|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omg.PortableServer.Servant
ParkNPark.interfaces.ReplicationManagerPOA
ParkNPark.middletier.ReplicationManager
public class ReplicationManager
| Nested Class Summary | |
|---|---|
protected class |
ReplicationManager.StartupListener
Listens on a server process to determine if it started up successfully or not |
| Field Summary | |
|---|---|
protected static PrintStream |
inputEater
Shared static instance of the input eater output stream wrapped in a PrintStream |
protected int |
interRequestTime
Time between requests |
private NamingContextExt |
nameServer
Naming context |
protected int |
numClients
Number of clients |
private ORB |
orb
Object request broker |
private NamingContext |
parkNParkContext
Our naming service's ParkNPark context, which contains server registrations |
protected String |
projectRoot
The project root, which is used when restarting a failed server |
protected int |
replySize
Size of reply |
private POA |
rootPOA
Root POA |
private ArrayList<ServerState> |
servers
List of active servers |
| Constructor Summary | |
|---|---|
ReplicationManager()
|
|
| Method Summary | |
|---|---|
void |
checkServers()
Check whether or not servers are active |
protected void |
initializeServerListFromParkNParkContext()
Initializes the server List from the ParkNParkContext in the name service. |
static void |
main(String[] args)
Entry point of replication manager |
private boolean |
refreshParkNParkContext()
Refreshes the parkNParkContext name service object that we use to get server bindings on. |
protected boolean |
registerReplicationManager()
Registers the replication manager's name with the name service. |
protected boolean |
removeExistingEntries(String serviceName)
Removes existing server entries that match the given service name. |
void |
serverRegistered(String ipAddress,
String serviceName,
ClientManagerFactory cmf)
Called by servers when they start up. |
void |
setPrimary(int index)
Set one of the active servers as the primary |
protected void |
setupReplicationManagerCORBAObjects(String[] args)
Setup CORBA objects |
void |
startServer(ServerState s,
boolean corrupted)
Start a new server or restart a corrupted server |
void |
unbindServer(ServerState s)
Unbind the failed server's service name from the naming service |
| Methods inherited from class ParkNPark.interfaces.ReplicationManagerPOA |
|---|
_all_interfaces, _invoke, _this, _this |
| Methods inherited from class org.omg.PortableServer.Servant |
|---|
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private ArrayList<ServerState> servers
private NamingContextExt nameServer
private NamingContext parkNParkContext
private ORB orb
private POA rootPOA
protected String projectRoot
protected int numClients
protected int interRequestTime
protected int replySize
protected static PrintStream inputEater
| Constructor Detail |
|---|
public ReplicationManager()
| Method Detail |
|---|
public static void main(String[] args)
args -
public void serverRegistered(String ipAddress,
String serviceName,
ClientManagerFactory cmf)
ipAddress - serviceName - cmf - public void checkServers()
public void setPrimary(int index)
index - public void unbindServer(ServerState s)
s -
public void startServer(ServerState s,
boolean corrupted)
s - corrupted - protected boolean removeExistingEntries(String serviceName)
serviceName - The service name to remove matching entries ofprotected void setupReplicationManagerCORBAObjects(String[] args)
protected boolean registerReplicationManager()
private boolean refreshParkNParkContext()
protected void initializeServerListFromParkNParkContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||