Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* 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.Map;
import java.util.Set;
import javax.cache.CacheException;
import javax.cache.event.CacheEntryRemovedListener;
import javax.cache.integration.CacheLoader;
import javax.cache.integration.CacheWriter;
import reactor.core.publisher.Mono;
/**
* Reactive interface for JCache
*
* @author Nikita Koksharov
*
* @param key type
* @param value type
*/
public interface CacheReactive {
/**
* This method retrieves an entry from the cache.
*
* If the cache uses the read-through pattern, and the method would return null
* because the entry is not present in the cache, then the cache's {@link CacheLoader}
* will try to load the entry.
*
* @param key the key whose value should be returned
* @return the element, or null if the entry does not exist.
* @throws IllegalStateException if the cache is in a closed state
* @throws NullPointerException if the key is null
* @throws CacheException if there is a problem retrieving the entry from the cache
*/
Mono get(K key);
/**
* This method accepts a set of requested keys and retrieves a collection of entries from the
* {@link CacheReactive}, returning them as a {@link Map} of the associated values.
*
* If the cache uses the read-through pattern, and the method would return null for a key
* because an entry is not present in the cache, the Cache's {@link CacheLoader} will try to
* load the entry. If a key's entry cannot be loaded, the key will not appear in the Map.
*
* @param keys The keys whose values should be returned.
* @return A Map of entries associated with the given keys. If a key is not found
* in the cache, it will not be in the Map.
* @throws NullPointerException if keys is null or contains a null
* @throws IllegalStateException if the cache is in a closed state
* @throws CacheException if there is a problem retrieving the entries from the cache
*/
Mono