| Modifier | Constructor and Description |
|---|---|
protected |
AbstractService(short id,
java.lang.String name,
TransactionConverter transactionConverter)
Creates an AbstractService.
|
| Modifier and Type | Method and Description |
|---|---|
Transaction |
convertToTransaction(com.exonum.binding.common.message.BinaryMessage message)
Converts an Exonum transaction message to an executable transaction of this service.
|
protected abstract Schema |
createDataSchema(View view)
Creates a data schema of this service.
|
short |
getId()
Returns the id of the service.
|
java.lang.String |
getName()
Returns the name of the service.
|
java.util.List<com.exonum.binding.common.hash.HashCode> |
getStateHashes(Snapshot snapshot)
Returns a list of root hashes of all Merklized tables defined by this service,
as of the given snapshot of the blockchain state.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreatePublicApiHandlers, initializeprotected AbstractService(short id,
java.lang.String name,
TransactionConverter transactionConverter)
id - an id of the servicename - a name of the servicetransactionConverter - a transaction converter that is aware of
all transactions of this servicepublic short getId()
Servicepublic java.lang.String getName()
Servicepublic Transaction convertToTransaction(com.exonum.binding.common.message.BinaryMessage message)
ServiceconvertToTransaction in interface Servicemessage - a transaction message
(i.e., whose message type is a transaction and service id is set to the id of
this service)public java.util.List<com.exonum.binding.common.hash.HashCode> getStateHashes(Snapshot snapshot)
ServiceThe core uses this list to aggregate hashes of tables defined by all services into a single Merklized meta-map. The hash of this meta-map is considered the hash of the entire blockchain state and is recorded as such in blocks and Precommit messages.
getStateHashes in interface Servicesnapshot - a snapshot of the blockchain state. Not valid after this method returnsProofListIndexProxy.getRootHash(),
ProofMapIndexProxy.getRootHash()Copyright © 2018 Exonum. All rights reserved.