public class StateTransferConfigurationBuilder extends AbstractClusteringConfigurationChildBuilder implements Builder<StateTransferConfiguration>
Modifier and Type | Field and Description |
---|---|
private java.lang.Boolean |
awaitInitialTransfer |
private int |
chunkSize |
private java.lang.Boolean |
fetchInMemoryState |
private static org.infinispan.util.logging.Log |
log |
private long |
timeout |
Constructor and Description |
---|
StateTransferConfigurationBuilder(ClusteringConfigurationBuilder builder) |
Modifier and Type | Method and Description |
---|---|
StateTransferConfigurationBuilder |
awaitInitialTransfer(boolean b)
If
true , this will cause the first call to method CacheManager.getCache() on the joiner node to
block and wait until the joining is complete and the cache has finished receiving state from neighboring caches
(if fetchInMemoryState is enabled). |
StateTransferConfigurationBuilder |
chunkSize(int i)
The state will be transferred in batches of
chunkSize cache entries. |
StateTransferConfiguration |
create()
Create the configuration bean
|
StateTransferConfigurationBuilder |
fetchInMemoryState(boolean b)
If
true , the cache will fetch data from the neighboring caches when it starts up, so
the cache starts 'warm', although it will impact startup time. |
StateTransferConfigurationBuilder |
read(StateTransferConfiguration template)
Reads the configuration from an already created configuration bean into this builder.
|
StateTransferConfigurationBuilder |
timeout(long l)
This is the maximum amount of time - in milliseconds - to wait for state from neighboring
caches, before throwing an exception and aborting startup.
|
StateTransferConfigurationBuilder |
timeout(long l,
java.util.concurrent.TimeUnit unit)
This is the maximum amount of time - in milliseconds - to wait for state from neighboring
caches, before throwing an exception and aborting startup.
|
java.lang.String |
toString() |
void |
validate()
Validate the data in this builder before building the configuration bean
|
async, getClusteringBuilder, hash, l1, stateTransfer, sync
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, getBuilder, indexing, invocationBatching, jmxStatistics, locking, persistence, security, sites, storeAsBinary, transaction, unsafe, versioning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
build, clustering, compatibility, customInterceptors, dataContainer, deadlockDetection, eviction, expiration, indexing, invocationBatching, jmxStatistics, locking, persistence, security, sites, storeAsBinary, transaction, unsafe, versioning
private static final org.infinispan.util.logging.Log log
private java.lang.Boolean fetchInMemoryState
private java.lang.Boolean awaitInitialTransfer
private int chunkSize
private long timeout
StateTransferConfigurationBuilder(ClusteringConfigurationBuilder builder)
public StateTransferConfigurationBuilder fetchInMemoryState(boolean b)
true
, the cache will fetch data from the neighboring caches when it starts up, so
the cache starts 'warm', although it will impact startup time.
In distributed mode, state is transferred between running caches as well, as the ownership of
keys changes (e.g. because a cache left the cluster). Disabling this setting means a key will
sometimes have less than numOwner
owners.public StateTransferConfigurationBuilder awaitInitialTransfer(boolean b)
true
, this will cause the first call to method CacheManager.getCache()
on the joiner node to
block and wait until the joining is complete and the cache has finished receiving state from neighboring caches
(if fetchInMemoryState is enabled). This option applies to distributed and replicated caches only and is enabled
by default. Please note that setting this to false
will make the cache object available immediately but
any access to keys that should be available locally but are not yet transferred will actually cause a (transparent)
remote access. While this will not have any impact on the logic of your application it might impact performance.public StateTransferConfigurationBuilder chunkSize(int i)
chunkSize
cache entries.
If chunkSize is equal to Integer.MAX_VALUE, the state will be transferred in all at once. Not recommended.public StateTransferConfigurationBuilder timeout(long l)
public StateTransferConfigurationBuilder timeout(long l, java.util.concurrent.TimeUnit unit)
public void validate()
Builder
validate
in interface Builder<StateTransferConfiguration>
public StateTransferConfiguration create()
Builder
create
in interface Builder<StateTransferConfiguration>
public StateTransferConfigurationBuilder read(StateTransferConfiguration template)
Builder
read
in interface Builder<StateTransferConfiguration>
template
- the configuration from which to "clone" this config if needed.public java.lang.String toString()
toString
in class java.lang.Object