public class SharedCache
extends java.lang.Object
implements java.io.Flushable, java.io.Closeable
IRegions.SharedCachedRegionProvider| Modifier and Type | Field and Description |
|---|---|
static SharedCache |
DEFAULT |
| Constructor and Description |
|---|
SharedCache(int maxCacheSize) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
cleanup0(boolean force,
boolean full) |
void |
close() |
void |
flush() |
<K extends IKey<K>> |
forRegion(RegionKey regionKey,
IRegionFactory<K> regionFactory,
boolean allowCreation,
CheckedConsumer<? super IRegion<K>,java.io.IOException> callback)
Runs the given function on the region supplied by the given
IRegionFactory for the given RegionKey. |
public static final SharedCache DEFAULT
protected boolean cleanup0(boolean force,
boolean full)
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOExceptionpublic <K extends IKey<K>> boolean forRegion(RegionKey regionKey, IRegionFactory<K> regionFactory, boolean allowCreation, CheckedConsumer<? super IRegion<K>,java.io.IOException> callback) throws java.io.IOException
IRegionFactory for the given RegionKey.regionKey - the region keyregionFactory - the region factoryallowCreation - whether or not the region is allowed to be created if it doesn't existcallback - the function to runfalse only if allowCreation == false and the region doesn't existjava.io.IOException