Class BaseOperationFactory
java.lang.Object
net.spy.memcached.ops.BaseOperationFactory
- All Implemented Interfaces:
OperationFactory
- Direct Known Subclasses:
AsciiOperationFactory, BinaryOperationFactory
Base class for operation factories.
There is little common code between OperationFactory implementations, but some exists, and is complicated and likely to cause problems.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone(KeyedOperation op) Clone an operation.protected abstract Collection<? extends Operation> private Stringfirst(Collection<String> keys)
-
Constructor Details
-
BaseOperationFactory
public BaseOperationFactory()
-
-
Method Details
-
first
-
clone
Description copied from interface:OperationFactoryClone an operation.This is used for requeueing operations after a server is found to be down.
Note that it returns more than one operation because a multi-get could potentially need to be played against a large number of underlying servers. In this case, there's a separate operation for each, and callback façade to reassemble them. It is left up to the operation pipeline to perform whatever optimization is required to turn these back into multi-gets.
- Specified by:
clonein interfaceOperationFactory- Parameters:
op- the operation to clone- Returns:
- a new operation for each key in the original operation
-
cloneGet
-