Package org.jcsp.lang
Class Any2AnyIntImpl
- java.lang.Object
-
- org.jcsp.lang.Any2AnyIntImpl
-
- All Implemented Interfaces:
Any2AnyChannelInt
,ChannelInternalsInt
- Direct Known Subclasses:
Any2AnyChannelIntImpl
,BufferedAny2AnyChannelIntImpl
,PoisonableAny2AnyChannelIntImpl
,PoisonableBufferedAny2AnyChannelInt
class Any2AnyIntImpl extends java.lang.Object implements Any2AnyChannelInt, ChannelInternalsInt
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelInternalsInt
channel
private Mutex
readMutex
The mutex on which readers must synchronizeprivate java.lang.Object
writeMonitor
-
Constructor Summary
Constructors Constructor Description Any2AnyIntImpl(ChannelInternalsInt _channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endRead()
SharedChannelInputInt
in()
Returns the input channel end.SharedChannelOutputInt
out()
Returns the output channel end.int
read()
boolean
readerDisable()
boolean
readerEnable(Alternative alt)
boolean
readerPending()
void
readerPoison(int strength)
int
startRead()
void
write(int n)
void
writerPoison(int strength)
-
-
-
Field Detail
-
channel
private ChannelInternalsInt channel
-
readMutex
private final Mutex readMutex
The mutex on which readers must synchronize
-
writeMonitor
private final java.lang.Object writeMonitor
-
-
Constructor Detail
-
Any2AnyIntImpl
Any2AnyIntImpl(ChannelInternalsInt _channel)
-
-
Method Detail
-
in
public SharedChannelInputInt in()
Description copied from interface:Any2AnyChannelInt
Returns the input channel end.- Specified by:
in
in interfaceAny2AnyChannelInt
-
out
public SharedChannelOutputInt out()
Description copied from interface:Any2AnyChannelInt
Returns the output channel end.- Specified by:
out
in interfaceAny2AnyChannelInt
-
endRead
public void endRead()
- Specified by:
endRead
in interfaceChannelInternalsInt
-
read
public int read()
- Specified by:
read
in interfaceChannelInternalsInt
-
readerDisable
public boolean readerDisable()
- Specified by:
readerDisable
in interfaceChannelInternalsInt
-
readerEnable
public boolean readerEnable(Alternative alt)
- Specified by:
readerEnable
in interfaceChannelInternalsInt
-
readerPending
public boolean readerPending()
- Specified by:
readerPending
in interfaceChannelInternalsInt
-
readerPoison
public void readerPoison(int strength)
- Specified by:
readerPoison
in interfaceChannelInternalsInt
-
startRead
public int startRead()
- Specified by:
startRead
in interfaceChannelInternalsInt
-
write
public void write(int n)
- Specified by:
write
in interfaceChannelInternalsInt
-
writerPoison
public void writerPoison(int strength)
- Specified by:
writerPoison
in interfaceChannelInternalsInt
-
-