Package com.j_spaces.core.admin
Interface IRemoteJSpaceAdmin
- All Superinterfaces:
Remote
- All Known Subinterfaces:
IInternalRemoteJSpaceAdmin
- All Known Implementing Classes:
JSpaceAdminImpl,JSpaceAdminProxy,LRMISpaceImpl,SpaceImpl
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
FieldsModifier and TypeFieldDescriptionstatic final intDeprecated.Since 8.0.static final intDeprecated.Since 8.0.static final intDeprecated.Since 8.0. -
Method Summary
Modifier and TypeMethodDescriptionvoiddropClass(String className, SpaceContext sc) Deprecated.Since 16.2 - use GigaSpaceTypeManager#unregisterTypeDescriptor method insteadgetClassTypeInfo(String className) Deprecated.Since 8.0 - UseGigaSpaceTypeManager.getTypeDescriptorinstead.Return the present ClusterPolicy objects.ReturnsSpaceConfigof this space.getName()Returns the Space Name.Object[]Deprecated.Since 8.0 - This method is relevant only in the old deprecated replication module and will be removed in a future version.ReturnsSpaceRuntimeInfo.getRuntimeInfo(String className) ReturnsSpaceRuntimeInfofor specific class name and its subclasses.Return the info about the space classloaderintgetState()Returns the particular condition of this space.voidping()Ping to space to see if alive.Given Url of a remote space, Copy all entries/notify templates from the space.voidtrigger read of chunks map from zk and update clusterInfo
-
Field Details
-
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.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.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
Returns the Space Name.Usage: spaceAdmin.getName()- Returns:
- the space's name
- Throws:
RemoteException- Failed to get name
-
getRuntimeInfo
ReturnsSpaceRuntimeInfo.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
ReturnsSpaceRuntimeInfofor 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
- Throws:
RemoteException
-
getConfig
ReturnsSpaceConfigof 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
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 fromtemplate- Entry template or null.includeNotifyTemplates- - if true ALL notify templates will be copied toochunkSize- 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.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.Since 8.0 - UseGigaSpaceTypeManager.getTypeDescriptorinstead.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
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 insteadDrop 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
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
Return the info about the space classloader- Returns:
- a SpaceInstanceRemoteClassLoaderInfo that represents the space classloader's
- Throws:
RemoteException- if a communication error occurs
-
updateClusterInfo
trigger read of chunks map from zk and update clusterInfo- Throws:
RemoteException- if a communication error occurs
-