com.caucho.jms.queue
Class QueueEntry<M>

java.lang.Object
  extended by com.caucho.jms.queue.QueueEntry<M>
Direct Known Subclasses:
FileQueueEntry, MemoryQueueEntry

public abstract class QueueEntry<M>
extends java.lang.Object

Basic implementation of an entry in the Queue.


Constructor Summary
QueueEntry(java.lang.String msgId, long leaseTimeout, int priority, long expiresTime)
           
 
Method Summary
 long getExpiresTime()
           
 long getLeaseExpires()
           
 java.lang.String getMsgId()
           
 M getPayload()
           
 int getPriority()
           
 long getReadSequence()
           
 boolean isExpired()
           
 boolean isLease()
          Returns true if we can get a lease to this entry
 boolean isRead()
           
 M readPayload()
           
 void rollback()
           
 void setPayload(M payload)
           
 void setReadSequence(long readSequence)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueueEntry

public QueueEntry(java.lang.String msgId,
                  long leaseTimeout,
                  int priority,
                  long expiresTime)
Method Detail

getMsgId

public java.lang.String getMsgId()

getLeaseExpires

public long getLeaseExpires()

getExpiresTime

public long getExpiresTime()

isLease

public boolean isLease()
Returns true if we can get a lease to this entry


isRead

public boolean isRead()

isExpired

public boolean isExpired()

getReadSequence

public long getReadSequence()

setReadSequence

public void setReadSequence(long readSequence)

rollback

public void rollback()

getPriority

public int getPriority()

readPayload

public M readPayload()

getPayload

public final M getPayload()

setPayload

public final void setPayload(M payload)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object