com.fasterxml.clustermate.client.operation.ListOperationResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clustermate-client Show documentation
Show all versions of clustermate-client Show documentation
Building blocks for client libraries that access
ClusterMate-based service.
package com.fasterxml.clustermate.client.operation;
import java.util.List;
import com.fasterxml.clustermate.client.ClusterServerNode;
import com.fasterxml.clustermate.client.call.ListCallResult;
import com.fasterxml.storemate.shared.StorableKey;
/**
* Result value produced by {@link StoreEntryLister}, contains information
* about success of individual call, as well as sequence of listed
* entries in case of successful call.
*/
public class ListOperationResult extends ReadOperationResult>
{
protected List _items;
protected StorableKey _lastSeen;
public ListOperationResult(OperationConfig config)
{
super(config);
}
public ListOperationResult setItems(ClusterServerNode server, ListCallResult result)
{
if (_server != null) {
throw new IllegalStateException("Already received successful response from "+_server+"; trying to override with "+server);
}
_server = server;
_items = result.getItems();
_lastSeen = result.getLastSeen();
return this;
}
public List getItems() { return _items; }
public StorableKey getLastSeen() { return _lastSeen; }
}