public class SemaphoreContainer extends Object implements IdentifiedDataSerializable
| Modifier and Type | Field and Description |
|---|---|
static int |
INITIAL_CAPACITY |
| Constructor and Description |
|---|
SemaphoreContainer() |
SemaphoreContainer(int partitionId,
SemaphoreConfig config) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acquire(String owner,
int permitCount) |
boolean |
detachAll(String owner) |
int |
drain(String owner) |
int |
getAsyncBackupCount() |
int |
getAvailable() |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
int |
getPartitionId() |
int |
getSyncBackupCount() |
int |
getTotalBackupCount() |
boolean |
increase(int permitCount) |
boolean |
init(int permitCount) |
boolean |
isAvailable(int permitCount) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
boolean |
reduce(int permitCount) |
void |
release(String owner,
int permitCount) |
void |
setInitialized() |
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int INITIAL_CAPACITY
public SemaphoreContainer()
public SemaphoreContainer(int partitionId,
SemaphoreConfig config)
public boolean detachAll(String owner)
public boolean init(int permitCount)
public int getAvailable()
public boolean isAvailable(int permitCount)
public boolean acquire(String owner, int permitCount)
public int drain(String owner)
public boolean increase(int permitCount)
public boolean reduce(int permitCount)
public void release(String owner, int permitCount)
public int getPartitionId()
public int getSyncBackupCount()
public int getAsyncBackupCount()
public void setInitialized()
public int getTotalBackupCount()
public int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getId()
IdentifiedDataSerializablegetId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - outputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializablereadData in interface DataSerializablein - inputIOException - if an I/O error occurs. In particular,
an IOException may be thrown if the
input stream has been closed.Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.