Class LatchCounter
- java.lang.Object
-
- com.oracle.coherence.concurrent.internal.LatchCounter
-
- All Implemented Interfaces:
ExternalizableLite,PortableObject,Serializable
public class LatchCounter extends Object implements ExternalizableLite, PortableObject
A data structure that holds state related to countdown latch.- Author:
- lh 2021.11.16
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected longf_lInitialCountThe initial latch count.protected longm_lCountThe current latch count.
-
Constructor Summary
Constructors Constructor Description LatchCounter()Default constructor for serialization interfacesLatchCounter(int count)Construct aLatchCounterinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcountDown()Count down the latch count.longgetCount()Returns the current count of the latch.longgetInitialCount()Returns the initial count of the latch.voidreadExternal(PofReader in)voidreadExternal(DataInput in)StringtoString()voidwriteExternal(PofWriter out)voidwriteExternal(DataOutput out)
-
-
-
Constructor Detail
-
LatchCounter
public LatchCounter()
Default constructor for serialization interfaces
-
LatchCounter
public LatchCounter(int count)
Construct aLatchCounterinstance.- Parameters:
count- of the latch
-
-
Method Detail
-
getCount
public long getCount()
Returns the current count of the latch.- Returns:
- the current count of the latch
-
getInitialCount
public long getInitialCount()
Returns the initial count of the latch.- Returns:
- the initial count of the latch
-
countDown
public void countDown()
Count down the latch count.
-
readExternal
public void readExternal(DataInput in) throws IOException
- Specified by:
readExternalin interfaceExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(PofReader in) throws IOException
- Specified by:
readExternalin interfacePortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(PofWriter out) throws IOException
- Specified by:
writeExternalin interfacePortableObject- Throws:
IOException
-
-