Interface MultiClusterSupport<T>
-
- Type Parameters:
T- value type
- All Known Implementing Classes:
BroadcastableClusterInfoGroup,CassandraClusterInfoGroup,CoordinatedCloudStorageDataTransferApi,MultiClusterContainer
public interface MultiClusterSupport<T>Support storing values per cluster, iteration and lookup
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidforEach(java.util.function.BiConsumer<java.lang.String,T> action)Iterate through all valuesTgetValueOrNull(java.lang.String clusterId)Look up a value based on clusterIddefault TgetValueOrThrow(java.lang.String clusterId)Look up a value based on clusterIdintsize()
-
-
-
Method Detail
-
size
int size()
- Returns:
- the total number of clusters
-
forEach
void forEach(java.util.function.BiConsumer<java.lang.String,T> action)
Iterate through all values- Parameters:
action- function to consume the values
-
getValueOrNull
@Nullable T getValueOrNull(@Nullable java.lang.String clusterId)
Look up a value based on clusterId- Parameters:
clusterId- cluster id- Returns:
- the value of type T associated with the clusterId, or null if not found
-
getValueOrThrow
@NotNull default T getValueOrThrow(@Nullable java.lang.String clusterId) throws java.util.NoSuchElementException
Look up a value based on clusterId- Parameters:
clusterId- cluster id- Returns:
- the value of type T associated with the clusterId, or throws NoSuchElementException
- Throws:
java.util.NoSuchElementException- when no value is found
-
-