|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.hazelcast.config.RingbufferConfig
@Beta public class RingbufferConfig
Contains the configuration for the Ringbuffer.
| Field Summary | |
|---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
Default value of asynchronous backup count |
static int |
DEFAULT_CAPACITY
Default value of capacity of the RingBuffer. |
static InMemoryFormat |
DEFAULT_IN_MEMORY_FORMAT
Default value for the InMemoryFormat. |
static int |
DEFAULT_SYNC_BACKUP_COUNT
Default value of synchronous backup count |
static int |
DEFAULT_TTL_SECONDS
Default value for the time to live property. |
| Constructor Summary | |
|---|---|
RingbufferConfig(RingbufferConfig config)
Clones a RingbufferConfig |
|
RingbufferConfig(String name)
Creates a RingbufferConfig with the provided name. |
|
RingbufferConfig(String name,
RingbufferConfig config)
Creates a new RingbufferConfig by cloning an existing config and overriding the name. |
|
| Method Summary | |
|---|---|
RingbufferConfig |
getAsReadOnly()
Creates a readonly copy of this RingbufferConfig. |
int |
getAsyncBackupCount()
Gets the number of asynchronous backups. |
int |
getBackupCount()
Gets the number of synchronous backups. |
int |
getCapacity()
Gets the capacity of the ringbuffer. |
InMemoryFormat |
getInMemoryFormat()
Gets the InMemoryFormat. |
String |
getName()
Returns the name of the ringbuffer. |
int |
getTimeToLiveSeconds()
Gets the time to live in seconds. |
int |
getTotalBackupCount()
Returns the total number of backups: backupCount plus asyncBackupCount. |
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 InMemoryFormat. |
RingbufferConfig |
setTimeToLiveSeconds(int timeToLiveSeconds)
Sets the time to live in seconds. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_CAPACITY
public static final int DEFAULT_SYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNT
public static final int DEFAULT_TTL_SECONDS
public static final InMemoryFormat DEFAULT_IN_MEMORY_FORMAT
| Constructor Detail |
|---|
public RingbufferConfig(String name)
name - the name
NullPointerException - if name is nullpublic RingbufferConfig(RingbufferConfig config)
config - the ringbuffer config to clone
NullPointerException - if config is null
public RingbufferConfig(String name,
RingbufferConfig config)
name - the new nameconfig - the config.
NullPointerException - if name or config is null.| Method Detail |
|---|
public String getName()
public int getCapacity()
public RingbufferConfig setCapacity(int capacity)
capacity - the capacity.
IllegalArgumentException - if capacity smaller than 1.getCapacity()public int getBackupCount()
public RingbufferConfig setBackupCount(int backupCount)
backupCount - the number of synchronous backups to set
IllegalArgumentException - if backupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetAsyncBackupCount(int),
getBackupCount()public int getAsyncBackupCount()
public RingbufferConfig setAsyncBackupCount(int asyncBackupCount)
asyncBackupCount - the number of asynchronous synchronous backups to set
IllegalArgumentException - if asyncBackupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetBackupCount(int),
getAsyncBackupCount()public int getTotalBackupCount()
public RingbufferConfig getAsReadOnly()
public int getTimeToLiveSeconds()
public RingbufferConfig setTimeToLiveSeconds(int timeToLiveSeconds)
timeToLiveSeconds - the time to live period in seconds
IllegalArgumentException - if timeToLiveSeconds smaller than 0.public InMemoryFormat getInMemoryFormat()
public RingbufferConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
InMemoryFormat.OBJECT: the item is stored in deserialized format (so a regular object)InMemoryFormat.BINARY: the item is stored in serialized format (so a is binary blob)
inMemoryFormat - the new in memory format.
NullPointerException - if inMemoryFormat is null.
IllegalArgumentException - if InMemoryFormat.NATIVE in memory format is selected.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||