public class ComposableRegionResolver extends AbstractCachingRegionResolver
RegionResolver
implementation used to compose a collection of RegionResolvers
.Region
,
RegionResolver
,
AbstractCachingRegionResolver
Modifier | Constructor and Description |
---|---|
protected |
ComposableRegionResolver(RegionResolver regionResolverOne,
RegionResolver regionResolverTwo)
Constructs a new instance of
ComposableRegionResolver initialized and composed with
the given RegionResolvers forming the composition. |
Modifier and Type | Method and Description |
---|---|
static RegionResolver |
compose(Iterable<RegionResolver> regionResolvers)
Factory method used to compose an Iterable collection of
RegionResolvers
in a composition. |
static RegionResolver |
compose(RegionResolver... regionResolvers)
Factory method used to compose an array of
RegionResolvers in a composition. |
static RegionResolver |
compose(RegionResolver one,
RegionResolver two)
Composes two
RegionResolvers in a composition. |
protected <K,V> org.apache.geode.cache.Region<K,V> |
doResolve(String regionName)
Resolves the first non-null reference to cache
Region identified by
the given name , handling any Exceptions throwing by
the composed RegionResolvers , such as a RegionDestroyedException . |
protected RegionResolver |
getRegionResolverOne()
Returns a reference to the first, non-null, configured
RegionResolver in the composition. |
protected RegionResolver |
getRegionResolverTwo()
Returns a reference to the second, non-null, configured
RegionResolver in the composition. |
afterRegionDestroy, resolve
afterCreate, afterDestroy, afterInvalidate, afterRegionClear, afterRegionCreate, afterRegionInvalidate, afterRegionLive, afterUpdate, close
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
require
protected ComposableRegionResolver(@NonNull RegionResolver regionResolverOne, @NonNull RegionResolver regionResolverTwo)
ComposableRegionResolver
initialized and composed with
the given RegionResolvers
forming the composition.regionResolverOne
- first RegionResolver
in the composition; must not be null.regionResolverTwo
- second RegionResolver
in the composition; must not be null.IllegalArgumentException
- if either RegionResolver
argument is null.RegionResolver
public static RegionResolver compose(@Nullable RegionResolver... regionResolvers)
RegionResolvers
in a composition.regionResolvers
- array of RegionResolvers
to compose; may be null.RegionResolvers
; may be null.RegionResolver
,
compose(Iterable)
@Nullable public static RegionResolver compose(@Nullable Iterable<RegionResolver> regionResolvers)
RegionResolvers
in a composition.regionResolvers
- Iterable
collection of RegionResolvers
to compose;
may be null.Iterable
collection of RegionResolvers
;
may be null.compose(RegionResolver, RegionResolver)
,
RegionResolver
,
Iterable
@Nullable public static RegionResolver compose(@Nullable RegionResolver one, @Nullable RegionResolver two)
RegionResolvers
in a composition.one
- first RegionResolver
in the composition.two
- second RegionResolver
in the composition.ComposableRegionResolver
composed of the RegionResolver
arguments.
Returns the first RegionResolver
if the second is null.
Returns the second RegionResolver
if the first is null.
Returns null if both RegionResolver
arguments are null.ComposableRegionResolver(RegionResolver, RegionResolver)
,
RegionResolver
@NonNull protected RegionResolver getRegionResolverOne()
RegionResolver
in the composition.RegionResolver
in the composition.RegionResolver
@NonNull protected RegionResolver getRegionResolverTwo()
RegionResolver
in the composition.RegionResolver
in the composition.RegionResolver
@Nullable protected <K,V> org.apache.geode.cache.Region<K,V> doResolve(@Nullable String regionName)
Region
identified by
the given name
, handling any Exceptions
throwing by
the composed RegionResolvers
, such as a RegionDestroyedException
.
This method may ultimately still result in a thrown Exception
, but it will make a best effort to
exhaustively consult all composed RegionResolvers
.doResolve
in class AbstractCachingRegionResolver
K
- type
of the Region
key.V
- type
of the Region
value.regionName
- name
of the Region
to resolve.Region
identified by the given name
.RegionResolver.resolve(String)
,
Region
,
Function
,
getRegionResolverOne()
,
getRegionResolverTwo()
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.