public abstract class AbstractHazelcastCachingProvider extends Object implements javax.cache.spi.CachingProvider
CachingProvider
implementation providing shared functionality to server and client caching
providers.
This class encapsulates following details:
CacheManager
by uri and class loader.CachingProvider
Modifier and Type | Field and Description |
---|---|
protected ClassLoader |
defaultClassLoader |
protected URI |
defaultURI |
protected HazelcastInstance |
hazelcastInstance |
protected static String |
INVALID_HZ_INSTANCE_SPECIFICATION_MESSAGE |
protected static ILogger |
LOGGER |
protected static Set<String> |
SUPPORTED_SCHEMES |
Constructor and Description |
---|
AbstractHazelcastCachingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
close(ClassLoader classLoader) |
void |
close(URI uri,
ClassLoader classLoader) |
protected abstract <T extends AbstractHazelcastCacheManager> |
createCacheManager(HazelcastInstance instance,
URI uri,
ClassLoader classLoader,
Properties properties) |
protected <T extends AbstractHazelcastCacheManager> |
createHazelcastCacheManager(URI uri,
ClassLoader classLoader,
Properties managerProperties) |
javax.cache.CacheManager |
getCacheManager() |
javax.cache.CacheManager |
getCacheManager(URI uri,
ClassLoader classLoader) |
javax.cache.CacheManager |
getCacheManager(URI uri,
ClassLoader classLoader,
Properties properties) |
ClassLoader |
getDefaultClassLoader() |
Properties |
getDefaultProperties() |
URI |
getDefaultURI() |
protected ClassLoader |
getManagerClassLoader(ClassLoader classLoader) |
protected URI |
getManagerUri(URI uri) |
protected abstract HazelcastInstance |
getOrCreateInstance(URI uri,
ClassLoader classLoader,
Properties properties) |
protected boolean |
isConfigLocation(URI location) |
boolean |
isSupported(javax.cache.configuration.OptionalFeature optionalFeature) |
protected void |
shutdownHazelcastInstance() |
protected static final ILogger LOGGER
protected static final String INVALID_HZ_INSTANCE_SPECIFICATION_MESSAGE
protected volatile HazelcastInstance hazelcastInstance
protected final ClassLoader defaultClassLoader
protected final URI defaultURI
public javax.cache.CacheManager getCacheManager(URI uri, ClassLoader classLoader, Properties properties)
getCacheManager
in interface javax.cache.spi.CachingProvider
public ClassLoader getDefaultClassLoader()
getDefaultClassLoader
in interface javax.cache.spi.CachingProvider
public URI getDefaultURI()
getDefaultURI
in interface javax.cache.spi.CachingProvider
public Properties getDefaultProperties()
getDefaultProperties
in interface javax.cache.spi.CachingProvider
public javax.cache.CacheManager getCacheManager(URI uri, ClassLoader classLoader)
getCacheManager
in interface javax.cache.spi.CachingProvider
public javax.cache.CacheManager getCacheManager()
getCacheManager
in interface javax.cache.spi.CachingProvider
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface javax.cache.spi.CachingProvider
protected void shutdownHazelcastInstance()
public void close(ClassLoader classLoader)
close
in interface javax.cache.spi.CachingProvider
public void close(URI uri, ClassLoader classLoader)
close
in interface javax.cache.spi.CachingProvider
public boolean isSupported(javax.cache.configuration.OptionalFeature optionalFeature)
isSupported
in interface javax.cache.spi.CachingProvider
protected ClassLoader getManagerClassLoader(ClassLoader classLoader)
protected <T extends AbstractHazelcastCacheManager> T createHazelcastCacheManager(URI uri, ClassLoader classLoader, Properties managerProperties)
protected abstract HazelcastInstance getOrCreateInstance(URI uri, ClassLoader classLoader, Properties properties) throws URISyntaxException, IOException
URISyntaxException
IOException
protected abstract <T extends AbstractHazelcastCacheManager> T createCacheManager(HazelcastInstance instance, URI uri, ClassLoader classLoader, Properties properties)
protected boolean isConfigLocation(URI location)
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.