This is thrown if an attempt is made to create some variety of buffered channel with a zero or negative sized buffer.
One2OneChannelInt c = ChannelInt.createOne2One (new BufferInt (-42)); // zero allowed One2OneChannelInt c = ChannelInt.createOne2One (new OverFlowingBufferInt (-42)); // zero not allowed One2OneChannelInt c = ChannelInt.createOne2One (new OverWriteOldestBufferInt (-42)); // zero not allowed One2OneChannelInt c = ChannelInt.createOne2One (new OverWritingBufferInt (-42)); // zero not allowed One2OneChannelInt c = ChannelInt.createOne2One (new InfiniteBufferInt (-42)); // zero not allowedZero-buffered non-overwriting channels are, of course, the default channel semantics. The following constructions are all legal and equivalent:
One2OneChannelInt c = ChannelInt.createOne2One (); One2OneChannelInt c = ChannelInt.createOne2One (new ZeroBufferInt ()); One2OneChannelInt c = ChannelInt.createOne2One (new BufferInt (0)); // legal but less efficientNo action should be taken to catch BufferSizeError. Application code generating it is in error and needs correcting.
Constructor and description |
---|
BufferIntSizeError
(String s) Constructs a new BufferIntSizeError with the specified detail message. |
Methods inherited from class | Name |
---|---|
class Error |
printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, setStackTrace, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
class Throwable |
printStackTrace, printStackTrace, printStackTrace, fillInStackTrace, getCause, initCause, toString, addSuppressed, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, setStackTrace, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
Constructs a new BufferIntSizeError
with the specified detail message.
s
- the detail message.JCSP for Java 1.8 generated 14-10-2016 by Jon Kerridge, Edinburgh Napier University - j dot kerridge at napier dot ac dot uk