Class BasicContext
- java.lang.Object
-
- org.epics.archiverappliance.common.BasicContext
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
- Direct Known Subclasses:
ETLContext
public class BasicContext extends Object implements Closeable
All the main units of work in the appliance that deal with plugins pass in a context that can be used to hold state that pertains to the unit of work. For now, these are- The main writer thread in the engine that writes to the short term store.
- The ETL jobs that transfer data from one store to the other.
- A client retrieval that gets data from the plugin.
- Author:
- mshankar
-
-
Constructor Summary
Constructors Constructor Description BasicContext()
BasicContext(ArchDBRTypes retrievalExpectedDBRType, String pvNameFromRequest)
-
Method Summary
Modifier and Type Method Description void
addResource(Closeable resource)
Add a resource that needs to be closed once we finish the unit of work..void
close()
ArchPaths
getPaths()
The PlainPB plugin deals with paths that can be translated into NIO by our implementation of Paths.String
getPvNameFromRequest()
ArchDBRTypes
getRetrievalExpectedDBRType()
-
-
-
Constructor Detail
-
BasicContext
public BasicContext()
-
BasicContext
public BasicContext(ArchDBRTypes retrievalExpectedDBRType, String pvNameFromRequest)
-
-
Method Detail
-
getPaths
public ArchPaths getPaths()
The PlainPB plugin deals with paths that can be translated into NIO by our implementation of Paths. We generate one per context so that things can be closed correctly.- Returns:
- paths ArchPaths
-
addResource
public void addResource(Closeable resource)
Add a resource that needs to be closed once we finish the unit of work..- Parameters:
resource
- Closeable resouce
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getRetrievalExpectedDBRType
public ArchDBRTypes getRetrievalExpectedDBRType()
- Returns:
- retrievalExpectedDBRType ArchDBRTypes
-
getPvNameFromRequest
public String getPvNameFromRequest()
- Returns:
- pvNameFromRequest
-
-