@ThreadSafe public abstract class LedgerTracerBase<T> extends java.lang.Object implements Ledger<T>
Ledger
that is used for validation.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,Asset<T>> |
inputs |
protected java.util.Map<java.lang.String,T> |
outputs |
Constructor and Description |
---|
LedgerTracerBase() |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Asset<T>> |
get(java.lang.String assetId)
Retrieves the latest
Asset entry (an asset entry with the largest age) from the ledger
with the specified asset ID. |
abstract java.lang.String |
getOutput(java.lang.String assetId) |
abstract java.util.Map<java.lang.String,java.lang.String> |
getOutputs() |
void |
put(java.lang.String assetId,
T data)
Creates/Appends an
Asset entry to the ledger. |
abstract void |
setInput(java.lang.String input) |
abstract void |
setInput(java.lang.String assetId,
com.scalar.dl.ledger.statemachine.InternalAsset asset) |
protected final java.util.Map<java.lang.String,T> outputs
public abstract void setInput(java.lang.String input)
public abstract void setInput(java.lang.String assetId, com.scalar.dl.ledger.statemachine.InternalAsset asset)
public abstract java.lang.String getOutput(java.lang.String assetId)
public abstract java.util.Map<java.lang.String,java.lang.String> getOutputs()
public java.util.Optional<Asset<T>> get(java.lang.String assetId)
Ledger
Asset
entry (an asset entry with the largest age) from the ledger
with the specified asset ID.