Tabnine Logo
org.apache.shindig.common.cache
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.shindig.common.cache

Best Java code snippets using org.apache.shindig.common.cache (Showing top 20 results out of 315)

origin: org.gatein.shindig/shindig-gadgets

DefaultInvalidationService(HttpCache httpCache, CacheProvider cacheProvider, AtomicLong marker) {
 this.httpCache = httpCache;
 invalidationEntries = cacheProvider.createCache(CACHE_NAME);
 this.marker = marker;
}
origin: org.gatein.shindig/shindig-gadgets

 @Override
 protected HttpResponse removeResponseImpl(String key) {
  return cache.removeElement(key);
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

 @Override
 protected synchronized boolean removeEldestEntry(Map.Entry<K, V> eldest) {
  return size() > capacity;
 }
}
origin: org.apache.shindig/shindig-common

private SoftExpiringCache<String, String> makeSoftExpiringCache() {
 SoftExpiringCache<String, String> expiringCache = new SoftExpiringCache<String, String>(cache);
 expiringCache.setTimeSource(timeSource);
 return expiringCache;
}
origin: org.apache.shindig/shindig-common

 @Test
 public void testMissingValue() {
  SoftExpiringCache<String, String> expiringCache = makeSoftExpiringCache();
  assertNull(expiringCache.getElement("not set"));
 }
}
origin: org.apache.shindig/shindig-gadgets

@Override
protected void addResponseImpl(String key, HttpResponse response) {
 cache.addElement(key, response);
}
origin: org.apache.shindig/shindig-gadgets

 private boolean shouldCache() {
  return parsedCssCache != null && parsedCssCache.getCapacity() != 0;
 }
}
origin: com.lmco.shindig/shindig-common

private SoftExpiringCache<String, String> makeSoftExpiringCache() {
 SoftExpiringCache<String, String> expiringCache = new SoftExpiringCache<String, String>(cache);
 expiringCache.setTimeSource(timeSource);
 return expiringCache;
}
origin: org.wso2.org.apache.shindig/shindig-common

 @Test
 public void testMissingValue() {
  SoftExpiringCache<String, String> expiringCache = makeSoftExpiringCache();
  assertNull(expiringCache.getElement("not set"));
 }
}
origin: com.lmco.shindig/shindig-gadgets

DefaultInvalidationService(HttpCache httpCache, CacheProvider cacheProvider, AtomicLong marker) {
 this.httpCache = httpCache;
 invalidationEntries = cacheProvider.createCache(CACHE_NAME);
 this.marker = marker;
}
origin: org.apache.shindig/shindig-common

 @Override
 protected synchronized boolean removeEldestEntry(Map.Entry<K, V> eldest) {
  return size() > capacity;
 }
}
origin: com.lmco.shindig/shindig-gadgets

 @Override
 protected HttpResponse removeResponseImpl(String key) {
  return cache.removeElement(key);
 }
}
origin: apache/shindig

private SoftExpiringCache<String, String> makeSoftExpiringCache() {
 SoftExpiringCache<String, String> expiringCache = new SoftExpiringCache<String, String>(cache);
 expiringCache.setTimeSource(timeSource);
 return expiringCache;
}
origin: org.gatein.shindig/shindig-common

 @Test
 public void testMissingValue() {
  SoftExpiringCache<String, String> expiringCache = makeSoftExpiringCache();
  assertNull(expiringCache.getElement("not set"));
 }
}
origin: org.apache.shindig/shindig-gadgets

DefaultInvalidationService(HttpCache httpCache, CacheProvider cacheProvider, AtomicLong marker) {
 this.httpCache = httpCache;
 invalidationEntries = cacheProvider.createCache(CACHE_NAME);
 this.marker = marker;
}
origin: org.gatein.shindig/shindig-common

 @Override
 protected synchronized boolean removeEldestEntry(Map.Entry<K, V> eldest) {
  return size() > capacity;
 }
}
origin: org.apache.shindig/shindig-gadgets

 @Override
 protected void removeResponseImpl(String key) {
  cache.removeElement(key);
 }
}
origin: org.wso2.org.apache.shindig/shindig-common

private SoftExpiringCache<String, String> makeSoftExpiringCache() {
 SoftExpiringCache<String, String> expiringCache = new SoftExpiringCache<String, String>(cache);
 expiringCache.setTimeSource(timeSource);
 return expiringCache;
}
origin: com.lmco.shindig/shindig-common

private LruCache<Object, Object> getCache(CacheProvider provider, String name) {
 Cache<Object, Object> base = provider.createCache(name);
 return (LruCache<Object, Object>)base;
}
origin: com.lmco.shindig/shindig-common

 @Override
 protected synchronized boolean removeEldestEntry(Map.Entry<K, V> eldest) {
  return size() > capacity;
 }
}
org.apache.shindig.common.cache

Most used classes

  • Cache
    A basic cache interface. If necessary, we can always move to the commons cache for the future.
  • CacheProvider
    Interface for Shindig caches.
  • LruCache
    A basic LRU cache. Prefer using EhCache for most purposes to this class.
  • LruCacheProvider
    A cache provider that always produces LRU caches. LRU cache sizes can be configured by specifying pr
  • SoftExpiringCache
    A cache that uses a soft expiration policy. Entries will be kept around for potentially as long as t
  • NullCache,
  • LruCacheProviderTest$1,
  • LruCacheProviderTest,
  • SoftExpiringCache$CachedObject,
  • SoftExpiringCacheTest,
  • EhCacheModule,
  • EhConfiguredCache
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