Interface IRemoteJSpaceAdmin

All Superinterfaces:
Remote
All Known Subinterfaces:
IInternalRemoteJSpaceAdmin
All Known Implementing Classes:
JSpaceAdminImpl, JSpaceAdminProxy, LRMISpaceImpl, SpaceImpl

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 Details

    • 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:
    • 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:
    • 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:
  • Method Details

    • 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
    • getReplicationStatistics

      ReplicationStatistics getReplicationStatistics() throws RemoteException
      Throws:
      RemoteException
    • 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
    • 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:
    • 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

      @Deprecated void dropClass(String className, SpaceContext sc) throws RemoteException, DropClassException
      Deprecated.
      Since 16.2 - use GigaSpaceTypeManager#unregisterTypeDescriptor method instead
      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:
    • getSpaceInstanceRemoteClassLoaderInfo

      SpaceInstanceRemoteClassLoaderInfo getSpaceInstanceRemoteClassLoaderInfo() throws RemoteException
      Return the info about the space classloader
      Returns:
      a SpaceInstanceRemoteClassLoaderInfo that represents the space classloader's
      Throws:
      RemoteException - if a communication error occurs
    • updateClusterInfo

      void updateClusterInfo() throws RemoteException
      trigger read of chunks map from zk and update clusterInfo
      Throws:
      RemoteException - if a communication error occurs