public class LRMIJSpaceContainer extends RemoteStub<IJSpaceContainer> implements IJSpaceContainer, IJSpaceContainerAdmin
IJSpaceContainer, IJSpaceContainerAdmin,
LifeCycle,Service
interface.Modifier and Type | Field and Description |
---|---|
static ThreadLocal<Boolean> |
isEmbeddedShutdownInvocation |
Constructor and Description |
---|
LRMIJSpaceContainer() |
LRMIJSpaceContainer(IJSpaceContainer directObjRef,
IJSpaceContainer dynamicProxy,
String name) |
Modifier and Type | Method and Description |
---|---|
IJSpace |
getClusteredSpace(String spaceName)
Returns a clustered proxy of the specified space.
|
ContainerConfig |
getConfig()
Get container configuration.
|
String |
getName()
Returns the name of this container.
|
String |
getRuntimeConfigReport()
Returns runtime configuration report: dump of the overall system configurations (spaces,
container, cluster), system env, sys properties.
|
IJSpace |
getSpace(String spaceName)
Returns a proxy of the specified space.
|
String[] |
getSpaceNames()
Returns the names of the spaces that belong to this container.
|
SpaceURL |
getURL()
Returns the
SpaceURL instance which was used to initialize the space. |
void |
ping()
Checks whether the container is alive and accessible.
|
void |
setConfig(ContainerConfig config)
Set new container configuration.
|
void |
shutdown()
Shuts down this container.
|
closeProxy, disable, enable, equals, getConnectionUrl, getDynamicProxy, getGeneratedTraffic, getProxy, getReceivedTraffic, getRemoteHostAddress, getRemoteHostName, getRemoteNetworkAddress, getRemoteProcessId, getServicePlatformLogicalVersion, getStubId, hashCode, init, isClosed, isCollocated, isCollocatedStub, isDirect, isRemote, isStub, overrideMethodsMetadata, readExternal, toString, writeExternal
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
enabledSmartExternalizableWithReference
public static final ThreadLocal<Boolean> isEmbeddedShutdownInvocation
public LRMIJSpaceContainer()
public LRMIJSpaceContainer(IJSpaceContainer directObjRef, IJSpaceContainer dynamicProxy, String name)
public IJSpace getClusteredSpace(String spaceName) throws NoSuchNameException, RemoteException
IJSpaceContainer
getClusteredSpace
in interface IJSpaceContainer
spaceName
- the name of the space.NoSuchNameException
- if the specified space does not exist in this container.RemoteException
- if a communication error occurspublic String getName() throws RemoteException
IJSpaceContainer
getName
in interface IJSpaceContainerAdmin
getName
in interface IJSpaceContainer
RemoteException
- Failed to retrieve container name.public IJSpace getSpace(String spaceName) throws NoSuchNameException, RemoteException
IJSpaceContainer
getSpace
in interface IJSpaceContainer
spaceName
- the name of the space.NoSuchNameException
- if the specified space does not exist in this container.RemoteException
- if a communication error occurspublic String[] getSpaceNames() throws RemoteException
IJSpaceContainer
getSpaceNames
in interface IJSpaceContainer
RemoteException
- if a communication error occurspublic SpaceURL getURL() throws RemoteException
IJSpaceContainer
SpaceURL
instance which was used to initialize the space. Notice: The
SpaceURL
object contains information on the space and container configuration/setup
such as space url used, space/container/cluster schema used and other attributes.
The
IJSpace
keeps also its reference of the SpaceURL which launched the container.
getURL
in interface IJSpaceContainer
SpaceURL
which initialized that specific space instance.RemoteException
public void ping() throws RemoteException
IJSpaceContainer
IJSpaceContainer aContainer = (IJSpaceContainer)SpaceFinder.find("jini://lookup-host/container-name")
;
try{
aContainer.ping();
System.out.println("Container alive");
}
catch (java.rmi.RemoteException re) {
System.out.println("Container unreachable");
}
ping
in interface IJSpaceContainer
RemoteException
- when container was unreachablepublic void shutdown() throws RemoteException
IJSpaceContainer
shutdown
in interface IJSpaceContainer
RemoteException
- if a communication error occurspublic ContainerConfig getConfig() throws RemoteException
IJSpaceContainerAdmin
getConfig
in interface IJSpaceContainerAdmin
RemoteException
- Failed to retrieve container configuration.public String getRuntimeConfigReport() throws RemoteException
IJSpaceContainerAdmin
getRuntimeConfigReport
in interface IJSpaceContainerAdmin
RemoteException
- Failed to get runtime configuration report.public void setConfig(ContainerConfig config) throws RemoteException
IJSpaceContainerAdmin
setConfig
in interface IJSpaceContainerAdmin
config
- The container config structure.RemoteException
- Failed to set new container configuration.Copyright © GigaSpaces.