Package io.split.client
Class HttpSplitChangeFetcher
- java.lang.Object
-
- io.split.client.HttpSplitChangeFetcher
-
- All Implemented Interfaces:
SplitChangeFetcher
public final class HttpSplitChangeFetcher extends Object implements SplitChangeFetcher
Created by adilaijaz on 5/30/15.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpSplitChangeFetchercreate(org.apache.http.impl.client.CloseableHttpClient client, URI root)static HttpSplitChangeFetchercreate(org.apache.http.impl.client.CloseableHttpClient client, URI root, Metrics metrics)SplitChangefetch(long since)The returned list should contain AT MOST one split per name.
-
-
-
Method Detail
-
create
public static HttpSplitChangeFetcher create(org.apache.http.impl.client.CloseableHttpClient client, URI root) throws URISyntaxException
- Throws:
URISyntaxException
-
create
public static HttpSplitChangeFetcher create(org.apache.http.impl.client.CloseableHttpClient client, URI root, Metrics metrics) throws URISyntaxException
- Throws:
URISyntaxException
-
fetch
public SplitChange fetch(long since)
Description copied from interface:SplitChangeFetcherThe returned list should contain AT MOST one split per name. Thus, in the time between requested change number and latest change number, if multiple changes have happened to partitions tied to a name, just return the latest change. If no changes have every happened, then return the an empty list of changed partitions, 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 list of changed partitions with the latest change number being the same as the requested change number. If the client is asking for split changes for the first time, implementations should only return active partitions. No need to return killed partitions.- Specified by:
fetchin interfaceSplitChangeFetcher- Parameters:
since- a value less than zero implies that the client is requesting information on partitions for the first time.- Returns:
- SegmentChange
-
-