Class Operator
java.lang.Object
org.apache.opendal.NativeObject
org.apache.opendal.Operator
- All Implemented Interfaces:
AutoCloseable
Operator represents an underneath OpenDAL operator that accesses data
synchronously.
-
Field Summary
FieldsFields inherited from class NativeObject
nativeHandle -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcreateInputStream(String path) createInputStream(String path, ReadOptions options) createOutputStream(String path) createOutputStream(String path, int maxBytes) createOutputStream(String path, WriteOptions options) createReader(String path) Creates a reusable reader for a file with default execution options.createReader(String path, ReaderOptions options) Creates a reusable reader for a file.voidprotected voiddisposeInternal(long handle) Deletes underlying native object pointer.list(String path, ListOptions options) static OperatorConstruct an OpenDAL blocking operator:static Operatorof(ServiceConfig config) Construct an OpenDAL blocking operator.byte[]byte[]byte[]read(String path, ReadOptions options) voidvoidstat(String path, StatOptions options) voidvoidwrite(String path, byte[] content, WriteOptions options) voidvoidwrite(String path, String content, WriteOptions options) Methods inherited from class NativeObject
close, isDisposed
-
Field Details
-
info
-
-
Method Details
-
of
Construct an OpenDAL blocking operator.- Parameters:
config- the config of the underneath service to access data from.
-
of
Construct an OpenDAL blocking 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.
-
duplicate
- Returns:
- the cloned blocking operator.
- See Also:
-
write
-
write
-
write
-
write
-
createOutputStream
-
createOutputStream
-
createOutputStream
-
read
-
read
-
read
-
createReader
Creates a reusable reader for a file with default execution options.- Parameters:
path- file path- Returns:
- a reader that the caller must close
- See Also:
-
createReader
Creates a reusable reader for a file. Options apply to every read through the reader; each read selects its own byte range. The reader can outlive this operator. Creation does not read file contents or guarantee that the file exists. Version selection and conditions apply to all requests through the reader, including streams. All conditions must hold; a failed condition on an existing file fails with ConditionNotMatch and a missing file fails with NotFound. Depending on the service, errors may surface at creation or during reading.- Parameters:
path- file pathoptions- reader execution options- Returns:
- a reader that the caller must close
- Throws:
OpenDALException- if options are invalid (ConfigInvalid), the path is a directory (IsADirectory), or the service does not support reads or a requested option (Unsupported)IllegalStateException- if this operator is closed
-
createInputStream
-
createInputStream
-
delete
-
stat
-
stat
-
createDir
-
copy
-
rename
-
removeAll
-
list
-
list
-
disposeInternal
protected void disposeInternal(long handle) Description copied from class:NativeObjectDeletes underlying native object pointer.- Specified by:
disposeInternalin classNativeObject- Parameters:
handle- to the native object pointer
-