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 PutCompletionCallback
public void onFailure(InsertException e, ClientPutState state, ClientContext context)
onFailure
in interface PutCompletionCallback
public void addURIGenerator(ClientPutState ps)
public void add(ClientPutState ps)
public void arm(ClientContext context)
public BaseClientPutter getParent()
ClientPutState
getParent
in interface ClientPutState
public void onEncode(BaseClientKey key, ClientPutState state, ClientContext context)
PutCompletionCallback
onEncode
in interface PutCompletionCallback
public void cancel(ClientContext context)
ClientPutState
cancel
in interface ClientPutState
public void onTransition(ClientPutState oldState, ClientPutState newState, ClientContext context)
onTransition
in interface PutCompletionCallback
public void onMetadata(Metadata m, ClientPutState state, ClientContext context)
PutCompletionCallback
onMetadata
in interface PutCompletionCallback
public void onMetadata(Bucket metadata, ClientPutState state, ClientContext context)
PutCompletionCallback
onMetadata
in interface PutCompletionCallback
public void onBlockSetFinished(ClientPutState state, ClientContext context)
PutCompletionCallback
onBlockSetFinished
in interface PutCompletionCallback
public void schedule(ClientContext context) throws InsertException
ClientPutState
schedule
in interface ClientPutState
InsertException
public java.lang.Object getToken()
ClientPutState
getToken
in interface ClientPutState
public void onFetchable(ClientPutState state)
PutCompletionCallback
onFetchable
in interface PutCompletionCallback
public void onResume(ClientContext context) throws InsertException, ResumeFailedException
PutCompletionCallback
onResume
in interface ClientPutState
onResume
in interface PutCompletionCallback
InsertException
ResumeFailedException
public void onShutdown(ClientContext context)
ClientPutState
onShutdown
in interface ClientPutState