com.hazelcast.concurrent.semaphore
Class Permit
java.lang.Object
com.hazelcast.concurrent.semaphore.Permit
- All Implemented Interfaces:
- DataSerializable
public class Permit
- extends Object
- implements DataSerializable
INITIAL_CAPACITY
public static final int INITIAL_CAPACITY
- See Also:
- Constant Field Values
Permit
public Permit()
Permit
public Permit(int partitionId,
SemaphoreConfig config)
memberRemoved
public boolean memberRemoved(String caller)
init
public boolean init(int permitCount)
getAvailable
public int getAvailable()
isAvailable
public boolean isAvailable(int permitCount)
acquire
public boolean acquire(int permitCount,
String caller)
drain
public int drain(String caller)
reduce
public boolean reduce(int permitCount)
release
public void release(int permitCount,
String caller)
getPartitionId
public int getPartitionId()
getSyncBackupCount
public int getSyncBackupCount()
getAsyncBackupCount
public int getAsyncBackupCount()
setInitialized
public void setInitialized()
writeData
public void writeData(ObjectDataOutput out)
throws IOException
- Description copied from interface:
DataSerializable
- Writes object fields to output stream
- Specified by:
writeData
in interface DataSerializable
- Parameters:
out
- output
- Throws:
IOException
readData
public void readData(ObjectDataInput in)
throws IOException
- Description copied from interface:
DataSerializable
- Reads fields from the input stream
- Specified by:
readData
in interface DataSerializable
- Parameters:
in
- input
- Throws:
IOException
toString
public String toString()
- Overrides:
toString
in class Object
getTotalBackupCount
public int getTotalBackupCount()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.