public final Item findOldestItem ( ) throws MessageStoreException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "findOldestItem" ) ; ItemCollection ic = ( ( ItemCollection ) _getMembership ( ) ) ; if ( null == ic ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "findOldestItem" ) ; throw new NotInMessageStore ( ) ; } Item item = null ; if ( ic != null ) { item = ( Item ) ic . findOldestItem ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "findOldestItem" , item ) ; return item ; }
Find the item that has been known to the stream for longest . The item returned may be in any of the states defined in the state model . The caller should not assume that the item can be used for any particular purpose .