Package org.jcsp.lang
Class Any2AnyImpl<T>
java.lang.Object
org.jcsp.lang.Any2AnyImpl<T>
- All Implemented Interfaces:
Any2AnyChannel<T>
,ChannelInternals<T>
- Direct Known Subclasses:
Any2AnyChannelImpl
,BufferedAny2AnyChannel
,PoisonableAny2AnyChannelImpl
,PoisonableBufferedAny2AnyChannel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ChannelInternals<T>
private final Mutex
The mutex on which readers must synchronizeprivate final Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
endRead()
in()
Returns the input end of the channel.out()
Returns the output end of the channel.read()
boolean
boolean
readerEnable
(Alternative alt) boolean
void
readerPoison
(int strength) void
void
writerPoison
(int strength)
-
Field Details
-
channel
-
readMutex
The mutex on which readers must synchronize -
writeMonitor
-
-
Constructor Details
-
Any2AnyImpl
Any2AnyImpl(ChannelInternals<T> _channel)
-
-
Method Details
-
in
Description copied from interface:Any2AnyChannel
Returns the input end of the channel.- Specified by:
in
in interfaceAny2AnyChannel<T>
-
out
Description copied from interface:Any2AnyChannel
Returns the output end of the channel.- Specified by:
out
in interfaceAny2AnyChannel<T>
-
endRead
public void endRead()- Specified by:
endRead
in interfaceChannelInternals<T>
-
read
- Specified by:
read
in interfaceChannelInternals<T>
-
readerDisable
public boolean readerDisable()- Specified by:
readerDisable
in interfaceChannelInternals<T>
-
readerEnable
- Specified by:
readerEnable
in interfaceChannelInternals<T>
-
readerPending
public boolean readerPending()- Specified by:
readerPending
in interfaceChannelInternals<T>
-
readerPoison
public void readerPoison(int strength) - Specified by:
readerPoison
in interfaceChannelInternals<T>
-
startRead
- Specified by:
startRead
in interfaceChannelInternals<T>
-
write
- Specified by:
write
in interfaceChannelInternals<T>
-
writerPoison
public void writerPoison(int strength) - Specified by:
writerPoison
in interfaceChannelInternals<T>
-