|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.karmi.rmi.Technology
Base class for technologies. Every technology has a domainId which is read from the properties file on startup. The transport calls the technology's init() method with a ConfigBundle. DomainId and dgc field are set by the init() method of the Technology class. The technology can also read technology specific values from this ConfigBundle.
The other methods are called from the reference layer when a client reference wants to invoke a method on the server.
The dgcCall and dgcAsyncCall methods are reserved for the dgc object connected with this technology.
Subclasses of Technology can overwrite buildUTID(). If this method is not overwritten the technology object can not be used to make initial registry lookups (getting remote objects by URL).
| Field Summary | |
protected ConfigBundle |
config
|
DGC |
dgc
A distributed garbage collector for this technology. |
int |
domainId
A global number to distinguish different technology domains. |
protected java.util.Hashtable |
ep2utid
Maps export points to UTID objects of this
technology. |
java.lang.String |
protocol
The protocol identifier used in URLs pointing to objects, which can be accessed by this technology. |
protected java.util.Hashtable |
utid2ep
Maps UTID objects for this technology to their
corresponding export points. |
| Fields inherited from interface uka.karmi.rmi.server.Constants |
APP_CALL, COLLECTIVE_OPERATION, DGC_ACK, DGC_CALL, DGC_CALL_ASYNC, MID_BARRIER, MID_COLLECTIVE_EXCHANGE, MID_COLLECTIVE_UPDATE, MID_EXCLUSIVE_LOCK, MID_EXCLUSIVE_UPDATE, MID_REQUEST_TICKET, MID_REQUEST_WAIT, MID_RMA, MID_SERVICE_CREATE_REPLICA, MID_SERVICE_GET_STUB, MID_SERVICE_INTERRUPT, MID_SERVICE_MIGRATE, MID_SERVICE_UPDATE_REFERENCES, MID_WAKEUP, SERVICE_CALL, SKELETON_EXTENSION, STUB_EXTENSION |
| Constructor Summary | |
Technology()
|
|
| Method Summary | |
void |
asyncDgcCall(UTID utid,
int methodId,
java.lang.Object argument)
|
UTID |
buildUTID(java.lang.String location)
Creates a new UTID object from a string. |
abstract UTID |
buildUTID(java.lang.String host,
int exportId)
|
java.lang.Object |
dgcCall(UTID utid,
int methodId,
java.lang.Object argument)
The DGC uses this method for communication. |
abstract ClientConnection |
getContext(byte cid,
int mid,
int oid,
long tid,
UTID useUtid)
On the client side, the type of the connection class is determined by the remote object reference that decides about the best technology to use for a call. |
ClientConnection |
getContext(int mid,
int oid,
UTID useUtid)
This method can not be moved to the Connection class as a factory method, because it serves as a frontend for the getContext(byte, int, int, long, UTID) method that is
overriden in subclasses. |
ExportPoint |
getLocalExportPoint(UTID utid)
This method returns the export point object if the given utid object addresses a local export point. |
static java.lang.Object |
getMonitorFor(Remote server)
|
UTID |
getUTID(ExportPoint ep)
Returns a UTID object for this technology and the specified export point. |
void |
init(ConfigBundle config)
This method is called after the standard constructor. |
abstract UTID |
initExportPoint(ExportPoint ep)
Called after creation of a new export point. |
void |
probeConfig()
|
static java.lang.Object |
rmaAcquire(Remote server)
|
static void |
rmaRelease(java.lang.Object rma)
|
static SingleRemoteClientRef |
serviceCreateReplica(SingleRemoteClientRef that,
PartitionedObjectSpace objects,
java.lang.Object root,
int rank)
|
static SingleRemoteClientRef |
serviceCreateReplicaBody(PartitionedObjectSpace objects,
java.lang.Object root,
int rank)
|
static RemoteStub |
serviceGetStub(SingleRemoteClientRef ref)
|
static boolean |
serviceInterrupt(ClientConnection clientConnection)
|
static RemoteClientRef |
serviceMigrate(Remote server,
SingleRemoteClientRef to)
|
static void |
serviceUpdateReferences(SingleRemoteClientRef that,
SingleRemoteClientRef[] refs)
|
static void |
serviceUpdateReferencesBody(ReplicatedServerRef that,
SingleRemoteClientRef[] refs)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public int domainId
public DGC dgc
public java.lang.String protocol
protected java.util.Hashtable ep2utid
Maps export points to UTID objects of this
technology. This table is updated when a new ExportPoint is registered.
getUTID(ExportPoint),
getLocalExportPoint(UTID)protected java.util.Hashtable utid2ep
UTID objects for this technology to their
corresponding export points. This table is updated when a new
ExportPoint is registered.
getUTID(ExportPoint),
getLocalExportPoint(UTID)protected ConfigBundle config
| Constructor Detail |
public Technology()
| Method Detail |
public void probeConfig()
public void init(ConfigBundle config)
throws java.lang.Exception
Subclasses of Technology which overwrite this method must also call this method ( super.init(config) ).
java.lang.Exception
public abstract UTID initExportPoint(ExportPoint ep)
throws java.lang.Exception
ep - export point
java.lang.Exceptionpublic UTID getUTID(ExportPoint ep)
ep - export point
public ExportPoint getLocalExportPoint(UTID utid)
utid - UTID address of the export point
public final UTID buildUTID(java.lang.String location)
throws RemoteException
KaRMI uses the local configuration information from the configuration file to map the abstract export point to a port number. This means that the configuration information of all hosts must be equal because KaRMI does not look up the configuration of the remote host.
location - has the syntax
"host-identifier:export-point". The host identifier is
technology specific.
RemoteException
public abstract UTID buildUTID(java.lang.String host,
int exportId)
throws java.lang.Exception
java.lang.Exception
public final ClientConnection getContext(int mid,
int oid,
UTID useUtid)
throws RemoteException
getContext(byte, int, int, long, UTID) method that is
overriden in subclasses.
RemoteExceptiongetContext(byte cid, int mid, int oid, long tid, UTID useUtid)
public abstract ClientConnection getContext(byte cid,
int mid,
int oid,
long tid,
UTID useUtid)
throws RemoteException
RemoteExceptionConnection#setContext(byte cid, int oid, int mid, long tid)
public static boolean serviceInterrupt(ClientConnection clientConnection)
throws RemoteException
RemoteException
public static RemoteClientRef serviceMigrate(Remote server,
SingleRemoteClientRef to)
throws RemoteException
RemoteException
public static RemoteStub serviceGetStub(SingleRemoteClientRef ref)
throws RemoteException
RemoteException
public static SingleRemoteClientRef serviceCreateReplica(SingleRemoteClientRef that,
PartitionedObjectSpace objects,
java.lang.Object root,
int rank)
throws RemoteException
RemoteException
public static SingleRemoteClientRef serviceCreateReplicaBody(PartitionedObjectSpace objects,
java.lang.Object root,
int rank)
throws RemoteException
RemoteException
public static void serviceUpdateReferences(SingleRemoteClientRef that,
SingleRemoteClientRef[] refs)
throws RemoteException
RemoteException
public static void serviceUpdateReferencesBody(ReplicatedServerRef that,
SingleRemoteClientRef[] refs)
throws RemoteException
RemoteExceptionpublic static java.lang.Object getMonitorFor(Remote server)
public static java.lang.Object rmaAcquire(Remote server)
throws RemoteException
RemoteException
public static void rmaRelease(java.lang.Object rma)
throws RemoteException
RemoteException
public java.lang.Object dgcCall(UTID utid,
int methodId,
java.lang.Object argument)
throws java.lang.Throwable
doDGCCall() method on the DGC
object for the remote technology represented by the
utid identifier. The methodId and
argument are passed to the method of the remote
DGC implementation.
java.lang.ThrowableDGC.doDGCCall(ExportPoint, int, Object)
public void asyncDgcCall(UTID utid,
int methodId,
java.lang.Object argument)
throws java.lang.Throwable
java.lang.ThrowabledgcCall(UTID, int, Object)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||