class HazelcastEntryProcessor<K, T> implements EntryProcessor<K, byte[], byte[]>, ComparableByContent<HazelcastEntryProcessor> {

    private static final long serialVersionUID = 1L;

    private final byte[] requestBytes;
    private EntryProcessor<K, byte[], byte[]> backupProcessor;

    public HazelcastEntryProcessor(Request<T> request) {
        this.requestBytes = serializeRequest(request);
    }

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

    @Override
    public byte[] process(Map.Entry<K, byte[]> entry) {
        return new AbstractBinaryTransaction(requestBytes) {
            @Override
            public boolean exists() {
                return entry.getValue() != null;
            }

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

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

    @Override
    public EntryProcessor<K, byte[], byte[]> getBackupProcessor() {
        return backupProcessor;
    }

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

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

}

                ExpirationAfterWriteStrategy expirationStrategy = getExpirationStrategy();
                long ttlMillis = expirationStrategy == null ? -1 : expirationStrategy.calculateTimeToLiveMillis(newState, getCurrentTimeNanos());
                if (ttlMillis > 0) {
                    ExtendedMapEntry<K, byte[]> extendedEntry = (ExtendedMapEntry<K, byte[]>) entry;
                    extendedEntry.setValue(newStateBytes, ttlMillis, TimeUnit.MILLISECONDS);
                    backupProcessor = new VersionedBackupProcessor<>(newStateBytes, ttlMillis);
                } else {
                    entry.setValue(newStateBytes);
                    backupProcessor = new SimpleBackupProcessor<>(newStateBytes);
                }
            
<no_super_class>