class InfinispanProcessor<K, R> implements
        SerializableFunction<EntryView.ReadWriteEntryView<K, byte[]>, byte[]>,
        ComparableByContent<InfinispanProcessor> {

    private static final long serialVersionUID = 911L;

    private final byte[] requestBytes;

    public InfinispanProcessor(Request<R> request) {
        this.requestBytes = InternalSerializationHelper.serializeRequest(request);
    }

    public InfinispanProcessor(byte[] requestBytes) {
        this.requestBytes = requestBytes;
    }

    @Override
    public byte[] apply(EntryView.ReadWriteEntryView<K, byte[]> entry) {<FILL_FUNCTION_BODY>}

    @Override
    public boolean equalsByContent(InfinispanProcessor other) {
        return ComparableByContent.equals(requestBytes, other.requestBytes);
    }

    public byte[] getRequestBytes() {
        return requestBytes;
    }

}

        if (requestBytes.length == 0) {
            // it is the marker to remove bucket state
            if (entry.find().isPresent()) {
                entry.remove();
                return new byte[0];
            }
        }

        return new AbstractBinaryTransaction(requestBytes) {
            @Override
            public boolean exists() {
                return entry.find().isPresent();
            }

            @Override
            protected byte[] getRawState() {
                return entry.get();
            }

            @Override
            protected void setRawState(byte[] newStateBytes, RemoteBucketState newState) {
                entry.set(newStateBytes);
            }
        }.execute();
    
<no_super_class>