Package io.split.engine.segments
Class RefreshableSegment
java.lang.Object
io.split.engine.segments.RefreshableSegment
public class RefreshableSegment extends Object implements Runnable, Segment
A SegmentFetcher implementation that can periodically refresh itself.
- Author:
- adil
-
Constructor Summary
Constructors Constructor Description RefreshableSegment(String segmentName, SegmentChangeFetcher segmentChangeFetcher, long changeNumber, SDKReadinessGates gates) -
Method Summary
Modifier and Type Method Description longchangeNumber()booleancontains(String key)This method MUST NOT throw any exceptions.static RefreshableSegmentcreate(String segmentName, SegmentChangeFetcher segmentChangeFetcher, SDKReadinessGates gates)voidforceRefresh()Forces a sync of the segment with the remote server, outside of any scheduled syncs.voidrun()StringsegmentName()StringtoString()
-
Constructor Details
-
RefreshableSegment
public RefreshableSegment(String segmentName, SegmentChangeFetcher segmentChangeFetcher, long changeNumber, SDKReadinessGates gates)
-
-
Method Details
-
segmentName
- Specified by:
segmentNamein interfaceSegment
-
contains
Description copied from interface:SegmentThis method MUST NOT throw any exceptions. -
forceRefresh
public void forceRefresh()Description copied from interface:SegmentForces a sync of the segment with the remote server, outside of any scheduled syncs. This method MUST NOT throw any exceptions.- Specified by:
forceRefreshin interfaceSegment
-
changeNumber
public long changeNumber() -
create
public static RefreshableSegment create(String segmentName, SegmentChangeFetcher segmentChangeFetcher, SDKReadinessGates gates) -
run
public void run() -
toString
-