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 singleNetworkRouteobject 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, searchMethods inherited from interface com.morpheusdata.core.MorpheusDataService
bulkCreate, bulkRemove, bulkSave, create, create, remove, remove, save, saveMethods 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 fullNetworkRouteobject for sync matching.- Parameters:
routeTable- theNetworkRouteTableIdentityProjectionidentifier 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 allNetworkRouteobjects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids- list of ids to grabNetworkRouteobjects from.- Returns:
- an RxJava Observable stream of
NetworkRouteto 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- TheNetworkRouterid of the network routerremoveList- a list ofNetworkRouteIdentityProjectionprojections to be removed- Returns:
- a Single
Observablereturning 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 newNetworkRouteobjects 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 singleNetworkRouteobject 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
-