org.infinispan.loaders.decorators
Class SingletonStoreConfig

java.lang.Object
  extended by org.infinispan.config.AbstractConfigurationBean
      extended by org.infinispan.config.AbstractNamedCacheConfigurationBean
          extended by org.infinispan.loaders.decorators.SingletonStoreConfig
All Implemented Interfaces:
Serializable, Cloneable, CloneableConfigurationComponent, JAXBUnmarshallable

public class SingletonStoreConfig
extends AbstractNamedCacheConfigurationBean

SingletonStore is a delegating cache store used for situations when only one instance in a cluster should interact with the underlying store. The coordinator of the cluster will be responsible for the underlying CacheStore. SingletonStore is a simply facade to a real CacheStore implementation. It always delegates reads to the real CacheStore.

Since:
4.0
Author:
Manik Surtani, Vladimir Blagojevic
See Also:
Configuration reference, Serialized Form

Field Summary
protected  Boolean enabled
           
protected  Long pushStateTimeout
           
protected  Boolean pushStateWhenCoordinator
           
 
Fields inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
cr
 
Fields inherited from class org.infinispan.config.AbstractConfigurationBean
EMPTY_PROPERTIES, log, overriddenConfigurationElements
 
Constructor Summary
SingletonStoreConfig()
           
 
Method Summary
 void accept(ConfigurationBeanVisitor v)
           
 SingletonStoreConfig clone()
           
 Long getPushStateTimeout()
           
 Boolean isPushStateWhenCoordinator()
           
 Boolean isSingletonStoreEnabled()
           
 void setPushStateTimeout(Long pushStateTimeout)
          If pushStateWhenCoordinator is true, this property sets the maximum number of milliseconds that the process of pushing the in-memory state to the underlying cache loader should take.
 void setPushStateWhenCoordinator(Boolean pushStateWhenCoordinator)
          If true, when a node becomes the coordinator, it will transfer in-memory state to the underlying cache store.
 void setSingletonStoreEnabled(Boolean singletonStoreEnabled)
          If true, the singleton store cache store is enabled.
 
Methods inherited from class org.infinispan.config.AbstractNamedCacheConfigurationBean
hasComponentStarted, inject
 
Methods inherited from class org.infinispan.config.AbstractConfigurationBean
testImmutability, toTypedProperties, toTypedProperties, uc, willUnmarshall
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

enabled

protected Boolean enabled

pushStateWhenCoordinator

protected Boolean pushStateWhenCoordinator

pushStateTimeout

protected Long pushStateTimeout
Constructor Detail

SingletonStoreConfig

public SingletonStoreConfig()
Method Detail

isSingletonStoreEnabled

public Boolean isSingletonStoreEnabled()

setSingletonStoreEnabled

public void setSingletonStoreEnabled(Boolean singletonStoreEnabled)
If true, the singleton store cache store is enabled.

Parameters:
singletonStoreEnabled -

isPushStateWhenCoordinator

public Boolean isPushStateWhenCoordinator()

setPushStateWhenCoordinator

public void setPushStateWhenCoordinator(Boolean pushStateWhenCoordinator)
If true, when a node becomes the coordinator, it will transfer in-memory state to the underlying cache store. This can be very useful in situations where the coordinator crashes and there's a gap in time until the new coordinator is elected.

Parameters:
pushStateWhenCoordinator -

getPushStateTimeout

public Long getPushStateTimeout()

setPushStateTimeout

public void setPushStateTimeout(Long pushStateTimeout)
If pushStateWhenCoordinator is true, this property sets the maximum number of milliseconds that the process of pushing the in-memory state to the underlying cache loader should take.

Parameters:
pushStateTimeout -

clone

public SingletonStoreConfig clone()
Specified by:
clone in interface CloneableConfigurationComponent
Overrides:
clone in class AbstractNamedCacheConfigurationBean

accept

public void accept(ConfigurationBeanVisitor v)


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.