public abstract class BaseCacheFactory<Key,Value,Config> extends Object implements CascadingFactory<Config,CascadingCache<Key,Value>>
CascadingCache
instances. Each sub-assembly using
the CascadingCache
facilities has it's own sub-class of this factory so that different Caches
can be used for different parts of the same flow.
A CacheEvictionCallback
can be set and it will be given to each Cache instance created
by the factory. If none is set, the Factory will use CacheEvictionCallback.NULL
, which
is a no-op implementation of the CacheEvictionCallback
interface.Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CAPACITY
default capacity for all caches.
|
Constructor and Description |
---|
BaseCacheFactory() |
Modifier and Type | Method and Description |
---|---|
abstract CascadingCache<Key,Value> |
create(FlowProcess<? extends Config> flowProcess)
Method create will return a new instance of the type create by this factory.
|
void |
initialize(FlowProcess<? extends Config> flowProcess)
Method initialize will configure an initialize this factory instance.
|
public static final int DEFAULT_CAPACITY
public BaseCacheFactory()
public void initialize(FlowProcess<? extends Config> flowProcess)
CascadingFactory
initialize
in interface CascadingFactory<Config,CascadingCache<Key,Value>>
flowProcess
- of type FlowProcesspublic abstract CascadingCache<Key,Value> create(FlowProcess<? extends Config> flowProcess)
CascadingFactory
create
in interface CascadingFactory<Config,CascadingCache<Key,Value>>
flowProcess
- of type FlowProcessCopyright © 2007-2015 Concurrent, Inc. All Rights Reserved.