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

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

Best Java code snippets using org.locationtech.geogig.storage.cache.SharedCache.contains (Showing top 8 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

/**
 * Checks whether a given {@link ObjectId} is already cached on this {@code ObjectCache}
 */
public boolean contains(ObjectId id) {
  return sharedCache.get().contains(keyPrefix.create(id));
}
origin: org.locationtech.geogig/geogig-core

/**
 * Checks whether a given {@link ObjectId} is already cached on this {@code ObjectCache}
 */
public boolean contains(ObjectId id) {
  return sharedCache.get().contains(keyPrefix.create(id));
}
origin: locationtech/geogig

public @Test void testContains() {
  when(mockSharedCache.contains(eq(k11))).thenReturn(false);
  when(mockSharedCache.contains(eq(k21))).thenReturn(true);
  assertFalse(cache1.contains(o1.getId()));
  assertTrue(cache2.contains(o1.getId()));
}
origin: org.locationtech.geogig/geogig-core

public @Test void testContains() {
  when(mockSharedCache.contains(eq(k11))).thenReturn(false);
  when(mockSharedCache.contains(eq(k21))).thenReturn(true);
  assertFalse(cache1.contains(o1.getId()));
  assertTrue(cache2.contains(o1.getId()));
}
origin: org.locationtech.geogig/geogig-core

public @Test void testKeyPrefix() {
  Key k1 = repo1Id.create(obj.getId());
  Key k2 = repo2Id.create(obj.getId());
  cache.put(k1, obj);
  assertTrue(cache.contains(k1));
  assertFalse(cache.contains(k2));
}
origin: locationtech/geogig

public @Test void testKeyPrefix() {
  cache = createCache(10, maxCacheSizeBytes);
  CacheKey k1 = repo1Id.create(obj.getId());
  CacheKey k2 = repo2Id.create(obj.getId());
  cache.put(k1, obj);
  assertTrue(cache.contains(k1));
  assertFalse(cache.contains(k2));
}
origin: locationtech/geogig

public @Test void testCacheDisabled() {
  cache = createCache(0, 0L);
  CacheKey k1 = repo1Id.create(obj.getId());
  cache.put(k1, obj);
  assertFalse(cache.contains(k1));
  assertEquals(0L, cache.sizeBytes());
}
origin: org.locationtech.geogig/geogig-core

public @Test void testCacheDisabled() {
  SharedCache cache = SharedCache.build(0L);
  Key k1 = repo1Id.create(obj.getId());
  cache.put(k1, obj);
  assertFalse(cache.contains(k1));
  assertEquals(0L, cache.sizeBytes());
}
org.locationtech.geogig.storage.cacheSharedCachecontains

Javadoc

Creates and returns a shared cache with the given maximum heap memory capacity in bytes.

This factory method does not check whether the provided maximum capacity exceeds any JVM limit, it's up to the calling code to make sure the provided capacity can be delivered by the JVM heap.

Popular methods of SharedCache

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

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
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