Package io.micronaut.eclipsestore.rest
Class EclipseStoreRestController
java.lang.Object
io.micronaut.eclipsestore.rest.EclipseStoreRestController
@Requires(bean=org.eclipse.store.storage.embedded.types.EmbeddedStorageFoundation.class)
@Controller("/${eclipsestore.rest.path:eclipsestore}")
public class EclipseStoreRestController
extends Object
EclipseStore REST controller for a single StorageManager.
- Since:
- 1.0.0
- Author:
- Tim Yates
-
Constructor Summary
ConstructorDescriptionA default controller to expose the expected EclipseStore REST API per storage manager. -
Method Summary
Modifier and TypeMethodDescriptionGet storage type dictionary.getDictionary
(String name) Get storage type dictionary.org.eclipse.store.storage.restadapter.types.ViewerStorageFileStatistics
Get statistics for all storage files.org.eclipse.store.storage.restadapter.types.ViewerStorageFileStatistics
getFilesStatistics
(String name) Get statistics for all storage files.org.eclipse.store.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.org.eclipse.store.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
-
EclipseStoreRestController
A default controller to expose the expected EclipseStore REST API per storage manager.- Parameters:
service
- the service to query EclipseStore 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 org.eclipse.store.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 org.eclipse.store.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 org.eclipse.store.storage.restadapter.types.ViewerStorageFileStatistics getFilesStatistics()Get statistics for all storage files.- Returns:
- the statistics as json
-
getFilesStatistics
@Get("/{name}/maintenance/filesStatistics") public org.eclipse.store.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
-