public class RingbufferConfigReadOnly extends RingbufferConfig
DEFAULT_ASYNC_BACKUP_COUNT, DEFAULT_CAPACITY, DEFAULT_IN_MEMORY_FORMAT, DEFAULT_SYNC_BACKUP_COUNT, DEFAULT_TTL_SECONDS| Constructor and Description |
|---|
RingbufferConfigReadOnly(RingbufferConfig config) |
| Modifier and Type | Method and Description |
|---|---|
RingbufferStoreConfig |
getRingbufferStoreConfig()
Get the RingbufferStore (load and store ringbuffer items from/to a database)
configuration.
|
RingbufferConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups.
|
RingbufferConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups.
|
RingbufferConfig |
setCapacity(int capacity)
Sets the capacity of the ringbuffer.
|
RingbufferConfig |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Sets the in-memory format.
|
RingbufferConfig |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for this ringbuffer. |
RingbufferConfig |
setRingbufferStoreConfig(RingbufferStoreConfig ringbufferStoreConfig)
Set the RingbufferStore (load and store ringbuffer items from/to a database)
configuration.
|
RingbufferConfig |
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection name for operations.
|
RingbufferConfig |
setTimeToLiveSeconds(int timeToLiveSeconds)
Sets the time to live in seconds which is the maximum number of seconds
for each item to stay in the ringbuffer before being removed.
|
equals, getAsyncBackupCount, getBackupCount, getCapacity, getClassId, getFactoryId, getInMemoryFormat, getMergePolicyConfig, getName, getProvidedMergeTypes, getSplitBrainProtectionName, getTimeToLiveSeconds, getTotalBackupCount, hashCode, readData, setName, toString, writeDatapublic RingbufferConfigReadOnly(RingbufferConfig config)
public RingbufferStoreConfig getRingbufferStoreConfig()
RingbufferConfiggetRingbufferStoreConfig in class RingbufferConfigpublic RingbufferConfig setCapacity(int capacity)
RingbufferConfigsetCapacity in class RingbufferConfigcapacity - the capacityRingbufferConfig.getCapacity()public RingbufferConfig setAsyncBackupCount(int asyncBackupCount)
RingbufferConfigsetAsyncBackupCount in class RingbufferConfigasyncBackupCount - the number of asynchronous synchronous backups to setRingbufferConfig.setBackupCount(int),
RingbufferConfig.getAsyncBackupCount()public RingbufferConfig setBackupCount(int backupCount)
RingbufferConfigsetBackupCount in class RingbufferConfigbackupCount - the number of synchronous backups to setRingbufferConfig.setAsyncBackupCount(int),
RingbufferConfig.getBackupCount()public RingbufferConfig setTimeToLiveSeconds(int timeToLiveSeconds)
RingbufferConfig
Entries that are older than timeToLiveSeconds are removed from the
ringbuffer on the next ringbuffer operation (read or write).
Time to live can be disabled by setting timeToLiveSeconds to 0.
It means that items won't get removed because they expire. They may only
be overwritten.
When timeToLiveSeconds is disabled and after the tail does a full
loop in the ring, the ringbuffer size will always be equal to the capacity.
The timeToLiveSeconds can be any integer between 0 and
Integer.MAX_VALUE. 0 means infinite. The default is 0.
setTimeToLiveSeconds in class RingbufferConfigtimeToLiveSeconds - the time to live period in secondspublic RingbufferConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
RingbufferConfigThe in-memory format controls the format of the stored item in the ringbuffer:
InMemoryFormat.OBJECT: the item is stored in deserialized
format (a regular object)InMemoryFormat.BINARY: the item is stored in serialized format
(a binary blob) The default is binary. The object InMemoryFormat is useful when:
setInMemoryFormat in class RingbufferConfiginMemoryFormat - the new in memory formatpublic RingbufferConfig setRingbufferStoreConfig(RingbufferStoreConfig ringbufferStoreConfig)
RingbufferConfigsetRingbufferStoreConfig in class RingbufferConfigringbufferStoreConfig - set the RingbufferStore configuration to
this configurationpublic RingbufferConfig setSplitBrainProtectionName(String splitBrainProtectionName)
RingbufferConfigsetSplitBrainProtectionName in class RingbufferConfigsplitBrainProtectionName - the split brain protection namepublic RingbufferConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
RingbufferConfigMergePolicyConfig for this ringbuffer.setMergePolicyConfig in class RingbufferConfigCopyright © 2019 Hazelcast, Inc.. All rights reserved.