Package com.tangosol.net

Examples of com.tangosol.net.CacheService


      typeMap = CacheFactory.getCache(AUTO_POF_MAPPING);
    }
    else {
      Cluster cluster = CacheFactory.getCluster();
      if (cluster.getServiceInfo(AUTO_POF_SERVICE) != null) {
        CacheService service = (CacheService) cluster.getService(AUTO_POF_SERVICE);
        typeMap = service.ensureCache(AUTO_POF_MAPPING, null);
      }
      else {
        XmlElement xml = XmlHelper.loadXml(XML_FRAGMENT);
        typeMap = new DefaultConfigurableCacheFactory(xml).ensureCache(AUTO_POF_MAPPING, null);
      }
View Full Code Here


         return Collections.singletonMap(nc.getCacheName(), getOwnedSize());
      }

      @Override
      public int getNumReplicas() {
         CacheService service = nc.getCacheService();
         if (service instanceof PartitionedService) {
            return ((PartitionedService) service).getBackupCount() + 1;
         } else if (service instanceof ReplicatedCache) {
            return service.getCluster().getMemberSet().size();
         } else {
            return 1;
         }
      }
View Full Code Here

TOP

Related Classes of com.tangosol.net.CacheService

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.