xmlBlaster 2.2.0 client API

org.xmlBlaster.util.queue
Interface I_Entry

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
I_QueueEntry
All Known Implementing Classes:
DummyEntry, MsgQueueConnectEntry, MsgQueueDisconnectEntry, MsgQueueEntry, MsgQueueEraseEntry, MsgQueueGetEntry, MsgQueuePublishEntry, MsgQueueSubscribeEntry, MsgQueueUnSubscribeEntry

public interface I_Entry
extends java.io.Serializable


Method Summary
 void added(StorageId storageId)
          Notification if this entry is added to storage.
 void embeddedObjectToXml(java.io.OutputStream out, java.util.Properties props)
          Dump content to xml representation
 java.lang.Object getEmbeddedObject()
          gets the content of this queue entry (the embedded object).
 java.lang.String getEmbeddedType()
          Gets the type of the object embedded in this entry, how the object is serialized.
 java.lang.String getLogId()
          Return a human readable identifier for logging output.
 XBMeat getMeat()
           
 int getPriority()
          Allows to query the priority of this entry.
 XBRef getRef()
           
 long getSizeInBytes()
          returns the size in bytes of this entry.
 long getUniqueId()
          This is the second order criteria in the queue
 boolean isPersistent()
          Returns true if the entry is persistent (persistent on HD), false otherwise.
 boolean isStored()
           
 void removed(StorageId storageId)
          Notification if this entry is removed from storage
 void setStored(boolean stored)
          Is invoked by the storage implementation with 'true' when the entry is put in a storage and with 'false' when the entry is removed from the storage.
 

Method Detail

getPriority

int getPriority()
Allows to query the priority of this entry. This is the highest order precedence in the sorted queue

Returns:
The priority

isPersistent

boolean isPersistent()
Returns true if the entry is persistent (persistent on HD), false otherwise.


getUniqueId

long getUniqueId()
This is the second order criteria in the queue

Returns:
The unique Id of this entry.

getEmbeddedObject

java.lang.Object getEmbeddedObject()
gets the content of this queue entry (the embedded object). In persistent queues this is the data which is stored as a blob.


getEmbeddedType

java.lang.String getEmbeddedType()
Gets the type of the object embedded in this entry, how the object is serialized.

Returns:
String the identifier which tells the I_EntryFactory how to deserialize this entry.
ServerEntryFactory.ENTRY_TYPE_MSG_XML or ServerEntryFactory.ENTRY_TYPE_MSG_SERIAL or ClientEntryFactory.ENTRY_TYPE_MSG_XML

getLogId

java.lang.String getLogId()
Return a human readable identifier for logging output.

See the derived class for a syntax description.


getSizeInBytes

long getSizeInBytes()
returns the size in bytes of this entry.


added

void added(StorageId storageId)
Notification if this entry is added to storage.

NOTE: This event is NOT triggered on startup if entries come from harddisk from the last run. It is NOT triggered during swapping.

This callback may or may not be called from within the queue specific synchronized block

NOTE: This callback is currently only implemented for I_Queue, but not for I_Map!


removed

void removed(StorageId storageId)
Notification if this entry is removed from storage

NOTE: This event is NOT triggered during swapping.

The callback is guaranteed to be NEVER called from inside a queue specific synchronized block.

NOTE: This callback is currently only implemented for I_Queue, but not for I_Map!

Parameters:
storageId - The storage id

setStored

void setStored(boolean stored)
Is invoked by the storage implementation with 'true' when the entry is put in a storage and with 'false' when the entry is removed from the storage. The storage is for example a 'cache', a 'ram' or a 'jdbc' implementation.

Note that this callback is guaranteed to be called from within the queue specific synchronized block

Todo: Remove this in favour of added()/removed() (isStored() is currently only used by CacheQueueInterceptorPlugin.java) I'm not sure if this usage relies on being inside sync

This method may never throw any exception

Parameters:
stored - 'true' if the entry will be put into the storage, 'false' if it is removed.

isStored

boolean isStored()
Returns:
boolean 'true' if the entry is still in the storage, 'false' if the entry has been removed or if it has not been put in the storage yet.

embeddedObjectToXml

void embeddedObjectToXml(java.io.OutputStream out,
                         java.util.Properties props)
                         throws java.io.IOException
Dump content to xml representation

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

getMeat

XBMeat getMeat()
               throws XmlBlasterException
Throws:
XmlBlasterException

getRef

XBRef getRef()

xmlBlaster 2.2.0 client API

Copyright © 1999-2014 The xmlBlaster.org contributers.