Class RefCountedChannel
- java.lang.Object
-
- org.epics.archiverappliance.engine.pv.RefCountedChannel
-
public class RefCountedChannel extends Object
A Channel with thread-safe reference count.- Author:
- Kay Kasemir
-
-
Constructor Summary
Constructors Constructor Description RefCountedChannel(gov.aps.jca.Channel channel)
Initialize
-
Method Summary
Modifier and Type Method Description int
decRefs()
Decrement reference count.void
dispose()
Must be called when all references are gonegov.aps.jca.Channel
getChannel()
void
incRefs()
Increment reference count
-
-
-
Constructor Detail
-
RefCountedChannel
public RefCountedChannel(gov.aps.jca.Channel channel)
Initialize- Parameters:
channel
- ChannelAccess channel- Throws:
Error
- when channel isnull
-
-
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
-
-