public final class DiscoveryCacheFactory extends DiscoveryObject
The discovery cache factory, a singleton object, provides methods to create discovery caches.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CACHE_DESCRIPTOR
Default discovery URL (if not overriden by nv.discovery.descriptor property)
|
static int |
FLG_NO_AUTOOPEN
Flag used in cache creation to not automatically open the cache during creation
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close all created caches.
|
IDiscoveryCache |
createCache(String descriptorStr)
Create a discovery cache.
|
IDiscoveryCache |
createCache(String descriptorStr,
int flags)
Create a discovery cache.
|
IDiscoveryCache |
getDefaultCache()
Get the process wide singleton discovery cache.
|
static DiscoveryCacheFactory |
getInstance()
Get the singleton discovery cache factory instance.
|
boolean |
isDefaultCache(IDiscoveryCache cache)
Get if a cache is the default cache.
|
getChecked, getThreaded, getTracer, setChecked, setTracer
public static final String DEFAULT_CACHE_DESCRIPTOR
public static final int FLG_NO_AUTOOPEN
public static final DiscoveryCacheFactory getInstance()
public final IDiscoveryCache createCache(String descriptorStr, int flags) throws EDiscoveryException
descriptorStr
- The string representation of an address descriptor
that describes the cache to create e.g. mcast://224.0.23.180:4090flags
- Flags tha qualify the creation of the cache. The following
flags are currently supportedFLG_NO_AUTOOPEN
EDiscoveryException
- Thrown in case an error occurs during the
creation of the cache.public final IDiscoveryCache createCache(String descriptorStr) throws EDiscoveryException
This method invokes createCache(descriptorStr, null)
EDiscoveryException
public final IDiscoveryCache getDefaultCache()
This method returns the process wide singleton discovery cache. The
singlton cache is created by invoking createCache(java.lang.String, int)
using
DEFAULT_CACHE_DESCRIPTOR
as the cache descriptor.
public final boolean isDefaultCache(IDiscoveryCache cache)
public final void close()
This should be the last call to the factory.
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.