Package com.morpheusdata.core.network
Interface MorpheusNetworkSubnetService
- All Superinterfaces:
MorpheusDataQueryService<NetworkSubnet>,MorpheusDataService<NetworkSubnet,,NetworkSubnetIdentityProjection> MorpheusIdentityService<NetworkSubnetIdentityProjection>
public interface MorpheusNetworkSubnetService
extends MorpheusDataService<NetworkSubnet,NetworkSubnetIdentityProjection>, MorpheusIdentityService<NetworkSubnetIdentityProjection>
Morpheus Context as it relates to network subnets related operations. This context contains methods for querying subnets, creating,
updating and deleting subnets. Typically this class is accessed via the primary
MorpheusContext.- Since:
- 0.11.0
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<Boolean>create(List<NetworkSubnet> addList, Network network) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkSubnet>listById(Collection<Long> ids) Deprecated.io.reactivex.rxjava3.core.Observable<NetworkSubnetIdentityProjection>listIdentityProjections(Network network) Lists all subnet projection objects for a specified network.io.reactivex.rxjava3.core.Observable<NetworkSubnetIdentityProjection>listIdentityProjections(Long cloudId, Long cloudPoolId, String category) Lists all subnet projection objects for a specified cloud.io.reactivex.rxjava3.core.Single<Boolean>remove(List<NetworkSubnetIdentityProjection> removeList) Deprecated.io.reactivex.rxjava3.core.Single<Boolean>save(List<NetworkSubnet> networkSubnetsToSave) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadMethods 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, saveMethods inherited from interface com.morpheusdata.core.MorpheusIdentityService
getIdentityProperties, listIdentityProjections
-
Method Details
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkSubnetIdentityProjection> listIdentityProjections(Network network) Lists all subnet projection objects for a specified network. The projection is a subset of the properties on a fullNetworkSubnetobject for sync matching.- Parameters:
network- theNetworkidentifier associated to the subnets to be listed.- Returns:
- an RxJava Observable stream of result projection objects.
-
listIdentityProjections
io.reactivex.rxjava3.core.Observable<NetworkSubnetIdentityProjection> listIdentityProjections(Long cloudId, Long cloudPoolId, String category) Lists all subnet projection objects for a specified cloud. The projection is a subset of the properties on a fullNetworkSubnetobject for sync matching.- Parameters:
cloudId- id of theCloudidentifier associated to the subnets to be listed.cloudPoolId- (optional) id of theCloudPoolthat the associated Network must be associated with via assignedZonePoolscategory- (optional category name that the network must have- Returns:
- an RxJava Observable stream of result projection objects.
-
listById
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Observable<NetworkSubnet> listById(Collection<Long> ids) Deprecated.Lists allNetworkSubnetobjects by a list of Identifiers. This is commonly used in sync / caching logic.- Parameters:
ids- list of ids to grabNetworkSubnetobjects from.- Returns:
- an RxJava Observable stream of
NetworkSubnetto be subscribed to.
-
remove
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> remove(List<NetworkSubnetIdentityProjection> removeList) Deprecated.Removes Missing NetworkSubnets 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.getNetworkSubnet().remove(removeItems).blockingGet()- Specified by:
removein interfaceMorpheusDataService<NetworkSubnet,NetworkSubnetIdentityProjection> - Parameters:
removeList- list of NetworkSubnets to remove- Returns:
- a Single
Observablereturning the success status of the operation. - See Also:
-
create
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> create(List<NetworkSubnet> addList, Network network) Deprecated.Creates new NetworkSubnet Domains from cache / sync implementations- Parameters:
addList- List of newNetworkSubnetobjects to be inserted into the databasenetwork- Network to add the NetworkSubnet to- Returns:
- notification of completion if someone really cares about it
-
save
@Deprecated(since="0.15.4") io.reactivex.rxjava3.core.Single<Boolean> save(List<NetworkSubnet> networkSubnetsToSave) Deprecated.useMorpheusDataService.bulkSave(java.util.List<M>)insteadSaves a list ofNetworkSubnetobjects. Be mindful this is an RxJava implementation and must be subscribed to for any action to actually take place.- Specified by:
savein interfaceMorpheusDataService<NetworkSubnet,NetworkSubnetIdentityProjection> - Parameters:
networkSubnetsToSave- a List of NetworkSubnet objects that need to be updated in the database.- Returns:
- the Single Observable stating the success state of the save attempt
- See Also:
-
MorpheusDataService.bulkCreate(java.util.List<M>)instead