public class CachePolicy
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
Purpose:
CachePolicy defines the cache configuration.
EclipseLink supports an integrated shared (L2) object cache.
Caching is enabled by default.
To disable caching use:
setCacheIsolation(CacheIsolationType.ISOLATED)
ClassDescriptor
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> |
cacheIndexes |
protected java.lang.Class |
cacheInterceptorClass |
protected java.lang.String |
cacheInterceptorClassName |
protected CacheIsolationType |
cacheIsolation |
protected CacheKeyType |
cacheKeyType
Allow cache key type to be configured.
|
protected int |
cacheSynchronizationType
Configures how objects will be sent via cache synchronization, if synchronization is enabled.
|
protected DatabaseChangeNotificationType |
databaseChangeNotificationType
Allows configuration of database change event notification.
|
static int |
DO_NOT_SEND_CHANGES |
protected boolean |
fullyMergeEntity
This flag controls how the MergeManager should merge an Entity when merging into the shared cache.
|
protected java.lang.Class |
identityMapClass |
protected int |
identityMapSize |
static int |
INVALIDATE_CHANGED_OBJECTS |
static int |
ISOLATE_CACHE_AFTER_TRANSACTION |
static int |
ISOLATE_CACHE_ALWAYS |
static int |
ISOLATE_FROM_CLIENT_SESSION |
static int |
ISOLATE_NEW_DATA_AFTER_TRANSACTION |
protected boolean |
prefetchCacheKeys
In certain cases and cache types it is more efficient to preFetch the cache keys from the cache when
building the results of the query.
|
protected java.lang.Class |
remoteIdentityMapClass |
protected int |
remoteIdentityMapSize |
static int |
SEND_NEW_OBJECTS_WITH_CHANGES |
static int |
SEND_OBJECT_CHANGES |
protected boolean |
shouldAlwaysRefreshCache |
protected boolean |
shouldAlwaysRefreshCacheOnRemote |
protected boolean |
shouldDisableCacheHits |
protected boolean |
shouldDisableCacheHitsOnRemote |
protected boolean |
shouldOnlyRefreshCacheIfNewerVersion |
static int |
UNDEFINED_ISOLATATION |
static int |
UNDEFINED_OBJECT_CHANGE_BEHAVIOR |
protected int |
unitOfWorkCacheIsolationLevel
Configures how the unit of work uses the session cache.
|
static int |
USE_SESSION_CACHE_AFTER_TRANSACTION |
protected boolean |
wasDefaultUnitOfWorkCacheIsolationLevel |
Constructor and Description |
---|
CachePolicy()
PUBLIC:
Return a new descriptor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCacheIndex(CacheIndex index)
PUBLIC:
Add the cache index to the descriptor's cache settings.
|
void |
addCacheIndex(org.eclipse.persistence.internal.helper.DatabaseField[] fields)
PUBLIC:
Add the cache index to the descriptor's cache settings.
|
void |
addCacheIndex(java.lang.String... fields)
PUBLIC:
Add the cache index to the descriptor's cache settings.
|
void |
assignDefaultValues(org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Some attributes have default values defined in Project.
|
org.eclipse.persistence.internal.identitymaps.CacheKey |
checkCacheByIndex(Expression expression,
org.eclipse.persistence.internal.sessions.AbstractRecord translationRow,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Lookup the expression in the cache if it contains any indexes.
|
CachePolicy |
clone() |
void |
convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL:
Convert all the class-name-based settings in this Descriptor to actual class-based
settings.
|
CacheIndex |
getCacheIndex(java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> fields)
PUBLIC:
Return the cache index for the field names.
|
java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> |
getCacheIndexes() |
java.lang.Class |
getCacheInterceptorClass()
A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction
between EclipseLink and the internal cache for that class will pass through the Interceptor.
|
java.lang.String |
getCacheInterceptorClassName()
A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction
between EclipseLink and the internal cache for that class will pass through the Interceptor.
|
CacheIsolationType |
getCacheIsolation()
PUBLIC:
Controls how the Entity instances will be cached.
|
CacheKeyType |
getCacheKeyType()
ADVANCED:
Return what cache key type to use to store the object in the cache.
|
int |
getCacheSynchronizationType()
PUBLIC:
Get a value indicating the type of cache synchronization that will be used on objects of
this type.
|
DatabaseChangeNotificationType |
getDatabaseChangeNotificationType()
Returns what type of database change notification an entity/descriptor should use.
|
boolean |
getFullyMergeEntity() |
java.lang.Class |
getIdentityMapClass()
INTERNAL:
Return the class of identity map to be used by this descriptor.
|
int |
getIdentityMapSize()
PUBLIC:
Return the size of the identity map.
|
java.lang.Class |
getRemoteIdentityMapClass()
INTERNAL:
Return the class of identity map to be used by this descriptor.
|
int |
getRemoteIdentityMapSize()
PUBLIC:
Return the size of the remote identity map.
|
int |
getUnitOfWorkCacheIsolationLevel()
ADVANCED:
Return the unit of work cache isolation setting.
|
boolean |
hasCacheIndexes() |
void |
indexObjectInCache(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow,
java.lang.Object domainObject,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean refresh)
INTERNAL:
Index the object by index in the cache using its row.
|
void |
indexObjectInCache(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey,
java.lang.Object object,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session,
boolean refresh)
INTERNAL:
Index the object by index in the cache using the object.
|
void |
indexObjectInCache(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
java.lang.Object object,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Index the object by index in the cache using its changeSet.
|
void |
initialize(ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Allow the inheritance properties of the descriptor to be initialized.
|
void |
initializeFromParent(CachePolicy parentPolicy,
ClassDescriptor descriptor,
ClassDescriptor descriptorDescriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Allow the inheritance properties of the descriptor to be initialized.
|
boolean |
isIndexableExpression(Expression expression,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Lookup the expression in the cache if it contains any indexes.
|
boolean |
isIsolated()
PUBLIC:
Returns true if the descriptor represents an isolated class
|
boolean |
isProtectedIsolation()
PUBLIC:
Returns true if the descriptor represents a protected class.
|
boolean |
isSharedIsolation()
PUBLIC:
Returns true if the descriptor represents a shared class.
|
void |
postInitialize(ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.AbstractSession session)
INTERNAL:
Initialize the cache isolation setting.
|
void |
setCacheCoordinationType(CacheCoordinationType type)
PUBLIC:
Set the type of cache coordination that will be used on objects of this type.
|
void |
setCacheIndexes(java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> cacheIndexes) |
void |
setCacheInterceptorClass(java.lang.Class cacheInterceptorClass)
PUBLIC:
A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction
between EclipseLink and the internal cache for that class will pass through the Interceptor.
|
void |
setCacheInterceptorClassName(java.lang.String cacheInterceptorClassName)
PUBLIC:
A CacheInterceptor is an adaptor that when overridden and assigned to a Descriptor all interaction
between EclipseLink and the internal cache for that class will pass through the Interceptor.
|
void |
setCacheIsolation(CacheIsolationType isolationType)
PUBLIC:
Controls how the Entity instances and data will be cached.
|
void |
setCacheKeyType(CacheKeyType cacheKeyType)
ADVANCED:
Set what cache key type to use to store the object in the cache.
|
void |
setCacheSynchronizationType(int type)
OBSOLETE:
Set the type of cache coordination that will be used on objects of this type.
|
void |
setDatabaseChangeNotificationType(DatabaseChangeNotificationType databaseChangeNotificationType)
Configures what type of database change notification an entity/descriptor should use.
|
void |
setFullyMergeEntity(boolean fullyMergeEntity) |
void |
setIdentityMapClass(java.lang.Class theIdentityMapClass)
PUBLIC:
Set the class of identity map to be used by this descriptor.
|
void |
setIdentityMapSize(int identityMapSize)
PUBLIC:
Set the size of the identity map to be used by this descriptor.
|
void |
setPrefetchCacheKeys(boolean prefetchCacheKeys) |
void |
setRemoteIdentityMapClass(java.lang.Class theIdentityMapClass)
PUBLIC:
Set the class of identity map to be used by this descriptor.
|
void |
setRemoteIdentityMapSize(int identityMapSize)
PUBLIC:
Set the size of the identity map to be used by this descriptor.
|
void |
setShouldAlwaysRefreshCache(boolean shouldAlwaysRefreshCache)
PUBLIC:
When the
shouldAlwaysRefreshCache argument passed into this method is true ,
this method configures a ClassDescriptor to always refresh the cache if data is received from
the database by any query. |
void |
setShouldAlwaysRefreshCacheOnRemote(boolean shouldAlwaysRefreshCacheOnRemote)
PUBLIC:
When the
shouldAlwaysRefreshCacheOnRemote argument passed into this method is true ,
this method configures a ClassDescriptor to always remotely refresh the cache if data is received from
the database by any query in a RemoteSession . |
void |
setShouldDisableCacheHits(boolean shouldDisableCacheHits)
PUBLIC:
Set if cache hits on primary key read object queries should be disabled.
|
void |
setShouldDisableCacheHitsOnRemote(boolean shouldDisableCacheHitsOnRemote)
PUBLIC:
Set if the remote session cache hits on primary key read object queries is allowed or not.
|
void |
setShouldOnlyRefreshCacheIfNewerVersion(boolean shouldOnlyRefreshCacheIfNewerVersion)
PUBLIC:
When the
shouldOnlyRefreshCacheIfNewerVersion argument passed into this method is true ,
this method configures a ClassDescriptor to only refresh the cache if the data received from the database
by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true:
the ClassDescriptor was configured by calling #alwaysRefreshCache or #alwaysRefreshCacheOnRemote ,
the query was configured by calling ObjectLevelReadQuery.refreshIdentityMapResult() , or
the query was a call to Session.refreshObject(java.lang.Object)
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. |
void |
setUnitOfWorkCacheIsolationLevel(int unitOfWorkCacheIsolationLevel)
ADVANCED:
This setting configures how the session cache will be used in a unit of work.
|
boolean |
shouldAlwaysRefreshCache()
PUBLIC:
This method returns
true if the ClassDescriptor is configured to always refresh
the cache if data is received from the database by any query. |
boolean |
shouldAlwaysRefreshCacheOnRemote()
PUBLIC:
This method returns
true if the ClassDescriptor is configured to always remotely
refresh the cache if data is received from the database by any query in a RemoteSession . |
boolean |
shouldDisableCacheHits()
PUBLIC:
Return if for cache hits on primary key read object queries to be disabled.
|
boolean |
shouldDisableCacheHitsOnRemote()
PUBLIC:
Return if the remote server session cache hits on primary key read object queries is aloowed or not.
|
boolean |
shouldIsolateObjectsInUnitOfWork()
INTERNAL:
Return if the unit of work should by-pass the session cache.
|
boolean |
shouldIsolateObjectsInUnitOfWorkEarlyTransaction()
INTERNAL:
Return if the unit of work should by-pass the session cache after an early transaction.
|
boolean |
shouldIsolateProtectedObjectsInUnitOfWork()
INTERNAL:
Return if the unit of work should by-pass the IsolatedSession cache.
|
boolean |
shouldOnlyRefreshCacheIfNewerVersion()
PUBLIC:
This method returns
true if the ClassDescriptor is configured to only refresh the cache
if the data received from the database by a query is newer than the data in the cache (as determined by the
optimistic locking field). |
boolean |
shouldPrefetchCacheKeys() |
boolean |
shouldUseSessionCacheInUnitOfWorkEarlyTransaction()
INTERNAL:
Return if the unit of work should use the session cache after an early transaction.
|
void |
useFullIdentityMap()
PUBLIC:
Set the class of identity map to be the full identity map.
|
void |
useHardCacheWeakIdentityMap()
PUBLIC:
Set the class of identity map to be the hard cache weak identity map.
|
void |
useNoIdentityMap()
PUBLIC:
Set the class of identity map to be the no identity map.
|
void |
useSoftIdentityMap()
PUBLIC:
Set the class of identity map to be the soft identity map.
|
void |
useWeakIdentityMap()
PUBLIC:
Set the class of identity map to be the weak identity map.
|
protected java.lang.Class identityMapClass
protected int identityMapSize
protected boolean shouldAlwaysRefreshCache
protected boolean shouldOnlyRefreshCacheIfNewerVersion
protected boolean shouldDisableCacheHits
protected java.lang.Class remoteIdentityMapClass
protected int remoteIdentityMapSize
protected boolean shouldAlwaysRefreshCacheOnRemote
protected boolean shouldDisableCacheHitsOnRemote
protected CacheIsolationType cacheIsolation
protected int cacheSynchronizationType
public static final int UNDEFINED_OBJECT_CHANGE_BEHAVIOR
public static final int SEND_OBJECT_CHANGES
public static final int INVALIDATE_CHANGED_OBJECTS
public static final int SEND_NEW_OBJECTS_WITH_CHANGES
public static final int DO_NOT_SEND_CHANGES
protected int unitOfWorkCacheIsolationLevel
protected boolean wasDefaultUnitOfWorkCacheIsolationLevel
public static final int UNDEFINED_ISOLATATION
public static final int USE_SESSION_CACHE_AFTER_TRANSACTION
public static final int ISOLATE_NEW_DATA_AFTER_TRANSACTION
public static final int ISOLATE_CACHE_AFTER_TRANSACTION
public static final int ISOLATE_FROM_CLIENT_SESSION
public static final int ISOLATE_CACHE_ALWAYS
protected CacheKeyType cacheKeyType
protected java.lang.Class cacheInterceptorClass
protected java.lang.String cacheInterceptorClassName
protected boolean fullyMergeEntity
protected boolean prefetchCacheKeys
protected java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> cacheIndexes
protected DatabaseChangeNotificationType databaseChangeNotificationType
public DatabaseChangeNotificationType getDatabaseChangeNotificationType()
public void setDatabaseChangeNotificationType(DatabaseChangeNotificationType databaseChangeNotificationType)
public void initializeFromParent(CachePolicy parentPolicy, ClassDescriptor descriptor, ClassDescriptor descriptorDescriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public void postInitialize(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public void initialize(ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session) throws DescriptorException
DescriptorException
public CacheIndex getCacheIndex(java.util.List<org.eclipse.persistence.internal.helper.DatabaseField> fields)
public void addCacheIndex(CacheIndex index)
public void addCacheIndex(java.lang.String... fields)
public void addCacheIndex(org.eclipse.persistence.internal.helper.DatabaseField[] fields)
public boolean hasCacheIndexes()
public java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> getCacheIndexes()
public void setCacheIndexes(java.util.Map<java.util.List<org.eclipse.persistence.internal.helper.DatabaseField>,CacheIndex> cacheIndexes)
public CachePolicy clone()
clone
in class java.lang.Object
public void assignDefaultValues(org.eclipse.persistence.internal.sessions.AbstractSession session)
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
classLoader
- public boolean getFullyMergeEntity()
public void setCacheKeyType(CacheKeyType cacheKeyType)
public CacheKeyType getCacheKeyType()
public java.lang.Class getCacheInterceptorClass()
CacheInterceptor
public java.lang.String getCacheInterceptorClassName()
CacheInterceptor
public int getCacheSynchronizationType()
public java.lang.Class getIdentityMapClass()
public int getIdentityMapSize()
public java.lang.Class getRemoteIdentityMapClass()
public int getRemoteIdentityMapSize()
public boolean shouldDisableCacheHits()
#disableCacheHits()
public boolean shouldDisableCacheHitsOnRemote()
#disableCacheHitsOnRemote()
public boolean shouldOnlyRefreshCacheIfNewerVersion()
true
if the ClassDescriptor
is configured to only refresh the cache
if the data received from the database by a query is newer than the data in the cache (as determined by the
optimistic locking field). Otherwise, it returns false
.public boolean shouldAlwaysRefreshCache()
true
if the ClassDescriptor
is configured to always refresh
the cache if data is received from the database by any query. Otherwise, it returns false
.setShouldAlwaysRefreshCache(boolean)
public boolean shouldAlwaysRefreshCacheOnRemote()
true
if the ClassDescriptor
is configured to always remotely
refresh the cache if data is received from the database by any query in a RemoteSession
.
Otherwise, it returns false
.public void setShouldDisableCacheHits(boolean shouldDisableCacheHits)
#alwaysRefreshCache()
public void setShouldDisableCacheHitsOnRemote(boolean shouldDisableCacheHitsOnRemote)
#disableCacheHitsOnRemote()
public void setShouldOnlyRefreshCacheIfNewerVersion(boolean shouldOnlyRefreshCacheIfNewerVersion)
shouldOnlyRefreshCacheIfNewerVersion
argument passed into this method is true
,
this method configures a ClassDescriptor
to only refresh the cache if the data received from the database
by a query is newer than the data in the cache (as determined by the optimistic locking field) and as long as one of the following is true:
ClassDescriptor
was configured by calling #alwaysRefreshCache
or #alwaysRefreshCacheOnRemote
,ObjectLevelReadQuery.refreshIdentityMapResult()
, orSession.refreshObject(java.lang.Object)
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For example, by default,
when a query for a single object based on its primary key is executed, OracleAS TopLink will first look in the cache for the object.
If the object is in the cache, the cached object is returned and data is not refreshed. To avoid cache hits, use
the #disableCacheHits
method.
Also note that the UnitOfWork
will not refresh its registered objects.
When the shouldOnlyRefreshCacheIfNewerVersion
argument passed into this method is false
, this method
ensures that a ClassDescriptor
is not configured to only refresh the cache if the data received from the database by a
query is newer than the data in the cache (as determined by the optimistic locking field).
#onlyRefreshCacheIfNewerVersion
,
#dontOnlyRefreshCacheIfNewerVersion
public void setShouldAlwaysRefreshCache(boolean shouldAlwaysRefreshCache)
shouldAlwaysRefreshCache
argument passed into this method is true
,
this method configures a ClassDescriptor
to always refresh the cache if data is received from
the database by any query.
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured.
For example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink
will first look in the cache for the object. If the object is in the cache, the cached object is returned and
data is not refreshed. To avoid cache hits, use the #disableCacheHits
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is not desired.
Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
.
To ensure that refreshes are only done when required, use this method in conjunction with #onlyRefreshCacheIfNewerVersion
.
When the shouldAlwaysRefreshCache
argument passed into this method is false
, this method
ensures that a ClassDescriptor
is not configured to always refresh the cache if data is received from the database by any query.
#alwaysRefreshCache
,
#dontAlwaysRefreshCache
public void setShouldAlwaysRefreshCacheOnRemote(boolean shouldAlwaysRefreshCacheOnRemote)
shouldAlwaysRefreshCacheOnRemote
argument passed into this method is true
,
this method configures a ClassDescriptor
to always remotely refresh the cache if data is received from
the database by any query in a RemoteSession
.
However, if a query hits the cache, data is not refreshed regardless of how this setting is configured. For
example, by default, when a query for a single object based on its primary key is executed, OracleAS TopLink
will first look in the cache for the object. If the object is in the cache, the cached object is returned and
data is not refreshed. To avoid cache hits, use the #disableCacheHitsOnRemote
method.
Also note that the UnitOfWork
will not refresh its registered objects.
Use this property with caution because it can lead to poor performance and may refresh on queries when it is
not desired. Normally, if you require fresh data, it is better to configure a query with ObjectLevelReadQuery.refreshIdentityMapResult()
.
To ensure that refreshes are only done when required, use this method in conjunction with #onlyRefreshCacheIfNewerVersion
.
When the shouldAlwaysRefreshCacheOnRemote
argument passed into this method is false
,
this method ensures that a ClassDescriptor
is not configured to always remotely refresh the cache if data
is received from the database by any query in a RemoteSession
.
#alwaysRefreshCacheOnRemote
,
#dontAlwaysRefreshCacheOnRemote
public void setRemoteIdentityMapClass(java.lang.Class theIdentityMapClass)
public void setRemoteIdentityMapSize(int identityMapSize)
public CacheIsolationType getCacheIsolation()
public void setCacheIsolation(CacheIsolationType isolationType)
public boolean shouldIsolateObjectsInUnitOfWork()
public boolean shouldIsolateProtectedObjectsInUnitOfWork()
public boolean shouldIsolateObjectsInUnitOfWorkEarlyTransaction()
public boolean shouldUseSessionCacheInUnitOfWorkEarlyTransaction()
public int getUnitOfWorkCacheIsolationLevel()
public void setUnitOfWorkCacheIsolationLevel(int unitOfWorkCacheIsolationLevel)
USE_SESSION_CACHE_AFTER_TRANSACTION - Objects built from new data accessed after a unit of work early transaction are stored in the session cache. This options is the most efficient as it allows the cache to be used after an early transaction. This should only be used if it is known that this class is not modified in the transaction, otherwise this could cause uncommitted data to be loaded into the session cache. ISOLATE_NEW_DATA_AFTER_TRANSACTION - Default (when using caching): Objects built from new data accessed after a unit of work early transaction are only stored in the unit of work. This still allows previously cached objects to be accessed in the unit of work after an early transaction, but ensures uncommitted data will never be put in the session cache by storing any object built from new data only in the unit of work. ISOLATE_CACHE_AFTER_TRANSACTION - After a unit of work early transaction the session cache is no longer used for this class. Objects will be directly built from the database data and only stored in the unit of work, even if previously cached. Note that this may lead to poor performance as the session cache is bypassed after an early transaction. ISOLATE_CACHE_ALWAYS - Default (when using isolated cache): The session cache will never be used for this class. Objects will be directly built from the database data and only stored in the unit of work. New objects and changes will also never be merged into the session cache. Note that this may lead to poor performance as the session cache is bypassed, however if this class is isolated or pessimistic locked and always accessed in a transaction, this can avoid having to build two copies of the object.
public void setFullyMergeEntity(boolean fullyMergeEntity)
fullyMergeEntity
- the fullyMergeEntity to setpublic void setIdentityMapClass(java.lang.Class theIdentityMapClass)
public void setIdentityMapSize(int identityMapSize)
public void setCacheSynchronizationType(int type)
This has been replaced by setCacheCoordinationType().
type
- int The synchronization type for this descriptorsetCacheCoordinationType(CacheCoordinationType)
public void setCacheCoordinationType(CacheCoordinationType type)
public void setCacheInterceptorClass(java.lang.Class cacheInterceptorClass)
CacheInterceptor
public void setCacheInterceptorClassName(java.lang.String cacheInterceptorClassName)
CacheInterceptor
public boolean isIsolated()
public boolean isProtectedIsolation()
public boolean isSharedIsolation()
public void indexObjectInCache(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, org.eclipse.persistence.internal.sessions.AbstractRecord databaseRow, java.lang.Object domainObject, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean refresh)
public void indexObjectInCache(org.eclipse.persistence.internal.identitymaps.CacheKey cacheKey, java.lang.Object object, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session, boolean refresh)
public void indexObjectInCache(org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, java.lang.Object object, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
public org.eclipse.persistence.internal.identitymaps.CacheKey checkCacheByIndex(Expression expression, org.eclipse.persistence.internal.sessions.AbstractRecord translationRow, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
public boolean isIndexableExpression(Expression expression, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.AbstractSession session)
public void useFullIdentityMap()
public void useHardCacheWeakIdentityMap()
public void useSoftIdentityMap()
public void useNoIdentityMap()
#setIsIsolated(boolean)
public void useWeakIdentityMap()
public void setPrefetchCacheKeys(boolean prefetchCacheKeys)
public boolean shouldPrefetchCacheKeys()