|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectvoldemort.client.protocol.admin.StreamingClient
public class StreamingClient
| Field Summary | |
|---|---|
protected RoutingStrategy |
routingStrategy
|
protected EventThrottler |
throttler
|
| Constructor Summary | |
|---|---|
StreamingClient(StreamingClientConfig config)
|
|
| Method Summary | |
|---|---|
void |
closeStreamingSession()
Close the streaming session Flush all n/w buffers and call the commit callback |
void |
closeStreamingSession(java.util.concurrent.Callable resetCheckpointCallback)
|
void |
closeStreamingSessions()
Close the streaming session Flush all n/w buffers and call the commit callback |
void |
closeStreamingSessions(java.util.concurrent.Callable resetCheckpointCallback)
|
void |
commitToVoldemort()
Flush the network buffer and write all entries to the server Wait for an ack from the server This is a blocking call. |
protected void |
finalize()
|
void |
initStreamingSession(java.lang.String store,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge)
|
void |
initStreamingSessions(java.util.List<java.lang.String> stores,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge)
|
void |
initStreamingSessions(java.util.List<java.lang.String> stores,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge,
java.util.List<java.lang.Integer> blackListedNodes)
|
void |
removeStoreFromSession(java.util.List<java.lang.String> storeNameToRemove)
Remove a list of stores from the session First commit all entries for these stores and then cleanup resources |
void |
streamingPut(ByteArray key,
Versioned<byte[]> value)
A Streaming Put call |
void |
streamingPut(ByteArray key,
Versioned<byte[]> value,
java.lang.String storeName)
|
void |
updateThrottleLimit(int throttleQPS)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RoutingStrategy routingStrategy
protected EventThrottler throttler
| Constructor Detail |
|---|
public StreamingClient(StreamingClientConfig config)
| Method Detail |
|---|
public void updateThrottleLimit(int throttleQPS)
public void initStreamingSession(java.lang.String store,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge)
store - - the name of the store to be streamed tocheckpointCallback - - the callback that allows for the user to
record the progress, up to the last event delivered. This callable
would be invoked every so often internally.recoveryCallback - - the callback that allows the user to rewind the
upstream to the position recorded by the last complete call on
checkpointCallback whenever an exception occurs during the
streaming session.allowMerge - - whether to allow for the streaming event to be merged
with online writes. If not, all online writes since the completion
of the last streaming session will be lost at the end of the
current streaming session.
public void streamingPut(ByteArray key,
Versioned<byte[]> value)
key - - The keyvalue - - The valuepublic void closeStreamingSession(java.util.concurrent.Callable resetCheckpointCallback)
resetCheckpointCallback - - the callback that allows for the user to
clean up the checkpoint at the end of the streaming session so a
new session could, if necessary, start from 0 position.public void closeStreamingSession()
protected void finalize()
finalize in class java.lang.Object
public void initStreamingSessions(java.util.List<java.lang.String> stores,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge)
stores - - the list of name of the stores to be streamed tocheckpointCallback - - the callback that allows for the user to
record the progress, up to the last event delivered. This callable
would be invoked every so often internally.recoveryCallback - - the callback that allows the user to rewind the
upstream to the position recorded by the last complete call on
checkpointCallback whenever an exception occurs during the
streaming session.allowMerge - - whether to allow for the streaming event to be merged
with online writes. If not, all online writes since the completion
of the last streaming session will be lost at the end of the
current streaming session.
public void initStreamingSessions(java.util.List<java.lang.String> stores,
java.util.concurrent.Callable checkpointCallback,
java.util.concurrent.Callable recoveryCallback,
boolean allowMerge,
java.util.List<java.lang.Integer> blackListedNodes)
stores - - the list of name of the stores to be streamed tocheckpointCallback - - the callback that allows for the user to
record the progress, up to the last event delivered. This callable
would be invoked every so often internally.recoveryCallback - - the callback that allows the user to rewind the
upstream to the position recorded by the last complete call on
checkpointCallback whenever an exception occurs during the
streaming session.allowMerge - - whether to allow for the streaming event to be merged
with online writes. If not, all online writes since the completion
of the last streaming session will be lost at the end of the
current streaming session.blackListedNodes - - the list of Nodes not to stream to; we can
probably recover them later from the replicaspublic void removeStoreFromSession(java.util.List<java.lang.String> storeNameToRemove)
storeNameToRemove - List of stores to be removed from the current
streaming session
public void streamingPut(ByteArray key,
Versioned<byte[]> value,
java.lang.String storeName)
key - - The keyvalue - - The valuestoreName - takes an additional store name as a parameter
If a store is added mid way through a streaming session we do not
play catchup and entries that were processed earlier during the
session will not be applied for the store.public void commitToVoldemort()
public void closeStreamingSessions(java.util.concurrent.Callable resetCheckpointCallback)
resetCheckpointCallback - - the callback that allows for the user to
clean up the checkpoint at the end of the streaming session so a
new session could, if necessary, start from 0 position.public void closeStreamingSessions()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||