Package org.objectweb.joram.mom.dest
Class QueueDeliveryTable
- java.lang.Object
-
- org.objectweb.joram.mom.dest.QueueDeliveryTable
-
- All Implemented Interfaces:
Encodable,Serializable
public class QueueDeliveryTable extends Object implements Encodable, Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQueueDeliveryTable.Factory
-
Field Summary
Fields Modifier and Type Field Description private static booleanDEBUGprivate HashMap<String,QueueDelivery>deliveriesprivate static Loggerloggerprivate booleanmodifiedprivate static longserialVersionUIDdefine serialVersionUID for interoperability, fix with 5.15.0 valueprivate StringtxName-
Fields inherited from interface fr.dyade.aaa.common.encoding.Encodable
BOOLEAN_ENCODED_SIZE, BYTE_ENCODED_SIZE, DOUBLE_ENCODED_SIZE, FLOAT_ENCODED_SIZE, INT_ENCODED_SIZE, LONG_ENCODED_SIZE, SHORT_ENCODED_SIZE
-
-
Constructor Summary
Constructors Constructor Description QueueDeliveryTable()QueueDeliveryTable(String txName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckModified(QueueDelivery delivery)voiddecode(Decoder decoder)Decodes the content of this objectvoiddelete()voidencode(Encoder encoder)Do not encode the transient messages.QueueDeliveryget(String msgId)intgetEncodableClassId()Returns a unique class identifier.intgetEncodedSize()Returns the size of the byte array that results from the encoding of this object.String[]getMessageIds()Return an array containing the message identifier of all deliveries in table.static QueueDeliveryTableload(String txName)voidput(String msgId, QueueDelivery delivery)QueueDeliveryremove(String msgId)voidsave()intsize()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
define serialVersionUID for interoperability, fix with 5.15.0 value- See Also:
- Constant Field Values
-
logger
private static final Logger logger
-
DEBUG
private static final boolean DEBUG
-
txName
private transient String txName
-
deliveries
private HashMap<String,QueueDelivery> deliveries
-
modified
private boolean modified
-
-
Constructor Detail
-
QueueDeliveryTable
public QueueDeliveryTable()
-
QueueDeliveryTable
public QueueDeliveryTable(String txName)
-
-
Method Detail
-
load
public static QueueDeliveryTable load(String txName) throws Exception
- Throws:
Exception
-
getMessageIds
public String[] getMessageIds()
Return an array containing the message identifier of all deliveries in table.- Returns:
- an array containing the message identifier of all deliveries in table.
-
get
public QueueDelivery get(String msgId)
-
checkModified
private void checkModified(QueueDelivery delivery)
-
remove
public QueueDelivery remove(String msgId)
-
put
public void put(String msgId, QueueDelivery delivery)
-
size
public int size()
-
save
public void save() throws IOException- Throws:
IOException
-
delete
public void delete()
-
getEncodableClassId
public int getEncodableClassId()
Description copied from interface:EncodableReturns a unique class identifier.- Specified by:
getEncodableClassIdin interfaceEncodable- Returns:
- a unique class identifier
-
getEncodedSize
public int getEncodedSize() throws ExceptionDescription copied from interface:EncodableReturns the size of the byte array that results from the encoding of this object.- Specified by:
getEncodedSizein interfaceEncodable- Returns:
- the size of the encoded byte array
- Throws:
Exception- if an error occurs
-
-