spacewar
Class RegistryCoordinator

java.lang.Object
  |
  +--coordination.Coordinator
        |
        +--spacewar.RegistryCoordinator

class RegistryCoordinator
extends Coordinator

This aspect ensures synchronized access to methods of the Registry in the presence of several threads. It uses the Coordinator class, from the AspectJ coordination library. It uses a per-Registry coordination scheme, so there is one instance of this class for each instance of the Registry class. When this class is constructed, it registers appropriate mutexes and selfexes using the behavior inherited from Coordinator. The mutating methods (register and unregister) should be self-exclusive. Each reader method should be mutually exclusive with the mutating methods. But the readers can run concurrently.


Crosscut Summary
coordinatorCut()
 

 
Constructor Summary
(package private) RegistryCoordinator()
          
 
Methods inherited from class coordination.Coordinator
addMutex, addSelfex, guardedEntry, guardedEntry, guardedEntry, guardedEntry, guardedEntryWithTimeout, guardedEntryWithTimeout, guardedEntryWithTimeout, guardedEntryWithTimeout, guardedExit, guardedExit, removeMutex, removeSelfex
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

 
Crosscut Detail

coordinatorCut()

Constructor Detail

RegistryCoordinator

RegistryCoordinator()