|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.spy.memcached.ops.BaseOperationFactory
net.spy.memcached.protocol.binary.BinaryOperationFactory
public class BinaryOperationFactory
Factory for binary operations.
Constructor Summary | |
---|---|
BinaryOperationFactory()
|
Method Summary | |
---|---|
CASOperation |
cas(StoreType type,
java.lang.String key,
long casId,
int flags,
int exp,
byte[] data,
StoreOperation.Callback cb)
Create a CAS operation. |
ConcatenationOperation |
cat(ConcatenationType catType,
long casId,
java.lang.String key,
byte[] data,
OperationCallback cb)
Get a concatenation operation. |
protected java.util.Collection<? extends Operation> |
cloneGet(KeyedOperation op)
|
DeleteOperation |
delete(java.lang.String key,
OperationCallback operationCallback)
Create a deletion operation. |
FlushOperation |
flush(int delay,
OperationCallback cb)
Create a flush operation. |
GetOperation |
get(java.util.Collection<java.lang.String> value,
GetOperation.Callback cb)
Create a get operation. |
GetOperation |
get(java.lang.String key,
GetOperation.Callback callback)
Create a get operation. |
GetAndTouchOperation |
getAndTouch(java.lang.String key,
int expiration,
GetAndTouchOperation.Callback cb)
Gets the value of a key and resets its timeout. |
GetlOperation |
getl(java.lang.String key,
int exp,
GetlOperation.Callback cb)
Create a getl operation. |
GetsOperation |
gets(java.lang.String key,
GetsOperation.Callback cb)
Create a gets operation. |
MutatorOperation |
mutate(Mutator m,
java.lang.String key,
long by,
long def,
int exp,
OperationCallback cb)
Create a mutator operation. |
NoopOperation |
noop(OperationCallback cb)
Create a NOOP operation. |
ObserveOperation |
observe(java.lang.String key,
long casId,
int index,
ObserveOperation.Callback cb)
Create an Observe operation. |
SASLAuthOperation |
saslAuth(java.lang.String[] mech,
java.lang.String serverName,
java.util.Map<java.lang.String,?> props,
javax.security.auth.callback.CallbackHandler cbh,
OperationCallback cb)
Create a new sasl auth operation. |
SASLMechsOperation |
saslMechs(OperationCallback cb)
Create a new SASL mechs operation. |
SASLStepOperation |
saslStep(java.lang.String[] mech,
byte[] challenge,
java.lang.String serverName,
java.util.Map<java.lang.String,?> props,
javax.security.auth.callback.CallbackHandler cbh,
OperationCallback cb)
Create a new sasl step operation. |
StatsOperation |
stats(java.lang.String arg,
StatsOperation.Callback cb)
Get a new StatsOperation. |
StoreOperation |
store(StoreType storeType,
java.lang.String key,
int flags,
int exp,
byte[] data,
StoreOperation.Callback cb)
Create a store operation. |
TapOperation |
tapAck(TapOpcode opcode,
int opaque,
OperationCallback cb)
Sends a tap ack message to the server. |
TapOperation |
tapBackfill(java.lang.String id,
long date,
OperationCallback cb)
Creates a tap backfill stream. |
TapOperation |
tapCustom(java.lang.String id,
RequestMessage message,
OperationCallback cb)
Creates a custom tap stream. |
TapOperation |
tapDump(java.lang.String id,
OperationCallback cb)
Sends a tap dump message to the server. |
KeyedOperation |
touch(java.lang.String key,
int expiration,
OperationCallback cb)
Resets a keys expiration time. |
UnlockOperation |
unlock(java.lang.String key,
long casId,
OperationCallback cb)
Create a Unlock operation. |
VersionOperation |
version(OperationCallback cb)
Create a new version operation. |
Methods inherited from class net.spy.memcached.ops.BaseOperationFactory |
---|
clone |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BinaryOperationFactory()
Method Detail |
---|
public DeleteOperation delete(java.lang.String key, OperationCallback operationCallback)
OperationFactory
key
- the key to deleteoperationCallback
- the status callback
public UnlockOperation unlock(java.lang.String key, long casId, OperationCallback cb)
OperationFactory
key
- the key to unlockcasId
- the value of CAScb
- the status callback
public ObserveOperation observe(java.lang.String key, long casId, int index, ObserveOperation.Callback cb)
OperationFactory
key
- the key to observecasId
- the value of CASindex
- the VBucket index of keycb
- the status callback
public FlushOperation flush(int delay, OperationCallback cb)
OperationFactory
delay
- delay until flush.cb
- the status callback
public GetAndTouchOperation getAndTouch(java.lang.String key, int expiration, GetAndTouchOperation.Callback cb)
OperationFactory
key
- the key to get a value for and reset its timeoutexpiration
- the new expiration for the keycb
- the callback that will contain the result
public GetOperation get(java.lang.String key, GetOperation.Callback callback)
OperationFactory
key
- the key to getcallback
- the callback that will contain the results
public GetOperation get(java.util.Collection<java.lang.String> value, GetOperation.Callback cb)
OperationFactory
value
- the collection of keys to getcb
- the callback that will contain the results
public GetlOperation getl(java.lang.String key, int exp, GetlOperation.Callback cb)
OperationFactory
key
- the key to get and lockexp
- the amount of time the lock should be valid for in seconds.cb
- the callback that will contain the results
public GetsOperation gets(java.lang.String key, GetsOperation.Callback cb)
OperationFactory
key
- the key to getcb
- the callback that will contain the results
public MutatorOperation mutate(Mutator m, java.lang.String key, long by, long def, int exp, OperationCallback cb)
OperationFactory
m
- the mutator typekey
- the mutatee keyby
- the amount to increment or decrementdef
- the default valueexp
- expiration in case we need to default (0 if no default)cb
- the status callback
public StatsOperation stats(java.lang.String arg, StatsOperation.Callback cb)
OperationFactory
arg
- the stat parameter (see protocol docs)cb
- the stats callback
public StoreOperation store(StoreType storeType, java.lang.String key, int flags, int exp, byte[] data, StoreOperation.Callback cb)
OperationFactory
storeType
- the type of store operationkey
- the key to storeflags
- the storage flagsexp
- the expiration timedata
- the datacb
- the status callback
public KeyedOperation touch(java.lang.String key, int expiration, OperationCallback cb)
OperationFactory
key
- The key whose expiration time is to be reset.expiration
- The new expiration time for the keycb
- The status callback
public VersionOperation version(OperationCallback cb)
OperationFactory
public NoopOperation noop(OperationCallback cb)
OperationFactory
cb
- the operation callback
public CASOperation cas(StoreType type, java.lang.String key, long casId, int flags, int exp, byte[] data, StoreOperation.Callback cb)
OperationFactory
key
- the key to storecasId
- the CAS identifier value (from a gets operation)flags
- the storage flagsexp
- the expiration timedata
- the datacb
- the status callback
public ConcatenationOperation cat(ConcatenationType catType, long casId, java.lang.String key, byte[] data, OperationCallback cb)
OperationFactory
catType
- the type of concatenation to perform.casId
- the CAS value for an atomic compare-and-catkey
- the keydata
- the data to storecb
- a callback for reporting the status
protected java.util.Collection<? extends Operation> cloneGet(KeyedOperation op)
cloneGet
in class BaseOperationFactory
public SASLAuthOperation saslAuth(java.lang.String[] mech, java.lang.String serverName, java.util.Map<java.lang.String,?> props, javax.security.auth.callback.CallbackHandler cbh, OperationCallback cb)
OperationFactory
public SASLMechsOperation saslMechs(OperationCallback cb)
OperationFactory
public SASLStepOperation saslStep(java.lang.String[] mech, byte[] challenge, java.lang.String serverName, java.util.Map<java.lang.String,?> props, javax.security.auth.callback.CallbackHandler cbh, OperationCallback cb)
OperationFactory
public TapOperation tapBackfill(java.lang.String id, long date, OperationCallback cb)
OperationFactory
id
- The name for the TAP connectiondate
- The date to start backfill from.cb
- The status callback.
public TapOperation tapCustom(java.lang.String id, RequestMessage message, OperationCallback cb)
OperationFactory
id
- The name for the TAP connectionmessage
- The tap message to send.cb
- The status callback.
public TapOperation tapAck(TapOpcode opcode, int opaque, OperationCallback cb)
OperationFactory
opcode
- the opcode sent to the client by the server.opaque
- the opaque value sent to the client by the server.cb
- the callback for the tap stream.
public TapOperation tapDump(java.lang.String id, OperationCallback cb)
OperationFactory
id
- the name for the TAP connectioncb
- the callback for the tap stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |