com.hazelcast.config
Class SemaphoreConfigReadOnly

java.lang.Object
  extended by com.hazelcast.config.SemaphoreConfig
      extended by com.hazelcast.config.SemaphoreConfigReadOnly

public class SemaphoreConfigReadOnly
extends SemaphoreConfig

Contains configuration for Semaphore(read only)


Field Summary
 
Fields inherited from class com.hazelcast.config.SemaphoreConfig
DEFAULT_ASYNC_BACKUP_COUNT, DEFAULT_SYNC_BACKUP_COUNT
 
Constructor Summary
SemaphoreConfigReadOnly(SemaphoreConfig config)
           
 
Method Summary
 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.
 
Methods inherited from class com.hazelcast.config.SemaphoreConfig
getAsReadOnly, getAsyncBackupCount, getBackupCount, getInitialPermits, getName, getTotalBackupCount, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SemaphoreConfigReadOnly

public SemaphoreConfigReadOnly(SemaphoreConfig config)
Method Detail

setName

public SemaphoreConfig setName(String name)
Description copied from class: SemaphoreConfig
Sets the name of the semaphore.

Overrides:
setName in class SemaphoreConfig
Parameters:
name - the name
Returns:
the updated SemaphoreConfig

setInitialPermits

public SemaphoreConfig setInitialPermits(int initialPermits)
Description copied from class: SemaphoreConfig
Sets the initial number of permits. The initial number of permits can be 0; meaning that there is no permit but it can also be negative meaning that there is a shortage of permits.

Overrides:
setInitialPermits in class SemaphoreConfig
Parameters:
initialPermits - the initial number of permits.
Returns:
the updated SemaphoreConfig

setBackupCount

public SemaphoreConfig setBackupCount(int backupCount)
Description copied from class: SemaphoreConfig
Sets the number of synchronous backups.

Overrides:
setBackupCount in class SemaphoreConfig
Parameters:
backupCount - the number of synchronous backups
Returns:
the updated SemaphoreConfig
See Also:
SemaphoreConfig.setAsyncBackupCount(int), SemaphoreConfig.getBackupCount()

setAsyncBackupCount

public SemaphoreConfig setAsyncBackupCount(int asyncBackupCount)
Description copied from class: SemaphoreConfig
Sets the number of asynchronous backups.

Overrides:
setAsyncBackupCount in class SemaphoreConfig
Parameters:
asyncBackupCount - the number of asynchronous backups
Returns:
the updated SemaphoreConfig
See Also:
(int), SemaphoreConfig.getAsyncBackupCount()


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.