Class InstancesDiff.InstanceCollection
- java.lang.Object
-
- org.apache.sling.discovery.commons.InstancesDiff.InstanceCollection
-
- Enclosing class:
- InstancesDiff
@Deprecated(since="2021-09-30") public final class InstancesDiff.InstanceCollection extends Object
Deprecated.This API is not supported in Cloud Service.TheInstanceCollection
collection allows to filter the instances using a set of custom filter either implementingInstanceFilter
or pre-defined ones.Filters conditions are joined combined together using the logical operator "AND".
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description @NotNull InstancesDiff.InstanceCollection
filterWith(@Nullable InstanceFilter filter)
Deprecated.Filter the instances with a customInstanceFilter
filter.@NotNull Collection<InstanceDescription>
get()
Deprecated.Return the collection ofInstanceDescription
instances that have not been filtered out.@NotNull InstancesDiff.InstanceCollection
isInClusterView(@Nullable ClusterView clusterView)
Deprecated.Keep only the instances that are contained in the sameClusterView
cluster view as the one provided.@NotNull InstancesDiff.InstanceCollection
isLeader()
Deprecated.Keep only the leader instances (seeInstanceDescription.isLeader()
.@NotNull InstancesDiff.InstanceCollection
isLocal()
Deprecated.Keep only the local instance (seeInstanceDescription.isLocal()
.@NotNull InstancesDiff.InstanceCollection
isNotInClusterView(@Nullable ClusterView clusterView)
Deprecated.Filter out the instances that are contained in the sameClusterView
cluster view as the one provided.@NotNull InstancesDiff.InstanceCollection
isNotLeader()
Deprecated.Filter out the leader instances (seeInstanceDescription.isLeader()
.@NotNull InstancesDiff.InstanceCollection
isNotLocal()
Deprecated.Filter out the local instances (seeInstanceDescription.isLocal()
.
-
-
-
Method Detail
-
filterWith
@NotNull public @NotNull InstancesDiff.InstanceCollection filterWith(@Nullable @Nullable InstanceFilter filter)
Deprecated.Filter the instances with a customInstanceFilter
filter.- Parameters:
filter
- the filter to be applied on the instances- Returns:
this
-
isLocal
@NotNull public @NotNull InstancesDiff.InstanceCollection isLocal()
Deprecated.Keep only the local instance (seeInstanceDescription.isLocal()
.- Returns:
this
-
isNotLocal
@NotNull public @NotNull InstancesDiff.InstanceCollection isNotLocal()
Deprecated.Filter out the local instances (seeInstanceDescription.isLocal()
.- Returns:
this
-
isLeader
@NotNull public @NotNull InstancesDiff.InstanceCollection isLeader()
Deprecated.Keep only the leader instances (seeInstanceDescription.isLeader()
.- Returns:
this
-
isNotLeader
@NotNull public @NotNull InstancesDiff.InstanceCollection isNotLeader()
Deprecated.Filter out the leader instances (seeInstanceDescription.isLeader()
.- Returns:
this
-
isInClusterView
@NotNull public @NotNull InstancesDiff.InstanceCollection isInClusterView(@Nullable @Nullable ClusterView clusterView)
Deprecated.Keep only the instances that are contained in the sameClusterView
cluster view as the one provided.The comparison between cluster views is done on the basis of the cluster view identifier. Two cluster views with the same identifier are considered equal.
- Parameters:
clusterView
- the cluster view used to filter the instances- Returns:
this
-
isNotInClusterView
@NotNull public @NotNull InstancesDiff.InstanceCollection isNotInClusterView(@Nullable @Nullable ClusterView clusterView)
Deprecated.Filter out the instances that are contained in the sameClusterView
cluster view as the one provided.The comparison between cluster views is done on the basis of the cluster view identifier. Two cluster views with the same identifier are considered equal.
- Parameters:
clusterView
- the cluster view used to filter the instances- Returns:
this
-
get
@NotNull public @NotNull Collection<InstanceDescription> get()
Deprecated.Return the collection ofInstanceDescription
instances that have not been filtered out.- Returns:
- the filtered collection of instances.
-
-