Package dev.vortex.jni
Class NativeFiles
java.lang.Object
dev.vortex.jni.NativeFiles
Static utilities for discovering, deleting, and inspecting the metadata of Vortex files on an object store. The
caller supplies a
Session; its runtime handle is forwarded to the underlying object store.-
Method Summary
Modifier and TypeMethodDescriptionstatic voidDelete files at the given URIs.List all Vortex files reachable underuri.readMetadata(Session session, NativeReadable readable) Read the user-defined metadata segments of a Vortex file through a caller-providedNativeReadable, instead of a native storage client.Read the user-defined metadata segments written into the Vortex file aturi, as opaque bytes keyed by the names theVortexWriterbuilder was given.
-
Method Details
-
listFiles
List all Vortex files reachable underuri. -
delete
Delete files at the given URIs. Silently tolerates an empty list. -
readMetadata
public static Map<String,byte[]> readMetadata(Session session, String uri, Map<String, String> options) Read the user-defined metadata segments written into the Vortex file aturi, as opaque bytes keyed by the names theVortexWriterbuilder was given. Returns an empty map for a file that carries no metadata.This opens the file on its own. Metadata lives in dedicated segments that opening a file does not read by default, so a segment that falls outside the file-tail read costs an extra round trip.
-
readMetadata
Read the user-defined metadata segments of a Vortex file through a caller-providedNativeReadable, instead of a native storage client. SeereadMetadata(Session, String, Map).The readable must stay open for the duration of the call; native code never closes it.
NativeReadable.name()keys the file in the session's footer cache, exactly as it does when the readable is scanned, so reading metadata and then scanning the same file share one footer read.
-