public class BufferColor extends Object
TransmissionBuffer
.Modifier and Type | Method and Description |
---|---|
static BufferColor |
getAllBuffersColor()
Returns the all colors BufferColor which creates buffer data visible to all colors.
|
short |
getColor() |
ReentrantLock |
getLock()
Return an instance to the lock for this color.
|
static BufferColor |
getNewColor()
Return a new unique BufferColor.
|
static BufferColor |
getNewColorFromHead(TransmissionBuffer buffer)
Returns a new unique BufferColor set to the head sequence of the specified TransmissionBuffer.
|
AtomicLong |
getSequence() |
void |
wake()
Wake up all threads which are monitoring this color.
|
public short getColor()
public AtomicLong getSequence()
public void wake()
public ReentrantLock getLock()
ReentrantLock
associated with this color.
This lock is unique to, immutable and is guaranteed to always be the
same lock for this color.public static BufferColor getNewColor()
getNewColorFromHead(TransmissionBuffer)
public static BufferColor getNewColorFromHead(TransmissionBuffer buffer)
buffer
- the buffer instance to obtain the head sequence from.public static BufferColor getAllBuffersColor()
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.