Java Code Examples for net.sf.ehcache.config.CacheConfiguration#overflowToDisk()

The following examples show how to use net.sf.ehcache.config.CacheConfiguration#overflowToDisk() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EHCacheTokenStore.java    From steady with Apache License 2.0 5 votes vote down vote up
public EHCacheTokenStore(String key, Bus b, URL configFileURL) {
    bus = b;
    if (bus != null) {
        b.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(this);
    }

    cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL);
    // Cannot overflow to disk as SecurityToken Elements can't be serialized
    CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
    cc.overflowToDisk(false); //tokens not writable
    
    Ehcache newCache = new Cache(cc);
    cache = cacheManager.addCacheIfAbsent(newCache);
}
 
Example 2
Source File: EHCacheTokenStore.java    From steady with Apache License 2.0 5 votes vote down vote up
public EHCacheTokenStore(String key, Bus b, URL configFileURL) {
    bus = b;
    if (bus != null) {
        b.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(this);
    }

    cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL);
    // Cannot overflow to disk as SecurityToken Elements can't be serialized
    CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
    cc.overflowToDisk(false); //tokens not writable
    
    Ehcache newCache = new Cache(cc);
    cache = cacheManager.addCacheIfAbsent(newCache);
}
 
Example 3
Source File: EHCacheTokenStore.java    From steady with Apache License 2.0 5 votes vote down vote up
public EHCacheTokenStore(String key, Bus b, URL configFileURL) {
    bus = b;
    if (bus != null) {
        b.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(this);
    }

    cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL);
    // Cannot overflow to disk as SecurityToken Elements can't be serialized
    CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
    cc.overflowToDisk(false); //tokens not writable
    
    Ehcache newCache = new Cache(cc);
    cache = cacheManager.addCacheIfAbsent(newCache);
}
 
Example 4
Source File: EHCacheTokenStore.java    From steady with Apache License 2.0 5 votes vote down vote up
public EHCacheTokenStore(String key, Bus b, URL configFileURL) {
    bus = b;
    if (bus != null) {
        b.getExtension(BusLifeCycleManager.class).registerLifeCycleListener(this);
    }

    cacheManager = EHCacheManagerHolder.getCacheManager(bus, configFileURL);
    // Cannot overflow to disk as SecurityToken Elements can't be serialized
    CacheConfiguration cc = EHCacheManagerHolder.getCacheConfiguration(key, cacheManager);
    cc.overflowToDisk(false); //tokens not writable
    
    Ehcache newCache = new Cache(cc);
    cache = cacheManager.addCacheIfAbsent(newCache);
}