GigaSpaces XAP 9.7.2 API

com.j_spaces.core
Interface IJSpaceContainer

All Superinterfaces:
Remote, ServiceProxyAccessor

Deprecated. Since 8.0 - This interface is reserved for internal usage only.

@Deprecated
public interface IJSpaceContainer
extends Remote, ServiceProxyAccessor

Since:
1.0
Version:
5.1
Author:
Igor Goldenberg
See Also:
IJSpace, SpaceFinder

Method Summary
 IJSpace createSpace(String spaceName, com.j_spaces.core.JSpaceAttributes spaceAttr)
          Deprecated. 
 void destroySpace(String spaceName)
          Deprecated. 
 IJSpace getClusteredSpace(String spaceName)
          Deprecated. 
 String getName()
          Deprecated. Returns the name of this container.
 IJSpace getSpace(String spaceName)
          Deprecated. 
 com.j_spaces.core.JSpaceAttributes getSpaceAttributes(String spaceName)
          Deprecated. 
 String[] getSpaceNames()
          Deprecated. 
 SpaceURL getURL()
          Deprecated. Returns the SpaceURL instance which was used to initialize the space.
 boolean isEmbedded()
          Deprecated. Checks if the container is embedded.
 void ping()
          Deprecated. Checks whether the container is alive and accessible.
 void shutdown()
          Deprecated. 
 
Methods inherited from interface com.sun.jini.start.ServiceProxyAccessor
getServiceProxy
 

Method Detail

createSpace

@Deprecated
IJSpace createSpace(String spaceName,
                               com.j_spaces.core.JSpaceAttributes spaceAttr)
                    throws CreateException,
                           RemoteException
Deprecated. 

Creates a space with a unique name in this container and writes the created space to the appropriate Storage Adapter. If the specified space already exists in this container, CreateException will be thrown. The created space will be registered with all discovered Lookup Services in the network.

 // get proxy of container
 // containerUrl of the form: protocol://host:port/container-name 
 IJSpaceContainer containerProxy = (IJSpaceContainer)SpaceFinder.find(containerUrl);
 containerProxy.createSpace( spaceName, new JSpaceAttributes( null, null, false ) );
 

Parameters:
spaceName - the name of the space, which must be unique in this container
spaceAttr - Space attributes
Returns:
space proxy
Throws:
CreateException - This exception may be thrown if container failed to create space.
RemoteException - if a communication error occurs

destroySpace

@Deprecated
void destroySpace(String spaceName)
                  throws DestroyedFailedException,
                         RemoteException
Deprecated. 

Destroys an existing space in this container, and unregisters it from all the Lookup Services.

 // ...after obtaining a containerProxy, either by createSpace(...)
 // or by IJSpace.getContainer()
 containerProxy.destroySpace( spaceName );
 

Parameters:
spaceName - the name of the space.
Throws:
DestroyedFailedException - This exception may be thrown if container failed to destroy space.
RemoteException - if a communication error occurs

getSpaceAttributes

@Deprecated
com.j_spaces.core.JSpaceAttributes getSpaceAttributes(String spaceName)
                                                      throws NoSuchNameException,
                                                             RemoteException
Deprecated. 

Returns the JSpaceAttributes object of the specified space, through which you may access different space attributes.
i.e. General properties, Memory Usage, Lease Manager, Persistence, Cluster, Security, Caching, etc.

 JSpaceAttributes spaceAttr = containerProxy.getSpaceAttributes( spaceName );
 System.out.println("Space is private?: " + spaceAttr.m_isPrivate );
 System.out.println("Space is clustered?: " + spaceAttr.m_isClustered );
 

Parameters:
spaceName - the name of the space.
Returns:
the JSpaceAttributes object associated with the specified space.
Throws:
NoSuchNameException - if the specified space doesn't exist in this container.
RemoteException - if a communication error occurs

getSpaceNames

@Deprecated
String[] getSpaceNames()
                       throws RemoteException
Deprecated. 

Returns the names of the spaces that belong to this container.

 // get all space names from container
 String[] names = containerProxy.getSpaceNames();
 for ( int i = 0; i < names.length; i++ )
    System.out.println( names[i] );
 
 

Returns:
String[] the names of the spaces that belong to this container.
Throws:
RemoteException - if a communication error occurs

getName

String getName()
               throws RemoteException
Deprecated. 
Returns the name of this container.

Returns:
the name of this container.
Throws:
RemoteException - if a communication error occurs

getSpace

@Deprecated
IJSpace getSpace(String spaceName)
                 throws NoSuchNameException,
                        RemoteException
Deprecated. 

Returns a proxy of the specified space.

Parameters:
spaceName - the name of the space.
Returns:
IJSpace space proxy.
Throws:
NoSuchNameException - if the specified space does not exist in this container.
RemoteException - if a communication error occurs

getClusteredSpace

@Deprecated
IJSpace getClusteredSpace(String spaceName)
                          throws NoSuchNameException,
                                 RemoteException
Deprecated. 

Returns a clustered proxy of the specified space.

Parameters:
spaceName - the name of the space.
Returns:
IJSpace clustered space proxy.
Throws:
NoSuchNameException - if the specified space does not exist in this container.
RemoteException - if a communication error occurs

shutdown

@Deprecated
void shutdown()
              throws RemoteException
Deprecated. 

Shuts down this container. This also involves unregistering all registered spaces from Lookup services and closing connections to storage adapters.

Throws:
RemoteException - if a communication error occurs

isEmbedded

boolean isEmbedded()
                   throws RemoteException
Deprecated. 
Checks if the container is embedded.

Returns:
true if the container is embedded
Throws:
RemoteException - if a communication error occurs

getURL

SpaceURL getURL()
                throws RemoteException
Deprecated. 
Returns the 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.

Returns:
SpaceURL which initialized that specific space instance.
Throws:
RemoteException

ping

void ping()
          throws RemoteException
Deprecated. 
Checks whether the container is alive and accessible.

 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");
 }
 

Throws:
RemoteException - when container was unreachable

GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.