Interface MorpheusNetworkRouteService

All Superinterfaces:
MorpheusDataQueryService<NetworkRoute>, 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 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 full NetworkRoute object for sync matching.
      Parameters:
      routeTable - the NetworkRouteTableIdentityProjection 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 all NetworkRoute objects by a list of Identifiers. This is commonly used in sync / caching logic.
      Parameters:
      ids - list of ids to grab NetworkRoute 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 occur

      Example:

      
       morpheusContext.getNetwork().getRouter().getRoute().remove(networkRouter.id, removeItems).blockingGet()
       
      Parameters:
      networkRouterId - The NetworkRouter id of the network router
      removeList - a list of NetworkRouteIdentityProjection 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 new NetworkRoute 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 single NetworkRoute 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