|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.rmi.server.RemoteObject
|
+--java.rmi.server.RemoteServer
|
+--java.rmi.server.UnicastRemoteObject
|
+--arlut.csd.ganymede.GanymedeAdmin
GanymedeAdmin is the server-side implementation of the
adminSession
interface; GanymedeAdmin provides the means by which privileged users
can carry out privileged operations on the Ganymede server, including
status monitoring and administrative activities.
GanymedeAdmin is actually a dual purpose class. One the one hand,
GanymedeAdmin implements adminSession,
providing a hook for the admin console to talk to. On the other,
GanymedeAdmin contains a lot of static fields and methods which the
server code uses to communicate information to any admin consoles
that are attached to the server at any given time.
| Field Summary | |
private java.lang.String |
adminName
The name that the admin console authenticated with. |
private static java.util.Vector |
badConsoles
Static vector of GanymedeAdmin instances for which remote exceptions were caught in the static update methods. |
private java.lang.String |
clientHost
The name or ip address of the system that this admin console is attached from. |
(package private) static java.util.Vector |
consoles
Static vector of GanymedeAdmin instances, used to keep track of the attached admin consoles. |
private static long |
freeMem
Free memory statistic that the server sends to admin consoles |
private boolean |
fullprivs
If true, the admin console is attached with full privileges to run tasks, shut down the server, and so on. |
private static java.util.Date |
lastDumpDate
Timestamp that the Ganymede server last consolidated its journal file and dumped its database to disk. |
(package private) serverAdminProxy |
proxy
A server-side proxy that maintains an event queue for the admin console attached to this GanymedeAdmin object. |
private static java.lang.String |
state
The overall server state.. |
private static long |
totalMem
Total memory statistic that the server sends to admin consoles |
| Fields inherited from class java.rmi.server.UnicastRemoteObject |
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf |
| Fields inherited from class java.rmi.server.RemoteServer |
log, logname |
| Fields inherited from class java.rmi.server.RemoteObject |
ref |
| Constructor Summary | |
GanymedeAdmin(Admin admin,
boolean fullprivs,
java.lang.String adminName,
java.lang.String clientHost)
This is the GanymedeAdmin constructor, used to create a new server-side admin console attachment. |
|
| Method Summary | |
private static void |
detachBadConsoles()
This is a private convenience function, it's purpose is to out any consoles that we caught a remote exception from, the context of a loop over consoles that we might interfere here. |
ReturnVal |
disableTask(java.lang.String name)
Causes a registered task to be made ineligible for execution until enableTask()
is called. |
ReturnVal |
dumpDB()
dump the current state of the db to disk |
SchemaEdit |
editSchema()
lock the server and edit the schema |
ReturnVal |
enableTask(java.lang.String name)
Causes a task that was temporarily disabled by disableTask()
to be available for execution again. |
ReturnVal |
forceBuild()
This method is called by admin console code to force a complete rebuild of all external builds. |
ReturnVal |
kill(java.lang.String user)
Kick a user off of the Ganymede server on behalf of this admin console |
ReturnVal |
killAll()
Kick all users off of the Ganymede server on behalf of this admin console |
void |
logout()
Disconnect the remote admin console associated with this object |
void |
logout(java.lang.String reason)
Disconnect the remote admin console associated with this object |
void |
refreshMe()
This method lets the admin console explicitly request a refresh. |
static void |
refreshTasks()
This static method is used to update the list of connnected users that appears in any admin consoles attached to the Ganymede server. |
static void |
refreshUsers()
This static method is used to update the list of connnected users that appears in any admin consoles attached to the Ganymede server. |
ReturnVal |
runEmbeddedSweep()
Removes any embedded objects which do not have containers. |
ReturnVal |
runEmbeddedTest()
run a verification on the integrity of embedded objects and their containers |
ReturnVal |
runInvidSweep()
run a long-running verification suite on the invid links |
ReturnVal |
runInvidTest()
run a long-running verification suite on the invid links |
ReturnVal |
runTaskNow(java.lang.String name)
Causes a pre-registered task in the Ganymede server to be executed as soon as possible. |
static void |
setState()
This method updates the state on all attached consoles |
static void |
setState(GanymedeAdmin console)
This method updates the state on a single console |
static void |
setState(java.lang.String state)
This method changes the system state and sends it out to the consoles |
static void |
setStatus(java.lang.String status)
This static method is used to send debug log info to the consoles. |
ReturnVal |
shutdown(boolean waitForUsers)
shutdown the server cleanly, on behalf of this admin console. |
ReturnVal |
stopTask(java.lang.String name)
Causes a running task to be stopped as soon as possible. |
void |
unreferenced()
This method is called when the Java RMI system detects that this remote object is no longer referenced by any remote objects. |
static void |
updateCheckedOut()
This method updates the objects checked out count on all consoles. |
static void |
updateCheckedOut(GanymedeAdmin console)
This method updates the objects checked out count on a single console |
static void |
updateLastDump()
This method updates the last dump time to all consoles. |
static void |
updateLastDump(java.util.Date date)
This static method is used to send the last dump time to the consoles. |
static void |
updateLastDump(GanymedeAdmin console)
This method updates the last dump time on a single console |
static void |
updateLocksHeld()
|
static void |
updateLocksHeld(GanymedeAdmin console)
This method updates the number of locks held on a single console |
static void |
updateMemState()
This method is used to send the server's memory status to all connected admin consoles. |
static void |
updateMemState(GanymedeAdmin console)
This method updates the server's memory status on a single connected admin console. |
static void |
updateMemState(long freeMem,
long totalMem)
This static method is used to update and transmit the server's memory status to the consoles. |
static void |
updateTransCount()
This static method is used to send the current transcount to the consoles. |
static void |
updateTransCount(GanymedeAdmin console)
This static method is used to send the current transcount to an individual consoles. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|
| Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub, writeObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait |
| Field Detail |
static java.util.Vector consoles
private static java.util.Vector badConsoles
detachBadConsoles()
to remove consoles that we were not able to communicate with.private static java.lang.String state
private static java.util.Date lastDumpDate
private static long freeMem
private static long totalMem
private java.lang.String adminName
private java.lang.String clientHost
private boolean fullprivs
serverAdminProxy proxy
A server-side proxy that maintains an event queue for the admin console attached to this GanymedeAdmin object.
| Constructor Detail |
public GanymedeAdmin(Admin admin,
boolean fullprivs,
java.lang.String adminName,
java.lang.String clientHost)
throws java.rmi.RemoteException
This is the GanymedeAdmin constructor, used to create a new server-side admin console attachment.
Admin is an RMI remote object exported by the client in the form of a callback.
This constructor is called from
admin(),
which is responsible for authenticating the name and password before
calling this constructor.
| Method Detail |
public static void setStatus(java.lang.String status)
Ganymede.debug()
to append information to the console logs.public static void updateTransCount()
public static void updateTransCount(GanymedeAdmin console)
public static void updateLastDump(java.util.Date date)
public static void updateLastDump()
public static void updateLastDump(GanymedeAdmin console)
public static void updateMemState(long freeMem,
long totalMem)
public static void updateMemState()
public static void updateMemState(GanymedeAdmin console)
public static void updateCheckedOut()
public static void updateCheckedOut(GanymedeAdmin console)
public static void updateLocksHeld()
public static void updateLocksHeld(GanymedeAdmin console)
public static void setState(java.lang.String state)
public static void setState()
public static void setState(GanymedeAdmin console)
public static void refreshUsers()
public static void refreshTasks()
public void logout()
logout in interface adminSessionpublic void logout(java.lang.String reason)
public void unreferenced()
This method is called when the Java RMI system detects that this remote object is no longer referenced by any remote objects.
This method handles abnormal logouts and time outs for us. By default, the 1.1 RMI time-out is 10 minutes.
unreferenced in interface java.rmi.server.UnreferencedUnreferenced
public void refreshMe()
throws java.rmi.RemoteException
This method lets the admin console explicitly request
a refresh. Upon being called, the server will call several
methods on the admin console's Admin
interface to pass current status information to the console.
refreshMe in interface adminSessionpublic ReturnVal forceBuild()
This method is called by admin console code to force a complete rebuild of all external builds. This means that all databases will have their last modification timestamp cleared and all builder tasks will be scheduled for immediate execution.
forceBuild in interface adminSessionpublic ReturnVal killAll()
killAll in interface adminSessionpublic ReturnVal kill(java.lang.String user)
kill in interface adminSessionpublic ReturnVal shutdown(boolean waitForUsers)
shutdown the server cleanly, on behalf of this admin console.
shutdown in interface adminSessionwaitForUsers - if true, shutdown will be deferred until all users are logged
out. No new users will be allowed to login.public ReturnVal dumpDB()
dump the current state of the db to disk
dumpDB in interface adminSessionpublic ReturnVal runInvidTest()
runInvidTest in interface adminSessionpublic ReturnVal runInvidSweep()
runInvidSweep in interface adminSessionpublic ReturnVal runEmbeddedTest()
runEmbeddedTest in interface adminSessionpublic ReturnVal runEmbeddedSweep()
Removes any embedded objects which do not have containers.
runEmbeddedSweep in interface adminSessionpublic ReturnVal runTaskNow(java.lang.String name)
Causes a pre-registered task in the Ganymede server to be executed as soon as possible. This method call will have no effect if the task is currently running.
runTaskNow in interface adminSessionpublic ReturnVal stopTask(java.lang.String name)
Causes a running task to be stopped as soon as possible. This is not always a safe operation, as the task is stopped abruptly, with possible consequences. Use with caution.
stopTask in interface adminSessionpublic ReturnVal disableTask(java.lang.String name)
Causes a registered task to be made ineligible for execution
until enableTask()
is called. This method will not stop a task that is currently
running.
disableTask in interface adminSessionpublic ReturnVal enableTask(java.lang.String name)
Causes a task that was temporarily disabled by
disableTask()
to be available for execution again.
enableTask in interface adminSessionpublic SchemaEdit editSchema()
editSchema in interface adminSessionprivate static void detachBadConsoles()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||