refactoring

pull/3562/head
Nikita Koksharov 4 years ago
parent b48e35857c
commit 43c90ef733

@ -15,12 +15,11 @@
*/
package org.redisson.api;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.redisson.api.map.MapWriter;
import org.redisson.api.map.event.MapEntryListener;
import java.util.concurrent.TimeUnit;
/**
* <p>Map-based cache with ability to set TTL for each entry via
* {@link #put(Object, Object, long, TimeUnit)} or {@link #putIfAbsent(Object, Object, long, TimeUnit)}
@ -267,20 +266,6 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V>, RDest
*/
void putAll(java.util.Map<? extends K, ? extends V> map, long ttl, TimeUnit ttlUnit);
/**
* Associates the specified <code>value</code> with the specified <code>key</code>
* in batch.
* <p>
* If {@link MapWriter} is defined then new map entries are stored in write-through mode.
*
* @param map - mappings to be stored in this map
* @param ttl - time to live for all key\value entries.
* If <code>0</code> then stores infinitely.
* @param ttlUnit - time unit
* @return void
*/
RFuture<Void> putAllAsync(Map<? extends K, ? extends V> map, long ttl, TimeUnit ttlUnit);
/**
* Returns the number of entries in cache.
* This number can reflects expired entries too

@ -15,6 +15,9 @@
*/
package org.redisson.api;
import org.redisson.api.map.MapWriter;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
@ -157,6 +160,20 @@ public interface RMapCacheAsync<K, V> extends RMapAsync<K, V> {
*/
RFuture<V> putAsync(K key, V value, long ttl, TimeUnit ttlUnit, long maxIdleTime, TimeUnit maxIdleUnit);
/**
* Associates the specified <code>value</code> with the specified <code>key</code>
* in batch.
* <p>
* If {@link MapWriter} is defined then new map entries are stored in write-through mode.
*
* @param map - mappings to be stored in this map
* @param ttl - time to live for all key\value entries.
* If <code>0</code> then stores infinitely.
* @param ttlUnit - time unit
* @return void
*/
RFuture<Void> putAllAsync(Map<? extends K, ? extends V> map, long ttl, TimeUnit ttlUnit);
/**
* Stores value mapped by key with specified time to live.
* Entry expires after specified time to live.

Loading…
Cancel
Save