Class MonitorStoragePolicy


  • public class MonitorStoragePolicy
    extends StoragePolicy
    Wrapper storage policy which derives its functionality from an existing ("base") policy, but additionally passes row storage events to a supplied TableSink.
    Since:
    24 Aug 2010
    Author:
    Mark Taylor
    See Also:
    ProgressBarTableSink
    • Constructor Detail

      • MonitorStoragePolicy

        public MonitorStoragePolicy​(StoragePolicy base,
                                    TableSink sink)
        Constructor.
        Parameters:
        base - base policy
        sink - recipient for row storage events associated with this policy
    • Method Detail

      • interrupt

        public void interrupt()
        Cancels this storage policy for table row writes. Any attempt to call acceptRow on a RowStore obtained from this policy after calling this will result in an InterruptedIOException.
      • isInterrupted

        public boolean isInterrupted()
        Indicates whether interrupt() has been called on this object.
        Returns:
        true iff interrupted
      • getBasePolicy

        public StoragePolicy getBasePolicy()
        Returns the base storage policy.
        Returns:
        base policy
      • makeRowStore

        public RowStore makeRowStore()
        Description copied from class: StoragePolicy
        Returns a new RowStore object which can be used to provide a destination for random-access table storage.
        Specified by:
        makeRowStore in class StoragePolicy
        Returns:
        a RowStore object
      • makeByteStore

        public ByteStore makeByteStore()
        Description copied from class: StoragePolicy
        Returns a new ByteStore object which can be used to provide a destination for general purpose data storage.
        Specified by:
        makeByteStore in class StoragePolicy
        Returns:
        new byte store