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

org.hyperledger.fabric.shim.ledger.KeyModification Maven / Gradle / Ivy

There is a newer version: 2.5.3
Show newest version
/*
Copyright IBM Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/

package org.hyperledger.fabric.shim.ledger;

/**
 * QueryResult for history query. Holds a transaction ID, value,
 * timestamp, and delete marker which resulted from a history query.
 */
public interface KeyModification {

    /**
     * Returns the transaction id.
     *
     * @return tx id of modification
     */
    String getTxId();

    /**
     * Returns the key's value at the time returned by {@link #getTimestamp()}.
     *
     * @return value
     */
    byte[] getValue();

    /**
     * Returns the key's value at the time returned by {@link #getTimestamp()},
     * decoded as a UTF-8 string.
     *
     * @return value as string
     */
    String getStringValue();

    /**
     * Returns the timestamp of the key modification entry.
     *
     * @return timestamp
     */
    java.time.Instant getTimestamp();

    /**
     * Returns the deletion marker.
     *
     * @return is key was deleted
     */
    boolean isDeleted();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy