public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) { backingMap.replaceAll(function); }
@Override public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { requireNonNull(function); // ensures that the removal notification is processed after the removal has completed @SuppressWarnings({"unchecked", "rawtypes"}) K[] notificationKey = (K[]) new Object[1]; @SuppressWarnings({"unchecked", "rawtypes"}) V[] notificationValue = (V[]) new Object[1]; data.replaceAll((key, value) -> { if (notificationKey[0] != null) { notifyRemoval(notificationKey[0], notificationValue[0], RemovalCause.REPLACED); notificationValue[0] = null; notificationKey[0] = null; } V newValue = requireNonNull(function.apply(key, value)); if (newValue != value) { writer.write(key, newValue); } if (hasRemovalListener() && (newValue != value)) { notificationKey[0] = key; notificationValue[0] = value; } return newValue; }); if (notificationKey[0] != null) { notifyRemoval(notificationKey[0], notificationValue[0], RemovalCause.REPLACED); } }
partitionGroups.get(groupId).replaceAll((partition, sequence) -> getNotSetMarker());
partitionGroups.get(groupId).replaceAll((partition, sequence) -> getNotSetMarker());
partitionGroups.get(groupId).replaceAll((partition, sequence) -> getNotSetMarker());
killTaskGroupForPartitions(ImmutableSet.of(partition), "DataSourceMetadata is updated while reset"); activelyReadingTaskGroups.remove(groupId); partitionGroups.get(groupId).replaceAll((partitionId, sequence) -> getNotSetMarker()); }); } else {
@Override public void replaceAll(BiFunction<? super K, ? super V, ? extends V> function) { requireNonNull(function); // ensures that the removal notification is processed after the removal has completed @SuppressWarnings({"unchecked", "rawtypes"}) K[] notificationKey = (K[]) new Object[1]; @SuppressWarnings({"unchecked", "rawtypes"}) V[] notificationValue = (V[]) new Object[1]; data.replaceAll((key, value) -> { if (notificationKey[0] != null) { notifyRemoval(notificationKey[0], notificationValue[0], RemovalCause.REPLACED); notificationValue[0] = null; notificationKey[0] = null; } V newValue = requireNonNull(function.apply(key, value)); if (newValue != value) { writer.write(key, newValue); } if (hasRemovalListener() && (newValue != value)) { notificationKey[0] = key; notificationValue[0] = value; } return newValue; }); if (notificationKey[0] != null) { notifyRemoval(notificationKey[0], notificationValue[0], RemovalCause.REPLACED); } }
public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) { backingMap.replaceAll(function); }
public void replaceAll(final BiFunction<? super K, ? super V, ? extends V> function) { backingMap.replaceAll(function); }
void decayThrottle() { unsolicitedThrottle.replaceAll((addr, i) -> { return i - 1; }); unsolicitedThrottle.values().removeIf(e -> e <= 0); }
partitionGroups.get(groupId).replaceAll((partition, offset) -> NOT_SET);
partitionGroups.get(groupId).replaceAll((partition, offset) -> NOT_SET);
partitionGroups.get(groupId).replaceAll((partition, offset) -> NOT_SET);
killTaskGroupForPartitions(ImmutableSet.of(partition)); taskGroups.remove(groupId); partitionGroups.get(groupId).replaceAll((partitionId, offset) -> NOT_SET); }); } else {