Package io.deephaven.kv.files
Class FilesContext
java.lang.Object
io.deephaven.kv.KeyPathContextBase
io.deephaven.kv.meta.AtomicDirectoryContext
io.deephaven.kv.files.FilesContext
- All Implemented Interfaces:
Context,KeyPathContext
- Direct Known Subclasses:
PersistentQueriesContext
A dynamic
KeyPath model around a list of files. Each file in the path
is modelled by a FileContext.
Models the data in FilesInfo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassstatic interfacestatic interfacestatic interfaceNested classes/interfaces inherited from class io.deephaven.kv.meta.AtomicDirectoryContext
AtomicDirectoryContext.AtomicUpdateWrt, AtomicDirectoryContext.MetaDescription -
Field Summary
Fields inherited from class io.deephaven.kv.meta.AtomicDirectoryContext
META, META_PART, parentFields inherited from class io.deephaven.kv.KeyPathContextBase
context, description -
Constructor Summary
ConstructorsConstructorDescriptionFilesContext(AtomicDirectoryContext parent, KeyPath context) FilesContext(AtomicDirectoryContext parent, String part) -
Method Summary
Modifier and TypeMethodDescriptionasFiles()atomic(UpdateInfo info, Collection<FileInfo> files, Composable onFailure) Atomic update of files in this directory.atomic(UpdateInfo info, Collection<FileInfo> files, Collection<String> toRemove, Composable onFailure) Atomic update plus remove of files in this directory.atomicDelete(@NotNull UpdateInfo info, @NotNull Collection<String> filenames) Atomic delete of files in this directory.static <T extends AtomicDirectoryContext>
KeyPathContextDescription.Entry<FilesContext,T> getAtomicChanges(UpdateInfo info, Collection<FileInfo> files, Collection<String> toRemove) Changes comprising atomic update plus remove of files in this directory.getFileContext(String name) watch(KVClient kvClient, WatchClient watchClient, FilesContext.FilesListener listener) Methods inherited from class io.deephaven.kv.meta.AtomicDirectoryContext
asDelete, atomic, atomicDelete, atomicDeleteChildren, expectNewWrtThis, expectUpdateWrtThis, getMetaInfoContext, getMetaInfoContext, getReadPermissions, getReadWritePaths, getReadWritePermissions, isLowestLevelAtomicDirectory, isMetaPart, isNotMeta, parseDirectoryListing, parseDirectoryListingStream, parseDirectoryListingStreamToSubset, watch, watch, watch, wrtAtomicConditionIsTrueHandleUsMethods inherited from class io.deephaven.kv.KeyPathContextBase
equals, getDescription, getPath, hashCodeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.deephaven.kv.KeyPathContext
resolve
-
Constructor Details
-
FilesContext
-
FilesContext
-
-
Method Details
-
entry
public static <T extends AtomicDirectoryContext> KeyPathContextDescription.Entry<FilesContext,T> entry(String part) -
getFileContext
-
atomic
public AtomicDirectoryContext.AtomicUpdateWrt atomic(UpdateInfo info, Collection<FileInfo> files, Composable onFailure) Atomic update of files in this directory.- Parameters:
info- info about the requested updatefiles- the files to updateonFailure- what to do if the update fails- Returns:
- the AtomicUpdateWrt
-
atomic
public AtomicDirectoryContext.AtomicUpdateWrt atomic(UpdateInfo info, Collection<FileInfo> files, Collection<String> toRemove, Composable onFailure) Atomic update plus remove of files in this directory.- Parameters:
info- info about the requested updatefiles- the files to updatetoRemove- the files to removeonFailure- what to do if the update fails- Returns:
- the AtomicUpdateWrt
-
getAtomicChanges
public Composable getAtomicChanges(UpdateInfo info, Collection<FileInfo> files, Collection<String> toRemove) Changes comprising atomic update plus remove of files in this directory.- Parameters:
info- info about the requested updatefiles- the files to updatetoRemove- the files to remove- Returns:
- the changes that will go into an AtomicUpdateWrt
-
atomicDelete
public AtomicDirectoryContext.AtomicUpdateWrt atomicDelete(@NotNull @NotNull UpdateInfo info, @NotNull @NotNull Collection<String> filenames) Atomic delete of files in this directory.- Parameters:
info- info about the requested updatefilenames- the names of files to delete- Returns:
- the AtomicUpdateWrt
-
asFiles
-
asFileIdentifiers
-
watch
public CompletableFuture<WatchClient.Watch> watch(KVClient kvClient, WatchClient watchClient, FilesContext.FilesListener listener)
-