com.hazelcast.cache
public final class HazelcastCachingProvider extends Object implements javax.cache.spi.CachingProvider
CachingProvider
implementation. This provider
class acts as the commonly used entry point for the JCache SPI to register Hazelcast JCache as an eligible JCache
implementation.
Main purpose of this provider implementation is to delegate to the user-selected internal
CachingProvider
implementation.
Hazelcast uses two internal CachingProvider
s depending on the environment:
CachingProvider
implementations are found (client and server), the client
provider has precedence. To select the server provider, use the above mentioned property.
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)
Properties
with the provided config file location.configFileLocation
- the location of the config file to configurepublic static Properties propertiesByInstanceName(String instanceName)
Properties
with the provided instance name.instanceName
- the instance name to configurepublic 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()
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 © 2015 Hazelcast, Inc.. All Rights Reserved.