public class PMCacheInvalidationRequest
extends java.lang.Object
implements java.io.Serializable
Lifetime In Cachein WebSphere documentation) and thus be cached across transactions for much greater performance on future attempts to find this bean. Yet when some outside mechanism updates the bean data, sending an invalidation request will remove stale data from the PM cache so applications that are highly sensitive to stale data do not behave falsely.
Modifier and Type | Field and Description |
---|---|
static int |
INVALIDATE_ALL |
static int |
INVALIDATE_BEAN_COLLECTION |
static int |
INVALIDATE_ONE_BEAN |
Constructor and Description |
---|
PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName)
Constructor used to invalidate all beans of a given type
|
PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName,
java.util.Collection beanKeys)
Constructor used to invalidate a Collection of beans
|
PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName,
java.lang.Object beanKey)
Constructor used to invalidate a single bean
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBeanHomeJNDIName()
Gets the beanHomeJNDIName.
|
int |
getInvalidationType()
Gets the invalidationType.
|
byte[] |
getKeyAsByteArray()
INTERNAL USE ONLY: Gets the keyAsByteArray.
|
java.lang.String |
toString()
Return this object as a String, primarily for debug purposes
|
public static final int INVALIDATE_ONE_BEAN
public static final int INVALIDATE_BEAN_COLLECTION
public static final int INVALIDATE_ALL
public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName, java.lang.Object beanKey) throws java.io.IOException
beanHomeJNDIName
- the JNDI name of the bean home. This is the same value used to look up the bean home prior to calling findByPrimaryKey, for example.beanKey
- the primary key of the bean to be invalidated. The actual object type must be the primary key type for this bean type.java.io.IOException
public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName, java.util.Collection beanKeys) throws java.io.IOException
beanHomeJNDIName
- java.lang.String the JNDI name of the bean home. This is the same value used to look up the bean home prior to calling findByPrimaryKey, for example.beanKeys
- a Collection of the primary keys of the beans to be invalidated. The actual type of each object in the Collection must be the primary key type for this bean type.java.io.IOException
public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName)
beanHomeJNDIName
- java.lang.String the JNDI name of the bean home. This is the same value used to look up the bean home prior to calling findByPrimaryKey, for example.public java.lang.String toString()
toString
in class java.lang.Object
public int getInvalidationType()
public java.lang.String getBeanHomeJNDIName()
public byte[] getKeyAsByteArray()