java.lang.Object
coneforest.psylla.core.PsyBlockingQueue
- All Implemented Interfaces:
PsyBounded
,PsyClearable
,PsyCloseable
,PsyContainer<PsyObject>
,PsyFormalQueue<PsyObject>
,PsyIterable<PsyObject>
,PsyLengthy
,PsyObject
,PsySequential<PsyObject>
,PsyStreamable<PsyObject>
,Iterable<PsyObject>
@Type("blockingqueue")
public class PsyBlockingQueue
extends Object
implements PsyFormalQueue<PsyObject>, PsyCloseable
The representation of
blockingqueue
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ContextAction
Context action of theblockingqueue
operator.Fields inherited from interface coneforest.psylla.core.PsyBounded
PSY_CAPACITY, PSY_ISFULL
Fields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEAR
Fields inherited from interface coneforest.psylla.core.PsyCloseable
PSY_CLOSE
Fields inherited from interface coneforest.psylla.core.PsyFormalQueue
PSY_DEQUEUE, PSY_ENQUEUE, PSY_GIVE, PSY_TAKE
Fields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTH
Fields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPE
Fields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALL
Fields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
capacity()
Returns the capacity of this container.iterator()
int
length()
Returns the number of elements in this queue.void
psyClear()
Clear this object.void
psyClose()
Closes this object.Removes and returns the head of this queue.void
Inserts an element into this queue.void
psyTake()
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface coneforest.psylla.core.PsyBounded
isFull, psyCapacity, psyIsFull
Methods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty, toSyntaxStringHelper
Methods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUnite
Methods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty, psyLength
Methods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeName
Methods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_BLOCKINGQUEUE
Context action of theblockingqueue
operator.
-
-
Constructor Details
-
PsyBlockingQueue
-
-
Method Details
-
length
public int length()Returns the number of elements in this queue.- Specified by:
length
in interfacePsyLengthy
- Returns:
- the number of elements in this queue.
-
psyGive
- Specified by:
psyGive
in interfacePsyFormalQueue<PsyObject>
- Throws:
PsyInterruptException
-
psyEnqueue
Description copied from interface:PsyFormalQueue
Inserts an element into this queue.- Specified by:
psyEnqueue
in interfacePsyFormalQueue<PsyObject>
- Parameters:
o
- the element to enqueue.- Throws:
PsyInvalidStateException
-
psyDequeue
Description copied from interface:PsyFormalQueue
Removes and returns the head of this queue.- Specified by:
psyDequeue
in interfacePsyFormalQueue<PsyObject>
- Returns:
- a head of this queue.
- Throws:
PsyInvalidStateException
-
psyTake
- Specified by:
psyTake
in interfacePsyFormalQueue<PsyObject>
- Throws:
PsyInterruptException
-
psyClose
public void psyClose()Description copied from interface:PsyCloseable
Closes this object.- Specified by:
psyClose
in interfacePsyCloseable
-
psyClear
public void psyClear()Description copied from interface:PsyClearable
Clear this object.- Specified by:
psyClear
in interfacePsyClearable
-
iterator
-
capacity
public int capacity()Description copied from interface:PsyBounded
Returns the capacity of this container.- Specified by:
capacity
in interfacePsyBounded
- Returns:
- the capacity of this container.
-
psyStream
- Specified by:
psyStream
in interfacePsyIterable<PsyObject>
- Specified by:
psyStream
in interfacePsyStreamable<PsyObject>
-