public interface Store| Modifier and Type | Method and Description |
|---|---|
void | add(String chunk, ChunkMeta chunkMeta, String path, IndexMeta indexMeta, Handler<AsyncResult<Void>> handler)Add a chunk to the store |
void | delete(String search, String path, Handler<AsyncResult<Void>> handler)Delete all chunks from the store that match a given query |
void | get(String search, String path, Handler<AsyncResult<StoreCursor>> handler)Get a number of chunks from the store using quick-search |
void | getOne(String path, Handler<AsyncResult<ChunkReadStream>> handler)Get a chunk from the store. |
void add(String chunk, ChunkMeta chunkMeta, String path, IndexMeta indexMeta, Handler<AsyncResult<Void>> handler)
chunk - the chunk to addchunkMeta - the chunk's metadatapath - the path where the chunk should be stored (may be null)indexMeta - metadata affecting the way the chunk will be indexedhandler - will be called when the chunk has been added to the storevoid getOne(String path, Handler<AsyncResult<ChunkReadStream>> handler)
ChunkReadStream must be closed after use to release all resources.path - the absolute path to the chunkhandler - will be called when the chunk has been retrieved from the storevoid delete(String search, String path, Handler<AsyncResult<Void>> handler)
search - the search querypath - the path where to search for the chunks (may be null)handler - will be called when the chunk has been deletedvoid get(String search, String path, Handler<AsyncResult<StoreCursor>> handler)
search - the search querypath - the path where to search for the chunks (may be null)handler - will be called when the chunks have been retrieved from the store