Class 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 Detail

      • m_lCount

        protected long m_lCount
        The current latch count.
      • f_lInitialCount

        protected long f_lInitialCount
        The initial latch count.
    • Constructor Detail

      • LatchCounter

        public LatchCounter()
        Default constructor for serialization interfaces
      • LatchCounter

        public LatchCounter​(int count)
        Construct a LatchCounter instance.
        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:
        readExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(DataOutput out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.ExternalizableLite
        Throws:
        IOException
      • readExternal

        public void readExternal​(com.tangosol.io.pof.PofReader in)
                          throws IOException
        Specified by:
        readExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException
      • writeExternal

        public void writeExternal​(com.tangosol.io.pof.PofWriter out)
                           throws IOException
        Specified by:
        writeExternal in interface com.tangosol.io.pof.PortableObject
        Throws:
        IOException