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

com.scalar.dl.ledger.statemachine.Asset Maven / Gradle / Ivy

The newest version!
package com.scalar.dl.ledger.statemachine;

/**
 * An asset entry abstraction. An asset is a set of historical data and it's data is identified by
 * it's ID and age as conceptually described below.
 *
 * 

{@code asset-ID => {, , ..., }} * *

The largest age specifies the latest asset entry. * * @author Hiroyuki Yamada */ public interface Asset { /** * Returns an ID of the asset. This ID is the same in all aged. * * @return an ID of the asset */ String id(); /** * Returns an age of the asset. * * @return an age of the asset */ int age(); /** * Returns a data of the asset. * * @return a data of the asset */ T data(); /** * Returns the metadata with {@link AssetMetadata} of the asset. {@link AssetMetadata} is * available for committed assets and null for uncommitted assets. You get uncommitted assets only * when you put a new asset and get the asset you put in a contract because the contract is not * successfully finished yet. * * @return the metadata of the asset */ AssetMetadata metadata(); }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy