GigaSpaces XAP 10.0.1 API

com.j_spaces.core.admin
Interface IRemoteJSpaceAdmin

All Superinterfaces:
Remote

public interface IRemoteJSpaceAdmin
extends Remote

This interface contains all the administrative methods that GigaSpaces provides to control the JavaSpaces service.


 Usage:
        IJSpace space = (IJSpace) SpaceFinder.find(spaceUrl);
        IRemoteJSpaceAdmin spaceAdmin = (IRemoteJSpaceAdmin)space.getAdmin();

 The code examples on each method assumes the above usage.
 

Author:
Igor Goldenberg.

Field Summary
static int REPLICATION_STATUS_ACTIVE
          Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
static int REPLICATION_STATUS_DISABLED
          Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
static int REPLICATION_STATUS_DISCONNECTED
          Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
 
Method Summary
 void dropClass(String className, SpaceContext sc)
          Drop all Class entries and all its templates from the space.
 BasicTypeInfo getClassTypeInfo(String className)
          Deprecated. Since 8.0 - Use GigaSpaceTypeManager.getTypeDescriptor instead.
 ClusterPolicy getClusterPolicy()
          Return the present ClusterPolicy objects.
 SpaceConfig getConfig()
          Returns SpaceConfig of this space.
 String getName()
          Returns the Space Name.
 Object[] getReplicationStatus()
          Deprecated. Since 8.0 - This method is relevant only in the old deprecated replication module and will be removed in a future version.
 SpaceRuntimeInfo getRuntimeInfo()
          Returns SpaceRuntimeInfo.
 SpaceRuntimeInfo getRuntimeInfo(String className)
          Returns SpaceRuntimeInfo for specific class name and its subclasses.
 int getState()
          Returns the particular condition of this space.
 void ping()
          Ping to space to see if alive.
 void setConfig(com.j_spaces.core.JSpaceAttributes config)
          Deprecated. Since 8.0 - This method is reserved for internal usage only.
 SpaceCopyStatus spaceCopy(IJSpace remoteSpace, Object template, boolean includeNotifyTemplates, int chunkSize)
           
 SpaceCopyStatus spaceCopy(String remoteUrl, Object template, boolean includeNotifyTemplates, int chunkSize)
          Given Url of a remote space, Copy all entries/notify templates from the space.
 

Field Detail

REPLICATION_STATUS_ACTIVE

@Deprecated
static final int REPLICATION_STATUS_ACTIVE
Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
The replication is active. @see getReplicationStatus()

See Also:
Constant Field Values

REPLICATION_STATUS_DISCONNECTED

@Deprecated
static final int REPLICATION_STATUS_DISCONNECTED
Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
The replication is disconnected. @see #getReplicationStatus()

See Also:
Constant Field Values

REPLICATION_STATUS_DISABLED

@Deprecated
static final int REPLICATION_STATUS_DISABLED
Deprecated. Since 8.0. This constant is relevant only in the old depracated replication module and will be removed in a future version.
The replication is disabled. @see #getReplicationStatus()

See Also:
Constant Field Values
Method Detail

getName

String getName()
               throws RemoteException
Returns the Space Name.

 Usage:
        spaceAdmin.getName()
 

Returns:
the space's name
Throws:
RemoteException - Failed to get name

getRuntimeInfo

SpaceRuntimeInfo getRuntimeInfo()
                                throws RemoteException
Returns SpaceRuntimeInfo.

 Usage:
   SpaceRuntimeInfo runtime = spaceAdmin.getRuntimeInfo();
   List classNames = runtime.m_ClassNames;
   List numOfEntries = runtime.m_NumOFEntries;
 

Returns:
SpaceRuntimeInfo which holds the classes and the number of entries currently in the space.
Throws:
RemoteException - if a communication error occurs

getRuntimeInfo

SpaceRuntimeInfo getRuntimeInfo(String className)
                                throws RemoteException
Returns SpaceRuntimeInfo for specific class name and its subclasses.

 Usage:
         String className = ExampleObject.class.getName();
   SpaceRuntimeInfo runtime = spaceAdmin.getRuntimeInfo(className);
   List classNames = runtime.m_ClassNames;
   List numOfEntries = runtime.m_NumOFEntries;
 

Returns:
SpaceRuntimeInfo which holds the classes and the number of entries of given class and its subclasses currently in space.
Throws:
RemoteException - if a communication error occurs

getConfig

SpaceConfig getConfig()
                      throws RemoteException
Returns SpaceConfig of this space.

 Usage:
        SpaceConfig config = spaceAdmin.getConfig();
        if (config != null)
                boolean isClustered = config.m_isClustered;
 

Returns:
SpaceConfig - Contains all information about the space configuration.
Throws:
RemoteException - if a communication error occurs

setConfig

@Deprecated
void setConfig(com.j_spaces.core.JSpaceAttributes config)
               throws RemoteException
Deprecated. Since 8.0 - This method is reserved for internal usage only.

Throws:
RemoteException

ping

void ping()
          throws RemoteException
Ping to space to see if alive. If successful, this does not indicate that the space is in a running state.
Usage:
 try
 {
     spaceAdmin.ping();
 }
 catch (RemoteException re)
 {
     System.err.println("Space not accessible");
 }

Throws:
RemoteException - if a communication error occurs
See Also:
getState()

spaceCopy

SpaceCopyStatus spaceCopy(String remoteUrl,
                          Object template,
                          boolean includeNotifyTemplates,
                          int chunkSize)
                          throws RemoteException
Given Url of a remote space, Copy all entries/notify templates from the space.

 Usage:
   SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( sourceSpaceURL, template, false );
   System.out.println("Copy-Status: " + copyStatus );
 

Parameters:
remoteUrl - url of remote space to copy from
template - Entry template or null.
includeNotifyTemplates - - if true ALL notify templates will be copied too
chunkSize - Chunk size (batch) for this copy operation.
Returns:
SpaceCopyStatus Contains the status information of spaceCopy operation.
Throws:
RemoteException - if a communication error occurs

spaceCopy

SpaceCopyStatus spaceCopy(IJSpace remoteSpace,
                          Object template,
                          boolean includeNotifyTemplates,
                          int chunkSize)
                          throws RemoteException
Throws:
RemoteException

getReplicationStatus

@Deprecated
Object[] getReplicationStatus()
                              throws RemoteException
Deprecated. Since 8.0 - This method is relevant only in the old deprecated replication module and will be removed in a future version.

returns the replication member-status relation of all the replication groups.

 Usage:
   Object[] replStatus = spaceAdmin.getReplicationStatus();
   String[] peers = (String[])replStatus[0];
   int[] status = (int[])replStatus[1];
 

Returns:
an array of remote member names array and replication status array. Replication status can have one of the following values: IRemoteJSpaceAdmin.REPLICATION_STATUS_ACTIVE IRemoteJSpaceAdmin.REPLICATION_STATUS_DISCONNECTED IRemoteJSpaceAdmin.REPLICATION_STATUS_DISABLED
Throws:
RemoteException - if a communication error occurs

getClassTypeInfo

@Deprecated
BasicTypeInfo getClassTypeInfo(String className)
                               throws RemoteException
Deprecated. Since 8.0 - Use GigaSpaceTypeManager.getTypeDescriptor instead.

Get the basic class information from the space directory.

 Usage:
   com.j_spaces.core.client.BasicTypeInfo classInfo
        = spaceAdmin.getClassTypeInfo( className );
 
   String[] fieldNames = classInfo.m_FieldsNames;
   String[] fieldTypes = classInfo.m_FieldsTypes;
 

Parameters:
className - - The name of the class to retrieve the information from.
Returns:
BasicTypeInfo - Which provides class information.
Throws:
RemoteException - if a communication error occurs

getClusterPolicy

ClusterPolicy getClusterPolicy()
                               throws RemoteException
Return the present ClusterPolicy objects.

Returns:
a ClusterPolicy that represents current cluster
Throws:
RemoteException - if a communication error occurs

dropClass

void dropClass(String className,
               SpaceContext sc)
               throws RemoteException,
                      DropClassException
Drop all Class 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. This method is protected through the space Default Security Filter. Admin permissions required to execute this request successfully.

 Usage:
        spaceAdmin.dropClass( className );
 

Parameters:
className - name of class to delete.
Throws:
DropClassException - Failed to drop desired class.
RemoteException - if a communication error occurs

getState

int getState()
             throws RemoteException
Returns the particular condition of this space.

Returns:
state - ISpaceState.STOPPED, ISpaceState.STARTED and etc.
Throws:
RemoteException - if a communication error occurs
See Also:
ISpaceState

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.