All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jsimpledb.kv.mvcc.Mutations Maven / Gradle / Ivy

The newest version!

/*
 * Copyright (C) 2015 Archie L. Cobbs. All rights reserved.
 */

package org.jsimpledb.kv.mvcc;

import java.util.Map;

import org.jsimpledb.kv.KeyRange;

/**
 * Represents a set of mutations that can be applied to a {@link org.jsimpledb.kv.KVStore}.
 *
 * 

* Each mutation is either a key/value put, the removal of a key range (possibly containing only a single key), * or a counter adjustment. Mutations are expected to be applied in the order: removes, puts, adjusts. Therefore, * if the same key is mutated in multiple ways, adjusts should occur after puts, and puts should occur after removes. */ public interface Mutations { /** * Get the key ranges removals contained by this instance. * *

* The caller must not invoke {@link java.util.Iterator#remove}. * * @return key ranges removed */ Iterable getRemoveRanges(); /** * Get the written key/value pairs contained by this instance. * *

* The caller must not modify any of the returned {@code byte[]} arrays, nor invoke {@link java.util.Iterator#remove}. * * @return mapping from key to corresponding value */ Iterable> getPutPairs(); /** * Get the counter adjustments contained by this instance. * *

* The caller must not modify any of the returned {@code byte[]} arrays, nor invoke {@link java.util.Iterator#remove}. * * @return mapping from key to corresponding counter adjustment */ Iterable> getAdjustPairs(); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy