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 Details

    • MicroStreamRestController

      public MicroStreamRestController(MicroStreamRestService service)
      A default controller to expose the expected MicroStream REST API per storage manager.
      Parameters:
      service - the service to query MicroStream via the relevant StorageRestAdapter
  • Method Details

    • getRoot

      @Get("/root") public RootObject getRoot()
      Get the user defined root.
      Returns:
      the root object
    • getRoot

      @Get("/{name}/root") public RootObject getRoot(@PathVariable String name)
      Get the user defined root.
      Parameters:
      name - the name of the storage adapter
      Returns:
      the root object
    • getDictionary

      @Get("/dictionary") public String getDictionary()
      Get storage type dictionary.
      Returns:
      storage type dictionary as a single string
    • getDictionary

      @Get("/{name}/dictionary") public String getDictionary(@PathVariable String name)
      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 object
      valueLength - limit size of returned value elements to this value
      fixedOffset - index of the first fix sized element to fetch
      fixedLength - number of fix sized elements to be fetched
      variableOffset - index of the first element in variable sized collections to be fetched
      variableLength - number of elements to be fetched from variable sized collections
      references - 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 adapter
      oid - object id of the requested object
      valueLength - limit size of returned value elements to this value
      fixedOffset - index of the first fix sized element to fetch
      fixedLength - number of fix sized elements to be fetched
      variableOffset - index of the first element in variable sized collections to be fetched
      variableLength - number of elements to be fetched from variable sized collections
      references - 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