java.lang.Object
io.hotmoka.local.Config.Builder<T>
- Enclosing class:
Config
The builder of a configuration object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configuration.protected abstract TgetThis()Standard design pattern.Sets the directory where the node's data will be persisted.setMaxGasPerViewTransaction(BigInteger maxGasPerViewTransaction) Sets the maximal amount of gas that a view transaction can consume.setMaxPollingAttempts(int maxPollingAttempts) Sets the maximal number of polling attempts, in milliseconds, while waiting for the result of a posted transaction.setPollingDelay(int pollingDelay) Sets the delay of two subsequent polling attempts, in milliseconds, while waiting for the result of a posted transaction.setRequestCacheSize(int requestCacheSize) Sets size of the cache for theNode.getRequest(TransactionReference)method.setResponseCacheSize(int responseCacheSize) Sets size of the cache for theNode.getResponse(TransactionReference)method.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
getThis
Standard design pattern. See http://www.angelikalanger.com/GenericsFAQ/FAQSections/ProgrammingIdioms.html#FAQ205 -
setMaxGasPerViewTransaction
Sets the maximal amount of gas that a view transaction can consume. It defaults to 100_000_000. -
setDir
Sets the directory where the node's data will be persisted. It defaults tochainin the current directory.- Parameters:
dir- the directory- Returns:
- this builder
-
setMaxPollingAttempts
Sets the maximal number of polling attempts, in milliseconds, while waiting for the result of a posted transaction. It defaults to 60.- Parameters:
maxPollingAttempts- the the maximal number of polling attempts- Returns:
- this builder
-
setPollingDelay
Sets the delay of two subsequent polling attempts, in milliseconds, while waiting for the result of a posted transaction. This delay is then increased by 10% at each subsequent attempt. It defaults to 10.- Parameters:
pollingDelay- the delay- Returns:
- this builder
-
setRequestCacheSize
Sets size of the cache for theNode.getRequest(TransactionReference)method. It defaults to 1,000.- Parameters:
requestCacheSize- the cache size- Returns:
- this builder
-
setResponseCacheSize
Sets size of the cache for theNode.getResponse(TransactionReference)method. It defaults to 1,000.- Parameters:
responseCacheSize- the cache size- Returns:
- this builder
-
build
Builds the configuration.- Returns:
- the configuration
-