Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.fasterxml.storemate.store.impl;
 
 
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>
    @Override
    public OUT perform(StorableKey keyStoreBackend backend, IN arg)
            throws IOExceptionStoreException
    {
        Storable entry = backend.findEntry(key);
        return perform(keybackendargentry);
    }

    
Method for sub-classes to implement

Parameters:
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