dist1.acb.CBL
Class CBL

java.lang.Object
  extended bydist1.acb.CBL.CBL

public class CBL
extends java.lang.Object

CBL

Version:
$Revision: 1.39 $
Author:
Alexander Stasiv

Nested Class Summary
static class CBL.TransitiveStateException
          Exection to indicate case when local server can not be retrieved after a timout
 
Method Summary
static CBL getInstance()
          Returns the only instance of the class
static Primary getPrimaryServer()
          Tries to retrieve local Primary server If current server is Backup calls to server.forceGetReplicas()
 java.lang.ThreadGroup getRootThreadGroup()
          Returns thread group with all threads
static Server getServer()
          Tries to retrieve local server
 java.lang.String getServerName()
          Retrns name of the server
static void main(java.lang.String[] args)
          Run the Application
 void pbBecomeHotPrimary(java.util.LinkedList replicasBackup)
          Start the Primary using the Hot rotocol
 void rejoin(java.lang.String source, java.lang.String reason)
          Invoked by outside serveices in order to restart the application
 void shutdownApplicaton(java.lang.String source, java.lang.String reason)
          Invoked by outside serveices in order to shutdown the application
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CBL getInstance()
Returns the only instance of the class

Returns:
The instance

getPrimaryServer

public static Primary getPrimaryServer()
                                throws CBL.TransitiveStateException
Tries to retrieve local Primary server If current server is Backup calls to server.forceGetReplicas()

Returns:
Current Primary local server, or null if Backup still on-line
Throws:
CBL.TransitiveStateException - if we reached timeout

getRootThreadGroup

public java.lang.ThreadGroup getRootThreadGroup()
Returns thread group with all threads

Returns:
Group with all threads

getServer

public static Server getServer()
                        throws CBL.TransitiveStateException
Tries to retrieve local server

Returns:
Current local server
Throws:
CBL.TransitiveStateException - if we reached timeout

main

public static void main(java.lang.String[] args)
Run the Application

Parameters:
args - Command line arguments

getServerName

public java.lang.String getServerName()
Retrns name of the server

Returns:
Name of the server

pbBecomeHotPrimary

public void pbBecomeHotPrimary(java.util.LinkedList replicasBackup)
                        throws java.lang.Exception
Start the Primary using the Hot rotocol

Parameters:
replicasBackup - List with replicas
Throws:
CBL.TransitiveStateException - if something wrong
java.lang.Exception

rejoin

public void rejoin(java.lang.String source,
                   java.lang.String reason)
Invoked by outside serveices in order to restart the application

Parameters:
source - Initiator of shutdowning
reason - A reason

shutdownApplicaton

public void shutdownApplicaton(java.lang.String source,
                               java.lang.String reason)
Invoked by outside serveices in order to shutdown the application

Parameters:
source - Initiator of shutdowning
reason - A reason


Copyright © 2004 Phoenix Team (CMU/AIT). All Rights Reserved.