jvn.JvnInvalidateReaderThread Class Reference

Collaboration diagram for jvn.JvnInvalidateReaderThread:

Collaboration graph
[legend]

List of all members.

Public Member Functions

void run ()

Package Functions

 JvnInvalidateReaderThread (Semaphore sema, JvnRemoteServer serv, int joi)

Private Attributes

int objectID
Semaphore semaphore
JvnRemoteServer server


Detailed Description

Thread used for invalidating readers. We use threads since we may have multiple readers for a single Javanaise Object, and of course calling jvnInvalidateReader on all those objects' servers in parallel is probably faster than calling sequentially.

Definition at line 27 of file JvnCoordImpl.java.


Constructor & Destructor Documentation

jvn.JvnInvalidateReaderThread.JvnInvalidateReaderThread ( Semaphore  sema,
JvnRemoteServer  serv,
int  joi 
) [package]

Creates the thread object.

Parameters:
sema Semaphore with which the object will synchronize with its creator.
serv Server object on which to call the JvnRemoteServer#jvnInvalidateReader(int) method.
joi Javanaise Object ID.

Definition at line 56 of file JvnCoordImpl.java.

References jvn.JvnInvalidateReaderThread.objectID, jvn.JvnInvalidateReaderThread.semaphore, and jvn.JvnInvalidateReaderThread.server.

00057         {
00058                 server = serv;
00059                 objectID = joi;
00060                 semaphore = sema;
00061         }


Member Function Documentation

void jvn.JvnInvalidateReaderThread.run (  ) 

Starts the thread.

See also:
Thread.run()

Definition at line 68 of file JvnCoordImpl.java.

References jvn.JvnRemoteServer.jvnInvalidateReader(), jvn.JvnInvalidateReaderThread.objectID, jvn.JvnInvalidateReaderThread.semaphore, and jvn.JvnInvalidateReaderThread.server.

00068                           {
00069                 try {
00070                         server.jvnInvalidateReader(objectID);
00071                 } catch(JvnException e) {
00072                         System.out.println("Javanaise error while invalidating reader: " + e);
00073                 }
00074                 catch(RemoteException e) {
00075                         System.out.println("Network error while invalidating reader: " + e);
00076                 }
00077 
00078                 semaphore.release();
00079         }

Here is the call graph for this function:


Member Data Documentation

int jvn.JvnInvalidateReaderThread.objectID [private]

The Javanaise Object ID.

Definition at line 32 of file JvnCoordImpl.java.

Referenced by jvn.JvnInvalidateReaderThread.JvnInvalidateReaderThread(), and jvn.JvnInvalidateReaderThread.run().

Semaphore jvn.JvnInvalidateReaderThread.semaphore [private]

Semaphore, for synchronization with the JvnCoordImpl#jvnLockWrite(int, JvnRemoteServer) that has created the thread.

Definition at line 39 of file JvnCoordImpl.java.

Referenced by jvn.JvnInvalidateReaderThread.JvnInvalidateReaderThread(), and jvn.JvnInvalidateReaderThread.run().

JvnRemoteServer jvn.JvnInvalidateReaderThread.server [private]

Server object on which to call the JvnRemoteServer#jvnInvalidateReader(int) method.

Definition at line 45 of file JvnCoordImpl.java.

Referenced by jvn.JvnInvalidateReaderThread.JvnInvalidateReaderThread(), and jvn.JvnInvalidateReaderThread.run().


The documentation for this class was generated from the following file:
Generated on Wed Jan 2 10:15:58 2008 for Javanaise by  doxygen 1.5.4