3939 * given a timestamp find the first message (position) (published) at or before the timestamp.
4040 */
4141public class PersistentMessageFinder implements AsyncCallbacks .FindEntryCallback {
42- private final ManagedCursor cursor ;
43- private final String subName ;
44- private final int ledgerCloseTimestampMaxClockSkewMillis ;
45- private final String topicName ;
46- private long timestamp = 0 ;
42+ protected final ManagedCursor cursor ;
43+ protected final String subName ;
44+ protected final int ledgerCloseTimestampMaxClockSkewMillis ;
45+ protected final String topicName ;
46+ protected long timestamp = 0 ;
4747
48- private static final int FALSE = 0 ;
49- private static final int TRUE = 1 ;
48+ protected static final int FALSE = 0 ;
49+ protected static final int TRUE = 1 ;
5050 @ SuppressWarnings ("unused" )
51- private volatile int messageFindInProgress = FALSE ;
52- private static final AtomicIntegerFieldUpdater <PersistentMessageFinder > messageFindInProgressUpdater =
51+ protected volatile int messageFindInProgress = FALSE ;
52+ protected static final AtomicIntegerFieldUpdater <PersistentMessageFinder > MESSAGE_FIND_IN_PROGRESS =
5353 AtomicIntegerFieldUpdater
5454 .newUpdater (PersistentMessageFinder .class , "messageFindInProgress" );
5555
@@ -61,7 +61,7 @@ public PersistentMessageFinder(String topicName, ManagedCursor cursor, int ledge
6161 }
6262
6363 public void findMessages (final long timestamp , AsyncCallbacks .FindEntryCallback callback ) {
64- if (messageFindInProgressUpdater .compareAndSet (this , FALSE , TRUE )) {
64+ if (MESSAGE_FIND_IN_PROGRESS .compareAndSet (this , FALSE , TRUE )) {
6565 this .timestamp = timestamp ;
6666 if (log .isDebugEnabled ()) {
6767 log .debug ("[{}] Starting message position find at timestamp {}" , subName , timestamp );
0 commit comments