|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.fc.WTObject
wt.fc.Item
wt.queue.WtQueue
wt.queue.ProcessingQueue
The ProcessingQueue
represents a specific (named) processing
queue. Queues can be started and stopped independently (through the
queue service). The ProcessingQueue class also supports the creation
and execution of queue entries.
this method is no longer supported
Use the newProcessingQueue
static factory method(s), not
the ProcessingQueue
constructor, to construct instances
of this class. Instances must be constructed using the static factory(s),
in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
Nested Class Summary |
Nested classes inherited from class wt.queue.WtQueue |
WtQueue.QueueCacheUpdater |
Field Summary | |
private static String |
CLASSNAME
|
private static long |
DEFAULT_INTERVAL
|
private static int |
EXEC_ENTRIES_COUNT
|
static long |
EXTERNALIZATION_VERSION_UID
|
private long |
interval
|
static String |
INTERVAL
Label for the attribute. |
private static int |
MAX_PROCESS_QUEUES
|
private static long |
NOTIFY_INTERVAL
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static Hashtable |
removeCompletedEntries
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static Hashtable |
stopProcessing
|
private static Hashtable |
suspendOnFailed
|
private static boolean |
VERBOSE
|
private static boolean |
VERBOSE_EXEC_ENTRIES
|
Fields inherited from class wt.queue.WtQueue |
DELETE_WHEN_EMPTY, DELETING, ENABLED, EXCEPTION_RETRIES, EXECUTION_HOST, FAILURE_NOTIFICATION_EMAIL, INIT, LAST_NOTIFICATION_TIME, LAST_STATE_SET, NAME, properties, QUEUE_STATE, REMOVE_FAILED_ENTIRES, RUNNING, STARTED, STARTING, STOPPED, STOPPING, SUSPEND_DURATION, SUSPEND_UNTIL, SUSPENDED, TOTAL_ENTRIES, VERBOSE_INDUSTRIALIZATION, WAITING_ENTRIES |
Fields inherited from class wt.fc.Item |
VERSION_40_UID, VERSION_51_UID |
Fields inherited from class wt.fc.WTObject |
CREATE_TIMESTAMP, MODIFY_TIMESTAMP |
Fields inherited from interface wt.admin.DomainAdministered |
DOMAIN_REF, INHERITED_DOMAIN |
Fields inherited from interface wt.fc.Persistable |
IDENTITY, PERSIST_INFO, TYPE |
Fields inherited from interface wt.identity.DisplayIdentification |
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE |
Constructor Summary | |
ProcessingQueue()
|
Method Summary | |
QueueEntry |
addEntry(WTPrincipal princ,
String t_method,
String t_class,
Class[] arg_types,
Object[] args)
Creates a new QueueEntry object corresponding to a processing request. |
void |
addMultiEntry(WTPrincipal princ,
String t_method,
String t_class,
Class[] arg_types,
Collection collection)
Create and commit multiple Queue entires from a Collection. |
QueryResult |
checkReadyEntries()
This method behaves exactly as getReadyEntries, but provides necessary MethodContext contruction |
boolean |
contains(QueueEntry entry)
Returns whether or not an entry belongs to the queue. |
boolean |
equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifier s. |
void |
execEntries()
Execute all queue entries in the 'READY' state, in the increasing order of their 'entryNumbers'. |
void |
execEntries(Enumeration entries)
This method executes a set of ready queue entries going back for more entires if the number entires processed equals the value of wt.queue.execEntriesCount |
QueueEntry |
execEntry(QueueEntry entry)
Executes a the queue entry passed as argument. |
String |
getConceptualClassname()
Deprecated. |
long |
getInterval()
Gets the value of the attribute: INTERVAL. |
Class |
getQType()
|
QueryResult |
getReadyEntries()
Method select entires from the queue which are ready for execution. |
Integer |
getTotalEntryCount()
|
Integer |
getWaitingEntryCount()
|
int |
hashCode()
Returns a hash code for this object based upon its ObjectIdentifier . |
boolean |
hasItems(String[] statuses)
The method checks if there exist at least one queue entry with one of the specified statuses. |
protected void |
initialize(String name)
Supports initialization, following construction of an instance. |
protected void |
initialize(String name,
String host)
Supports initialization, following construction of an instance. |
QueryResult |
minEntry()
|
static ProcessingQueue |
newProcessingQueue(String name)
Constructs a queue given its name. |
static ProcessingQueue |
newProcessingQueue(String name,
String host)
Constructs a queue given its name. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
void |
readExternal(PersistentRetrieveIfc input)
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(ProcessingQueue thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
boolean |
removeCompleted()
|
void |
setExit(boolean ex)
|
void |
setInterval(long a_Interval)
Sets the value of the attribute: INTERVAL. |
static void |
setStopProcessing(String queueName,
boolean stop)
|
static boolean |
stopProcessing(String queueName)
|
boolean |
suspendOnFailed()
|
String |
toString()
Returns a string representaion of the queue. |
void |
updateProcessEntry(QueueEntry entry,
StatusInfo status,
Timestamp st,
Timestamp et)
Generic mehtod to update a Queues execution state information |
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
void |
writeExternal(PersistentStoreIfc output)
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store. |
Methods inherited from class wt.fc.Item |
getDomainRef, initialize, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain |
Methods inherited from class wt.fc.WTObject |
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface wt.fc.NetFactor |
getClassInfo |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
public static final String INTERVAL
private long interval
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static boolean VERBOSE
private static boolean VERBOSE_EXEC_ENTRIES
private static long DEFAULT_INTERVAL
private static long NOTIFY_INTERVAL
private static int EXEC_ENTRIES_COUNT
private static int MAX_PROCESS_QUEUES
private static Hashtable stopProcessing
private static Hashtable removeCompletedEntries
private static Hashtable suspendOnFailed
Constructor Detail |
public ProcessingQueue()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class WtQueue
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class WtQueue
input
-
IOException
ClassNotFoundException
protected boolean readVersion(ProcessingQueue thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public void writeExternal(PersistentStoreIfc output) throws SQLException, DatastoreException
(Not intended for general use.)
Supported API: false
writeExternal
in interface ObjectMappable
writeExternal
in class WtQueue
output
-
SQLException
DatastoreException
public void readExternal(PersistentRetrieveIfc input) throws SQLException, DatastoreException
(Not intended for general
use.)
Supported API: false
readExternal
in interface ObjectMappable
readExternal
in class WtQueue
input
-
SQLException
DatastoreException
public String getConceptualClassname()
getConceptualClassname
in interface NetFactor
public long getInterval()
public void setInterval(long a_Interval)
a_Interval
- public static ProcessingQueue newProcessingQueue(String name) throws WTException
name
-
WTException
protected void initialize(String name) throws WTException
name
-
WTException
public QueueEntry addEntry(WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args) throws WTException
princ
- t_method
- t_class
- arg_types
- args
-
WTException
public QueueEntry execEntry(QueueEntry entry) throws WTException
entry
-
WTException
public boolean contains(QueueEntry entry) throws WTException
entry
-
WTException
public String toString()
toString
in class WtQueue
public void execEntries() throws WTException
execEntries
in class WtQueue
WTException
public static ProcessingQueue newProcessingQueue(String name, String host) throws WTException
name
- host
-
WTException
protected void initialize(String name, String host) throws WTException
name
- host
-
WTException
public boolean hasItems(String[] statuses) throws WTException
statuses
- List of statuses to consider. Constants from StatusInfo class.
WTException
public void addMultiEntry(WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Collection collection) throws WTException
princ
- t_method
- t_class
- arg_types
- collection
-
WTException
public boolean equals(Object obj)
ObjectIdentifier
s.
Changed or stale copies are still considered equal by this method.
Delegates to PersistenceHelper.equals(Persistable,Object)
.
Warning: Certain core Windchill operations may depend upon
equals
being ObjectIdentifier
-based. Changes
to the default implementation should be done with care, if at all.
Supported API: false
equals
in class WtQueue
obj
-
public int hashCode()
ObjectIdentifier
.
Delegates to PersistenceHelper.hashCode(Persistable)
.
Warning: Certain core Windchill operations may depend upon
hashCode
being ObjectIdentifier-based
. Changes
to the default implementation should be done with care, if at all.
Supported API: false
hashCode
in class WtQueue
public QueryResult getReadyEntries() throws WTException
WTException
public QueryResult minEntry() throws WTException
WTException
public QueryResult checkReadyEntries() throws WTException
WTException
public void setExit(boolean ex)
public void execEntries(Enumeration entries) throws WTException
WTException
public boolean removeCompleted()
public void updateProcessEntry(QueueEntry entry, StatusInfo status, Timestamp st, Timestamp et) throws WTException
WTException
public static boolean stopProcessing(String queueName)
public static void setStopProcessing(String queueName, boolean stop)
public boolean suspendOnFailed()
public Class getQType()
getQType
in class WtQueue
public Integer getTotalEntryCount() throws WTException
WTException
public Integer getWaitingEntryCount() throws WTException
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |