synchronized KeyValue set(long index, String key, String value) {
        incrementLastAppliedIndex(index);

        entries.put(key, value);

        return new KeyValue(key, entries.get(key));
    }
synchronized KeyValue set ( long index , String key , String value ) { incrementLastAppliedIndex ( index ) ; entries . put ( key , value ) ; return new KeyValue ( key , entries . get ( key ) ) ; }
Set a key to a value.

@param index log index >= 0 associated with this command
@param key non-null (possibly empty) key for which the value should be set
@param value non-null, non-empty value for this key
@return a {@code KeyValue} instance containing the most up-to-date {@code key=>value} pair for {@code key}