Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tangosol.coherence.hibernate
Class CoherenceCacheProvider

    java.lang.Object
      com.tangosol.util.Base
          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 java.lang.String` | `CACHE_CONFIG_PATH` The system property specifying the path to the cache configuration used to configure the hibernate L2 caches.
`protected static java.lang.String` | `DEFAULT_CACHE_CONFIG_PATH` The cache configuration file that defines Coherence caches for Hibernate
`protected static java.lang.String` | `PREFIX` The prefix for all provider-specific system properties

Constructor Summary
`CoherenceCacheProvider()`

Method Summary
`Cache` | `buildCache(java.lang.String sRegionName, java.util.Properties properties)` Returns a Hibernate cache region (creating a clustered NamedCache instance if necessary).
`protected ConfigurableCacheFactory` | `getCacheFactory()` Get the ConfigurableCacheFactory instance
`protected NamedCache` | `getNamedCache(java.lang.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(java.util.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 java.lang.String PREFIX

  The prefix for all provider-specific system properties

  See Also:
    Constant Field Values

### CACHE_CONFIG_PATH

    public static final java.lang.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 java.lang.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(java.lang.String sRegionName,
                            java.util.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(java.util.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(java.lang.String sName)

  Get a NamedCache instance given a cache name.

  Parameters:
    `sName` - the name of the NamedCache
  Returns:
    the NamedCache instance

Overview | Package | Class | Tree | Index | Help

Oracle® Coherence Java API Reference
v3.5.3
E15583-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2010, Oracle. All rights reserved.