public final class PassivationKey
extends java.lang.Object
implements java.io.Serializable
PassivationRecord
s and to query for records with certain key values. Implementers of CustomPassivationMechanism
are free to serialize instances of this class, but must pay careful attention to the serialVersionUID
if using Java Serialization. Two keys are considered to be equal
when all of their fields are equal. A less strict equality operation is defined in the matches(PassivationKey)
method.Modifier and Type | Class and Description |
---|---|
static class |
PassivationKey.Type
Keys come in one of four types:
PassivationKey.Type.REQUESTOR : This key represents a requestor, or a query for requestor objects. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT |
static long |
serialVersionUID |
static java.lang.String |
VERSION |
Constructor and Description |
---|
PassivationKey()
Deserialization constructor.
|
PassivationKey(PassivationKey.Type aType,
java.lang.String aRequestorId,
java.lang.String aThreadName,
java.lang.String aPageName)
Create a new key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getPageName() |
java.lang.String |
getRequestorId() |
java.lang.String |
getThreadName() |
PassivationKey.Type |
getType() |
int |
hashCode() |
boolean |
matches(PassivationKey aPartialKey)
Returns true if this key matches the provided partial key.
|
java.lang.String |
toString() |
public static final java.lang.String VERSION
public static final java.lang.String COPYRIGHT
public static final long serialVersionUID
public PassivationKey(PassivationKey.Type aType, java.lang.String aRequestorId, java.lang.String aThreadName, java.lang.String aPageName)
aType
- The type for this keyaRequestorId
- The requestor IDaThreadName
- The thread nameaPageName
- The page namejava.lang.IllegalArgumentException
- If the key constraints described in PassivationKey.Type
are not held.public PassivationKey()
public java.lang.String getRequestorId()
public java.lang.String getThreadName()
public java.lang.String getPageName()
public PassivationKey.Type getType()
public int hashCode()
hashCode
in class java.lang.Object
public boolean matches(PassivationKey aPartialKey)
PassivationKey
object that has unspecified values for some or all of its fields. This
method determines matching by applying the following algorithm:
For example, if this is a key for a thread with a requestor ID of H7F8AF0BFDCFD32398D34D13C94E9010A and a name of MyWorkThread, this method would return true for:
Note that due to the fact that the values of aPartialKey dictate which comparisons are performed, this method is not commutative.
aPartialKey
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2018 Pegasystems Inc. All Rights Reserved.