Class BasicContext

  • All Implemented Interfaces:
    Closeable, AutoCloseable
    Direct Known Subclasses:

    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
    1. The main writer thread in the engine that writes to the short term store.
    2. The ETL jobs that transfer data from one store to the other.
    3. A client retrieval that gets data from the plugin.
    This class contains functionality that plugins can rely on in all these contexts. Callers are expected to call the close method on completion of the unit of work. Contexts are not expected to be thread safe and are particular to the thread of execution.
    • 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.
        paths ArchPaths
      • addResource

        public void addResource​(Closeable resource)
        Add a resource that needs to be closed once we finish the unit of work..
        resource - Closeable resouce
      • getRetrievalExpectedDBRType

        public ArchDBRTypes getRetrievalExpectedDBRType()
        retrievalExpectedDBRType ArchDBRTypes
      • getPvNameFromRequest

        public String getPvNameFromRequest()