Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Helper class used for operations that do "GET, modify, PUT" style operation that needs to be atomic.
public abstract class ReadModifyOperationCallback<IN,OUT> 
    implements StoreOperationCallback<IN,OUT>
    public OUT perform(StorableKey keyStoreBackend backend, IN arg)
            throws IOExceptionStoreException
        Storable entry = backend.findEntry(key);
        return perform(keybackendargentry);

Method for sub-classes to implement

entry NOTE: may be null if no entry exists in the store
    protected abstract OUT perform(StorableKey keyStoreBackend backend, IN arg,
            Storable entry)
        throws IOExceptionStoreException;
New to GrepCode? Check out our FAQ X