Package io.split.engine.segments
Class SegmentSynchronizationTaskImp
- java.lang.Object
-
- io.split.engine.segments.SegmentSynchronizationTaskImp
-
- All Implemented Interfaces:
SyncTask,SegmentSynchronizationTask,Closeable,AutoCloseable
public class SegmentSynchronizationTaskImp extends Object implements SegmentSynchronizationTask, Closeable
-
-
Constructor Summary
Constructors Constructor Description SegmentSynchronizationTaskImp(SegmentChangeFetcher segmentChangeFetcher, long refreshEveryNSeconds, int numThreads, SegmentCacheProducer segmentCacheProducer, TelemetryRuntimeProducer telemetryRuntimeProducer, SplitCacheConsumer splitCacheConsumer, ThreadFactory threadFactory, RuleBasedSegmentCacheConsumer ruleBasedSegmentCacheConsumer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidfetchAll(boolean addCacheHeader)fetch every SegmentbooleanfetchAllSynchronous()fetch every Segment SynchronousSegmentFetchergetFetcher(String segmentName)returns segmentFecthervoidinitializeSegment(String segmentName)initializes the segmentbooleanisRunning()voidstart()starts the fetchingvoidstop()stops the thread
-
-
-
Constructor Detail
-
SegmentSynchronizationTaskImp
public SegmentSynchronizationTaskImp(SegmentChangeFetcher segmentChangeFetcher, long refreshEveryNSeconds, int numThreads, SegmentCacheProducer segmentCacheProducer, TelemetryRuntimeProducer telemetryRuntimeProducer, SplitCacheConsumer splitCacheConsumer, ThreadFactory threadFactory, RuleBasedSegmentCacheConsumer ruleBasedSegmentCacheConsumer)
-
-
Method Detail
-
initializeSegment
public void initializeSegment(String segmentName)
Description copied from interface:SegmentSynchronizationTaskinitializes the segment- Specified by:
initializeSegmentin interfaceSegmentSynchronizationTask
-
getFetcher
public SegmentFetcher getFetcher(String segmentName)
Description copied from interface:SegmentSynchronizationTaskreturns segmentFecther- Specified by:
getFetcherin interfaceSegmentSynchronizationTask- Returns:
-
start
public void start()
Description copied from interface:SegmentSynchronizationTaskstarts the fetching- Specified by:
startin interfaceSegmentSynchronizationTask- Specified by:
startin interfaceSyncTask
-
stop
public void stop()
Description copied from interface:SegmentSynchronizationTaskstops the thread- Specified by:
stopin interfaceSegmentSynchronizationTask- Specified by:
stopin interfaceSyncTask
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceSegmentSynchronizationTask- Specified by:
closein interfaceSyncTask
-
fetchAll
public void fetchAll(boolean addCacheHeader)
Description copied from interface:SegmentSynchronizationTaskfetch every Segment- Specified by:
fetchAllin interfaceSegmentSynchronizationTask
-
fetchAllSynchronous
public boolean fetchAllSynchronous()
Description copied from interface:SegmentSynchronizationTaskfetch every Segment Synchronous- Specified by:
fetchAllSynchronousin interfaceSegmentSynchronizationTask
-
-