Code example for SetMultimap

Methods: putremove

                    "if onItemAdded subsequently received will get new container then", item, newNode);
        ContainerType newNodeNonNull = toNonNullContainer(newNode);
        ContainerType oldNode = itemToContainer.put(item, newNodeNonNull);
        if (oldNode != null && oldNode != NULL_CONTAINER) containerToItems.remove(oldNode, item);
        if (newNode != null) containerToItems.put(newNode, item);
    public void onContainerAdded(ContainerType newContainer, double lowThreshold, double highThreshold) {
        boolean added = containers.add(newContainer);
        if (!added) {
            // See LoadBalancingPolicy.onContainerAdded for possible explanation of why can get duplicate calls 
            LOG.debug("Duplicate container-added event for {}; ignoring", newContainer);
        containerToLowThreshold.put(newContainer, lowThreshold);
        containerToHighThreshold.put(newContainer, highThreshold);
        poolLowThreshold += lowThreshold;
Stop searching for code, let great code find you!  Add Codota to your java IDE