jp.lang
Class DistributedRuntime

java.lang.Object
  extended byjp.lang.DistributedRuntime

public final class DistributedRuntime
extends java.lang.Object

Application interface to the JavaParty RuntimeEnvironment. Application writers can use this class to influence the object distribution strategy. But use this class as few as possible, because the offered interface is not really aproppriate and can produce not the expected results in presence of concurrency.

Since:
JP0.1
Author:
Matthias Zenger, Bernhard Haumacher

Constructor Summary
DistributedRuntime()
           
 
Method Summary
static void exit(int status)
          terminates a java program (the runtime system continous running)
static int getLocation(jp.lang.RemoteObject obj)
           
static int getMachineCnt()
          get the number of registered machines
static int getMachineID()
          get the identification number of the local JVM
static java.lang.Object getReplicatedClassImplReference(java.lang.String clazzName)
          Only used in the initializing process of replicated objects
static boolean getReplicatedClassInitializingEnd(java.lang.String className)
          Only used in the initializing process of replicated objects
static void kill(int status)
          causes all local java virtual machines to exit
static int machines()
          Deprecated. use getMachineCnt() instead
static boolean migrate(jp.lang.RemoteObject obj, int id)
          object migration
static boolean replicatedClassInitializing(java.lang.String className)
          Only used in the initializing process of replicated objects
static void resetTarget()
          reset the local object distributor
static void setClassDistributor(Distributor distr)
          install new global class distributor
static void setObjectDistributor(Distributor distr)
          install new local object distributor
static void setObjectDistributor(java.lang.String classname)
          Deprecated. use setObjectDistributor(Distributor.loadDistributor(name)) instead
static void setReplicatedClassInitializingEnd(java.lang.String className, java.lang.Object o)
          Only used in the initializing process of replicated objects
static void setTarget()
          always create new objects on the local machine
static void setTarget(int t)
          set the strategy for choosing host machines for new remote objects (only for the local machine!) if t == DEFAULT, then use internal strategy else select always machine t
static void setTarget(jp.lang.RemoteObject obj)
          create new objects on the same machine than obj equal to: _setTarget(obj._location)
static int thisLocation()
          Deprecated. use getMachineID() instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedRuntime

public DistributedRuntime()
Method Detail

getMachineID

public static final int getMachineID()
get the identification number of the local JVM


getMachineCnt

public static final int getMachineCnt()
get the number of registered machines


replicatedClassInitializing

public static boolean replicatedClassInitializing(java.lang.String className)
Only used in the initializing process of replicated objects


setReplicatedClassInitializingEnd

public static void setReplicatedClassInitializingEnd(java.lang.String className,
                                                     java.lang.Object o)
                                              throws java.lang.IllegalAccessException
Only used in the initializing process of replicated objects

Throws:
java.lang.IllegalAccessException

getReplicatedClassInitializingEnd

public static boolean getReplicatedClassInitializingEnd(java.lang.String className)
                                                 throws java.lang.IllegalAccessException
Only used in the initializing process of replicated objects

Throws:
java.lang.IllegalAccessException

getReplicatedClassImplReference

public static java.lang.Object getReplicatedClassImplReference(java.lang.String clazzName)
Only used in the initializing process of replicated objects


setTarget

public static final void setTarget()
always create new objects on the local machine


setTarget

public static final void setTarget(int t)
set the strategy for choosing host machines for new remote objects (only for the local machine!) if t == DEFAULT, then use internal strategy else select always machine t


setTarget

public static final void setTarget(jp.lang.RemoteObject obj)
create new objects on the same machine than obj equal to: _setTarget(obj._location)


resetTarget

public static final void resetTarget()
reset the local object distributor


setObjectDistributor

public static final void setObjectDistributor(Distributor distr)
install new local object distributor


setClassDistributor

public static final void setClassDistributor(Distributor distr)
install new global class distributor


exit

public static final void exit(int status)
terminates a java program (the runtime system continous running)


kill

public static final void kill(int status)
causes all local java virtual machines to exit


migrate

public static final boolean migrate(jp.lang.RemoteObject obj,
                                    int id)
object migration


getLocation

public static final int getLocation(jp.lang.RemoteObject obj)

machines

public static final int machines()
Deprecated. use getMachineCnt() instead


thisLocation

public static final int thisLocation()
Deprecated. use getMachineID() instead


setObjectDistributor

public static final void setObjectDistributor(java.lang.String classname)
Deprecated. use setObjectDistributor(Distributor.loadDistributor(name)) instead

set default object distributor class (for new local machines)