Package io.micronaut.microstream.rest
Class DefaultMicroStreamRestService
java.lang.Object
io.micronaut.microstream.rest.DefaultMicroStreamRestService
- All Implemented Interfaces:
MicroStreamRestService
@Singleton
public class DefaultMicroStreamRestService
extends Object
implements MicroStreamRestService
Default implementation of
MicroStreamRestService
.- Since:
- 1.0.0
- Author:
- Tim Yates
-
Constructor Summary
ConstructorDescriptionDefaultMicroStreamRestService
(io.micronaut.context.BeanContext beanContext, Collection<RootClassConfigurationProvider> storageFoundations) Creates a service that allows us to query storage managers by name. -
Method Summary
Modifier and TypeMethodDescription@NonNull one.microstream.storage.restadapter.types.StorageRestAdapter
getAdapter
(@NonNull String name) Get the single adapter for a given storage name.@NonNull Optional<one.microstream.storage.restadapter.types.StorageRestAdapter>
Returns a single adaptor if only one is available.
-
Constructor Details
-
DefaultMicroStreamRestService
public DefaultMicroStreamRestService(io.micronaut.context.BeanContext beanContext, Collection<RootClassConfigurationProvider> storageFoundations) Creates a service that allows us to query storage managers by name.- Parameters:
beanContext
- the bean context to resolve storage managersstorageFoundations
- the bound storage foundations
-
-
Method Details
-
getAdapter
@NonNull public @NonNull one.microstream.storage.restadapter.types.StorageRestAdapter getAdapter(@NonNull @NonNull String name) Description copied from interface:MicroStreamRestService
Get the single adapter for a given storage name.- Specified by:
getAdapter
in interfaceMicroStreamRestService
- Parameters:
name
- the storage name- Returns:
- the adapter
-
singleAdapter
@NonNull public @NonNull Optional<one.microstream.storage.restadapter.types.StorageRestAdapter> singleAdapter()Description copied from interface:MicroStreamRestService
Returns a single adaptor if only one is available.- Specified by:
singleAdapter
in interfaceMicroStreamRestService
- Returns:
- The adaptor if only one is defined, or an empty optional if multiple are defined.
-