Tabnine Logo
J2CacheConfig.setL2CacheName
Code IndexAdd Tabnine to your IDE (free)

How to use
setL2CacheName
method
in
net.oschina.j2cache.J2CacheConfig

Best Java code snippets using net.oschina.j2cache.J2CacheConfig.setL2CacheName (Showing top 2 results out of 315)

origin: sanluan/PublicCMS

@Override
public void init(String region, Properties properties) {
  this.region = region;
  J2CacheConfig config = new J2CacheConfig();
  config.setSerialization(properties.getProperty("j2cache.serialization"));
  config.setBroadcast(properties.getProperty("j2cache.broadcast"));
  config.setL1CacheName(properties.getProperty("j2cache.L1.provider_class"));
  config.setL2CacheName(properties.getProperty("j2cache.L2.provider_class"));
  config.setSyncTtlToRedis(!"false".equalsIgnoreCase(properties.getProperty("j2cache.sync_ttl_to_redis")));
  config.setDefaultCacheNullObject("true".equalsIgnoreCase(properties.getProperty("j2cache.default_cache_null_object")));
  String l2_config_section = properties.getProperty("j2cache.L2.config_section");
  if (l2_config_section == null || l2_config_section.trim().equals("")) {
    l2_config_section = config.getL2CacheName();
  }
  final String l2_section = l2_config_section;
  properties.forEach((k, v) -> {
    String key = (String) k;
    if (key.startsWith(config.getBroadcast() + ".")) {
      config.getBroadcastProperties().setProperty(key.substring((config.getBroadcast() + ".").length()), (String) v);
    }
    if (key.startsWith(config.getL1CacheName() + ".")) {
      config.getL1CacheProperties().setProperty(key.substring((config.getL1CacheName() + ".").length()), (String) v);
    }
    if (key.startsWith(l2_section + ".")) {
      config.getL2CacheProperties().setProperty(key.substring((l2_section + ".").length()), (String) v);
    }
  });
  J2CacheBuilder builder = J2CacheBuilder.init(config);
  channel = builder.getChannel();
}
origin: nutzam/nutzboot

j2CacheConfig.setL1CacheProperties(nb_l1CacheProperties);
j2CacheConfig.setSerialization(nb_serialization);
j2CacheConfig.setL2CacheName(nb_l2CacheName);
j2CacheConfig.setL2CacheProperties(nb_l2CacheProperties);
j2CacheConfig.setSyncTtlToRedis(Boolean.parseBoolean(nb_syncTtlToRedis));
net.oschina.j2cacheJ2CacheConfigsetL2CacheName

Popular methods of J2CacheConfig

  • <init>
  • getL2CacheName
  • getL2CacheProperties
  • getBroadcast
  • getBroadcastProperties
  • getL1CacheName
  • getL1CacheProperties
  • setBroadcast
  • setL1CacheName
  • setSerialization
  • setSyncTtlToRedis
  • getConfigStream
    get j2cache properties stream
  • setSyncTtlToRedis,
  • getConfigStream,
  • getSerialization,
  • getSubProperties,
  • initFromConfig,
  • isDefaultCacheNullObject,
  • isSyncTtlToRedis,
  • setBroadcastProperties,
  • setDefaultCacheNullObject

Popular in Java

  • Parsing JSON documents to java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 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