Package io.micronaut.microstream.rest
Class MicroStreamRestController
java.lang.Object
io.micronaut.microstream.rest.MicroStreamRestController
@Requires(bean=one.microstream.storage.embedded.types.EmbeddedStorageFoundation.class)
@Controller("/${microstream.rest.path:microstream}")
public class MicroStreamRestController
extends Object
MicroStream REST controller for a single StorageManager.
- Since:
- 1.0.0
- Author:
- Tim Yates
-
Constructor Summary
ConstructorDescriptionA default controller to expose the expected MicroStream REST API per storage manager. -
Method Summary
Modifier and TypeMethodDescriptionGet storage type dictionary.getDictionary
(String name) Get storage type dictionary.one.microstream.storage.restadapter.types.ViewerStorageFileStatistics
Get statistics for all storage files.one.microstream.storage.restadapter.types.ViewerStorageFileStatistics
getFilesStatistics
(String name) Get statistics for all storage files.one.microstream.storage.restadapter.types.ViewerObjectDescription
getObject
(String oid, @Nullable Long valueLength, @Nullable Long fixedOffset, @Nullable Long fixedLength, @Nullable Long variableOffset, @Nullable Long variableLength, @Nullable Boolean references) Get an object by its id.one.microstream.storage.restadapter.types.ViewerObjectDescription
getObject
(String name, String oid, @Nullable Long valueLength, @Nullable Long fixedOffset, @Nullable Long fixedLength, @Nullable Long variableOffset, @Nullable Long variableLength, @Nullable Boolean references) Get an object by its id.getRoot()
Get the user defined root.Get the user defined root.
-
Constructor Details
-
MicroStreamRestController
A default controller to expose the expected MicroStream REST API per storage manager.- Parameters:
service
- the service to query MicroStream via the relevantStorageRestAdapter
-
-
Method Details
-
getRoot
Get the user defined root.- Returns:
- the root object
-
getRoot
Get the user defined root.- Parameters:
name
- the name of the storage adapter- Returns:
- the root object
-
getDictionary
Get storage type dictionary.- Returns:
- storage type dictionary as a single string
-
getDictionary
Get storage type dictionary.- Parameters:
name
- the name of the storage adapter- Returns:
- storage type dictionary as a single string
-
getObject
@Get("/object/{oid}") public one.microstream.storage.restadapter.types.ViewerObjectDescription getObject(@PathVariable String oid, @Nullable @QueryValue @Nullable Long valueLength, @Nullable @QueryValue @Nullable Long fixedOffset, @Nullable @QueryValue @Nullable Long fixedLength, @Nullable @QueryValue @Nullable Long variableOffset, @Nullable @QueryValue @Nullable Long variableLength, @Nullable @QueryValue @Nullable Boolean references) Get an object by its id.- Parameters:
oid
- object id of the requested objectvalueLength
- limit size of returned value elements to this valuefixedOffset
- index of the first fix sized element to fetchfixedLength
- number of fix sized elements to be fetchedvariableOffset
- index of the first element in variable sized collections to be fetchedvariableLength
- number of elements to be fetched from variable sized collectionsreferences
- resolve top level references and return them with this request- Returns:
- the object
-
getObject
@Get("/{name}/object/{oid}") public one.microstream.storage.restadapter.types.ViewerObjectDescription getObject(@PathVariable String name, @PathVariable String oid, @Nullable @QueryValue @Nullable Long valueLength, @Nullable @QueryValue @Nullable Long fixedOffset, @Nullable @QueryValue @Nullable Long fixedLength, @Nullable @QueryValue @Nullable Long variableOffset, @Nullable @QueryValue @Nullable Long variableLength, @Nullable @QueryValue @Nullable Boolean references) Get an object by its id.- Parameters:
name
- the name of the storage adapteroid
- object id of the requested objectvalueLength
- limit size of returned value elements to this valuefixedOffset
- index of the first fix sized element to fetchfixedLength
- number of fix sized elements to be fetchedvariableOffset
- index of the first element in variable sized collections to be fetchedvariableLength
- number of elements to be fetched from variable sized collectionsreferences
- resolve top level references and return them with this request- Returns:
- the object
-
getFilesStatistics
@Get("/maintenance/filesStatistics") public one.microstream.storage.restadapter.types.ViewerStorageFileStatistics getFilesStatistics()Get statistics for all storage files.- Returns:
- the statistics as json
-
getFilesStatistics
@Get("/{name}/maintenance/filesStatistics") public one.microstream.storage.restadapter.types.ViewerStorageFileStatistics getFilesStatistics(@PathVariable String name) Get statistics for all storage files.- Parameters:
name
- the name of the storage adapter- Returns:
- the statistics as json
-