K - The key typepublic interface IRegionProvider<K extends IKey<K>>
extends java.io.Closeable
| Modifier and Type | Method and Description |
|---|---|
void |
forAllRegions(CheckedBiConsumer<RegionKey,? super IRegion<K>,java.io.IOException> consumer)
Calls the given consumer for all existing region names.
|
void |
forExistingRegion(K key,
CheckedConsumer<? super IRegion<K>,java.io.IOException> consumer)
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> consumer)
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)
Calls the given consumer with region at that location.
|
<R> R |
fromRegion(K key,
CheckedFunction<? super IRegion<K>,R,java.io.IOException> func)
Calls the given function with region at that location and returns value from that function.
|
java.util.Optional<IRegion<K>> |
getExistingRegion(K key)
Gets an IRegion at a given region key, creates new one if it doesn't exist.
|
IRegion<K> |
getRegion(K key)
Gets an IRegion at a given region key, or create one if it does not exist.
|
void forRegion(K key, CheckedConsumer<? super IRegion<K>,java.io.IOException> consumer) throws java.io.IOException
key - The key for the IRegionconsumer - Consumer that accepts the IRegionjava.io.IOException<R> java.util.Optional<R> fromExistingRegion(K key, CheckedFunction<? super IRegion<K>,R,java.io.IOException> func) throws java.io.IOException
key - The key for the IRegionregionKey if it existsjava.io.IOException<R> R fromRegion(K key, CheckedFunction<? super IRegion<K>,R,java.io.IOException> func) throws java.io.IOException
key - The key for the IRegionjava.io.IOExceptionvoid forExistingRegion(K key, CheckedConsumer<? super IRegion<K>,java.io.IOException> consumer) throws java.io.IOException
key - The key for the IRegionconsumer - Accepts the given region, if it already existsjava.io.IOExceptionIRegion<K> getRegion(K key) throws java.io.IOException
key - The key for the IRegionregionKeyjava.io.IOExceptionjava.util.Optional<IRegion<K>> getExistingRegion(K key) throws java.io.IOException
key - The key for the IRegionregionKey if it existsjava.io.IOExceptionvoid forAllRegions(CheckedBiConsumer<RegionKey,? super IRegion<K>,java.io.IOException> consumer) throws java.io.IOException
java.io.IOException