K - The key typepublic interface IRegionFactory<K extends IKey<K>>
Note that all IRegion instances returned will be newly created. Users are responsible for ensuring that multiple regions corresponding
to the same key are not open at once. Therefore, this should be used with some caching implementation of IRegionProvider (such as
SharedCachedRegionProvider).
| Modifier and Type | Method and Description |
|---|---|
java.util.stream.Stream<RegionKey> |
allRegions()
Gets a
Stream over the keys of all the existing regions. |
java.util.Optional<IRegion<K>> |
getExistingRegion(RegionKey key)
Opens an existing
IRegion at a given region key. |
IKeyProvider<K> |
getKeyProvider() |
IRegion<K> |
getRegion(RegionKey key)
Opens an
IRegion at a given region key, creating a new one if none exists. |
IKeyProvider<K> getKeyProvider()
IKeyProvider used by this factoryIRegion<K> getRegion(RegionKey key) throws java.io.IOException
IRegion at a given region key, creating a new one if none exists.java.util.Optional<IRegion<K>> getExistingRegion(RegionKey key) throws java.io.IOException
IRegion at a given region key.java.util.stream.Stream<RegionKey> allRegions() throws java.io.IOException
Stream over the keys of all the existing regions.
All regions that had been created at the time of this method invocation are guaranteed to be present in the returned Stream, no guarantees
are made for regions created during iteration.
Note that the returned Stream must be closed (using BaseStream.close()) once no longer needed.
Stream over the keys of all the existing regionsjava.io.IOException