|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hazelcast.config.SemaphoreConfig
public class SemaphoreConfig
Contains the configuration for an ISemaphore
.
Field Summary | |
---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
Default asynchronous backup count |
static int |
DEFAULT_SYNC_BACKUP_COUNT
Default synchronous backup count |
Constructor Summary | |
---|---|
SemaphoreConfig()
Creates a default configured SemaphoreConfig . |
|
SemaphoreConfig(SemaphoreConfig config)
Creates a SemaphoreConfig by cloning another one. |
Method Summary | |
---|---|
SemaphoreConfigReadOnly |
getAsReadOnly()
|
int |
getAsyncBackupCount()
Returns the number of asynchronous backups. |
int |
getBackupCount()
Returns the number of synchronous backups. |
int |
getInitialPermits()
Gets the initial number of permits |
String |
getName()
Gets the name of the semaphore. |
int |
getTotalBackupCount()
Returns the total number of backups; the returned value will always equal or bigger than 0. |
SemaphoreConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups. |
SemaphoreConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups. |
SemaphoreConfig |
setInitialPermits(int initialPermits)
Sets the initial number of permits. |
SemaphoreConfig |
setName(String name)
Sets the name of the semaphore. |
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_SYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNT
Constructor Detail |
---|
public SemaphoreConfig()
SemaphoreConfig
.
public SemaphoreConfig(SemaphoreConfig config)
config
- the SemaphoreConfig to copy
IllegalArgumentException
- if config is null.Method Detail |
---|
public SemaphoreConfigReadOnly getAsReadOnly()
public String getName()
public SemaphoreConfig setName(String name)
name
- the name of the semaphore
IllegalArgumentException
- if name is null or empty.public int getInitialPermits()
public SemaphoreConfig setInitialPermits(int initialPermits)
initialPermits
- the initial number of permits.
public int getBackupCount()
setBackupCount(int)
public SemaphoreConfig setBackupCount(int backupCount)
backupCount
- the number of synchronous backups to set
new
- 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()
setAsyncBackupCount(int)
public SemaphoreConfig 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 String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |