public class LRMIRuntime extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DUMMY_OBJECT_ID
Dummy object id
|
Modifier and Type | Method and Description |
---|---|
int |
countRemoteObjectConnections(long remoteObjID) |
Remote |
createDynamicProxy(Remote remoteObj,
ITransportConfig config,
boolean allowCache)
Returns an instance of a dynamic
Proxy which represents DynamicSmartStub and castable
to any remote declared interface of passed obj |
DynamicThreadPoolExecutor |
getCustomThreadPool() |
long |
getID() |
DynamicThreadPoolExecutor |
getLivenessPriorityThreadPool() |
LRMIMonitoringDetails |
getMonitoringDetails(ITransportConfig config) |
DynamicThreadPoolExecutor |
getMonitoringPriorityThreadPool() |
INetworkMapper |
getNetworkMapper()
Gets the network mapper
|
int |
getPort(ITransportConfig config) |
ProtocolRegistry |
getProtocolRegistry()
Returns the protocol registry of this LRMI Runtime.
|
ObjectRegistry.Entry |
getRegistryObject(long objectId)
Returns the object registry info of bound remote object in remote LRMI stack.
|
List<ITransportConnection> |
getRemoteObjectConnectionsList(long remoteObjID) |
static LRMIRuntime |
getRuntime() |
static LRMIRuntime |
getRuntime(ITransportConfig config,
ProtocolAdapter.Side initSide)
Returns the LRMIRuntime instance.
|
StubCache |
getStubCache() |
DynamicThreadPoolExecutor |
getThreadPool() |
Object |
invoked(long objectId,
IMethod method,
Object[] args)
This method is called by a Server Peer after extracting the method name and arguments.
|
boolean |
isMonitorActivity() |
boolean |
isUseNetworkInJVM() |
void |
setMonitorActivity(boolean trackActivity) |
void |
setUseNetworkInJVM(boolean useNetworkInJVM)
If set Network socket will be used even when the client and the server share the same JVM.
|
void |
shutdown()
Shutdown the lrmi runtime, once invoked the LRMI layer is destroyed and cannot be reused in
the current class loader which it was created in, as a result this is an irreversible
process.
|
void |
simulatedDisconnectionByPID(int pid) |
void |
simulatedReconnectionByPID(int pid) |
void |
unexport(Remote object,
String protocol,
boolean force)
Unexports the remote object from the specified protocol.
|
public static final int DUMMY_OBJECT_ID
public static LRMIRuntime getRuntime()
public static LRMIRuntime getRuntime(ITransportConfig config, ProtocolAdapter.Side initSide) throws ConfigurationException
config
- the transport protocol configuration.initSide
- the protocol side initialization ProtocolAdapter.Side
Client or Server.ConfigurationException
- failed to initialize the runtime of LRMI.public long getID()
public DynamicThreadPoolExecutor getThreadPool()
public DynamicThreadPoolExecutor getMonitoringPriorityThreadPool()
public DynamicThreadPoolExecutor getLivenessPriorityThreadPool()
public DynamicThreadPoolExecutor getCustomThreadPool()
public boolean isUseNetworkInJVM()
public void setUseNetworkInJVM(boolean useNetworkInJVM)
public void setMonitorActivity(boolean trackActivity)
public boolean isMonitorActivity()
public ProtocolRegistry getProtocolRegistry()
public int getPort(ITransportConfig config)
public LRMIMonitoringDetails getMonitoringDetails(ITransportConfig config)
public Remote createDynamicProxy(Remote remoteObj, ITransportConfig config, boolean allowCache)
Proxy
which represents DynamicSmartStub and castable
to any remote declared interface of passed obj.
remoteObj
- the remote object to make it available to receive remote method invocation.config
- the configuration of transport protocol.public void unexport(Remote object, String protocol, boolean force) throws RemoteException, NoSuchObjectException
object
- the the object to unexport.protocol
- the protocol to unexport the object from.force
- if true
unexport should be performed even if the remote object
is in the process of serving clients' requests.RemoteException
- failed to unexport.NoSuchObjectException
- if the remote object is not currently exported.public ObjectRegistry.Entry getRegistryObject(long objectId)
objectId
- The exported objectId.null
if the supplied objectId was
never registered or already unexported.public Object invoked(long objectId, IMethod method, Object[] args) throws RemoteException, ApplicationException
RemoteException
ApplicationException
public List<ITransportConnection> getRemoteObjectConnectionsList(long remoteObjID) throws NoSuchObjectException
NoSuchObjectException
public int countRemoteObjectConnections(long remoteObjID) throws NoSuchObjectException
NoSuchObjectException
public StubCache getStubCache()
public void shutdown()
public INetworkMapper getNetworkMapper()
public void simulatedDisconnectionByPID(int pid)
public void simulatedReconnectionByPID(int pid)
Copyright © GigaSpaces.