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 ContextActionContext action of theblockingqueueoperator.Fields inherited from interface coneforest.psylla.core.PsyBounded
PSY_CAPACITY, PSY_ISFULLFields inherited from interface coneforest.psylla.core.PsyClearable
PSY_CLEARFields inherited from interface coneforest.psylla.core.PsyCloseable
PSY_CLOSEFields inherited from interface coneforest.psylla.core.PsyFormalQueue
PSY_DEQUEUE, PSY_ENQUEUE, PSY_GIVE, PSY_TAKEFields inherited from interface coneforest.psylla.core.PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface coneforest.psylla.core.PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TONAME, PSY_TOSTRING, PSY_TYPEFields inherited from interface coneforest.psylla.core.PsySequential
PSY_FORALLFields inherited from interface coneforest.psylla.core.PsyStreamable
PSY_STREAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcapacity()Returns the capacity of this container.iterator()intlength()Returns the number of elements in this queue.voidpsyClear()Clear this object.voidpsyClose()Closes this object.Removes and returns the head of this queue.voidInserts an element into this queue.voidpsyTake()Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface coneforest.psylla.core.PsyBounded
isFull, psyCapacity, psyIsFullMethods inherited from interface coneforest.psylla.core.PsyContainer
psyNewEmpty, toSyntaxStringHelperMethods inherited from interface coneforest.psylla.core.PsyIterable
psyToArray, psyUniteMethods inherited from interface coneforest.psylla.core.PsyLengthy
isEmpty, psyIsEmpty, psyLengthMethods inherited from interface coneforest.psylla.core.PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToName, psyToString, psyType, toSyntaxString, typeNameMethods inherited from interface coneforest.psylla.core.PsyStreamable
psyForAll
-
Field Details
-
PSY_BLOCKINGQUEUE
Context action of theblockingqueueoperator.
-
-
Constructor Details
-
PsyBlockingQueue
-
-
Method Details
-
length
public int length()Returns the number of elements in this queue.- Specified by:
lengthin interfacePsyLengthy- Returns:
- the number of elements in this queue.
-
psyGive
- Specified by:
psyGivein interfacePsyFormalQueue<PsyObject>- Throws:
PsyInterruptException
-
psyEnqueue
Description copied from interface:PsyFormalQueueInserts an element into this queue.- Specified by:
psyEnqueuein interfacePsyFormalQueue<PsyObject>- Parameters:
o- the element to enqueue.- Throws:
PsyInvalidStateException
-
psyDequeue
Description copied from interface:PsyFormalQueueRemoves and returns the head of this queue.- Specified by:
psyDequeuein interfacePsyFormalQueue<PsyObject>- Returns:
- a head of this queue.
- Throws:
PsyInvalidStateException
-
psyTake
- Specified by:
psyTakein interfacePsyFormalQueue<PsyObject>- Throws:
PsyInterruptException
-
psyClose
public void psyClose()Description copied from interface:PsyCloseableCloses this object.- Specified by:
psyClosein interfacePsyCloseable
-
psyClear
public void psyClear()Description copied from interface:PsyClearableClear this object.- Specified by:
psyClearin interfacePsyClearable
-
iterator
-
capacity
public int capacity()Description copied from interface:PsyBoundedReturns the capacity of this container.- Specified by:
capacityin interfacePsyBounded- Returns:
- the capacity of this container.
-
psyStream
- Specified by:
psyStreamin interfacePsyIterable<PsyObject>- Specified by:
psyStreamin interfacePsyStreamable<PsyObject>
-