Package io.split.client
Class HttpSegmentChangeFetcher
- java.lang.Object
-
- io.split.client.HttpSegmentChangeFetcher
-
- All Implemented Interfaces:
SegmentChangeFetcher
public final class HttpSegmentChangeFetcher extends Object implements SegmentChangeFetcher
Created by adilaijaz on 5/22/15.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpSegmentChangeFetchercreate(org.apache.http.impl.client.CloseableHttpClient client, URI root)static HttpSegmentChangeFetchercreate(org.apache.http.impl.client.CloseableHttpClient client, URI root, Metrics metrics)SegmentChangefetch(String segmentName, long since)
-
-
-
Method Detail
-
create
public static HttpSegmentChangeFetcher create(org.apache.http.impl.client.CloseableHttpClient client, URI root) throws URISyntaxException
- Throws:
URISyntaxException
-
create
public static HttpSegmentChangeFetcher create(org.apache.http.impl.client.CloseableHttpClient client, URI root, Metrics metrics) throws URISyntaxException
- Throws:
URISyntaxException
-
fetch
public SegmentChange fetch(String segmentName, long since)
Description copied from interface:SegmentChangeFetcherIf the segment does not exist, then return the an empty segment change with the latest change number set to a value less than 0. If no changes have happened since the change number requested, then return an empty segment change with the latest change number equal to the requested change number.- Specified by:
fetchin interfaceSegmentChangeFetcher- Parameters:
segmentName- the name of the segment to fetch.since- a value less than zero implies that the client is requesting information on this segment for the first time.- Returns:
- SegmentChange
-
-