jcsp.util.ints
Class BufferIntSizeError
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Error
|
+--jcsp.util.ints.BufferIntSizeError
- All Implemented Interfaces:
- Serializable
- public class BufferIntSizeError
- extends Error
This is thrown if an attempt is made to create some variety of buffered channel
with a zero or negative sized buffer.
Description
Buffered channels must have (usually non-zero) positive sized buffers.
The following constructions will all throw this Error
:
One2OneChannelInt c = One2OneChannelInt.create (new BufferInt (-42)); // zero allowed
One2OneChannelInt c = One2OneChannelInt.create (new OverFlowingBufferInt (-42)); // zero not allowed
One2OneChannelInt c = One2OneChannelInt.create (new OverWriteOldestBufferInt (-42)); // zero not allowed
One2OneChannelInt c = One2OneChannelInt.create (new OverWritingBufferInt (-42)); // zero not allowed
One2OneChannelInt c = One2OneChannelInt.create (new InfiniteBufferInt (-42)); // zero not allowed
Zero-buffered non-overwriting channels are, of course, the default channel semantics.
The following constructions are all legal and equivalent:
One2OneChannelInt c = new One2OneChannelInt ();
One2OneChannelInt c = One2OneChannelInt.create (new ZeroBufferInt ());
One2OneChannelInt c = One2OneChannelInt.create (new BufferInt (0)); // legal but less efficient
No action should be taken to catch BufferSizeError.
Application code generating it is in error and needs correcting.
- Author:
- P.H.Welch
- See Also:
- Serialized Form
BufferIntSizeError
public BufferIntSizeError(String s)
Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.0-rc7 of the JCSP API Specification (Copyright 1997-2006 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.