Package com.morpheusdata.core.network
Interface MorpheusNetworkRouteService
- All Superinterfaces:
MorpheusDataQueryService<NetworkRoute>
,MorpheusDataService<NetworkRoute,
,NetworkRouteIdentityProjection> MorpheusIdentityService<NetworkRouteIdentityProjection>
public interface MorpheusNetworkRouteService
extends MorpheusDataService<NetworkRoute,NetworkRouteIdentityProjection>, MorpheusIdentityService<NetworkRouteIdentityProjection>
This Context deals with interactions related to
NetworkRoute
objects. It can normally
be accessed via the primary MorpheusContext
via the MorpheusNetworkService
and
finally via the MorpheusNetworkRouterService
traversal.
Examples:
morpheusContext.getNetwork().getRouter().getRoute()
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>
create
(NetworkRouterIdentityProjection networkRouter, List<NetworkRoute> addList) Creates new Network Router from cache / sync implementationsio.reactivex.rxjava3.core.Observable<NetworkRoute>
listById
(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkRouteIdentityProjection>
Lists NetworkRouteIdentityProjections for a specified network route table.io.reactivex.rxjava3.core.Single<Boolean>
remove
(Long networkRouterId, List<NetworkRouteIdentityProjection> removeList) Removes Missing Network Routes on the Morpheus side.io.reactivex.rxjava3.core.Single<NetworkRoute>
save
(NetworkRouterIdentityProjection networkRouter, NetworkRoute networkRoute) Saves a singleNetworkRoute
object returning the final result object if any changes occurred during save.Methods inherited from interface com.morpheusdata.core.MorpheusDataQueryService
count, find, get, list, list, listById, listOptions, listOptions, search
Methods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, save
Methods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkRouteIdentityProjection> listIdentityProjections(NetworkRouteTableIdentityProjection routeTable) Lists NetworkRouteIdentityProjections for a specified network route table. The projection is a subset of the properties on a fullNetworkRoute
object for sync matching.- Parameters:
routeTable
- theNetworkRouteTableIdentityProjection
identifier associated to the route table to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<NetworkRoute> listById(Collection<Long> ids) Deprecated.Lists allNetworkRoute
objects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids
- list of ids to grabNetworkRoute
objects from.- Returns:
- an RxJava Observable stream of
NetworkRoute
to be subscribed to.
-
remove
io.reactivex.rxjava3.core.Single<Boolean> remove(Long networkRouterId, List<NetworkRouteIdentityProjection> removeList) Removes Missing Network Routes on the Morpheus side. This accepts the Projection Object instead of the main Object. It is important to note this is a Observer pattern and must be subscribed to in order for the action to occurExample:
morpheusContext.getNetwork().getRouter().getRoute().remove(networkRouter.id, removeItems).blockingGet()
- Parameters:
networkRouterId
- TheNetworkRouter
id of the network routerremoveList
- a list ofNetworkRouteIdentityProjection
projections to be removed- Returns:
- a Single
Observable
returning the success status of the operation.
-
create
io.reactivex.rxjava3.core.Single<Boolean> create(NetworkRouterIdentityProjection networkRouter, List<NetworkRoute> addList) Creates new Network Router from cache / sync implementations- Parameters:
networkRouter
- The {NetworkRouter} we are bulk creating routes into.addList
- List of newNetworkRoute
objects to be inserted into the database- Returns:
- notification of completion if someone really cares about it
-
save
io.reactivex.rxjava3.core.Single<NetworkRoute> save(NetworkRouterIdentityProjection networkRouter, NetworkRoute networkRoute) Saves a singleNetworkRoute
object returning the final result object if any changes occurred during save.- Parameters:
networkRoute
- the Network Route we wish to persist changes to- Returns:
- the resultant Host Record Object containing any additional metadata that may have been applied
-