Tabnine Logo
MapCache
Code IndexAdd Tabnine to your IDE (free)

How to use
MapCache
in
org.apache.shiro.cache

Best Java code snippets using org.apache.shiro.cache.MapCache (Showing top 6 results out of 315)

origin: apache/shiro

  @Override
  protected Cache<Serializable, Session> createCache(String name) throws CacheException {
    return new MapCache<Serializable, Session>(name, new ConcurrentHashMap<Serializable, Session>());
  }
});
origin: apache/shiro

/**
 * Returns a {@link MapCache} instance representing the named Hazelcast-managed
 * {@link com.hazelcast.core.IMap IMap}.  The Hazelcast Map is obtained by calling
 * {@link HazelcastInstance#getMap(String) hazelcastInstance.getMap(name)}.
 *
 * @param name the name of the cache to acquire.
 * @param <K> the type of map key
 * @param <V> the type of map value
 * @return a {@link MapCache} instance representing the named Hazelcast-managed {@link com.hazelcast.core.IMap IMap}.
 * @throws CacheException
 * @see HazelcastInstance#getMap(String)
 * @see #ensureHazelcastInstance()
 *
 */
public <K, V> Cache<K, V> getCache(String name) throws CacheException {
  Map<K, V> map = ensureHazelcastInstance().getMap(name); //returned map is a ConcurrentMap
  return new MapCache<K, V>(name, map);
}
origin: apache/shiro

  /**
   * Returns a new {@link MapCache MapCache} instance backed by a {@link SoftHashMap}.
   *
   * @param name the name of the cache
   * @return a new {@link MapCache MapCache} instance backed by a {@link SoftHashMap}.
   */
  @Override
  protected Cache createCache(String name) {
    return new MapCache<Object, Object>(name, new SoftHashMap<Object, Object>());
  }
}
origin: org.apache.shiro/shiro-core

  @Override
  protected Cache<Serializable, Session> createCache(String name) throws CacheException {
    return new MapCache<Serializable, Session>(name, new ConcurrentHashMap<Serializable, Session>());
  }
});
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

  @Override
  protected Cache<Serializable, Session> createCache(String name) throws CacheException {
    return new MapCache<Serializable, Session>(name, new ConcurrentHashMap<Serializable, Session>());
  }
});
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.shiro

  /**
   * Returns a new {@link MapCache MapCache} instance backed by a {@link SoftHashMap}.
   *
   * @param name the name of the cache
   * @return a new {@link MapCache MapCache} instance backed by a {@link SoftHashMap}.
   */
  @Override
  protected Cache createCache(String name) {
    return new MapCache<Object, Object>(name, new SoftHashMap<Object, Object>());
  }
}
org.apache.shiro.cacheMapCache

Javadoc

A MapCache is a Cache implementation that uses a backing Map instance to store and retrieve cached data.

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • getResourceAsStream (ClassLoader)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Permission (java.security)
    Legacy security code; do not use.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • IsNull (org.hamcrest.core)
    Is the value null?
  • CodeWhisperer alternatives
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