OrderedPool<PoolResourceType extends Object> class
- Inheritance
-
- Object
- AbstractPool<
PoolResourceType> - OrderedPool
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allPoolResources(
) → FutureOr< int> -
Get the number of all resources in the pool, including free and in use.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
operateOnResourceWithoutTimeout<
ReturnType> (OperationOnResource< PoolResourceType, ReturnType> operationOnResource) → Future<ReturnType> -
Try to borrow a resource from the pool. If the pool has no resource
available, try to create a new one. If the pool is full, then throw an
exception GetResourceFromPoolFailed.
override
-
operateOnResourceWithTimeout<
ReturnType> (OperationOnResource< PoolResourceType, ReturnType> operationOnResource, Duration timeout) → Future<ReturnType> -
Like the operateOnResourceWithoutTimeout, but with a timeout. It will
wait until the resource is borrowed or the timeout is reached. Note
that the zero duration timeout means wait forever.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create<
PoolResourceType extends Object> (PoolMeta poolMeta, {required FutureOr< PoolResource< poolObjectFactory()}) → FutureOr<PoolResourceType> >OrderedPool< PoolResourceType> >