Class FileBackedPBEventStream

java.lang.Object
edu.stanford.slac.archiverappliance.plain.pb.FileBackedPBEventStream
All Implemented Interfaces:
ETLPBByteStream, Closeable, AutoCloseable, Iterable<Event>, RemotableOverRaw, ETLBulkStream, EventStream

public class FileBackedPBEventStream extends Object implements EventStream, RemotableOverRaw, ETLPBByteStream
An EventStream that is backed by a single PB file. You can only get one iterator out of this event stream. This condition is also checked for. This is typically used with/after PlainPBFileNameUtility.getFilesWithData
Author:
mshankar
  • Constructor Details

    • FileBackedPBEventStream

      public FileBackedPBEventStream(String pvname, Path path, ArchDBRTypes type) throws IOException
      Used when we want to include data from the entire file.
      Parameters:
      pvname - The PV name
      path - path
      type - Enum ArchDBRTypes
      Throws:
      IOException -  
    • FileBackedPBEventStream

      public FileBackedPBEventStream(String pvname, Path path, ArchDBRTypes type, long startPosition, long endPosition) throws IOException
      Used when we know the file locations of the start and end. Really only used in one utility...
      Parameters:
      pvname - The PV name
      path - Path
      type - Enum ArchDBRTypes
      startPosition - The file location of the start
      endPosition - The file location of the end
      Throws:
      IOException -  
    • FileBackedPBEventStream

      public FileBackedPBEventStream(String pvname, Path path, ArchDBRTypes dbrtype, Instant startTime, Instant endTime, boolean skipSearch) throws IOException
      Used when we know the start and end times. There are six cases here; see the FileBackedIteratorTest for more details. For performance reasons, we want to use the location based iterator as much as possible. But in case of issues, we do not want to not return data. So, fall back to a time based iterator
      Parameters:
      pvname - The PV name
      path - Path
      dbrtype - Enum ArchDBRTypes
      startTime - The start time
      endTime - The end time
      skipSearch - true or false
      Throws:
      IOException -  
    • FileBackedPBEventStream

      public FileBackedPBEventStream(String pvname, Path path, ArchDBRTypes dbrtype, Instant startAtTime, BiDirectionalIterable.IterationDirection direction) throws IOException
      Used for unlimited iteration. We specify a time to start the iteration at and a direction.
      Parameters:
      pvname - The PV name
      path - Path
      dbrtype - Enum ArchDBRTypes
      startAtTime - Start iteration at time
      Throws:
      IOException -  
  • Method Details