Correct var names, improve documentation.

pull/1043/head
Johno Crawford 7 years ago
parent cf1a190594
commit e4cc154823
No known key found for this signature in database
GPG Key ID: 747B819B88FCAB8A

@ -96,13 +96,13 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
}
@Override
public boolean trySetMaxSize(int permits) {
return get(trySetMaxSizeAsync(permits));
public boolean trySetMaxSize(int maxSize) {
return get(trySetMaxSizeAsync(maxSize));
}
@Override
public RFuture<Boolean> trySetMaxSizeAsync(int maxSize) {
if (maxSize <= 0) {
if (maxSize < 0) {
throw new IllegalArgumentException("maxSize should be greater than zero");
}
@ -110,13 +110,13 @@ public class RedissonMapCache<K, V> extends RedissonMap<K, V> implements RMapCac
}
@Override
public void setMaxSize(int permits) {
get(setMaxSizeAsync(permits));
public void setMaxSize(int maxSize) {
get(setMaxSizeAsync(maxSize));
}
@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