K - The key type@Deprecated public class CachedRegionProvider<K extends IKey<K>> extends java.lang.Object implements IRegionProvider<K>
| Constructor and Description |
|---|
CachedRegionProvider(IRegionProvider<K> sourceProvider,
int maxCacheSize)
Deprecated.
Creates a RegionProvider using the given
regionFactory and maxCacheSize |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
|
void |
forAllRegions(CheckedBiConsumer<RegionKey,? super IRegion<K>,java.io.IOException> consumer)
Deprecated.
Calls the given consumer for all existing region names.
|
void |
forExistingRegion(K key,
CheckedConsumer<? super IRegion<K>,java.io.IOException> cons)
Deprecated.
Calls the given function with region at that location and returns value from that function..
|
void |
forRegion(K key,
CheckedConsumer<? super IRegion<K>,java.io.IOException> cons)
Deprecated.
Calls the given consumer with region at that location.
|
<R> java.util.Optional<R> |
fromExistingRegion(K key,
CheckedFunction<? super IRegion<K>,R,java.io.IOException> func)
Deprecated.
Calls the given consumer with region at that location.
|
<R> R |
fromRegion(K key,
CheckedFunction<? super IRegion<K>,R,java.io.IOException> func)
Deprecated.
Calls the given function with region at that location and returns value from that function.
|
java.util.Optional<IRegion<K>> |
getExistingRegion(K key)
Deprecated.
Gets an IRegion at a given region key, creates new one if it doesn't exist.
|
IRegion<K> |
getRegion(K key)
Deprecated.
Gets an IRegion at a given region key, or create one if it does not exist.
|
public CachedRegionProvider(IRegionProvider<K> sourceProvider, int maxCacheSize)
regionFactory and maxCacheSizesourceProvider - provider used as source of regionsmaxCacheSize - The maximum number of cached region filespublic <R> java.util.Optional<R> fromExistingRegion(K key, CheckedFunction<? super IRegion<K>,R,java.io.IOException> func) throws java.io.IOException
IRegionProviderfromExistingRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegionregionKey if it existsjava.io.IOExceptionpublic <R> R fromRegion(K key, CheckedFunction<? super IRegion<K>,R,java.io.IOException> func) throws java.io.IOException
IRegionProviderfromRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegionjava.io.IOExceptionpublic void forRegion(K key, CheckedConsumer<? super IRegion<K>,java.io.IOException> cons) throws java.io.IOException
IRegionProviderforRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegioncons - Consumer that accepts the IRegionjava.io.IOExceptionpublic void forExistingRegion(K key, CheckedConsumer<? super IRegion<K>,java.io.IOException> cons) throws java.io.IOException
IRegionProviderforExistingRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegioncons - Accepts the given region, if it already existsjava.io.IOExceptionpublic IRegion<K> getRegion(K key) throws java.io.IOException
IRegionProvidergetRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegionregionKeyjava.io.IOExceptionpublic java.util.Optional<IRegion<K>> getExistingRegion(K key) throws java.io.IOException
IRegionProvidergetExistingRegion in interface IRegionProvider<K extends IKey<K>>key - The key for the IRegionregionKey if it existsjava.io.IOExceptionpublic void forAllRegions(CheckedBiConsumer<RegionKey,? super IRegion<K>,java.io.IOException> consumer) throws java.io.IOException
IRegionProviderforAllRegions in interface IRegionProvider<K extends IKey<K>>java.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOException