
org.jsimpledb.kv.raft.PrefixPutFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsimpledb-kv-raft Show documentation
Show all versions of jsimpledb-kv-raft Show documentation
JSimpleDB distributed, linearizable ACID compliant key/value store implementation based on the Raft consensus algorithm.
/*
* Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
*/
package org.jsimpledb.kv.raft;
import com.google.common.primitives.Bytes;
import java.util.AbstractMap;
import java.util.Map;
class PrefixPutFunction extends AbstractPrefixFunction, Map.Entry> {
PrefixPutFunction(byte[] prefix) {
super(prefix);
}
@Override
public Map.Entry apply(Map.Entry entry) {
return new AbstractMap.SimpleEntry(Bytes.concat(this.prefix, entry.getKey()), entry.getValue());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy