Examples of CacheFactory


Examples of org.apache.oodt.cas.filemgr.ingest.CacheFactory

        return null;
    }
   
    public static Cache getCacheFromFactory(String serviceFactory){
        CacheFactory factory = null;
        Class<CacheFactory> clazz = null;

        try {
            clazz = (Class<CacheFactory>) Class.forName(serviceFactory);
            factory = clazz.newInstance();
            return factory.createCache();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
            LOG.log(Level.WARNING,
                    "ClassNotFoundException when loading cache factory class "
                            + serviceFactory + " Message: " + e.getMessage());
View Full Code Here

Examples of org.castor.cache.CacheFactory

    }

    public TestNoCacheFactory(final String name) { super(name); }

    public void testConstructor() {
        CacheFactory cf = new NoCacheFactory();
        assertTrue(cf instanceof NoCacheFactory);
    }
View Full Code Here

Examples of org.gradle.cache.internal.CacheFactory

                get(IGradlePropertiesLoader.class),
                new InstantiatingBuildLoader(get(IProjectFactory.class)));
    }

    protected CacheRepository createCacheRepository() {
        CacheFactory factory = get(CacheFactory.class);
        StartParameter startParameter = get(StartParameter.class);
        DefaultCacheScopeMapping scopeMapping = new DefaultCacheScopeMapping(startParameter.getGradleUserHomeDir(), startParameter.getProjectCacheDir(), GradleVersion.current());
        return new DefaultCacheRepository(
                scopeMapping,
                factory);
View Full Code Here

Examples of org.jasig.portal.utils.cache.CacheFactory

                }

                if(CACHE_CHANNELS) {
                    // try to obtain rendering from cache
                    if(channel instanceof ICacheable ) {
                        final CacheFactory cacheFactory = CacheFactoryLocator.getCacheFactory();
                        final Map<Serializable, ChannelCacheEntry> systemCache = cacheFactory.getCache(SYSTEM_WIDE_CHANNEL_CACHE);
                       
                        ChannelCacheKey key=((ICacheable)channel).generateKey();
                        if (log.isTraceEnabled()) {
                            log.trace("Generated cache key " + (key != null ? key.getKey() : null) + " for worker " + this.toString());
                        }
View Full Code Here

Examples of org.jboss.cache.CacheFactory

      this.providerFactory = providerFactory;
   }

   public void start()
   {
      CacheFactory factory = new DefaultCacheFactory();
      ExpirationAlgorithmConfig exp = new ExpirationAlgorithmConfig();
      exp.setMaxNodes(maxSize);

      EvictionRegionConfig evictionRegionConfig = new EvictionRegionConfig(RegionManagerImpl.DEFAULT_REGION);
      evictionRegionConfig.setEvictionAlgorithmConfig(exp);

      EvictionConfig evictConfig = new EvictionConfig();
      evictConfig.setDefaultEvictionRegionConfig(evictionRegionConfig);
      evictConfig.setWakeupInterval(wakeupInterval);


      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setEvictionConfig(evictConfig);

      cache = factory.createCache(config, true);

      ServerCacheHitInterceptor hit = new ServerCacheHitInterceptor(this);
      ServerCacheInterceptor interceptor = new ServerCacheInterceptor(this);

      getProviderFactory().getServerPreProcessInterceptorRegistry().register(hit);
View Full Code Here

Examples of org.jboss.cache.CacheFactory

   * @param mySessionFactory
   */
  private void registerAllJBossTreeCacheMBeans() {
      try {
        log.info("start to register all JBoss Treecache MBeans...");
        CacheFactory factory = new DefaultCacheFactory();
        Cache cache = factory.createCache("treecache.xml");
        ObjectName cacheObjectName = new ObjectName("jboss.cache:service=Cache");
        JmxRegistrationManager jmxRegistrationManager = new JmxRegistrationManager(server, cache, cacheObjectName );
        jmxRegistrationManager.registerAllMBeans();
        log.info("registered all JBoss Treecache MBeans");
      } catch (MalformedObjectNameException e) {
View Full Code Here

Examples of org.jboss.cache.CacheFactory

   {
      log.debug("Starting JBoss Cache");

      try
      {
         CacheFactory factory = new DefaultCacheFactory();
         cache = factory.createCache(getConfigurationAsStream());

         cache.create();
         cache.start();
      }
      catch (Exception e)
View Full Code Here

Examples of org.jboss.cache.CacheFactory

   private void buildCache(List<CustomInterceptorConfig> interceptorConfig)
   {
      Configuration config = new Configuration();
      config.setCacheMode(Configuration.CacheMode.LOCAL);
      config.setNodeLockingScheme(Configuration.NodeLockingScheme.MVCC);
      CacheFactory cacheFactory2 = new UnitTestCacheFactory<Object, Object>();
      CacheSPI tmpCacheSPI = (CacheSPI) cacheFactory2.createCache(config);
      defaultInterceptroCount = tmpCacheSPI.getInterceptorChain().size();
      tmpCacheSPI.stop();

      CacheFactory cacheFactory = new UnitTestCacheFactory<Object, Object>();
      config.setCustomInterceptors(interceptorConfig);
      cache = (CacheSPI) cacheFactory.createCache(config, true);
   }
View Full Code Here

Examples of org.jboss.cache.CacheFactory

   @Test(enabled = false)
   public static void main(String[] args)
   {
      Configuration localConfig = UnitTestCacheConfigurationFactory.createConfiguration(Configuration.CacheMode.REPL_SYNC);
      localConfig.setExposeManagementStatistics(true);
      CacheFactory cacheFactory = new DefaultCacheFactory();
      Cache cache = cacheFactory.createCache(localConfig);
      JmxRegistrationManager regManager = new JmxRegistrationManager(cache);
      while (true){}
   }
View Full Code Here

Examples of org.jboss.cache.CacheFactory

   static boolean notificationsReceived = true;

   @BeforeMethod
   public void setUp() throws CloneNotSupportedException
   {
      CacheFactory cf = new UnitTestCacheFactory<Object, Object>();
      Configuration conf = new Configuration();
      conf.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      BuddyReplicationConfig brc = new BuddyReplicationConfig();
      brc.setEnabled(true);
      conf.setBuddyReplicationConfig(brc);
     
      c1 = cf.createCache(conf, false);
      c2 = cf.createCache(conf.clone(), false);
      c3 = cf.createCache(conf.clone(), false);

      c1.start();
      c2.start();
      c3.start();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.