Class Queue<T>
- java.lang.Object
-
- jdk.incubator.http.internal.common.Queue<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,ExceptionallyCloseable
public class Queue<T> extends java.lang.Object implements ExceptionallyCloseable
-
-
Constructor Summary
Constructors Constructor Description Queue()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
closeExceptionally(java.lang.Throwable t)
Called when an instance ofExceptionallyCloseable
is closed due to some exceptional condition revealed bycause
.T
poll()
T[]
pollAll(T[] type)
void
pushback(T v)
void
pushbackAll(T[] v)
void
put(T obj)
void
putAll(T[] objs)
void
registerPutCallback(java.lang.Runnable callback)
callback is invoked any time put is called where the Queue was empty.int
size()
T
take()
boolean
tryPut(T obj)
-
Methods inherited from interface jdk.incubator.http.internal.common.ExceptionallyCloseable
close
-
-
-
-
Method Detail
-
putAll
public void putAll(T[] objs) throws java.io.IOException
- Throws:
java.io.IOException
-
size
public int size()
-
tryPut
public boolean tryPut(T obj) throws java.io.IOException
- Throws:
java.io.IOException
-
put
public void put(T obj) throws java.io.IOException
- Throws:
java.io.IOException
-
registerPutCallback
public void registerPutCallback(java.lang.Runnable callback)
callback is invoked any time put is called where the Queue was empty.
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
closeExceptionally
public void closeExceptionally(java.lang.Throwable t)
Description copied from interface:ExceptionallyCloseable
Called when an instance ofExceptionallyCloseable
is closed due to some exceptional condition revealed bycause
.- Specified by:
closeExceptionally
in interfaceExceptionallyCloseable
- Parameters:
t
- The reason for which the object is closed.
-
take
public T take() throws java.io.IOException
- Throws:
java.io.IOException
-
poll
public T poll() throws java.io.IOException
- Throws:
java.io.IOException
-
pushback
public void pushback(T v)
-
pushbackAll
public void pushbackAll(T[] v)
-
-