Package com.volantis.xml.pipeline.sax.cache

Examples of com.volantis.xml.pipeline.sax.cache.CacheProcessConfiguration


        pipelineContextMock =
            new XMLPipelineContextMock("pipelineContextMock", expectations);
        final XMLPipeline pipeline =
            new XMLPipelineProcessImpl(pipelineContextMock);

        final CacheProcessConfiguration cacheProcessConfig =
            new CacheProcessConfiguration();
        cacheProcessConfig.createCache("cacheName", "100", "50");

        // initialize the process
        process = new CacheBodyOperationProcess();
        cache = cacheProcessConfig.getCache("cacheName");
        process.setCache(cache);
        process.setCacheName("cacheName");
        cacheKey = new CacheKey();
        cacheKey.addKey("cacheKey");
        process.setCacheKey(cacheKey);
View Full Code Here


        final String key = "key";

        CacheKey cacheKey = new CacheKey();
        cacheKey.addKey(key);

        final CacheProcessConfiguration cpc = new CacheProcessConfiguration();
        final String cacheName = "cache";
        cpc.createCache(cacheName, "10", "0");

        final Cache cache = cpc.getCache("cache");

        AsyncResult async = cache.asyncQuery(cacheKey, Period.inSeconds(30));

        assertFalse(async.isReady());
View Full Code Here

    // javadoc inherited
    protected void setUp() throws Exception {
        super.setUp();

        cpc = new CacheProcessConfiguration();
    }
View Full Code Here

        PipelineConfiguration configFileInfo =
                marinerConfiguration.getPipelineConfiguration();

        // Create the caches
        final CacheProcessConfiguration cacheProcessConfiguration;
        final CacheOperationConfiguration cacheOperationConfiguration =
            configFileInfo.getCacheOperationConfiguration();
        if (cacheOperationConfiguration != null) {
            // @todo this seems a bit inefficient, iterating over the same
            // collection twice. But the collection is expected to be small.
            // Leaving for now.
            int cacheSize = calculateTotalMaxEntries(
                    cacheOperationConfiguration.getCacheConfigurations());
            cacheProcessConfiguration = new CacheProcessConfiguration();
            createCaches(cacheProcessConfiguration,
                cacheOperationConfiguration.getCacheConfigurations());
            cacheProcessConfiguration.setFixedExpiryMode(
                cacheOperationConfiguration.isFixedExpiryMode());
        } else {
            cacheProcessConfiguration = new CacheProcessConfiguration();
        }

        pipelineConfig.storeConfiguration(CacheProcessConfiguration.class,
                cacheProcessConfiguration);
View Full Code Here

    /**
     * A method to flush all the pipeline caches.
     */
    public void flushAllPipelineCaches() {
        // flush named caches
        CacheProcessConfiguration cache =
            retrievePipelineCacheProcessConfiguration();
        cache.flushAllCaches();


        // flush URLContentCache
        URLContentCacheConfiguration contentCacheConfig = retrieveURLContentCacheConfiguration();
        Cache contentCache = contentCacheConfig.getCache();
View Full Code Here

     *
     * @param name the name of the cache to flush
     * @return false if pipeline cache with the specified name was not found
     */
    public boolean flushPipelineCache(final String name) {
        CacheProcessConfiguration config =
            retrievePipelineCacheProcessConfiguration();

        boolean result = false;
        try {
            config.getCache(name).getRootGroup().flush(null);
            result = true;
        } catch (RuntimeException e) {
            logger.error(e);

        }
View Full Code Here

     * @return the Cache.
     */
    private CacheProcessConfiguration retrievePipelineCacheProcessConfiguration() {
        final XMLPipelineConfiguration config =
                pipelineInitialization.getPipelineConfiguration();
        final CacheProcessConfiguration cpc = (CacheProcessConfiguration)
                config.retrieveConfiguration(CacheProcessConfiguration.class);
        return cpc;
    }
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.cache.CacheProcessConfiguration

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.