public class MultiPutCompletionCallback extends java.lang.Object implements PutCompletionCallback, ClientPutState, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
java.lang.Object |
token |
| Constructor and Description |
|---|
MultiPutCompletionCallback(PutCompletionCallback cb,
BaseClientPutter parent,
java.lang.Object token,
boolean persistent) |
MultiPutCompletionCallback(PutCompletionCallback cb,
BaseClientPutter parent,
java.lang.Object token,
boolean persistent,
boolean collisionIsOK) |
MultiPutCompletionCallback(PutCompletionCallback cb,
BaseClientPutter parent,
java.lang.Object token,
boolean persistent,
boolean collisionIsOK,
boolean finishOnFailure) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(ClientPutState ps) |
void |
addURIGenerator(ClientPutState ps) |
void |
arm(ClientContext context) |
void |
cancel(ClientContext context)
Cancel the request.
|
BaseClientPutter |
getParent()
Get the BaseClientPutter responsible for this request state.
|
java.lang.Object |
getToken()
Get the token, an object which is passed around with the insert and may be
used by callers.
|
void |
onBlockSetFinished(ClientPutState state,
ClientContext context)
Called when the ClientPutState knows that it knows about
all the blocks it will need to put.
|
void |
onEncode(BaseClientKey key,
ClientPutState state,
ClientContext context)
Called when we know the final URI of the state in question.
|
void |
onFailure(InsertException e,
ClientPutState state,
ClientContext context) |
void |
onFetchable(ClientPutState state)
Called when enough data has been inserted that the file can be
retrieved, even if not all data has been inserted yet.
|
void |
onMetadata(Bucket metadata,
ClientPutState state,
ClientContext context)
Called as an alternative to onEncode, if a metadata length threshold
was specified.
|
void |
onMetadata(Metadata m,
ClientPutState state,
ClientContext context)
Only called if explicitly asked for, in which case, generally
the metadata won't be inserted.
|
void |
onResume(ClientContext context)
Called on restarting the node for a persistent request.
|
void |
onShutdown(ClientContext context)
Called just before the final write of client.dat before the node shuts down.
|
void |
onSuccess(ClientPutState state,
ClientContext context) |
void |
onTransition(ClientPutState oldState,
ClientPutState newState,
ClientContext context) |
void |
schedule(ClientContext context)
Schedule the request.
|
public MultiPutCompletionCallback(PutCompletionCallback cb, BaseClientPutter parent, java.lang.Object token, boolean persistent)
public MultiPutCompletionCallback(PutCompletionCallback cb, BaseClientPutter parent, java.lang.Object token, boolean persistent, boolean collisionIsOK)
public MultiPutCompletionCallback(PutCompletionCallback cb, BaseClientPutter parent, java.lang.Object token, boolean persistent, boolean collisionIsOK, boolean finishOnFailure)
public void onSuccess(ClientPutState state, ClientContext context)
onSuccess in interface PutCompletionCallbackpublic void onFailure(InsertException e, ClientPutState state, ClientContext context)
onFailure in interface PutCompletionCallbackpublic void addURIGenerator(ClientPutState ps)
public void add(ClientPutState ps)
public void arm(ClientContext context)
public BaseClientPutter getParent()
ClientPutStategetParent in interface ClientPutStatepublic void onEncode(BaseClientKey key, ClientPutState state, ClientContext context)
PutCompletionCallbackonEncode in interface PutCompletionCallbackpublic void cancel(ClientContext context)
ClientPutStatecancel in interface ClientPutStatepublic void onTransition(ClientPutState oldState, ClientPutState newState, ClientContext context)
onTransition in interface PutCompletionCallbackpublic void onMetadata(Metadata m, ClientPutState state, ClientContext context)
PutCompletionCallbackonMetadata in interface PutCompletionCallbackpublic void onMetadata(Bucket metadata, ClientPutState state, ClientContext context)
PutCompletionCallbackonMetadata in interface PutCompletionCallbackpublic void onBlockSetFinished(ClientPutState state, ClientContext context)
PutCompletionCallbackonBlockSetFinished in interface PutCompletionCallbackpublic void schedule(ClientContext context) throws InsertException
ClientPutStateschedule in interface ClientPutStateInsertExceptionpublic java.lang.Object getToken()
ClientPutStategetToken in interface ClientPutStatepublic void onFetchable(ClientPutState state)
PutCompletionCallbackonFetchable in interface PutCompletionCallbackpublic void onResume(ClientContext context) throws InsertException, ResumeFailedException
PutCompletionCallbackonResume in interface ClientPutStateonResume in interface PutCompletionCallbackInsertExceptionResumeFailedExceptionpublic void onShutdown(ClientContext context)
ClientPutStateonShutdown in interface ClientPutState