|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--arlut.csd.ganymede.serverAdminProxy
serverAdminProxy is a server-side Admin object which buffers console status updates, coalescing update events as needed to maximize server efficiency. Each serverAdminProxy object has a background thread which communicates with an admin console in the background, allowing the Ganymede server's operations to be asynchronous with respect to admin console updates.
adminEvent| Field Summary | |
private java.lang.Thread |
commThread
Our background communications thread, which is responsible for calling the admin console via RMI. |
private boolean |
done
If true, we have been told to shut down, and our background commThread will exit as soon as it can clear its event queue. |
private java.lang.String |
errorCondition
If our commThread receives a remote exception when communicating with an admin console, this field will become non-null, and no more communications will be attempted with that console. |
private java.util.Vector |
eventBuffer
Our queue of adminEvent objects. |
private adminEvent[] |
lookUp
Handy direct look-up table for events in eventBuffer |
private int |
maxBufferSize
How many events we'll queue up before deciding that the admin console isn't responding. |
private Admin |
remoteConsole
Our remote reference to the admin console client |
| Constructor Summary | |
serverAdminProxy(Admin remoteConsole)
|
|
| Method Summary | |
private void |
addEvent(adminEvent newEvent)
private helper method in serverAdminProxy, used to add an event to the proxy's event buffer. |
void |
changeAdmins(java.lang.String adminStatus)
This method is called by the Ganymede server to update the number of admin consoles attached to the server. |
void |
changeState(java.lang.String state)
This method is called by the Ganymede server to update the admin console's server state display. |
void |
changeStatus(java.lang.String status)
This method is called by the Ganymede server to add to the admin console's log display. |
void |
changeStatus(java.lang.String status,
boolean timeLabelled)
This method is called by the Ganymede server to add to the admin console's log display. |
void |
changeTasks(java.util.Vector tasks)
This method is called by the Ganymede server to update the admin console's task table. |
void |
changeUsers(java.util.Vector entries)
This method is called by the Ganymede server to update the admin console's connected user table. |
void |
forceDisconnect(java.lang.String reason)
Callback: The server can tell us to disconnect if the server is going down. |
java.lang.String |
getName()
This method is called by the Ganymede server to obtain the username given when the admin console was started. |
java.lang.String |
getPassword()
This method is called by the Ganymede server to obtain the password given when the admin console was started. |
boolean |
isAlive()
Returns true if we are successfully in communications with the attached admin console. |
private void |
replaceEvent(adminEvent newEvent)
private helper method in serverAdminProxy, used to add an event to the proxy's event buffer. |
void |
run()
The serverAdminProxy's background thread's run() method. |
void |
setLastDumpTime(java.util.Date date)
This method is called by the Ganymede server to set the last dump date in the admin console. |
void |
setLocksHeld(int locks)
This method is called by the Ganymede server to set the number of locks held in the admin console. |
void |
setMemoryState(long freeMem,
long totalMem)
This method is called by the Ganymede server to update the memory status display in the admin console. |
void |
setObjectsCheckedOut(int objs)
This method is called by the Ganymede server to set the number of objects checked out in the admin console. |
void |
setServerStart(java.util.Date date)
This method is called by the Ganymede server to set the server start date in the admin console. |
void |
setTransactionsInJournal(int trans)
This method is called by the Ganymede server to set the number of transactions in the server's journal in the admin console. |
void |
shutdown()
This method shuts down the background thread. |
private void |
throwOverflow()
This method throws a remoteException which describes the state of the event buffer. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.lang.Thread commThread
Our background communications thread, which is responsible for calling the admin console via RMI.
private java.util.Vector eventBuffer
Our queue of adminEvent objects.
private int maxBufferSize
How many events we'll queue up before deciding that the admin console isn't responding.
private Admin remoteConsole
Our remote reference to the admin console client
private boolean done
If true, we have been told to shut down, and our background commThread will exit as soon as it can clear its event queue.
.private java.lang.String errorCondition
If our commThread receives a remote exception when communicating with an admin console, this field will become non-null, and no more communications will be attempted with that console.
private adminEvent[] lookUp
Handy direct look-up table for events in eventBuffer
| Constructor Detail |
public serverAdminProxy(Admin remoteConsole)
| Method Detail |
public boolean isAlive()
Returns true if we are successfully in communications with the attached admin console.
public void shutdown()
This method shuts down the background thread.
public java.lang.String getName()
throws java.rmi.RemoteException
This method is called by the Ganymede server to obtain the username given when the admin console was started.
getName in interface Admin
public java.lang.String getPassword()
throws java.rmi.RemoteException
This method is called by the Ganymede server to obtain the password given when the admin console was started.
getPassword in interface Admin
public void forceDisconnect(java.lang.String reason)
throws java.rmi.RemoteException
forceDisconnect in interface Admin
public void setServerStart(java.util.Date date)
throws java.rmi.RemoteException
This method is called by the Ganymede server to set the server start date in the admin console.
setServerStart in interface Admin
public void setLastDumpTime(java.util.Date date)
throws java.rmi.RemoteException
This method is called by the Ganymede server to set the last dump date in the admin console.
setLastDumpTime in interface Admin
public void setTransactionsInJournal(int trans)
throws java.rmi.RemoteException
This method is called by the Ganymede server to set the number of transactions in the server's journal in the admin console.
setTransactionsInJournal in interface Admin
public void setObjectsCheckedOut(int objs)
throws java.rmi.RemoteException
This method is called by the Ganymede server to set the number of objects checked out in the admin console.
setObjectsCheckedOut in interface Admin
public void setLocksHeld(int locks)
throws java.rmi.RemoteException
This method is called by the Ganymede server to set the number of locks held in the admin console.
setLocksHeld in interface Admin
public void setMemoryState(long freeMem,
long totalMem)
throws java.rmi.RemoteException
This method is called by the Ganymede server to update the memory status display in the admin console.
setMemoryState in interface Admin
public void changeState(java.lang.String state)
throws java.rmi.RemoteException
This method is called by the Ganymede server to update the admin console's server state display.
changeState in interface Admin
public void changeStatus(java.lang.String status)
throws java.rmi.RemoteException
This method is called by the Ganymede server to add to the admin console's log display.
changeStatus in interface Admin
public void changeStatus(java.lang.String status,
boolean timeLabelled)
throws java.rmi.RemoteException
This method is called by the Ganymede server to add to the admin console's log display.
public void changeAdmins(java.lang.String adminStatus)
throws java.rmi.RemoteException
This method is called by the Ganymede server to update the number of admin consoles attached to the server.
changeAdmins in interface Admin
public void changeUsers(java.util.Vector entries)
throws java.rmi.RemoteException
This method is called by the Ganymede server to update the admin console's connected user table.
changeUsers in interface Adminentries - a Vector of AdminEntry
login description objects.
public void changeTasks(java.util.Vector tasks)
throws java.rmi.RemoteException
This method is called by the Ganymede server to update the admin console's task table.
changeTasks in interface Admintasks - a Vector of scheduleHandle
objects describing the tasks registered in the Ganymede server.public void run()
The serverAdminProxy's background thread's run() method. This method runs in the admin console proxy thread to read events from this console's serverAdminProxy eventBuffer and send them down to the admin console.
run in interface java.lang.Runnable
private void addEvent(adminEvent newEvent)
throws java.rmi.RemoteException
private helper method in serverAdminProxy, used to add an event to the proxy's event buffer. If the buffer already contains an event of the same type as newEvent, both events will be sent to the admin console, in chronological order.
private void replaceEvent(adminEvent newEvent)
throws java.rmi.RemoteException
private helper method in serverAdminProxy, used to add an event to the proxy's event buffer. If the buffer already contains an event of the same type as newEvent, the old event's contents will be replaced with the new, and the admin console will never be notified of the old event's contents.
private void throwOverflow()
throws java.rmi.RemoteException
This method throws a remoteException which describes the state
of the event buffer. This is called from addEvent and
replaceEvent. The GanymedeAdmin code that calls the Admin proxy methods in serverAdminProxy
take repeated remote exceptions as an indication that they need
to detach the admin console, which is why we use RemoteException.
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||