All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.redisson.api.RListMultimapReactive Maven / Gradle / Ivy

There is a newer version: 3.34.1
Show newest version
/**
 * Copyright 2018 Nikita Koksharov
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.redisson.api;

import java.util.List;

import org.reactivestreams.Publisher;

/**
 * 
 * @author Nikita Koksharov
 *
 * @param  key type
 * @param  value type
 */
public interface RListMultimapReactive extends RMultimapReactive {

    /**
     * Returns a view List of the values associated with {@code key} in this
     * multimap, if any. Note that when {@code containsKey(key)} is false, this
     * returns an empty collection, not {@code null}.
     *
     * 

Changes to the returned collection will update the underlying multimap, * and vice versa. * * @param key - map key * @return list of values */ RListReactive get(K key); /** * Returns all elements at once. Result Set is NOT backed by map, * so changes are not reflected in map. * * @param key - map key * @return list of values */ Publisher> getAll(K key); /** * Removes all values associated with the key {@code key}. * *

Once this method returns, {@code key} will not be mapped to any values *

Use {@link RMultimapReactive#fastRemove} if values are not needed.

* * @param key - map key * @return the values that were removed (possibly empty). The returned * list may be modifiable, but updating it will have no * effect on the multimap. */ Publisher> removeAll(Object key); /** * Stores a collection of values with the same key, replacing any existing * values for that key. * *

If {@code values} is empty, this is equivalent to * {@link #removeAll(Object)}. * * @param key - map key * @param values - map values * @return list of replaced values, or an empty collection if no * values were previously associated with the key. List * may be modifiable, but updating it will have no effect on the * multimap. */ Publisher> replaceValues(K key, Iterable values); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy