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.40.2
Show newest version
/**
 * Copyright (c) 2013-2024 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 reactor.core.publisher.Mono;

/**
 * Reactive interface for List based Multimap object
 * 
 * @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 */ Mono> 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. */ Mono> 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. */ Mono> replaceValues(K key, Iterable values); /** * Adds object event listener * * @see org.redisson.api.listener.MapPutListener * @see org.redisson.api.listener.MapRemoveListener * @see org.redisson.api.listener.ListAddListener * @see org.redisson.api.listener.ListRemoveListener * @see org.redisson.api.ExpiredObjectListener * @see org.redisson.api.DeletedObjectListener * * @param listener object event listener * @return listener id */ @Override Mono addListener(ObjectListener listener); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy