Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ProgressTracker: Decrease delay due nearestAllowed
[controller.git]
/
opendaylight
/
md-sal
/
cds-access-client
/
src
/
main
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
access
/
client
/
EmptyQueue.java
diff --git
a/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
b/opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
index 31d863a36cf8721de52969ed0bfb5e94dfad4922..125f0251cd947198edbc17072d66c7fc607c7d61 100644
(file)
--- a/
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
+++ b/
opendaylight/md-sal/cds-access-client/src/main/java/org/opendaylight/controller/cluster/access/client/EmptyQueue.java
@@
-7,21
+7,23
@@
*/
package org.opendaylight.controller.cluster.access.client;
*/
package org.opendaylight.controller.cluster.access.client;
+import com.google.common.annotations.Beta;
import java.util.AbstractQueue;
import java.util.Collections;
import java.util.Iterator;
import java.util.Queue;
import java.util.AbstractQueue;
import java.util.Collections;
import java.util.Iterator;
import java.util.Queue;
+import org.opendaylight.yangtools.concepts.Immutable;
/**
* A specialized always-empty implementation of {@link java.util.Queue}. This implementation will always refuse new
* elements in its {@link #offer(Object)} method.
/**
* A specialized always-empty implementation of {@link java.util.Queue}. This implementation will always refuse new
* elements in its {@link #offer(Object)} method.
-
* @author Robert Varga
*
* @param <E> the type of elements held in this collection
*/
// TODO: move this class into yangtools.util
* @author Robert Varga
*
* @param <E> the type of elements held in this collection
*/
// TODO: move this class into yangtools.util
-final class EmptyQueue<T> extends AbstractQueue<T> {
+@Beta
+public final class EmptyQueue<E> extends AbstractQueue<E> implements Immutable {
private static final EmptyQueue<?> INSTANCE = new EmptyQueue<>();
private EmptyQueue() {
private static final EmptyQueue<?> INSTANCE = new EmptyQueue<>();
private EmptyQueue() {
@@
-29,27
+31,27
@@
final class EmptyQueue<T> extends AbstractQueue<T> {
}
@SuppressWarnings("unchecked")
}
@SuppressWarnings("unchecked")
- static <T> Queue<T> getInstance() {
+
public
static <T> Queue<T> getInstance() {
return (Queue<T>) INSTANCE;
}
@Override
return (Queue<T>) INSTANCE;
}
@Override
- public boolean offer(final
T e
) {
+ public boolean offer(final
E entry
) {
return false;
}
@Override
return false;
}
@Override
- public
T
poll() {
+ public
E
poll() {
return null;
}
@Override
return null;
}
@Override
- public
T
peek() {
+ public
E
peek() {
return null;
}
@Override
return null;
}
@Override
- public Iterator<
T
> iterator() {
+ public Iterator<
E
> iterator() {
return Collections.emptyIterator();
}
return Collections.emptyIterator();
}
@@
-57,4
+59,4
@@
final class EmptyQueue<T> extends AbstractQueue<T> {
public int size() {
return 0;
}
public int size() {
return 0;
}
-}
\ No newline at end of file
+}