Codota Logo
CacheManager.release
Code IndexAdd Codota to your IDE (free)

How to use
release
method
in
org.locationtech.geogig.storage.cache.CacheManager

Best Java code snippets using org.locationtech.geogig.storage.cache.CacheManager.release (Showing top 6 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: locationtech/geogig

public void tearDown() {
  CacheManager.INSTANCE.release(cache);
  // Preconditions.checkState(cache.sizeBytes() == 0);
}
origin: org.locationtech.geogig/geogig-core

public void tearDown() {
  CacheManager.INSTANCE.release(cache);
  // Preconditions.checkState(cache.sizeBytes() == 0);
}
origin: locationtech/geogig

@Override
public void close() {
  if (this.dataSource == null) {
    return;
  }
  DataSource ds = this.dataSource;
  SharedResourceReference res = this.resources;
  ObjectCache sharedCache = this.sharedCache;
  this.dataSource = null;
  this.resources = null;
  this.sharedCache = null;
  try {
    PGStorage.closeDataSource(ds);
  } finally {
    if (res != null) {
      SHARED_RESOURCES.release(res);
    }
    CacheManager.INSTANCE.release(sharedCache);
  }
}
origin: org.locationtech.geogig/geogig-postgres

@Override
public void close() {
  if (this.dataSource == null) {
    return;
  }
  DataSource ds = this.dataSource;
  SharedResourceReference res = this.resources;
  ObjectCache sharedCache = this.sharedCache;
  this.dataSource = null;
  this.resources = null;
  this.sharedCache = null;
  try {
    PGStorage.closeDataSource(ds);
  } finally {
    if (res != null) {
      SHARED_RESOURCES.release(res);
    }
    CacheManager.INSTANCE.release(sharedCache);
  }
}
origin: locationtech/geogig

public @Test void release() {
  ObjectCache cache1 = cacheManager.acquire("id1");
  ObjectCache cache2 = cacheManager.acquire("id1");
  ObjectCache cache3 = cacheManager.acquire("id2");
  assertNotNull(cache1);
  assertSame(cache1, cache2);
  assertNotNull(cache3);
  assertNotSame(cache1, cache3);
  cacheManager.release(cache1);
  cacheManager.release(cache2);
  ObjectCache cache4 = cacheManager.acquire("id1");
  assertNotNull(cache4);
  assertNotSame(cache1, cache4);
  ObjectCache cache5 = cacheManager.acquire("id2");
  assertSame(cache3, cache5);
}
origin: org.locationtech.geogig/geogig-core

public @Test void release() {
  ObjectCache cache1 = cacheManager.acquire("id1");
  ObjectCache cache2 = cacheManager.acquire("id1");
  ObjectCache cache3 = cacheManager.acquire("id2");
  assertNotNull(cache1);
  assertSame(cache1, cache2);
  assertNotNull(cache3);
  assertNotSame(cache1, cache3);
  cacheManager.release(cache1);
  cacheManager.release(cache2);
  ObjectCache cache4 = cacheManager.acquire("id1");
  assertNotNull(cache4);
  assertNotSame(cache1, cache4);
  ObjectCache cache5 = cacheManager.acquire("id2");
  assertSame(cache3, cache5);
}
org.locationtech.geogig.storage.cacheCacheManagerrelease

Javadoc

Indicates the client code that obtained the ObjectCache through the #acquiremethod does no longer need it and hence the cache manager is free to release the object cache if there are no more clients for it.

Popular methods of CacheManager

  • acquire
    Returns a RevObject cache Multiple invocations of this method for the same key are guaranteed to ret
  • getCacheSizePercent
  • getMaximumHeapSize
  • getMaximumSize
  • getMaximumSizeEnvVariable
  • getMaximumSizeSystemProperty
  • getSizeBytes
  • parseCacheSizeArgument
    Format: * {float} between 0 and 0.9: Size as percentage of available heap (e.g. 0 for zero cache
  • resolveDefaultMaxSize
    Resolves the default maximum cache size in bytes. If it's given by a valid value of the GEOGIG_CACHE
  • setMaximumSize
  • sharedCache
  • <init>
  • sharedCache,
  • <init>,
  • clear,
  • create,
  • doRelease,
  • getAbsoluteMaximumSize,
  • getAbsoluteMaximumSizeMB,
  • getDefaultSizeMB,
  • getEvictionCount

Popular in Java

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • onCreateOptionsMenu (Activity)
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • JLabel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now