Package org.ngengine.platform
Class VStore
- java.lang.Object
-
- org.ngengine.platform.VStore
-
public class VStore extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVStore.VStoreBackend
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CREATE_IF_ABSENT_BYTESMaximum complete value accepted by conditional creation; existing write APIs are unchanged.
-
Constructor Summary
Constructors Constructor Description VStore(VStore.VStoreBackend backend)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AsyncTask<java.lang.Boolean>createIfAbsent(java.lang.String path, byte[] completeValue)Creates a complete value without replacing any existing target entry.AsyncTask<java.lang.Void>delete(java.lang.String path)AsyncTask<java.lang.Boolean>exists(java.lang.String path)AsyncTask<java.util.List<java.lang.String>>listAll()AsyncTask<java.io.InputStream>read(java.lang.String path)AsyncTask<byte[]>readFully(java.lang.String path)AsyncTask<java.io.OutputStream>write(java.lang.String path)AsyncTask<java.lang.Void>writeFully(java.lang.String path, byte[] data)
-
-
-
Field Detail
-
MAX_CREATE_IF_ABSENT_BYTES
public static final int MAX_CREATE_IF_ABSENT_BYTES
Maximum complete value accepted by conditional creation; existing write APIs are unchanged.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VStore
public VStore(VStore.VStoreBackend backend)
-
-
Method Detail
-
read
public AsyncTask<java.io.InputStream> read(java.lang.String path)
-
write
public AsyncTask<java.io.OutputStream> write(java.lang.String path)
-
createIfAbsent
public AsyncTask<java.lang.Boolean> createIfAbsent(java.lang.String path, byte[] completeValue)
Creates a complete value without replacing any existing target entry. True means this call published the value; false means an entry already exists. IO failures remain failures, and a failed call may have published a complete value before a subsequent durability/cleanup error. The value is copied before queueing and limited toMAX_CREATE_IF_ABSENT_BYTESbytes. Only the private copy is erased after backend completion. Cancelling the returned view does not cancel the private publication, which may still commit. This is ordinary desktop storage, not a vault against privileged processes or host access-control administration. Platforms without direct task completion observation are rejected. An observation failure abandons work that has not started; an already-started publication retains its private copy until the backend settles.
-
exists
public AsyncTask<java.lang.Boolean> exists(java.lang.String path)
-
delete
public AsyncTask<java.lang.Void> delete(java.lang.String path)
-
listAll
public AsyncTask<java.util.List<java.lang.String>> listAll()
-
writeFully
public AsyncTask<java.lang.Void> writeFully(java.lang.String path, byte[] data)
-
readFully
public AsyncTask<byte[]> readFully(java.lang.String path)
-
-