public class StateTransferConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
awaitInitialTransfer |
private int |
chunkSize |
private boolean |
fetchInMemoryState |
private java.lang.Boolean |
originalAwaitInitialTransfer |
private java.lang.Boolean |
originalFetchInMemoryState |
private long |
timeout |
Constructor and Description |
---|
StateTransferConfiguration(boolean fetchInMemoryState,
java.lang.Boolean originalFetchInMemoryState,
long timeout,
int chunkSize,
boolean awaitInitialTransfer,
java.lang.Boolean originalAwaitInitialTransfer) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitInitialTransfer()
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). |
int |
chunkSize()
If > 0, the state will be transferred in batches of
chunkSize cache entries. |
boolean |
equals(java.lang.Object o) |
boolean |
fetchInMemoryState()
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. |
int |
hashCode() |
protected java.lang.Boolean |
originalAwaitInitialTransfer()
We want to remember if the user didn't configure awaitInitialTransfer for the default cache.
|
protected java.lang.Boolean |
originalFetchInMemoryState()
We want to remember if the user didn't configure fetchInMemoryState for the default cache.
|
long |
timeout()
This is the maximum amount of time - in milliseconds - to wait for state from neighboring
caches, before throwing an exception and aborting startup.
|
StateTransferConfiguration |
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.
|
java.lang.String |
toString() |
private boolean fetchInMemoryState
private java.lang.Boolean originalFetchInMemoryState
private long timeout
private int chunkSize
private boolean awaitInitialTransfer
private java.lang.Boolean originalAwaitInitialTransfer
StateTransferConfiguration(boolean fetchInMemoryState, java.lang.Boolean originalFetchInMemoryState, long timeout, int chunkSize, boolean awaitInitialTransfer, java.lang.Boolean originalAwaitInitialTransfer)
public boolean fetchInMemoryState()
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.protected java.lang.Boolean originalFetchInMemoryState()
public long timeout()
public StateTransferConfiguration timeout(long l)
public int chunkSize()
chunkSize
cache entries.
If <= 0, the state will be transferred in all at once. Not recommended.public boolean awaitInitialTransfer()
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.protected java.lang.Boolean originalAwaitInitialTransfer()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object