X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fcds-access-client%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Faccess%2Fclient%2FSequencedQueue.java;h=0e8d1b9d56b8c5674268ca1ec21b9fb24b43ad3f;hb=314d5b41ea6b464db939da95a33c872f594ccada;hp=5cf7873a4b95efadc64ba335dc3004aea9333bb4;hpb=5464f50be733df1bbbe31cf05665d542d3b7c5e7;p=controller.git diff --git a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SequencedQueue.java b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SequencedQueue.java index 5cf7873a4b..0e8d1b9d56 100644 --- a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SequencedQueue.java +++ b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/SequencedQueue.java @@ -28,6 +28,8 @@ import org.slf4j.LoggerFactory; import scala.concurrent.duration.FiniteDuration; /* + * A queue that processes entries in sequence. + * * TODO: make this class and its users thread-safe. This will require some atomic state-keeping so that timeouts, * retries and enqueues work as expected. */ @@ -118,7 +120,7 @@ final class SequencedQueue { * 2) The request has been enqueued and transmitted, but the caller needs to schedule a new timer * 3) The request has been enqueued, but the caller needs to request resolution of backend information and that * process needs to complete before transmission occurs - * + *

* These options are covered via returning an {@link Optional}. The caller needs to examine it and decode * the scenarios above according to the following rules: * - if is null, the first case applies @@ -271,7 +273,8 @@ final class SequencedQueue { transmitEntries(pending, toSend); } - Optional setBackendInfo(final CompletionStage proof, final BackendInfo backend) { + Optional setBackendInfo(final CompletionStage proof, + final BackendInfo backend) { Preconditions.checkNotNull(backend); if (!proof.equals(backendProof)) { LOG.debug("Ignoring resolution {} while waiting for {}", proof, this.backendProof);