Examples of CacheFactory


Examples of org.shiftone.cache.CacheFactory

    private static final Log LOG = new Log(ReaperTestCase.class);

    public void testSoft() throws Exception
    {

        CacheFactory factory = new FifoCacheFactory();
        Cache        cache   = factory.newInstance("test", 10000, 10000);

        LOG.info("cache = " + cache);
        cache.addObject("test", "test");
        Thread.sleep(5000);
View Full Code Here

Examples of org.shiftone.cache.CacheFactory

    public void testProxy() throws Exception
    {

        List         list    = new ArrayList();
        CacheFactory factory = new SingleCacheFactory();
        Cache        cache   = factory.newInstance("proxyTest", 1000, 1);
        List         plist   = (List) CacheProxy.newProxyInstance(list, List.class, cache);

        System.out.println(plist.size());
        System.out.println(plist.add("test1"));
        System.out.println(plist.add("test2"));
View Full Code Here

Examples of org.shiftone.cache.CacheFactory

    {

        String       name             = factoryNode.getKey();
        String       factoryClassName = factoryNode.getValue();
        Class        factoryClass;
        CacheFactory cacheFactory;

        try
        {
            factoryClass = Class.forName(factoryClassName);
            cacheFactory = (CacheFactory) factoryClass.newInstance();
View Full Code Here

Examples of org.shiftone.cache.CacheFactory

    private void setFactoryProperties(Node factoryNode) throws ConfigurationException
    {

        String       name         = factoryNode.getKey();
        CacheFactory cacheFactory = getFactory(name);
        BeanWrapper  wrapper      = new BeanWrapper(cacheFactory);
        Iterator     iterator     = factoryNode.getChildren().iterator();
        Node         node;

        while (iterator.hasNext())
View Full Code Here

Examples of org.shiftone.cache.CacheFactory


    private void setFactoryProperty(String cacheName, BeanWrapper factoryWrapper, String name, String value) throws ConfigurationException
    {

        CacheFactory factory;

        try
        {
            Class type = factoryWrapper.getType(name);
View Full Code Here

Examples of org.shiftone.cache.CacheFactory

    private Cache            theTestCache;

    public MissHandlingCache createCache()
    {

        CacheFactory             cacheFactory     = new FifoCacheFactory();
        MissHandlingCacheFactory missCacheFactory = new MissHandlingCacheFactory();

        missCacheFactory.setDelegate(cacheFactory);
        missCacheFactory.setMissHandlerClass(TestMissHandler.class);
View Full Code Here

Examples of org.shiftone.cache.CacheFactory

    public void testCluster() throws Exception
    {

        CacheConfiguration config   = new CacheConfiguration();
        CacheFactory       factoryA = config.getCacheFactory("clusterA");
        CacheFactory       factoryB = config.getCacheFactory("clusterB");
        Cache              oneA     = factoryA.newInstance("one", 1000, 1000);
        Cache              oneB     = factoryB.newInstance("one", 1000, 1000);

        for (int i = 0; i < 1000; i++)
        {
            oneA.addObject("key" + i, "value");
            oneB.addObject("key" + i, "value");
View Full Code Here

Examples of railo.runtime.cache.eh.remote.rest.sax.CacheFactory

      connection.setRequestProperty("id", "getKeysWithExpiryCheck");
      connection.connect();
      InputStream is=null;
      try  {
        is=connection.getInputStream();
        return new CacheFactory(is).getMeta();
    }
      finally  {
        Util.closeEL(is);
        disconnectEL(connection);
      }
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.