Class RefCountedChannel


  • public class RefCountedChannel
    extends Object
    A Channel with thread-safe reference count.
    Author:
    Kay Kasemir
    • Constructor Detail

      • RefCountedChannel

        public RefCountedChannel​(gov.aps.jca.Channel channel)
        Initialize
        Parameters:
        channel - ChannelAccess channel
        Throws:
        Error - when channel is null
    • Method Detail

      • incRefs

        public void incRefs()
        Increment reference count
      • decRefs

        public int decRefs()
        Decrement reference count.
        Returns:
        Remaining references.
      • getChannel

        public gov.aps.jca.Channel getChannel()
        Returns:
        ChannelAccess channel
      • dispose

        public void dispose()
        Must be called when all references are gone
        Throws:
        Error - when channel is still references