public final class HazelcastCachingProvider extends Object implements javax.cache.spi.CachingProvider
CachingProvider
implementation to provide Hazelcast JCache Implementation.
Main purpose of this provider implementation is delegating to selected internal actual provider implementation.
There are two internal CachingProvider
s:
HazelcastServerCachingProvider
HazelcastClientCachingProvider
hazelcast.jcache.provider.typewith values "client" or "server". If no selection exists, then the default behavior for selecting the internal provider type is based on which dependency found on classpath. Client and server provider classes are searched on classpath respectively.
Modifier and Type | Field and Description |
---|---|
static String |
HAZELCAST_CONFIG_LOCATION
Hazelcast config location property
|
static String |
HAZELCAST_INSTANCE_NAME
hazelcast instance name property
|
Constructor and Description |
---|
HazelcastCachingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
close(ClassLoader classLoader) |
void |
close(URI uri,
ClassLoader classLoader) |
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() |
boolean |
isSupported(javax.cache.configuration.OptionalFeature optionalFeature) |
static Properties |
propertiesByInstanceName(String instanceName)
create the properties with the provided instance name
|
static Properties |
propertiesByLocation(String configFileLocation)
create the properties with the provided config file location
|
String |
toString() |
public static final String HAZELCAST_CONFIG_LOCATION
public static final String HAZELCAST_INSTANCE_NAME
public static Properties propertiesByLocation(String configFileLocation)
configFileLocation
- config file locationpublic static Properties propertiesByInstanceName(String instanceName)
instanceName
- instance namepublic 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
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
Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.