Interface Pipe
-
- All Known Implementing Classes:
TsFilePipe
public interface PipePipe 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classPipe.PipeStatus
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close this pipe, stop collecting data from IoTDB, but do not delete information about this pipe on disk.voidcommit()Used for ISyncClient to commit all PipeDatas which are taken but not be committed yet.voiddeleteSyncManager(java.lang.String dataRegionId)voiddrop()Drop this pipe, delete all information about this pipe on disk.longgetCreateTime()Get the creation time of this pipe with unit of IoTDBConfig.getTimestampPrecision() .java.lang.StringgetName()Get the name of this pipe.ISyncManagergetOrCreateSyncManager(java.lang.String dataRegionId)Get ISyncManager by dataRegionId.PipeSinkgetPipeSink()Get the PipeSink of this pipe.Pipe.PipeStatusgetStatus()Get the Pipe.PipeStatus of this pipe.voidstart()Start this pipe, so it can collect data from IoTDB continuously.voidstop()Stop this pipe, but it will not stop collecting data from IoTDB.PipeDatatake()Used for ISyncClient to take one PipeData from this pipe.
-
-
-
Method Detail
-
start
void start() throws PipeExceptionStart 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 PipeExceptionClose 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.
-
getPipeSink
PipeSink getPipeSink()
Get the PipeSink of this pipe.- Returns:
- The PipeSink of this pipe.
-
getCreateTime
long getCreateTime()
Get the creation time of this pipe with unit of IoTDBConfig.getTimestampPrecision() .- Returns:
- A time with unit of IoTDBConfig.getTimestampPrecision().
-
getStatus
Pipe.PipeStatus getStatus()
Get the Pipe.PipeStatus of this pipe. When a pipe is created, the status should be Pipe.PipeStatus.STOP- Returns:
- The Status 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.
-
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)
-
-