CSP for Java
(JCSP) 1.0-rc4

jcsp.util
Class BufferSizeError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Error
              |
              +--jcsp.util.BufferSizeError
All Implemented Interfaces:
Serializable

public class BufferSizeError
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:
   One2OneChannel c = One2OneChannel.create (new Buffer (-42));                 // zero allowed
   One2OneChannel c = One2OneChannel.create (new OverFlowingBuffer (-42));      // zero not allowed
   One2OneChannel c = One2OneChannel.create (new OverWriteOldestBuffer (-42));  // zero not allowed
   One2OneChannel c = One2OneChannel.create (new OverWritingBuffer (-42));      // zero not allowed
   One2OneChannel c = One2OneChannel.create (new InfiniteBuffer (-42));         // zero not allowed
 
Zero-buffered non-overwriting channels are, of course, the default channel semantics. The following constructions are all legal and equivalent:
   One2OneChannel c = new One2OneChannel ();
   One2OneChannel c = One2OneChannel.create (new ZeroBuffer ());
   One2OneChannel c = One2OneChannel.create (new Buffer (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

Constructor Summary
BufferSizeError(String s)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferSizeError

public BufferSizeError(String s)

CSP for Java
(JCSP) 1.0-rc4

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