Merge pull request #1043 from sulake/fix_nits

Correct var names, improve documentation.
pull/1051/head
Nikita Koksharov 8 years ago committed by GitHub
commit 3c4a832c39

@ -102,7 +102,7 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
@Override
public RFuture<Boolean> trySetMaxSizeAsync(int maxSize) {
if (maxSize <= 0) {
if (maxSize < 0) {
throw new IllegalArgumentException("maxSize should be greater than zero");
}
@ -116,7 +116,7 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
@Override
public RFuture<Void> setMaxSizeAsync(int maxSize) {
if (maxSize <= 0) {
if (maxSize < 0) {
throw new IllegalArgumentException("maxSize should be greater than zero");
}

@ -44,6 +44,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
* Superfluous elements are evicted using LRU algorithm.
*
* @param maxSize - max size
* If <code>0</code> the cache is unbounded (default).
*/
void setMaxSize(int maxSize);
@ -53,6 +54,7 @@ public interface RMapCache<K, V> extends RMap<K, V>, RMapCacheAsync<K, V> {
*
* @param maxSize - max size
* @return <code>true</code> if max size has been successfully set, otherwise <code>false</code>.
* If <code>0</code> the cache is unbounded (default).
*/
boolean trySetMaxSize(int maxSize);

Loading…
Cancel
Save