com.ibm.websphere.ejbpersistence

Class PMCacheInvalidationRequest

  • java.lang.Object
    • com.ibm.websphere.ejbpersistence.PMCacheInvalidationRequest
  • All Implemented Interfaces:
    java.io.Serializable


    public class PMCacheInvalidationRequest
    extends java.lang.Object
    implements java.io.Serializable
    An instance of this class represents a request to invalidate one or more CMP beans in the PM cache. When an invalidate occurs, cached data for this bean is removed from the cache; the next time an application tries to find this bean, a fresh copy of the bean data is obtained from the datastore. The ability to invalidate a bean means that a CMP bean may be configured as a long-lifetime bean (see "Lifetime In Cache" in 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.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      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
    • Method Summary

      Methods 
      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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • PMCacheInvalidationRequest

        public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName,
                                  java.lang.Object beanKey)
                                   throws java.io.IOException
        Constructor used to invalidate a single bean
        Parameters:
        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.
        Throws:
        java.io.IOException
      • PMCacheInvalidationRequest

        public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName,
                                  java.util.Collection beanKeys)
                                   throws java.io.IOException
        Constructor used to invalidate a Collection of beans
        Parameters:
        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.
        Throws:
        java.io.IOException
      • PMCacheInvalidationRequest

        public PMCacheInvalidationRequest(java.lang.String beanHomeJNDIName)
        Constructor used to invalidate all beans of a given type
        Parameters:
        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.
    • Method Detail

      • toString

        public java.lang.String toString()
        Return this object as a String, primarily for debug purposes
        Overrides:
        toString in class java.lang.Object
      • getInvalidationType

        public int getInvalidationType()
        Gets the invalidationType.
        Returns:
        Returns a int
      • getBeanHomeJNDIName

        public java.lang.String getBeanHomeJNDIName()
        Gets the beanHomeJNDIName.
        Returns:
        Returns a String
      • getKeyAsByteArray

        public byte[] getKeyAsByteArray()
        INTERNAL USE ONLY: Gets the keyAsByteArray.
        Returns:
        Returns a byte[]
IBM WebSphere Application ServerTM
Release 9.0