public class SemaphoreContainer extends Object implements DataSerializable
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(int permitCount,
String caller) |
int |
drain(String caller) |
int |
getAsyncBackupCount() |
int |
getAvailable() |
int |
getPartitionId() |
int |
getSyncBackupCount() |
int |
getTotalBackupCount() |
boolean |
init(int permitCount) |
boolean |
isAvailable(int permitCount) |
boolean |
memberRemoved(String caller) |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
boolean |
reduce(int permitCount) |
void |
release(int permitCount,
String caller) |
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 memberRemoved(String caller)
public boolean init(int permitCount)
public int getAvailable()
public boolean isAvailable(int permitCount)
public boolean acquire(int permitCount, String caller)
public int drain(String caller)
public boolean reduce(int permitCount)
public void release(int permitCount, String caller)
public int getPartitionId()
public int getSyncBackupCount()
public int getAsyncBackupCount()
public void setInitialized()
public int getTotalBackupCount()
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.