Codota Logo
SharedCache.invalidateAll
Code IndexAdd Codota to your IDE (free)

How to use
invalidateAll
method
in
org.locationtech.geogig.storage.cache.SharedCache

Best Java code snippets using org.locationtech.geogig.storage.cache.SharedCache.invalidateAll (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: locationtech/geogig

@Override
public void clear() {
  if (_SHARED_CACHE != null) {
    _SHARED_CACHE.invalidateAll();
  }
}
origin: org.locationtech.geogig/geogig-core

@Override
public void clear() {
  if (_SHARED_CACHE != null) {
    _SHARED_CACHE.invalidateAll();
  }
}
origin: locationtech/geogig

/**
 * Prunes this {@code ObjectCache}, making all its entries available for GC.
 */
public void invalidateAll() {
  sharedCache.get().invalidateAll(keyPrefix);
}
origin: org.locationtech.geogig/geogig-core

/**
 * Prunes this {@code ObjectCache}, making all its entries available for GC.
 */
public void invalidateAll() {
  sharedCache.get().invalidateAll(keyPrefix);
}
origin: locationtech/geogig

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

@Override
public void setMaximumSize(long maxSizeBytes) throws IllegalArgumentException {
  final long absoluteMaximumSize = getAbsoluteMaximumSize();
  checkArgument(maxSizeBytes >= 0 && maxSizeBytes <= absoluteMaximumSize,
      "Cache max size must be between 0 and %s, got %s", absoluteMaximumSize,
      maxSizeBytes);
  SharedCache cache = SharedCache.build(maxSizeBytes);
  SharedCache old = _SHARED_CACHE;
  _SHARED_CACHE = cache;
  if (old != null) {
    old.invalidateAll();
  }
  this.currentMaxCacheSize = maxSizeBytes;
}
origin: locationtech/geogig

_SHARED_CACHE = cache;
if (old != null) {
  old.invalidateAll();
origin: locationtech/geogig

public @Test void testInvalidateAll() {
  cache1.invalidateAll();
  verify(mockSharedCache, times(1)).invalidateAll(eq(cacheId1));
}
origin: org.locationtech.geogig/geogig-core

public @Test void testInvalidateAll() {
  cache1.invalidateAll();
  verify(mockSharedCache, times(1)).invalidateAll(eq(cacheId1));
}
origin: org.locationtech.geogig/geogig-core

public @Test void testInvalidateAllForPrefix() {
  final int L1Capacity = 10;
  SharedCache cache = SharedCache.build(L1Capacity, 16 * 1024 * 1024);
  List<RevObject> objects = createObjects(100);
  objects.forEach((o) -> cache.put(repo1Id.create(o.getId()), o));
  objects.forEach((o) -> cache.put(repo2Id.create(o.getId()), o));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  cache.invalidateAll(repo2Id);
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  cache.invalidateAll(repo1Id);
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo1Id.create(o.getId()))));
}
origin: locationtech/geogig

@Ignore // too fragile depending on the jvm test heap
public @Test void testInvalidateAllForPrefix() {
  final int L1Capacity = 10;
  cache = createCache(L1Capacity, 32 * 1024 * 1024);
  List<RevObject> objects = createObjects(100);
  objects.forEach((o) -> cache.put(repo1Id.create(o.getId()), o));
  objects.forEach((o) -> cache.put(repo2Id.create(o.getId()), o));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  cache.invalidateAll(repo2Id);
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  cache.invalidateAll(repo1Id);
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo1Id.create(o.getId()))));
}
origin: org.locationtech.geogig/geogig-core

public @Test void testInvalidateAll() {
  final int L1Capacity = 10;
  SharedCache cache = SharedCache.build(L1Capacity, 16 * 1024 * 1024);
  List<RevObject> objects = createObjects(500);
  objects.forEach((o) -> cache.put(repo1Id.create(o.getId()), o));
  objects.forEach((o) -> cache.put(repo2Id.create(o.getId()), o));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  cache.invalidateAll();
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo1Id.create(o.getId()))));
}
origin: locationtech/geogig

@Ignore // too fragile depending on the jvm test heap
public @Test void testInvalidateAll() {
  final int L1Capacity = 10;
  cache = createCache(L1Capacity, 32 * 1024 * 1024);
  List<RevObject> objects = createObjects(500);
  objects.forEach((o) -> cache.put(repo1Id.create(o.getId()), o));
  objects.forEach((o) -> cache.put(repo2Id.create(o.getId()), o));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo1Id.create(o.getId()))));
  objects.forEach((o) -> assertNotNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  cache.invalidateAll();
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo2Id.create(o.getId()))));
  objects.forEach((o) -> assertNull(cache.getIfPresent(repo1Id.create(o.getId()))));
}
org.locationtech.geogig.storage.cacheSharedCacheinvalidateAll

Popular methods of SharedCache

  • sizeBytes
  • build
    Creates and returns a shared cache with the given maximum heap memory capacity in bytes. This factor
  • contains
  • getIfPresent
  • getStats
  • invalidate
  • objectCount
  • put
  • setEncoder
  • dispose

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • addToBackStack (FragmentTransaction)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • 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
  • PriorityQueue (java.util)
    An unbounded priority Queue based on a priority heap. The elements of the priority queue are ordered
  • JCheckBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
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