GigaSpaces XAP 8.0 API

com.gigaspaces.client
Interface IServerAdmin

All Known Subinterfaces:
IJSpace

public interface IServerAdmin

This interface contains all the administrative methods that the proxy provides to control the server.


 Usage:
        IPojoSpace space = (IPojoSpace)SpaceFinder.find(spaceUrl);
        IServerAdmin serverAdmin = space.getServerAdmin();
 
 The code examples on each method assumes the above usage.
 

Since:
6.1
Author:
Guy Korland
See Also:
IPojoSpace.getServerAdmin(), IRemoteJSpaceAdmin

Method Summary
 void clean()
          Deprecated. Since 8.0.2. The processing unit instance that contain this space instance should be restarted instead, or if the entire space was meant to be cleaned, the entire processing unit should be undeployed and redeployed. Using this method is strongly not recommended because it will not invoke any space mode change events registered components and it is not a cluster wide operation.
 void dropClass(String className)
          Drops all Class's entries and all its templates from the space.
 Object getAdmin()
          Returns the admin object to the remote part of this space.
 IJSpaceContainer getContainer()
          Deprecated. Since 8.0 - This method is reserved for internal usage.
 String getName()
          Returns the name of this space.
 Uuid getReferentUuid()
          Returns the unique Uuid of this space instance.
 com.j_spaces.core.IStubHandler getStubHandler()
          Deprecated. Since 8.0 - This method is reserved for internal usage.
 SpaceURL getURL()
          Returns the SpaceURL instance which was used to initialize the space.
 boolean isEmbedded()
          Checks whether proxy is connected to embedded or remote space.
 void ping()
          Checks whether the space is alive and accessible.
 

Method Detail

getName

String getName()
Returns the name of this space.

 String name = serverAdmin.getName();
 

Returns:
the name of this space.
See Also:
IJSpaceContainer.getName()

clean

@Deprecated
void clean()
           throws RemoteException
Deprecated. Since 8.0.2. The processing unit instance that contain this space instance should be restarted instead, or if the entire space was meant to be cleaned, the entire processing unit should be undeployed and redeployed. Using this method is strongly not recommended because it will not invoke any space mode change events registered components and it is not a cluster wide operation.

Cleans this space. The side-effects of cleaning the space are:

 serverAdmin.clean();
 

Throws:
RemoteException - if a communication error occurs

ping

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

 try{
    serverAdmin.ping();
    System.out.println("Space alive");
 }
 catch (java.rmi.RemoteException re) {
    System.out.println("Space unreachable");
 }
 

Throws:
RemoteException - when space was unreachable

getContainer

@Deprecated
IJSpaceContainer getContainer()
Deprecated. Since 8.0 - This method is reserved for internal usage.

Returns the container proxy this space resides in.
The container holds information and attributes of neighboring spaces, and exposes API for creating and destroying of spaces.

Returns:
Returns the container proxy.

getAdmin

Object getAdmin()
                throws RemoteException
Returns the admin object to the remote part of this space.

 // get a list of classes and the number of entries of each class
 IRemoteJSpaceAdmin remoteAdmin = (IRemoteJSpaceAdmin)serverAdmin.getAdmin();
 Object classList[] = remoteAdmin.getRuntimeInfo().m_ClassNames.toArray();
 List numOFEntries = remoteAdmin.getRuntimeInfo().m_NumOFEntries;
 

Returns:
the remoteAdmin object to the remote part of this space.
Throws:
RemoteException - if a communication error occurs

dropClass

void dropClass(String className)
               throws RemoteException,
                      DropClassException
Drops all Class's entries and all its templates from the space. Calling this method will remove all internal meta data related to this class stored in the space. When using persistent spaced the relevant RDBMS table will be dropped. It is the caller responsibility to ensure that no entries from this class are written to the space while this method is called.

 Message message = new Message("Hello");
 Lease lease = space.write(message, null, Lease.FOREVER);

 serverAdmin.dropClass( Message.class.getName());
 

Parameters:
className - name of class to delete.
Throws:
DropClassException - Failed to drop desired class.
RemoteException - if a communication error occurs
See Also:
IPojoSpace.clear(Object, Transaction), IJSpace.clear(Entry, Transaction)

isEmbedded

boolean isEmbedded()
Checks whether proxy is connected to embedded or remote space.

Returns:
Returns true if the proxy embedded, otherwise false.

getURL

SpaceURL getURL()
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.

In case of a clustered proxy, the returned SpaceURL object is associated to the space which initialized this proxy. The IJSpaceContainer keeps also its reference of the SpaceURL which launched the container.

Returns:
SpaceURL which initialized that specific space instance.

getStubHandler

@Deprecated
com.j_spaces.core.IStubHandler getStubHandler()
Deprecated. Since 8.0 - This method is reserved for internal usage.

Returns the StubHandler of this space.

Returns:
StubHandler of this space.

getReferentUuid

Uuid getReferentUuid()
Returns the unique Uuid of this space instance.

Returns:
Returns the unique Uuid of the space
See Also:
ReferentUuid

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.