Package com.exonum.binding.time
Interface TimeSchema
-
public interface TimeSchema
Exonum time service database schema. It provides read-only access to the state of the time oracle for a given database view.- See Also:
- Time oracle documentation
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description EntryIndexProxy<ZonedDateTime>
getTime()
Returns consolidated time output by the service, which can be used by other business logic on the blockchain.ProofMapIndexProxy<PublicKey,ZonedDateTime>
getValidatorsTimes()
Returns the table that stores time for every validator.static TimeSchema
newInstance(View dbView)
Constructs a time schema for a given dbView.
-
-
-
Method Detail
-
newInstance
static TimeSchema newInstance(View dbView)
Constructs a time schema for a given dbView.Won't be constructed unless time service is enabled. To enable time service, put 'time' into 'services.toml' file.
- Throws:
IllegalStateException
- if time service is not enabled
-
getTime
EntryIndexProxy<ZonedDateTime> getTime()
Returns consolidated time output by the service, which can be used by other business logic on the blockchain.At the time when a new blockchain is launched, the consolidated time is unknown until the transactions from at least two thirds of validator nodes are processed. In that case the result will not contain a value.
-
getValidatorsTimes
ProofMapIndexProxy<PublicKey,ZonedDateTime> getValidatorsTimes()
Returns the table that stores time for every validator.
-
-