Class Snapshot


  • public class Snapshot
    extends Object
    Stores a snapshot of information from a StreamBase application. Snapshot objects are created by the StreamBaseMonitor class, and consumed by MonitorListeners. New snapshots are produced at regular intervals, depending on the period specified in the StreamBase Server's conf file.
    See Also:
    StreamBaseMonitor, MonitorListener
    • Constructor Detail

      • Snapshot

        protected Snapshot​(StreamBaseMonitor sbmon,
                           boolean enableOperatorDetails)
    • Method Detail

      • terminate

        public void terminate()
        Ask the StreamBaseMonitor to terminate at the end of the current snapshot.
        See Also:
        StreamBaseMonitor.terminate()
      • getModName

        protected static final String getModName​(String name)
        Given a queue name, retrieve the module name.
        Parameters:
        name - queue name
        Returns:
        module name
      • containerNames

        public Set<String> containerNames()
        Return a list of the names of the current containers
        Returns:
        list of the names of the current containers
      • getSystemInfo

        public SystemInfo getSystemInfo()
        The SystemInfo object for this snapshot.
        Returns:
        the SystemInfo object
      • getOperatorInfo

        public OperatorInfo getOperatorInfo​(String name)
        Returns information about the specified operator.
        Parameters:
        name - the operator name
        Returns:
        the requested OperatorInfo object
      • getThreadInfo

        public ThreadInfo getThreadInfo​(String name)
        Returns information about the specified thread.
        Parameters:
        name - the thread name
        Returns:
        the requested ThreadInfo object
      • getModuleInfo

        public ModuleInfo getModuleInfo​(String name)
        Returns information about the specified module.
        Parameters:
        name - the module name
        Returns:
        the requested ModuleInfo object
      • getStreamInfo

        public StreamInfo getStreamInfo​(String name)
        Returns information about the specified stream.
        Parameters:
        name - the stream name
        Returns:
        the requested StreamInfo object
      • getCycle

        public int getCycle()
        Returns the cycle number of this snapshot. All subsequent snapshots will have an increasing cycle number. This is a monotonically increasing integer generated by the StreamBase daemon.
        Returns:
        snapshot cycle number
      • getTimestamp

        public Timestamp getTimestamp()
        Return the time when this snapshot was taken. It is the timestamp of the first tuple of this snapshot.
        Returns:
        timestamp of whhen this snapshot was taken
      • reset

        protected void reset()
        totally reset this snapshot
      • recycle

        protected void recycle()
      • toString

        public String toString()
        Returns a string representation of the Snapshot object.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.