CSP for Java
(JCSP) 1.1-rc4

Class BufferIntSizeError

  extended by java.lang.Throwable
      extended by java.lang.Error
          extended by org.jcsp.util.ints.BufferIntSizeError
All Implemented Interfaces:

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.


Buffered channels must have (usually non-zero) positive sized buffers. The following constructions will all throw this Error:
   One2OneChannelInt c = Channel.one2oneInt (new BufferInt (-42));                 // must be >= 0
   One2OneChannelInt c = Channel.one2oneInt (new OverFlowingBufferInt (-42));      // must be > 0
   One2OneChannelInt c = Channel.one2oneInt (new OverWriteOldestBufferInt (-42));  // must be > 0
   One2OneChannelInt c = Channel.one2oneInt (new OverWritingBufferInt (-42));      // must be > 0
   One2OneChannelInt c = Channel.one2oneInt (new InfiniteBufferInt (-42));         // must be > 0
Zero-buffered non-overwriting channels are, of course, the default channel semantics. The following constructions are all legal and equivalent:
   One2OneChannelInt c = Channel.one2oneInt ();
   One2OneChannelInt c = Channel.one2oneInt (new ZeroBufferInt ());      // less efficient
   One2OneChannelInt c = Channel.one2oneInt (new BufferInt (0));         // less efficient
No action should be taken to catch BufferSizeError. Application code generating it is in error and needs correcting.

P.H. Welch
See Also:
Serialized Form

Constructor Summary
BufferIntSizeError(String s)
          Constructs a new BufferIntSizeError with the specified detail message.
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public BufferIntSizeError(String s)
Constructs a new BufferIntSizeError with the specified detail message.

s - the detail message.

CSP for Java
(JCSP) 1.1-rc4

Submit a bug or feature to jcsp-team@kent.ac.uk
Version 1.1-rc4 of the JCSP API Specification (Copyright 1997-2008 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.