public class EventJournalConfigReadOnly extends EventJournalConfig
DEFAULT_CAPACITY, DEFAULT_TTL_SECONDS
Constructor and Description |
---|
EventJournalConfigReadOnly(EventJournalConfig config) |
Modifier and Type | Method and Description |
---|---|
EventJournalConfig |
setCapacity(int capacity)
Sets the capacity of the event journal.
|
EventJournalConfig |
setEnabled(boolean enabled)
Enables or disables the event journal.
|
EventJournalConfig |
setTimeToLiveSeconds(int timeToLiveSeconds)
Sets the time to live in seconds.
|
equals, getCapacity, getClassId, getFactoryId, getTimeToLiveSeconds, hashCode, isEnabled, readData, toString, writeData
public EventJournalConfigReadOnly(EventJournalConfig config)
public EventJournalConfig setCapacity(int capacity)
EventJournalConfig
NOTE
The capacity is shared equally between all partitions.
This is done by assigning each partition getCapacity() / partitionCount
available slots in the event journal. Because of this, the effective total
capacity may be somewhat lower and you must make sure that the
configured capacity is at least greater than the partition count.
setCapacity
in class EventJournalConfig
capacity
- the capacity.EventJournalConfig.getCapacity()
public EventJournalConfig setTimeToLiveSeconds(int timeToLiveSeconds)
EventJournalConfig
Time to live can be disabled by setting timeToLiveSeconds to 0. This means that the events never expire but they can be overwritten when the capacity of the journal is exceeded.
setTimeToLiveSeconds
in class EventJournalConfig
timeToLiveSeconds
- the time to live period in secondspublic EventJournalConfig setEnabled(boolean enabled)
EventJournalConfig
setEnabled
in class EventJournalConfig
enabled
- true
if enabled, false
otherwise.Copyright © 2019 Hazelcast, Inc.. All rights reserved.