Class PsyBlockingQueue
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 final 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 PsyBounded
PSY_CAPACITY, PSY_ISFULLFields inherited from interface PsyClearable
PSY_CLEARFields inherited from interface PsyCloseable
PSY_CLOSEFields inherited from interface PsyFormalQueue
PSY_DEQUEUE, PSY_ENQUEUE, PSY_GIVE, PSY_TAKEFields inherited from interface PsyLengthy
PSY_ISEMPTY, PSY_LENGTHFields inherited from interface PsyObject
PSY_CLONE, PSY_EQ, PSY_HASHCODE, PSY_INSTANCEOF, PSY_NE, PSY_TOSTRING, PSY_TOSTRINGBUFFER, PSY_TYPEFields inherited from interface PsySequential
PSY_FORALLFields inherited from interface 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 Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface PsyBounded
isFull, psyCapacity, psyIsFullMethods inherited from interface PsyContainer
psyNewEmpty, toSyntaxStringHelperMethods inherited from interface PsyIterable
psyToArray, psyUniteMethods inherited from interface PsyLengthy
isEmpty, psyIsEmpty, psyLengthMethods inherited from interface PsyObject
convert, execute, invoke, psyClone, psyEq, psyHashCode, psyInstanceOf, psyNe, psySyntax, psyToString, psyToStringBuffer, psyType, toSyntaxString, typeNameMethods inherited from interface 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>
-