xmlBlaster 2.1.0 API

org.xmlBlaster.client.queuemsg
Class MsgQueueEraseEntry

java.lang.Object
  extended by org.xmlBlaster.util.queuemsg.MsgQueueEntry
      extended by org.xmlBlaster.client.queuemsg.MsgQueueEraseEntry
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, I_Entry, I_QueueEntry

public final class MsgQueueEraseEntry
extends MsgQueueEntry

Wraps an erase() message into an entry for a sorted queue.

Author:
xmlBlaster@marcelruff.info
See Also:
Serialized Form

Field Summary
private  EraseKey eraseKey
           
private  EraseQos eraseQos
           
private  long immutableSizeInBytes
           
private  SessionName receiver
           
private static long serialVersionUID
           
 
Fields inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
entryType, glob, persistent, priority, redeliverCounter, refToCloneOrigin, returnObj, storageId, uniqueIdString, uniqueIdTimestamp, wantReturnObj
 
Constructor Summary
MsgQueueEraseEntry(Global glob, PriorityEnum priority, StorageId storageId, Timestamp timestamp, long sizeInBytes, EraseKey eraseKey, EraseQos eraseQos)
          For persistence recovery
MsgQueueEraseEntry(Global glob, StorageId storageId, EraseKey eraseKey, EraseQos eraseQos)
          Use this constructor if a new message object is fed by method erase().
 
Method Summary
 java.lang.Object clone()
          Returns a shallow clone
 void embeddedObjectToXml(java.io.OutputStream out, java.util.Properties props)
          Dump content to xml representation
 java.lang.Object getEmbeddedObject()
          The embeddded object for this implementing class is an Object[2] where Object[0] = qos.toXml() Object[1] = key.toXml()
 EraseKey getEraseKey()
           
 EraseQos getEraseQos()
           
 java.lang.String getKeyOid()
           
 MsgUnit getMsgUnit()
           
 Timestamp getRcvTimestamp()
          return null
 SessionName getReceiver()
           
 SessionName getSender()
          Access the unique login name of the eraser.
 long getSizeInBytes()
          Try to find out the approximate memory consumption of this message in RAM.
 boolean isDestroyed()
          Flag which marks the entry as destroyed, you should take it from queue and ignore/discard it
 boolean isExpired()
          Flag which marks the entry as outdated
 boolean isInternal()
           
 void setReceiver(SessionName receiver)
           
 
Methods inherited from class org.xmlBlaster.util.queuemsg.MsgQueueEntry
added, compare, equals, finalize, getEmbeddedType, getLogId, getMeat, getMethodName, getPriority, getPriorityEnum, getRedeliverCounter, getRef, getReturnObj, getStorageId, getUniqueId, getUniqueIdLong, incrRedeliverCounter, isPersistent, isStored, removed, setGlobal, setPersistent, setReturnObj, setStored, setWantReturnObject, toString, toXml, toXml, wantReturnObj
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

eraseQos

private final EraseQos eraseQos

eraseKey

private final EraseKey eraseKey

receiver

private SessionName receiver

immutableSizeInBytes

private final long immutableSizeInBytes
Constructor Detail

MsgQueueEraseEntry

public MsgQueueEraseEntry(Global glob,
                          StorageId storageId,
                          EraseKey eraseKey,
                          EraseQos eraseQos)
                   throws XmlBlasterException
Use this constructor if a new message object is fed by method erase().

Throws:
XmlBlasterException

MsgQueueEraseEntry

public MsgQueueEraseEntry(Global glob,
                          PriorityEnum priority,
                          StorageId storageId,
                          Timestamp timestamp,
                          long sizeInBytes,
                          EraseKey eraseKey,
                          EraseQos eraseQos)
For persistence recovery

Method Detail

isExpired

public boolean isExpired()
Description copied from class: MsgQueueEntry
Flag which marks the entry as outdated

Specified by:
isExpired in class MsgQueueEntry
See Also:
MsgQueueEntry.isExpired()

isDestroyed

public boolean isDestroyed()
Description copied from class: MsgQueueEntry
Flag which marks the entry as destroyed, you should take it from queue and ignore/discard it

Specified by:
isDestroyed in class MsgQueueEntry
See Also:
MsgQueueEntry.isDestroyed()

getEraseQos

public EraseQos getEraseQos()

getEraseKey

public EraseKey getEraseKey()

getMsgUnit

public MsgUnit getMsgUnit()
Specified by:
getMsgUnit in class MsgQueueEntry
Returns:
null (always)

getSender

public SessionName getSender()
Access the unique login name of the eraser.

Specified by:
getSender in class MsgQueueEntry
Returns:
loginName of the source
See Also:
MsgQueueEntry.getSender()

setReceiver

public void setReceiver(SessionName receiver)
See Also:
MsgQueueEntry.getReceiver()

getReceiver

public SessionName getReceiver()
Specified by:
getReceiver in class MsgQueueEntry
Returns:
The name of the receiver (data sink) or null
See Also:
MsgQueueEntry.getReceiver()

getKeyOid

public java.lang.String getKeyOid()
Specified by:
getKeyOid in class MsgQueueEntry
Returns:
The message key oid or null
See Also:
MsgQueueEntry.getKeyOid()

getRcvTimestamp

public Timestamp getRcvTimestamp()
return null


getEmbeddedObject

public java.lang.Object getEmbeddedObject()
The embeddded object for this implementing class is an Object[2] where Object[0] = qos.toXml() Object[1] = key.toXml()


getSizeInBytes

public long getSizeInBytes()
Description copied from class: MsgQueueEntry
Try to find out the approximate memory consumption of this message in RAM.

NOTE: The derived classes need to add their data amount to this value.

Specified by:
getSizeInBytes in interface I_Entry
Overrides:
getSizeInBytes in class MsgQueueEntry
Returns:
the approximate size in bytes of this object which contributes to a QueueEntry memory consumption

isInternal

public boolean isInternal()
Specified by:
isInternal in class MsgQueueEntry
Returns:
true

embeddedObjectToXml

public final void embeddedObjectToXml(java.io.OutputStream out,
                                      java.util.Properties props)
                               throws java.io.IOException
Description copied from interface: I_Entry
Dump content to xml representation

Parameters:
out - The stream to dump to
props - Control porperties
Throws:
java.io.IOException

clone

public java.lang.Object clone()
Returns a shallow clone

Overrides:
clone in class MsgQueueEntry

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.