Package bbflow
Class ff_queue_TCP<T>
java.lang.Object
bbflow.ff_queue<T>
bbflow.ff_queue_TCP<T>
- Type Parameters:
T
- Type of channels of the queue
Queue extending ff_queue exploting a network channel. The channel is uni-directional and type of it must be specified during initialization (INPUT/OUTPUT)
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) objectClient
int
static final int
static final int
(package private) Thread
(package private) int
Fields inherited from class bbflow.ff_queue
blocking, blocking_queue, bounded, EOS, nonblocking_bounded_queue, nonblocking_queue
-
Constructor Summary
ConstructorsConstructorDescriptionff_queue_TCP
(int type, int connectionId) ff_queue_TCP
(int type, int connectionId, String host) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and false if this queue is fullboolean
Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.void
Inserts the specified element at the tail of this queue, waiting if necessary for space to become available (if bounded)void
setEOS()
tell the Queue the end of stream reached
-
Field Details
-
client
objectClient client -
server
Thread server -
INPUT
public static final int INPUT- See Also:
-
OUTPUT
public static final int OUTPUT- See Also:
-
sockettype
int sockettype -
connectionId
public int connectionId
-
-
Constructor Details
-
ff_queue_TCP
-
ff_queue_TCP
public ff_queue_TCP(int type, int connectionId)
-
-
Method Details
-
put
Description copied from class:ff_queue
Inserts the specified element at the tail of this queue, waiting if necessary for space to become available (if bounded) -
setEOS
public void setEOS()tell the Queue the end of stream reached -
offer
Description copied from class:ff_queue
Inserts the specified element at the tail of this queue, waiting if necessary up to the specified wait time for space to become available.- Overrides:
offer
in classff_queue<T>
- Parameters:
i
- element to inserttimeout
- time to waittimeunit
- unit of the time to wait- Returns:
- true or false
- Throws:
InterruptedException
-
offer
Description copied from class:ff_queue
Inserts the specified element at the tail of this queue if it is possible to do so immediately without exceeding the queue's capacity, returning true upon success and false if this queue is full
-