EclipseLink 2.4.0, build 'v20120608-r11652' API Reference

org.eclipse.persistence.platform.database.oracle.ucp
Class UCPDataPartitioningCallback

java.lang.Object
  extended by org.eclipse.persistence.platform.database.oracle.ucp.UCPDataPartitioningCallback
All Implemented Interfaces:
oracle.ucp.ConnectionAffinityCallback, oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback, DataPartitioningCallback
Direct Known Subclasses:
GridLinkDataPartitioningCallback

public class UCPDataPartitioningCallback
extends java.lang.Object
implements DataPartitioningCallback, oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback

PUBLIC: Integrates with Oracle Universal ConnectionPool's data affinity support.

See Also:
PartitioningPolicy
Author:
James Sutherland
Since:
EclipseLink 2.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.ucp.ConnectionAffinityCallback
oracle.ucp.ConnectionAffinityCallback.AffinityPolicy
 
Field Summary
protected  java.lang.ThreadLocal partitionId
          The id is stored in a thread local.
 
Constructor Summary
UCPDataPartitioningCallback()
           
 
Method Summary
 oracle.ucp.ConnectionAffinityCallback.AffinityPolicy getAffinityPolicy()
           
 java.lang.Object getConnectionAffinityContext()
           
 int getPartitionId()
           
 void register(javax.sql.DataSource datSource, Session session)
           
 void setAffinityPolicy(oracle.ucp.ConnectionAffinityCallback.AffinityPolicy policy)
           
 boolean setConnectionAffinityContext(java.lang.Object context)
           
 boolean setDataKey(java.lang.Object key)
           
 void setPartitionId(int id)
          Set the partition id for this thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partitionId

protected java.lang.ThreadLocal partitionId
The id is stored in a thread local.

Constructor Detail

UCPDataPartitioningCallback

public UCPDataPartitioningCallback()
Method Detail

register

public void register(javax.sql.DataSource datSource,
                     Session session)
Specified by:
register in interface DataPartitioningCallback

setPartitionId

public void setPartitionId(int id)
Set the partition id for this thread.

Specified by:
setPartitionId in interface DataPartitioningCallback

getPartitionId

public int getPartitionId()
Specified by:
getPartitionId in interface oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback

setDataKey

public boolean setDataKey(java.lang.Object key)
Specified by:
setDataKey in interface oracle.ucp.jdbc.oracle.DataBasedConnectionAffinityCallback

setConnectionAffinityContext

public boolean setConnectionAffinityContext(java.lang.Object context)
Specified by:
setConnectionAffinityContext in interface oracle.ucp.ConnectionAffinityCallback

setAffinityPolicy

public void setAffinityPolicy(oracle.ucp.ConnectionAffinityCallback.AffinityPolicy policy)
Specified by:
setAffinityPolicy in interface oracle.ucp.ConnectionAffinityCallback

getConnectionAffinityContext

public java.lang.Object getConnectionAffinityContext()
Specified by:
getConnectionAffinityContext in interface oracle.ucp.ConnectionAffinityCallback

getAffinityPolicy

public oracle.ucp.ConnectionAffinityCallback.AffinityPolicy getAffinityPolicy()
Specified by:
getAffinityPolicy in interface oracle.ucp.ConnectionAffinityCallback

EclipseLink 2.4.0, build 'v20120608-r11652' API Reference