Java Code Examples for net.oschina.j2cache.J2Cache#getChannel()

The following examples show how to use net.oschina.j2cache.J2Cache#getChannel() . 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: J2CacheRegionFactory.java    From J2Cache with Apache License 2.0 5 votes vote down vote up
@Override
public void start(Settings settings, Properties properties) throws CacheException {
    this.settings = settings;
    if (this.channel == null) {
        this.channel = J2Cache.getChannel();
    }
}
 
Example 2
Source File: J2CacheRegionFactory.java    From J2Cache with Apache License 2.0 5 votes vote down vote up
@Override
public void start(SessionFactoryOptions settings, Properties properties) throws CacheException {
    this.settings = settings;
    if (this.channel == null) {
        this.channel = J2Cache.getChannel();
    }
}
 
Example 3
Source File: J2CacheSpringCacheManageAdapter.java    From J2Cache with Apache License 2.0 4 votes vote down vote up
@Override
protected Cache getMissingCache(String name) {
    CacheChannel cacheChannel = j2CacheBuilder == null ? J2Cache.getChannel() : j2CacheBuilder.getChannel();
    return new J2CacheSpringCacheAdapter(allowNullValues, cacheChannel, name);
}
 
Example 4
Source File: J2CacheProvider.java    From J2Cache with Apache License 2.0 4 votes vote down vote up
@Override
public Cache buildCache(String regionName, Properties properties)
        throws CacheException {
    return new J2HibernateCache(regionName, J2Cache.getChannel());
}