T- Type of element managed in this factory.
public interface AsyncObjectFactory<T>
|Modifier and Type||Method and Description|
Create an instance that can be served by the pool and wrap it in a
Destroys an instance no longer needed by the pool.
Ensures that the instance is safe to be returned by the pool.
PooledObjectto be managed by the pool.
PooledObjectwrapping an instance that can be served by the pool
CompletableFuture<Void> destroy(T object)
It is important for implementations of this method to be aware that there is no guarantee about what state
will be in and the implementation should be prepared to handle unexpected errors.
Also, an implementation must take in to consideration that instances lost to the garbage collector may never be destroyed.
PooledObjectwrapping the instance to be destroyed
Copyright © 2022 lettuce.io. All rights reserved.