Tabnine Logo
CachePool.returnCache
Code IndexAdd Tabnine to your IDE (free)

How to use
returnCache
method
in
org.apache.polygene.spi.cache.CachePool

Best Java code snippets using org.apache.polygene.spi.cache.CachePool.returnCache (Showing top 4 results out of 315)

origin: org.apache.polygene.core/org.apache.polygene.core.spi

@Override
public void tearDownJSONMapES()
  throws Exception
{
  if( caching != null )
  {
    caching.returnCache( cache );
    cache = null;
  }
}
origin: apache/attic-polygene-java

@Override
public void tearDownJSONMapES()
  throws Exception
{
  if( caching != null )
  {
    caching.returnCache( cache );
    cache = null;
  }
}
origin: apache/attic-polygene-java

  @Test
  public void givenCacheWithValueWhenDroppingReferenceAndRequestNewCacheAndItsValueExpectItToBeGone()
  {
    cache.put( "Habba", "Zout" );
    assertEquals( "Zout", cache.get( "Habba" ) );
    cachePool.returnCache( cache );
    cache = cachePool.fetchCache( "1", String.class );
    assertNull( "Value not missing", cache.get( "Habba" ) );
  }
}
origin: org.apache.polygene.core/org.apache.polygene.core.testsupport

  @Test
  public void givenCacheWithValueWhenDroppingReferenceAndRequestNewCacheAndItsValueExpectItToBeGone()
  {
    cache.put( "Habba", "Zout" );
    assertEquals( "Zout", cache.get( "Habba" ) );
    cachePool.returnCache( cache );
    cache = cachePool.fetchCache( "1", String.class );
    assertNull( "Value not missing", cache.get( "Habba" ) );
  }
}
org.apache.polygene.spi.cacheCachePoolreturnCache

Javadoc

Returns the cache back to the pool. The reference count for the cache must then be decreased and if the count reaches zero, the Cache should be destroyed and cleared from memory.

Popular methods of CachePool

  • fetchCache
    Fetches a cache from the pool. If the cache does not exist already, then a new Cache should be creat

Popular in Java

  • Running tasks concurrently on multiple threads
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • getSharedPreferences (Context)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Table (org.hibernate.mapping)
    A relational table
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now