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 | appendTags(String search, String path, List<String> tags, Handler<AsyncResult<Void>> handler) Append tags to of a list of chunks selected by search and path |
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 | getAttributeValues(String search, String path, String attribute, Handler<AsyncResult<AsyncCursor<String>>> handler) Get all values for the specified attribute |
void | getOne(String path, Handler<AsyncResult<ChunkReadStream>> handler) Get a chunk from the store. |
void | getPropertyValues(String search, String path, String property, Handler<AsyncResult<AsyncCursor<String>>> handler) Get all values for the specified property |
void | removeProperties(String search, String path, List<String> properties, Handler<AsyncResult<Void>> handler) Remove the properties of a list of chunks selected by search and path |
void | removeTags(String search, String path, List<String> tags, Handler<AsyncResult<Void>> handler) Remove the tags of a list of chunks selected by search and path |
void | scroll(String scrollId, Handler<AsyncResult<StoreCursor>> handler) Continue scrolling with a given scrollId |
void | scroll(String search, String path, int size, Handler<AsyncResult<StoreCursor>> handler) Start scrolling but load only one frame. |
void | setProperties(String search, String path, Map<String,String> properties, Handler<AsyncResult<Void>> handler) Set the properties of a list of chunks selected by search and path |
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 storevoid scroll(String search, String path, int size, 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 storesize
- the number of elements to load.void scroll(String scrollId, Handler<AsyncResult<StoreCursor>> handler)
scrollId
- The scrollId to load the chunkshandler
- will be called when the chunks have been retrieved from the storevoid getAttributeValues(String search, String path, String attribute, Handler<AsyncResult<AsyncCursor<String>>> handler)
search
- the search querypath
- the path where to search for the values (may be null)attribute
- the name of the attributehandler
- will be called when the values have been retrieved from the storevoid getPropertyValues(String search, String path, String property, Handler<AsyncResult<AsyncCursor<String>>> handler)
search
- the search querypath
- the path where to search for the values (may be null)property
- the name of the propertyhandler
- will be called when the values have been retrieved from the storevoid setProperties(String search, String path, Map<String,String> properties, Handler<AsyncResult<Void>> handler)
search
- the search querypath
- the path where to search for the values (may be null)properties
- the list of properties to sethandler
- will be called when the properties are setvoid removeProperties(String search, String path, List<String> properties, Handler<AsyncResult<Void>> handler)
search
- the search querypath
- the path where to search for the values (may be null)properties
- the list of properties to removehandler
- will be called when the properties are removedvoid appendTags(String search, String path, List<String> tags, Handler<AsyncResult<Void>> handler)
search
- the search querypath
- the path where to search for the values (may be null)tags
- the list of tags to appendhandler
- will be called when the tags are appendedvoid removeTags(String search, String path, List<String> tags, Handler<AsyncResult<Void>> handler)
search
- the search querypath
- the path where to search for the values (may be null)tags
- the list of tags to removehandler
- will be called when the tags are removed