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