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 MutexThe mutex on which readers must synchronizeprivate final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidendRead()in()Returns the input end of the channel.out()Returns the output end of the channel.read()booleanbooleanreaderEnable(Alternative alt) booleanvoidreaderPoison(int strength) voidvoidwriterPoison(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:Any2AnyChannelReturns the input end of the channel.- Specified by:
inin interfaceAny2AnyChannel<T>
-
out
Description copied from interface:Any2AnyChannelReturns the output end of the channel.- Specified by:
outin interfaceAny2AnyChannel<T>
-
endRead
public void endRead()- Specified by:
endReadin interfaceChannelInternals<T>
-
read
- Specified by:
readin interfaceChannelInternals<T>
-
readerDisable
public boolean readerDisable()- Specified by:
readerDisablein interfaceChannelInternals<T>
-
readerEnable
- Specified by:
readerEnablein interfaceChannelInternals<T>
-
readerPending
public boolean readerPending()- Specified by:
readerPendingin interfaceChannelInternals<T>
-
readerPoison
public void readerPoison(int strength) - Specified by:
readerPoisonin interfaceChannelInternals<T>
-
startRead
- Specified by:
startReadin interfaceChannelInternals<T>
-
write
- Specified by:
writein interfaceChannelInternals<T>
-
writerPoison
public void writerPoison(int strength) - Specified by:
writerPoisonin interfaceChannelInternals<T>
-