JanosVM v1.0 API

java.lang.isolate
Class OneWayLink_Both

java.lang.Object
  |
  +--java.lang.isolate.Link
        |
        +--java.lang.isolate.OneWayLink
              |
              +--java.lang.isolate.OneWayLink_Both

class OneWayLink_Both
extends OneWayLink

Implementation of a OneWayLink for the case where the same Isolate is both the sender and the receiver.

XXX For a sender-heavy or receiver-heavy link, too many folks are getting woken up on operation.

XXX there is no way for a sender to transmit an object to a waiting reciever without blocking. The sender always waits at least once. Should be relatively easy for the OneWayLink_Both because only a single isolate is involved.


Inner Class Summary
private static class OneWayLink_Both.LinkMapAccessor
          Per-isolate mapping of link names to link points.
private static class OneWayLink_Both.LinkPoint
          The LinkPoint is the common rendezvous point for different Link objects that all point to the same Link.
private static class OneWayLink_Both.Timeout
           
 
Field Summary
private static OneWayLink_Both.LinkMapAccessor linkMapAccessor
           
private  OneWayLink_Both.LinkPoint linkPoint
           
 
Fields inherited from class java.lang.isolate.OneWayLink
guidManager, name, receiver, sender
 
Fields inherited from class java.lang.isolate.Link
typeName
 
Constructor Summary
(package private) OneWayLink_Both(Isolate sender, Isolate receiver, java.lang.String name)
           
 
Method Summary
 void close()
           
 boolean isOpen()
           
private static OneWayLink_Both.LinkPoint lookupLinkPoint(java.lang.String name)
           
 IsolateMessage receive(long millis, int nanos)
           
 boolean send(IsolateMessage lm, long millis, int nanos)
           
 
Methods inherited from class java.lang.isolate.OneWayLink
clone, equals, isReceiver, isSender, name, newInstance, receiver, sender, toString
 
Methods inherited from class java.lang.isolate.Link
newEventLink, newLink, receive, send, tryReceive, trySend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait, wait0
 

Field Detail

linkMapAccessor

private static final OneWayLink_Both.LinkMapAccessor linkMapAccessor

linkPoint

private final OneWayLink_Both.LinkPoint linkPoint
Constructor Detail

OneWayLink_Both

OneWayLink_Both(Isolate sender,
                Isolate receiver,
                java.lang.String name)
          throws ClosedLinkException
Method Detail

lookupLinkPoint

private static OneWayLink_Both.LinkPoint lookupLinkPoint(java.lang.String name)

isOpen

public boolean isOpen()
Overrides:
isOpen in class OneWayLink

close

public void close()
Overrides:
close in class OneWayLink

send

public boolean send(IsolateMessage lm,
                    long millis,
                    int nanos)
             throws ClosedLinkException,
                    LinkSerializationException
Overrides:
send in class OneWayLink

receive

public IsolateMessage receive(long millis,
                              int nanos)
                       throws ClosedLinkException
Overrides:
receive in class OneWayLink

JanosVM v1.0 API

This documentation is Copyright (C) 2000-2003 The University of Utah. All Rights Reserved. See the documentation license for distribution terms and restrictions.
Documentation, software, and mailing lists for the JanosVM can be found at the Janos Project web page: http://www.cs.utah.edu/flux/janos/
Generated on Feb 13, 2003