Class LatchCounter
- java.lang.Object
-
- com.oracle.coherence.concurrent.internal.LatchCounter
-
- All Implemented Interfaces:
com.tangosol.io.ExternalizableLite,com.tangosol.io.pof.PortableObject,Serializable
public class LatchCounter extends Object implements com.tangosol.io.ExternalizableLite, com.tangosol.io.pof.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(com.tangosol.io.pof.PofReader in)voidreadExternal(DataInput in)StringtoString()voidwriteExternal(com.tangosol.io.pof.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 interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(com.tangosol.io.pof.PofReader in) throws IOException- Specified by:
readExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(com.tangosol.io.pof.PofWriter out) throws IOException- Specified by:
writeExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
-