Package org.apache.opendal
Class AsyncOperator
java.lang.Object
org.apache.opendal.NativeObject
org.apache.opendal.AsyncOperator
- All Implemented Interfaces:
AutoCloseable
AsyncOperator represents an underneath OpenDAL operator that
accesses data asynchronously.
-
Field Summary
FieldsFields inherited from class org.apache.opendal.NativeObject
nativeHandle
-
Method Summary
Modifier and TypeMethodDescriptionblocking()
Create a new operator that performs every operation blocking.protected void
disposeInternal
(long handle) Deletes underlying native object pointer.Clone a new operator that is identical to this one.Create a new operator that is layered with the given layer.list
(String path, ListOptions options) static AsyncOperator
Construct an OpenDAL operator:static AsyncOperator
Construct an OpenDAL operator:static AsyncOperator
of
(ServiceConfig config) Construct an OpenDAL operator.static AsyncOperator
of
(ServiceConfig config, AsyncExecutor executor) Construct an OpenDAL operator.presignRead
(String path, Duration duration) presignStat
(String path, Duration duration) presignWrite
(String path, Duration duration) CompletableFuture<byte[]>
write
(String path, byte[] content, WriteOptions options) write
(String path, String content, WriteOptions options) Methods inherited from class org.apache.opendal.NativeObject
close, isDisposed
-
Field Details
-
info
-
-
Method Details
-
of
Construct an OpenDAL operator.- Parameters:
config
- the config of the underneath service to access data from.
-
of
Construct an OpenDAL operator.- Parameters:
executor
- the underneath executor to run async operations;null
to use a default global executor.
-
of
Construct an OpenDAL operator:You can find all possible schemes here and see what config options each service supports.
- Parameters:
scheme
- the name of the underneath service to access data from.map
- a map of properties to construct the underneath operator.
-
of
Construct an OpenDAL operator:You can find all possible schemes here and see what config options each service supports.
- Parameters:
scheme
- the name of the underneath service to access data from.map
- a map of properties to construct the underneath operator.executor
- the underneath executor to run async operations;null
to use a default global executor.
-
duplicate
Clone a new operator that is identical to this one. The new operator has its own lifecycle.Since an operator will release all its resource and "flush" on lifecycle end, this method is suitable to create a narrowed "scope" while avoiding creating a brand-new operator for each scope.
- Returns:
- the cloned operator.
-
layer
Create a new operator that is layered with the given layer.Note that the current operator is not modified. The returned operator is a new instance. You must close the current operator on demand to avoid resource leak.
- Parameters:
layer
- the layer to be applied.- Returns:
- the layered new operator.
-
blocking
Create a new operator that performs every operation blocking.Note that the current operator is not modified. The returned operator is a new instance. You must close the current operator on demand to avoid resource leak.
- Returns:
- the blocking new operator.
-
write
-
write
-
write
-
write
-
append
-
append
-
stat
-
read
-
presignRead
-
presignWrite
-
presignStat
-
delete
-
createDir
-
copy
-
rename
-
removeAll
-
list
-
list
-
disposeInternal
protected void disposeInternal(long handle) Description copied from class:NativeObject
Deletes underlying native object pointer.- Specified by:
disposeInternal
in classNativeObject
- Parameters:
handle
- to the native object pointer
-