WalletTasksWorkerPool class base
Worker pool for WalletTasks
- Implemented types
Constructors
- WalletTasksWorkerPool({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager, ConcurrencySettings? concurrencySettings})
- WalletTasksWorkerPool.js({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager, ConcurrencySettings? concurrencySettings})
- WalletTasksWorkerPool.vm({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager, ConcurrencySettings? concurrencySettings})
- WalletTasksWorkerPool.wasm({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager, ConcurrencySettings? concurrencySettings})
Properties
- channelLogger ↔ Logger?
-
getter/setter pairinherited
- concurrencySettings → ConcurrencySettings
-
Concurrency settings.
finalinherited
- exceptionManager → ExceptionManager
-
no setterinherited
-
fullStats
→ Iterable<
WorkerStat> -
Full worker statistics.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isReleased → bool
-
Returns
trueif the instance has been released,falseotherwise.no setterinherited - maxSize → int
-
Maximum number of workers.
no setterinherited
- operations → OperationsMap
-
Worker pools do not need an
operationsmap.no setterinherited - pendingWorkload → int
-
Gets remaining workload
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
Number of workers.
no setterinherited
-
stats
→ Iterable<
WorkerStat> -
Worker statistics.
no setterinherited
- stopped → bool
-
Whether this pool is scheduled for stopping.
no setterinherited
Methods
-
autoRelease(
List< Releasable?> instances) → void -
The
autoReleasemethod is used to register a set ofReleasableinstances that will be automatically released when this instance becomes unreachable. Please note that this mechanism is based on Dart's Finalizer feature which makes no guarantee that it will ever be called. Depending on instance dependencies and their relationship with the internal Finalizer instance, it may even never be called. For instance, make surethisis never passed toautoReleaseas this will create a cyclic graph of dependencies that will prevent finalization to happen.inherited -
buildHdWalletFromMnemonic(
List< String> mnemonic, int accountIndex) → Future<HdWallet> -
override
-
buildHdWalletFromSeed(
Uint8List seed, int accountIndex) → Future< HdWallet> -
override
-
buildWalletFromHdWallet(
HdWallet hdWallet, NetworkId networkId) → Future< CardanoWallet> -
override
-
cancel(
Task task, [String? message]) → void -
Task cancelation. If a specific
taskis provided, only this task will be canceled. Otherwise, all tasks registered with theWorkerPoolare canceled.inherited -
cancelAll(
[String? message]) → void -
Task cancelation. If a specific
taskis provided, only this task will be canceled. Otherwise, all tasks registered with theWorkerPoolare canceled.inherited -
ckdPubBip32Ed25519KeyDerivation(
Bip32PublicKey pubKey, int index) → Future< Bip32PublicKey> -
override
-
ckdPubBip32Ed25519KeyDerivations(
Bip32PublicKey pubKey, int startIndexInclusive, int endIndexExclusive) → Future< List< Bip32PublicKey> > -
override
-
deriveAddressKit(
HdWallet wallet, NetworkId networkId, int index, Bip32KeyRole role) → Future< CardanoAddressKit> -
override
-
execute<
T> (Future< T> task(WalletTasksWorker worker), {PerfCounter? counter}) → Future<T> -
Registers and schedules a
taskthat returns a single value. Returns a future that completes with the task's value.inherited -
findCardanoSigner(
String xPubHex, String requestedSignerRaw, int deriveMaxAddressCount) → Future< CardanoSigner> -
override
-
hexCredentialsDerivation(
Bip32PublicKey pubKey, int startIndexInclusive, int endIndexExclusive) → Future< List< String> > -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareTxsForSigningImpl(
String walletBech32Address, String drepCredential, String constitutionalCommitteeColdCredential, String constitutionalCommitteeHotCredential, NetworkId networkId, List< CardanoTransaction> txs, List<Utxo> utxos) → Future<TxSigningBundle> -
override
-
registerWorkerPoolListener(
void listener(WorkerStat, bool)) → Object -
Registers a callback to be invoked when a worker thread is added or removed from the pool.
inherited
-
release(
) → void -
The release method must be overriden in derived classes to clean up
any resources they use. Implementations should not throw and must call
super.release()in afinallyblock. If a derived class definesReleasablefields, these fields should be released of in this method. Note for implementers: it should be safe to call this method several times.inherited -
scheduleStreamTask<
T> (Stream< T> task(WalletTasksWorker worker), {PerfCounter? counter}) → StreamTask<T> -
Registers and schedules a
taskthat returns a stream of values. Returns aStreamTask.inherited -
scheduleValueTask<
T> (Future< T> task(WalletTasksWorker worker), {PerfCounter? counter}) → ValueTask<T> -
Registers and schedules a
taskthat returns a single value. Returns aValueTask.inherited -
signDataLegacy(
CardanoWallet wallet, String payloadHex, String requestedSignerRaw, int deriveMaxAddressCount) → Future< DataSignature> -
override
-
signDataV2(
CardanoWalletImpl wallet, String payloadHex, String requestedSignerRaw, int deriveMaxAddressCount) → Future< DataSignature> -
override
-
signTransactionsBundle(
CardanoWallet wallet, TxSigningBundle bundle, int deriveMaxAddressCount) → Future< TxSignedBundle> -
override
-
start(
) → FutureOr< void> -
Ensure at least
ConcurrencySettings.minWorkersworkers are started (defaulting to 1 ifConcurrencySettings.minWorkersis zero).inherited -
stop(
[bool predicate(WalletTasksWorker worker)?]) → int -
Stop idle pool workers matching the
predicate. Ifpredicateis null or not provided, all workers will be stopped. Stopping a worker does not interrupt or cancel processing. Workers will complete pending tasks before shutting down. In the meantime, they will not receive any new workload. Returns the number of workers that have been stopped.inherited -
stream<
T> (Stream< T> task(WalletTasksWorker worker), {PerfCounter? counter}) → Stream<T> -
Registers and schedules a
taskthat returns a stream of values. Returns a stream containing the task's values.inherited -
terminate(
[TaskTerminatedException? ex]) → void -
inherited
-
toCardanoBaseAddress(
Bip32PublicKey spend, Bip32PublicKey stake, NetworkId networkId, {CredentialType paymentType = CredentialType.key, CredentialType stakeType = CredentialType.key}) → Future< CardanoAddress> -
override
-
toCardanoRewardAddress(
Bip32PublicKey spend, NetworkId networkId, {CredentialType paymentType = CredentialType.key}) → Future< CardanoAddress> -
override
-
toString(
) → String -
A string representation of this object.
inherited
-
track(
) → void -
Implementations should call this method e.g. at construction time to make
sure they will be trackable in debugging scenarios. See
ReleasableTracker.enablefor more information.inherited -
unregisterWorkerPoolListener(
{dynamic listener(WorkerStat, bool)?, Object? token}) → void -
Unregisters a callback.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited