Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


oracle.eclipselink.coherence.standalone
Class EclipseLinkJPACacheLoader

java.lang.Object
  extended by com.tangosol.util.Base
      extended by oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheLoader

All Implemented Interfaces:
com.tangosol.net.cache.CacheLoader
Direct Known Subclasses:
EclipseLinkJPACacheStore

public class EclipseLinkJPACacheLoader
extends com.tangosol.util.Base
implements com.tangosol.net.cache.CacheLoader

This is a Coherence Cache Loader that can be used when EclipseLink is is desired as the persistence provider and no Cache Interceptors or Query Redirectors from the EclipseLink-Coherence integration are set within the Persistence Unit for the specific class. This is intended to be used where the application uses Coherence directly and the cache store/loader are used behind the scene to persist and load data.

Coherence Configuration: In order to use the integrated EclipseLinkJPACacheLoader or EclipseLinkJPACacheStore the Coherence configuration XML file must specify the loader/store class as well as providing parameters for the cache-name and JPA persistence unit name.

The following is an example of how the standalone EclipseLinkJPACacheLoader can be configured.

 <cachestore-scheme>
    <class-scheme>
       <class-name>oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheLoader</class-name> 
       <init-params> 
          <init-param>
             <param-type>java.lang.String</param-type>
             <param-value>{cache-name}</param-value> 
          </init-param>
          <init-param>
             <param-type>java.lang.String</param-type>
             <param-value>coherence-pu</param-value> 
          </init-param> 
       </init-params>
    </class-scheme>
 </cachestore-scheme>
 
Since:
Oracle TopLink 11g (11.1.1.0.0)
Author:
gyorke, djclarke

Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.util.Base
com.tangosol.util.Base.LoggingWriter, com.tangosol.util.Base.StackFrame

 

Field Summary
private  ClassDescriptor descriptor
           
private  javax.persistence.EntityManagerFactory emf
           

 

Fields inherited from class com.tangosol.util.Base
LOG_ALWAYS, LOG_DEBUG, LOG_ERR, LOG_INFO, LOG_MAX, LOG_MIN, LOG_QUIET, LOG_WARN, POWER_0, POWER_G, POWER_K, POWER_M, POWER_T, UNIT_D, UNIT_H, UNIT_M, UNIT_MS, UNIT_NS, UNIT_S, UNIT_US

 

Constructor Summary
EclipseLinkJPACacheLoader(java.lang.String cacheName, java.lang.String puName)
           

 

Method Summary
protected  ClassDescriptor getDescriptor()
           
protected  javax.persistence.EntityManagerFactory getEMF()
           
 java.lang.Object load(java.lang.Object id)
           
 java.util.Map loadAll(java.util.Collection ids)
           

 

Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, decimalValue, dup, dup, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getRandom, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, read, read, read, read, read, read, read, redirectAll, replace, setErr, setLog, setLogEcho, setOut, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

emf

private javax.persistence.EntityManagerFactory emf

descriptor

private ClassDescriptor descriptor

Constructor Detail

EclipseLinkJPACacheLoader

public EclipseLinkJPACacheLoader(java.lang.String cacheName,
                                 java.lang.String puName)

Method Detail

getEMF

protected javax.persistence.EntityManagerFactory getEMF()

getDescriptor

protected ClassDescriptor getDescriptor()

load

public java.lang.Object load(java.lang.Object id)
Specified by:
load in interface com.tangosol.net.cache.CacheLoader

loadAll

public java.util.Map loadAll(java.util.Collection ids)
Specified by:
loadAll in interface com.tangosol.net.cache.CacheLoader

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.