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()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- 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
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.