org.infinispan.loaders.file
Class FileCacheStoreConfig
java.lang.Object
org.infinispan.config.AbstractConfigurationBean
org.infinispan.config.AbstractNamedCacheConfigurationBean
org.infinispan.loaders.AbstractCacheLoaderConfig
org.infinispan.loaders.AbstractCacheStoreConfig
org.infinispan.loaders.LockSupportCacheStoreConfig
org.infinispan.loaders.file.FileCacheStoreConfig
- All Implemented Interfaces:
- Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable, CacheLoaderConfig, CacheStoreConfig
public class FileCacheStoreConfig
- extends LockSupportCacheStoreConfig
Configures FileCacheStore
. This allows you to tune a number of characteristics
of the FileCacheStore
.
- location - a location on disk where the store can write internal files. This defaults to
Infinispan-FileCacheStore in the current working directory.
- purgeSynchronously - whether
CacheStore.purgeExpired()
calls happen
synchronously or not. By default, this is set to false.
- purgerThreads - number of threads to use when purging. Defaults to 1 if purgeSynchronously
is true, ignored if false.
- streamBufferSize - when writing state to disk, a buffered stream is used. This
parameter allows you to tune the buffer size. Larger buffers are usually faster but take up more (temporary) memory,
resulting in more gc. By default, this is set to 8192.
- lockConcurrencyLevel - locking granularity is per file bucket. This setting defines the number of
shared locks to use. The more locks you have, the better your concurrency will be, but more locks take up more
memory. By default, this is set to 2048.
- lockAcquistionTimeout - the length of time, in milliseconds, to wait for locks
before timing out and throwing an exception. By default, this is set to 60000.
- Since:
- 4.0
- Author:
- Manik Surtani
- See Also:
- Serialized Form
Methods inherited from class org.infinispan.loaders.AbstractCacheStoreConfig |
accept, asyncStore, clone, equals, equalsExcludingProperties, getAsyncStoreConfig, getPurgerThreads, getSingletonStoreConfig, getTypedProperties, hashCode, hashCodeExcludingProperties, isFetchPersistentState, isIgnoreModifications, isPurgeOnStartup, isPurgeSynchronously, purgerThreads, setAsyncStoreConfig, setFetchPersistentState, setIgnoreModifications, setPurgeOnStartup, setPurgerThreads, setPurgeSynchronously, setSingletonStoreConfig, setTypedProperties, singletonStore |
FileCacheStoreConfig
public FileCacheStoreConfig()
getLocation
public String getLocation()
setLocation
@Deprecated
public void setLocation(String location)
- Deprecated. The visibility of this will be reduced, use
location(String)
location
public FileCacheStoreConfig location(String location)
getStreamBufferSize
public int getStreamBufferSize()
setStreamBufferSize
@Deprecated
public void setStreamBufferSize(int streamBufferSize)
- Deprecated. The visibility of this will be reduced, use
streamBufferSize(int)
instead
streamBufferSize
public FileCacheStoreConfig streamBufferSize(int streamBufferSize)
purgeOnStartup
public FileCacheStoreConfig purgeOnStartup(Boolean purgeOnStartup)
- Description copied from class:
AbstractCacheStoreConfig
- If true, purges this cache store when it starts up.
- Specified by:
purgeOnStartup
in interface CacheStoreConfig
- Overrides:
purgeOnStartup
in class AbstractCacheStoreConfig
purgeSynchronously
public FileCacheStoreConfig purgeSynchronously(Boolean purgeSynchronously)
- Description copied from class:
AbstractCacheStoreConfig
- If true, CacheStore#purgeExpired() call will be done synchronously
- Specified by:
purgeSynchronously
in interface CacheStoreConfig
- Overrides:
purgeSynchronously
in class AbstractCacheStoreConfig
fetchPersistentState
public FileCacheStoreConfig fetchPersistentState(Boolean fetchPersistentState)
- Description copied from class:
AbstractCacheStoreConfig
- If true, fetch persistent state when joining a cluster. If multiple cache stores are chained,
only one of them can have this property enabled. Persistent state transfer with a shared cache
store does not make sense, as the same persistent store that provides the data will just end
up receiving it. Therefore, if a shared cache store is used, the cache will not allow a
persistent state transfer even if a cache store has this property set to true. Finally,
setting it to true only makes sense if in a clustered environment, and only 'replication' and
'invalidation' cluster modes are supported.
- Specified by:
fetchPersistentState
in interface CacheStoreConfig
- Overrides:
fetchPersistentState
in class AbstractCacheStoreConfig
ignoreModifications
public FileCacheStoreConfig ignoreModifications(Boolean ignoreModifications)
- Description copied from class:
AbstractCacheStoreConfig
- If true, any operation that modifies the cache (put, remove, clear, store...etc) won't be
applied to the cache store. This means that the cache store could become out of sync with the
cache.
- Specified by:
ignoreModifications
in interface CacheStoreConfig
- Overrides:
ignoreModifications
in class AbstractCacheStoreConfig
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.