Class PVContext
java.lang.Object
org.epics.archiverappliance.engine.pv.PVContext
Handle PV context, pool PVs by name.
When using the pure java CA client implementation, it returns the same
'channel' when trying to access the same PV name multiple times. That's good,
but I don't know how to determine if the channel for this EPICS_V3_PV is
actually shared. Calling destroy() on such a shared channel creates problems.
The PVContext adds its own hash map of channels and keeps a reference count.
The PVContext adds its own hash map of channels and keeps a reference count.
- Version:
- 4-Jun-2012, Luofeng Li:added codes to support for the new archiver
- Author:
- Kay Kasemir s@version Initial version:CSS
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic gov.aps.jca.ChannelgetChannel(String name, int jcaCommandThreadId, gov.aps.jca.event.ConnectionListener conn_callback) Get a new channel, or a reference to an existing one.static voidscheduleCommand(String pvName, int jcaCommandThreadId, gov.aps.jca.Channel theChannel, String msg, Runnable command) Add a command to the JCACommandThread.static voidsetConfigservice(ConfigService configservice)
-
Constructor Details
-
PVContext
public PVContext()
-
-
Method Details
-
setConfigservice
-
getChannel
public static gov.aps.jca.Channel getChannel(String name, int jcaCommandThreadId, gov.aps.jca.event.ConnectionListener conn_callback) throws Exception Get a new channel, or a reference to an existing one.- Parameters:
name- Channel namejcaCommandThreadId- The JCA Command thread.conn_callback-- Returns:
- reference to channel
- Throws:
Exception- on error- See Also:
-
scheduleCommand
public static void scheduleCommand(String pvName, int jcaCommandThreadId, gov.aps.jca.Channel theChannel, String msg, Runnable command) Add a command to the JCACommandThread.- Parameters:
pvName- The name of the PV that this applies tojcaCommandThreadId- The JCA Command thread for this PV.theChannel- this can be nullmsg-command- The runnable that will run in the specified command thread
-