Package EDU.oswego.cs.dl.util.concurrent
Class DefaultChannelCapacity
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.DefaultChannelCapacity
A utility class to set the default capacity of
BoundedChannel
implementations that otherwise require a capacity argument
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The initial value of the default capacity is 1024 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
get()
Get the default capacity used in default (no-argument) constructor for BoundedChannels that otherwise require a capacity argument.static void
set
(int capacity) Set the default capacity used in default (no-argument) constructor for BoundedChannels that otherwise require a capacity argument.
-
Field Details
-
INITIAL_DEFAULT_CAPACITY
public static final int INITIAL_DEFAULT_CAPACITYThe initial value of the default capacity is 1024- See Also:
-
-
Constructor Details
-
DefaultChannelCapacity
public DefaultChannelCapacity()
-
-
Method Details
-
set
public static void set(int capacity) Set the default capacity used in default (no-argument) constructor for BoundedChannels that otherwise require a capacity argument.- Throws:
IllegalArgumentException
- if capacity less or equal to zero
-
get
public static int get()Get the default capacity used in default (no-argument) constructor for BoundedChannels that otherwise require a capacity argument. Initial value isINITIAL_DEFAULT_CAPACITY
- See Also:
-