Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


com.tangosol.coherence.hibernate
Class CoherenceCacheProvider

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.coherence.hibernate.CoherenceCacheProvider


public class CoherenceCacheProvider
extends Base

Serves as the integration point for the Coherence Cache Provider for Hibernate.

Author:
jp, jh 2005.08.31

Field Summary
static String CACHE_CONFIG_PATH
          The system property specifying the path to the cache configuration used to configure the hibernate L2 caches.
protected static String DEFAULT_CACHE_CONFIG_PATH
          The cache configuration file that defines Coherence caches for Hibernate
protected static String PREFIX
          The prefix for all provider-specific system properties

 

Constructor Summary
CoherenceCacheProvider()
           

 

Method Summary
 Cache buildCache(String sRegionName, Properties properties)
          Returns a Hibernate cache region (creating a clustered NamedCache instance if necessary).
protected  ConfigurableCacheFactory getCacheFactory()
          Get the ConfigurableCacheFactory instance
protected  NamedCache getNamedCache(String sName)
          Get a NamedCache instance given a cache name.
 boolean isMinimalPutsEnabledByDefault()
          Indicates whether minimal puts are enabled by default.
 long nextTimestamp()
          Returns the current timestamp.
protected  void setCacheFactory(ConfigurableCacheFactory factory)
          Set the ConfigurableCacheFactory instance
 void start(Properties properties)
          Initializes the Coherence cache provider and pre-starts Coherence.
 void stop()
          Stops the Coherence cache provider and frees local resources.

 

Field Detail

PREFIX

protected static final String PREFIX
The prefix for all provider-specific system properties
See Also:
Constant Field Values

CACHE_CONFIG_PATH

public static final String CACHE_CONFIG_PATH
The system property specifying the path to the cache configuration used to configure the hibernate L2 caches. Uses the default cache configuration file unless specified otherwise.
See Also:
Constant Field Values

DEFAULT_CACHE_CONFIG_PATH

protected static final String DEFAULT_CACHE_CONFIG_PATH
The cache configuration file that defines Coherence caches for Hibernate
See Also:
Constant Field Values

Constructor Detail

CoherenceCacheProvider

public CoherenceCacheProvider()

Method Detail

buildCache

public Cache buildCache(String sRegionName,
                        Properties properties)
Returns a Hibernate cache region (creating a clustered NamedCache instance if necessary).
Parameters:
sRegionName - a Hibernate cache region name
properties - not used by this implementation
Returns:
a Hibernate cache region reference

nextTimestamp

public long nextTimestamp()
Returns the current timestamp.
Returns:
the current timestamp

start

public void start(Properties properties)
           throws CacheException
Initializes the Coherence cache provider and pre-starts Coherence.
Parameters:
properties - configuration properties
Throws:
CacheException - thrown if there are configuration errors

stop

public void stop()
Stops the Coherence cache provider and frees local resources.

isMinimalPutsEnabledByDefault

public boolean isMinimalPutsEnabledByDefault()
Indicates whether minimal puts are enabled by default. This allows Hibernate to use extra gets to minimize the number of puts.
Returns:
a boolean indicating whether minimal puts are the default

getCacheFactory

protected ConfigurableCacheFactory getCacheFactory()
Get the ConfigurableCacheFactory instance
Returns:
the ConfigurableCacheFactory

setCacheFactory

protected void setCacheFactory(ConfigurableCacheFactory factory)
Set the ConfigurableCacheFactory instance
Parameters:
factory - the ConfigurableCacheFactory instance

getNamedCache

protected NamedCache getNamedCache(String sName)
Get a NamedCache instance given a cache name.
Parameters:
sName - the name of the NamedCache
Returns:
the NamedCache instance

Skip navigation links

Oracle® Coherence Java API Reference
Release 3.6.0.0

E15725-01


Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.