Package com.caucho.env.distcache

Examples of com.caucho.env.distcache.DistCacheSystem


  {
    if ("jdbc".equals(_type) && _dataSource == null)
      throw new ConfigException(L.l("'jdbc' persistent-store requires a data-source"));
   
    if (_dataSource != null) {
      DistCacheSystem system = DistCacheSystem.getCurrent();

      system.setJdbcDataSource(_dataSource);
      /*
      if (system.getJdbcCacheManager() == null) {
        ResinSystem resinSystem = ResinSystem.getCurrent();
       
        JdbcCacheManager jdbcManager
View Full Code Here


    _localManager = cacheManager;
  }

  public static AbstractCache getMatchingCache(String name)
  {
    DistCacheSystem cacheService = DistCacheSystem.getCurrent();
   
    CacheManagerImpl localManager = cacheService.getCacheManager();

    String contextId = Environment.getEnvironmentName();

    String guid = contextId + ":" + name;
 
View Full Code Here

      _config.setCacheKey(_manager.createSelfHashKey(_config.getGuid(),
                                                     _config.getKeySerializer()));

      if (_localManager == null) {
        DistCacheSystem cacheService = DistCacheSystem.getCurrent();
       
        _localManager = cacheService.getCacheManager();
      }
     
      if (_localManager.putIfAbsent(_guid, this) != null) {
        if (ifAbsent) {
          close();
View Full Code Here

    throws ConfigException
  {
    if (_manager != null)
      return;
   
    DistCacheSystem cacheService = DistCacheSystem.getCurrent();

    if (cacheService == null)
      throw new ConfigException(L.l("'{0}' cannot be initialized because it is not in a clustered environment",
                                    getClass().getSimpleName()));

    _manager = cacheService.getDistCacheManager();

    if (_manager == null)
      throw new IllegalStateException("distributed cache manager not available");
  }
View Full Code Here

TOP

Related Classes of com.caucho.env.distcache.DistCacheSystem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.