Interface Pipe

  • All Known Implementing Classes:
    TsFilePipe

    public interface Pipe
    Pipe is the abstract of a sync task, and a data source for ISyncClient. When the pipe is started, it will collect history data and real time data from IoTDB continuously, and record it. A ISyncClient can take PipeData from a pipe, just like take data from a BlockingQueue.
    • Method Detail

      • start

        void start()
            throws PipeException
        Start this pipe, so it can collect data from IoTDB continuously.
        Throws:
        PipeException - This pipe is dropped or some inside error happens.
      • stop

        void stop()
           throws PipeException
        Stop this pipe, but it will not stop collecting data from IoTDB.
        Throws:
        PipeException - This pipe is dropped or some inside error happens.
      • drop

        void drop()
           throws PipeException
        Drop this pipe, delete all information about this pipe on disk.
        Throws:
        PipeException - Some inside error happens(such as IOException about disk).
      • close

        void close()
            throws PipeException
        Close this pipe, stop collecting data from IoTDB, but do not delete information about this pipe on disk. Used for SyncService.shutdown(long). Do not change the status of this pipe.
        Throws:
        PipeException - Some inside error happens(such as IOException about disk).
      • getName

        java.lang.String getName()
        Get the name of this pipe.
        Returns:
        The name of this pipe.
      • take

        PipeData take()
               throws java.lang.InterruptedException
        Used for ISyncClient to take one PipeData from this pipe. If there is no new data in this pipe, the method will block the thread until there is a new one.
        Returns:
        A PipeData.
        Throws:
        java.lang.InterruptedException - Be Interrupted when waiting for new PipeData.
      • commit

        void commit()
        Used for ISyncClient to commit all PipeDatas which are taken but not be committed yet.
      • getOrCreateSyncManager

        ISyncManager getOrCreateSyncManager​(java.lang.String dataRegionId)
        Get ISyncManager by dataRegionId. If ISyncManager does not exist, it will be created automatically.
        Parameters:
        dataRegionId - string of DataRegionId
        Returns:
        ISyncManager
      • deleteSyncManager

        void deleteSyncManager​(java.lang.String dataRegionId)