|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.spy.memcached.ops.BaseOperationFactory net.spy.memcached.protocol.ascii.AsciiOperationFactory
public class AsciiOperationFactory
Operation factory for the ascii protocol.
Constructor Summary | |
---|---|
AsciiOperationFactory()
|
Method Summary | |
---|---|
CASOperation |
cas(StoreType type,
String key,
long casId,
int flags,
int exp,
byte[] data,
OperationCallback cb)
Create a CAS operation. |
ConcatenationOperation |
cat(ConcatenationType catType,
long casId,
String key,
byte[] data,
OperationCallback cb)
Get a concatenation operation. |
protected Collection<? extends Operation> |
cloneGet(KeyedOperation op)
|
DeleteOperation |
delete(String key,
OperationCallback cb)
Create a deletion operation. |
FlushOperation |
flush(int delay,
OperationCallback cb)
Create a flush operation. |
GetOperation |
get(Collection<String> keys,
GetOperation.Callback cb)
Create a get operation. |
GetOperation |
get(String key,
GetOperation.Callback cb)
Create a get operation. |
GetsOperation |
gets(String key,
GetsOperation.Callback cb)
Create a gets operation. |
MutatorOperation |
mutate(Mutator m,
String key,
int by,
long exp,
int def,
OperationCallback cb)
Create a mutator operation. |
NoopOperation |
noop(OperationCallback cb)
Create a NOOP operation. |
StatsOperation |
stats(String arg,
StatsOperation.Callback cb)
Get a new StatsOperation. |
StoreOperation |
store(StoreType storeType,
String key,
int flags,
int exp,
byte[] data,
OperationCallback cb)
Create a store 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 AsciiOperationFactory()
Method Detail |
---|
public DeleteOperation delete(String key, OperationCallback cb)
OperationFactory
key
- the key to deletecb
- the status callback
public FlushOperation flush(int delay, OperationCallback cb)
OperationFactory
delay
- delay until flush.cb
- the status callback
public GetOperation get(String key, GetOperation.Callback cb)
OperationFactory
key
- the key to getcb
- the callback that will contain the results
public GetOperation get(Collection<String> keys, GetOperation.Callback cb)
OperationFactory
keys
- the collection of keys to getcb
- the callback that will contain the results
public GetsOperation gets(String key, GetsOperation.Callback cb)
OperationFactory
key
- the key to getcb
- the callback that will contain the results
public MutatorOperation mutate(Mutator m, String key, int by, long exp, int def, OperationCallback cb)
OperationFactory
m
- the mutator typekey
- the mutatee keyby
- the amount to increment or decrementexp
- the default valuedef
- expiration in case we need to default (0 if no default)cb
- the status callback
public StatsOperation stats(String arg, StatsOperation.Callback cb)
OperationFactory
arg
- the stat parameter (see protocol docs)cb
- the stats callback
public StoreOperation store(StoreType storeType, String key, int flags, int exp, byte[] data, OperationCallback cb)
OperationFactory
storeType
- the type of store operationkey
- the key to storeflags
- the storage flagsexp
- the expiration timedata
- the datacb
- the status callback
public VersionOperation version(OperationCallback cb)
OperationFactory
public NoopOperation noop(OperationCallback cb)
OperationFactory
cb
- the operation callback
public CASOperation cas(StoreType type, String key, long casId, int flags, int exp, byte[] data, OperationCallback 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, 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 Collection<? extends Operation> cloneGet(KeyedOperation op)
cloneGet
in class BaseOperationFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |