public class JSpaceAdminProxy extends ServiceAdminProxy implements IInternalRemoteJSpaceAdmin, StatisticsAdmin
adminImpl, uuidREPLICATION_STATUS_ACTIVE, REPLICATION_STATUS_DISABLED, REPLICATION_STATUS_DISCONNECTED| Constructor and Description |
|---|
JSpaceAdminProxy(ServiceAdmin admin,
Uuid uuid) |
| Modifier and Type | Method and Description |
|---|---|
SpaceMode |
addSpaceModeListener(ISpaceModeListener listener)
Adds a listener to be called back with
ISpaceModeListener mode changes. |
int |
countIncomingConnections() |
int |
countTransactions(int type,
int status) |
void |
disableLRMIMonitoring()
Disabled lrmi monitoring (gigaspaces internal remoting layer).
|
void |
disableStub()
disable remote.
|
void |
dropClass(String className,
SpaceContext sc)
Drop all Class entries and all its templates from the space.
|
void |
enableLRMIMonitoring()
Enables lrmi monitoring (gigaspaces internal remoting layer), this will cause the target to
start track lrmi invocations which can later be viewed by calling.
|
LRMIMonitoringDetails |
fetchLRMIMonitoringDetails()
Return lrmi (gigaspaces internal remoting layer) services monitoring details.
|
void |
forceMoveToPrimary()
Forcefully make this space to be primary
|
ITypeDesc |
getClassDescriptor(String className)
Get the basic class information from the space directory.
|
BasicTypeInfo |
getClassTypeInfo(String className)
Get the basic class information from the space directory.
|
byte[] |
getClusterConfigFile()
Returns a byte representation of the cluster configuration file.
|
ClusterPolicy |
getClusterPolicy()
Return the present ClusterPolicy objects.
|
SpaceConfig |
getConfig()
Returns
SpaceConfig of this space. |
List<ITransportConnection> |
getConnectionsInfo() |
long |
getCurrentTimestamp() |
StatisticsHolder |
getHolder() |
JVMDetails |
getJVMDetails() |
JVMStatistics |
getJVMStatistics() |
Map<String,LocalCacheDetails> |
getLocalCacheDetails() |
Map<String,LocalViewDetails> |
getLocalViewDetails() |
List<UnderTxnLockedObject> |
getLockedObjects(Transaction txn)
getLockedObjects is called by the GUI.
|
Map<String,Object> |
getMetricSnapshots(Collection<String> prefixes) |
String |
getName()
Returns the Space Name.
|
NIODetails |
getNIODetails()
Returns the transport configuration.
|
NIOStatistics |
getNIOStatistics()
Returns the transport statistics.
|
OSDetails |
getOSDetails() |
OSStatistics |
getOSStatistics() |
String |
getReplicationDump() |
Object[] |
getReplicationStatus()
returns the replication member-status relation of all the replication groups.
|
RuntimeHolder |
getRuntimeHolder() |
SpaceRuntimeInfo |
getRuntimeInfo()
Returns
SpaceRuntimeInfo. |
SpaceRuntimeInfo |
getRuntimeInfo(String className)
Returns
SpaceRuntimeInfo for specific class name and its subclasses. |
IJSpace |
getSpace()
return the defined spaceProxy for this spaceAdmin,
null if setSpace hasn't never
invoked |
SpaceInstanceRemoteClassLoaderInfo |
getSpaceInstanceRemoteClassLoaderInfo()
Return the info about the space classloader
|
SpaceMode |
getSpaceMode()
Get the current
SpaceMode which represents the current state of this participant in
the election process. |
int |
getState()
Returns the particular condition of this space.
|
Map<Integer,StatisticsContext> |
getStatistics()
Returns statistics repository that contains a map of operation codes to
StatisticsContext objects for all filter
operation codes. |
StatisticsContext |
getStatistics(int operationCode)
Returns a
StatisticsContext for specific
filter operation code. |
Map<Integer,StatisticsContext> |
getStatistics(Integer[] operationCodes)
Returns statistics repository that contains a map of operation codes to
StatisticsContext objects for passed specific
filter operation codes. |
long |
getStatisticsSamplingRate()
Checks statistics sampling rate.
|
String[] |
getStatisticsStringArray()
Returns a string array contains statistics values for each operation.
|
List<TemplateInfo> |
getTemplatesInfo(String className)
Returns a list of pending templates.
|
TransactionInfo[] |
getTransactionsInfo(int type,
int status)
Returns all the transactions with the specific parameters.
|
String[] |
getZones() |
boolean |
isStartedWithinGSC() |
boolean |
isStatisticsAvailable()
Checks if space statistics is available.
|
void |
ping()
Ping to space to see if alive.
|
void |
removeSpaceModeListener(ISpaceModeListener listener)
Removes this listener so that it no longer receives call backs of space mode changes.
|
void |
restart()
IRemoteJSpaceAdmin interface
|
void |
runGc() |
void |
setClusterConfigFile(byte[] config)
set the cluster configuration according to the given byte representation of the configuration
file.
|
void |
setSpace(IJSpace space)
set space proxy for this Admin proxy, useally calls by IJSpace.getAdmin() method
|
void |
setStatisticsSamplingRate(long rate)
Set statistics sampling rate.
|
SpaceCopyStatus |
spaceCopy(IJSpace remoteProxy,
Object template,
boolean includeNotifyTemplates,
int chunkSize) |
SpaceCopyStatus |
spaceCopy(IRemoteSpace remoteProxy,
String remoteSpaceUrl,
String remoteSpaceName,
ITemplatePacket template,
boolean includeNotifyTemplates,
int chunkSize,
SpaceContext spaceContext,
SpaceContext remoteSpaceContext)
Given ISpaceInternal of a remote space, Copy all entries/notify templates from the space.
|
SpaceCopyStatus |
spaceCopy(String remoteUrl,
ITemplatePacket templPacket,
boolean includeNotifyTemplates,
int chunkSize)
Given Url of a remote space, Copy all entries/notify templates from the space.
|
SpaceCopyStatus |
spaceCopy(String remoteUrl,
ITemplatePacket template,
boolean includeNotifyTemplates,
int chunkSize,
SpaceContext sc)
Given Url of a remote space, Copy all entries/notify templates from the space.
|
SpaceCopyStatus |
spaceCopy(String remoteUrl,
Object template,
boolean includeNotifyTemplates,
int chunkSize)
Given Url of a remote space, Copy all entries/notify templates from the space.
|
void |
start()
Attempt to start this space.
|
void |
stop()
Attempt to stop this space.
|
addLookupAttributes, addLookupGroups, addLookupLocators, destroy, equals, getInstance, getLookupAttributes, getLookupGroups, getLookupLocators, getReferentUuid, hashCode, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocatorspublic JSpaceAdminProxy(ServiceAdmin admin, Uuid uuid)
public void setSpace(IJSpace space)
public IJSpace getSpace()
null if setSpace hasn't never
invokedpublic void restart()
throws RemoteException
restart in interface IInternalRemoteJSpaceAdminRemoteException - Failed to restart space.public SpaceInstanceRemoteClassLoaderInfo getSpaceInstanceRemoteClassLoaderInfo() throws RemoteException
IRemoteJSpaceAdmingetSpaceInstanceRemoteClassLoaderInfo in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic String getName() throws RemoteException
IRemoteJSpaceAdmin
Usage:
spaceAdmin.getName()
getName in interface IRemoteJSpaceAdminRemoteException - Failed to get namepublic SpaceRuntimeInfo getRuntimeInfo() throws RemoteException
IRemoteJSpaceAdminSpaceRuntimeInfo.
Usage:
SpaceRuntimeInfo runtime = spaceAdmin.getRuntimeInfo();
List classNames = runtime.m_ClassNames;
List numOfEntries = runtime.m_NumOFEntries;
getRuntimeInfo in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic SpaceRuntimeInfo getRuntimeInfo(String className) throws RemoteException
IRemoteJSpaceAdminSpaceRuntimeInfo 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;
getRuntimeInfo in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic SpaceConfig getConfig() throws RemoteException
IRemoteJSpaceAdminSpaceConfig of this space.
Usage:
SpaceConfig config = spaceAdmin.getConfig();
if (config != null)
boolean isClustered = config.m_isClustered;
getConfig in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic void ping()
throws RemoteException
IRemoteJSpaceAdminUsage:
try
{
spaceAdmin.ping();
}
catch (RemoteException re)
{
System.err.println("Space not accessible");
}ping in interface IRemoteJSpaceAdminRemoteException - if a communication error occursIRemoteJSpaceAdmin.getState()public void disableStub()
throws RemoteException
IInternalRemoteJSpaceAdmindisableStub in interface IInternalRemoteJSpaceAdminRemoteException - if a communication error occurspublic Object[] getReplicationStatus() throws RemoteException
IRemoteJSpaceAdmin
Usage:
Object[] replStatus = spaceAdmin.getReplicationStatus();
String[] peers = (String[])replStatus[0];
int[] status = (int[])replStatus[1];
getReplicationStatus in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic RuntimeHolder getRuntimeHolder() throws RemoteException
getRuntimeHolder in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic boolean isStartedWithinGSC()
throws RemoteException
isStartedWithinGSC in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic ITypeDesc getClassDescriptor(String className) throws RemoteException
IInternalRemoteJSpaceAdmin
Usage:
com.j_spaces.core.client.BasicTypeInfo classInfo
= spaceAdmin.getClassTypeInfo( className );
String[] fieldNames = classInfo.m_FieldsNames;
String[] fieldTypes = classInfo.m_FieldsTypes;
getClassDescriptor in interface IInternalRemoteJSpaceAdminclassName - - The name of the class to retrieve the information from.RemoteException - if a communication error occurspublic BasicTypeInfo getClassTypeInfo(String className) throws RemoteException
IRemoteJSpaceAdmin
Usage:
com.j_spaces.core.client.BasicTypeInfo classInfo
= spaceAdmin.getClassTypeInfo( className );
String[] fieldNames = classInfo.m_FieldsNames;
String[] fieldTypes = classInfo.m_FieldsTypes;
getClassTypeInfo in interface IRemoteJSpaceAdminclassName - - The name of the class to retrieve the information from.RemoteException - if a communication error occurspublic ClusterPolicy getClusterPolicy() throws RemoteException
IRemoteJSpaceAdmingetClusterPolicy in interface IRemoteJSpaceAdminRemoteException - if a communication error occurspublic void dropClass(String className, SpaceContext sc) throws RemoteException, DropClassException
IRemoteJSpaceAdmin
Usage:
spaceAdmin.dropClass( className );
dropClass in interface IRemoteJSpaceAdminclassName - name of class to delete.RemoteException - if a communication error occursDropClassException - Failed to drop desired class.public void start()
throws RemoteException,
SpaceAlreadyStartedException
IInternalRemoteJSpaceAdmin
Usage:
spaceAdmin.start();
start in interface IInternalRemoteJSpaceAdminRemoteException - - Failed to start space.SpaceAlreadyStartedException - - The space is already startedpublic void stop()
throws RemoteException,
SpaceAlreadyStoppedException
IInternalRemoteJSpaceAdmin
Usage:
spaceAdmin.stop();
stop in interface IInternalRemoteJSpaceAdminRemoteException - - Failed to stop space.SpaceAlreadyStoppedException - - The space is already stoppedpublic TransactionInfo[] getTransactionsInfo(int type, int status) throws RemoteException
IInternalRemoteJSpaceAdmingetTransactionsInfo in interface IInternalRemoteJSpaceAdmintype - TransactionInfo.Types.LOCAL, TransactionInfo.Types.JINI or
TransactionInfo.Types.XA. Use TransactionInfo.Types.All for all types;status - can be one of the status defined in TransactionConstantsRemoteException - if a communication error occursIRemoteJSpaceAdminpublic int countTransactions(int type,
int status)
throws RemoteException
countTransactions in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic List<TemplateInfo> getTemplatesInfo(String className) throws RemoteException
IInternalRemoteJSpaceAdmingetTemplatesInfo in interface IInternalRemoteJSpaceAdminclassName - name of the class to searchRemoteExceptionIInternalRemoteJSpaceAdmin.getTemplatesInfo(java.lang.String)public List<ITransportConnection> getConnectionsInfo() throws RemoteException
getConnectionsInfo in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic int countIncomingConnections()
throws RemoteException
countIncomingConnections in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic List<UnderTxnLockedObject> getLockedObjects(Transaction txn) throws RemoteException
IInternalRemoteJSpaceAdmingetLockedObjects in interface IInternalRemoteJSpaceAdmintxn - - the Transaction that locks the Objects.RemoteExceptionpublic int getState()
throws RemoteException
IRemoteJSpaceAdmingetState in interface IRemoteJSpaceAdminRemoteException - if a communication error occursISpaceStatepublic boolean isStatisticsAvailable()
throws RemoteException
StatisticsAdminisStatisticsAvailable in interface StatisticsAdmintrue if space statistics is availableRemoteException - if a communication error occurspublic String[] getStatisticsStringArray() throws RemoteException
StatisticsAdmingetStatisticsStringArray in interface StatisticsAdminStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occurspublic void setStatisticsSamplingRate(long rate)
throws RemoteException
StatisticsAdminsetStatisticsSamplingRate in interface StatisticsAdminrate - the rate to sample the space for statisticsStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occurspublic long getStatisticsSamplingRate()
throws RemoteException
StatisticsAdmingetStatisticsSamplingRate in interface StatisticsAdminStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occurspublic StatisticsContext getStatistics(int operationCode) throws RemoteException
StatisticsAdminStatisticsContext for specific
filter operation code.getStatistics in interface StatisticsAdminoperationCode - filter operation code defined in FilterOperationCodesStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occursFilterOperationCodespublic StatisticsHolder getHolder() throws RemoteException
getHolder in interface StatisticsAdminRemoteExceptionpublic Map<String,Object> getMetricSnapshots(Collection<String> prefixes) throws RemoteException
getMetricSnapshots in interface StatisticsAdminprefixes - collection of metrics prefixesRemoteExceptionpublic Map<Integer,StatisticsContext> getStatistics(Integer[] operationCodes) throws RemoteException
StatisticsAdminStatisticsContext objects for passed specific
filter operation codes.getStatistics in interface StatisticsAdminoperationCodes - filter array of operation codes defined in FilterOperationCodesStatisticsContextStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occurspublic Map<Integer,StatisticsContext> getStatistics() throws RemoteException
StatisticsAdminStatisticsContext objects for all filter
operation codes.getStatistics in interface StatisticsAdminStatisticsContextStatisticsNotAvailable - when space statistics are not availableRemoteException - if a communication error occurspublic byte[] getClusterConfigFile()
throws RemoteException
IInternalRemoteJSpaceAdmingetClusterConfigFile in interface IInternalRemoteJSpaceAdminRemoteException - if a communication error occurspublic void setClusterConfigFile(byte[] config)
throws RemoteException
IInternalRemoteJSpaceAdminsetClusterConfigFile in interface IInternalRemoteJSpaceAdminconfig - byte representation of the configuration fileRemoteException - if a communication error occurspublic SpaceCopyStatus spaceCopy(String remoteUrl, Object template, boolean includeNotifyTemplates, int chunkSize) throws RemoteException
IRemoteJSpaceAdmin
Usage:
SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( sourceSpaceURL, template, false );
System.out.println("Copy-Status: " + copyStatus );
spaceCopy in interface IRemoteJSpaceAdminremoteUrl - 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.RemoteException - if a communication error occurspublic SpaceCopyStatus spaceCopy(String remoteUrl, ITemplatePacket templPacket, boolean includeNotifyTemplates, int chunkSize) throws RemoteException
IInternalRemoteJSpaceAdmin
Usage:
SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( sourceSpaceURL, template, false );
System.out.println("Copy-Status: " + copyStatus );
spaceCopy in interface IInternalRemoteJSpaceAdminremoteUrl - url of remote space to copy fromtemplPacket - EntryPacket template or null.includeNotifyTemplates - - if true ALL notify templates will be copied toochunkSize - Chunk size (batch) for this copy operation.RemoteException - if a communication error occurspublic SpaceCopyStatus spaceCopy(String remoteUrl, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize, SpaceContext sc) throws RemoteException
IInternalRemoteJSpaceAdmin
Usage:
SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( sourceSpaceURL, template, false );
System.out.println("Copy-Status: " + copyStatus );
spaceCopy in interface IInternalRemoteJSpaceAdminremoteUrl - url of remote space to copy fromtemplate - EntryPacket template or null.includeNotifyTemplates - - if true ALL notify templates will be copied toochunkSize - Chunk size (batch) for this copy operation.sc - SpaceContext for security check in the server side.RemoteException - if a communication error occurspublic SpaceCopyStatus spaceCopy(IRemoteSpace remoteProxy, String remoteSpaceUrl, String remoteSpaceName, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize, SpaceContext spaceContext, SpaceContext remoteSpaceContext) throws RemoteException
IInternalRemoteJSpaceAdmin
Usage:
SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( remoteProxy, remoteURL, remoteName,
template, false 1000, sc);
System.out.println("Copy-Status: " + copyStatus );
spaceCopy in interface IInternalRemoteJSpaceAdminremoteProxy - ISpaceInternal, a proxy to the remote space to copy fromremoteSpaceUrl - the remote space url.remoteSpaceName - the remote space name.template - A template for identified entries that should be copied.includeNotifyTemplates - - if true ALL notify templates will be copied toochunkSize - Chunk size (batch) for this copy operation.spaceContext - SpaceContext for security check in the server side.remoteSpaceContext - remoteSpaceContext for security check in the server side.RemoteException - if a communication error occurspublic SpaceCopyStatus spaceCopy(IJSpace remoteProxy, Object template, boolean includeNotifyTemplates, int chunkSize) throws RemoteException
spaceCopy in interface IRemoteJSpaceAdminRemoteExceptionpublic SpaceMode getSpaceMode() throws RemoteException
IInternalRemoteJSpaceAdminSpaceMode which represents the current state of this participant in
the election process. In case of a non-clustered participant, where no election process
takes place, the return value is always SpaceMode.PRIMARY.
getSpaceMode in interface IInternalRemoteJSpaceAdminSpaceMode of the space.RemoteException - if an exception occurred executing this remote method.public SpaceMode addSpaceModeListener(ISpaceModeListener listener) throws RemoteException
IInternalRemoteJSpaceAdminISpaceModeListener mode changes. The change (
SpaceMode ) represents the result of an election process of this
participant space. The returned value represents the current state of this participant in the
election process. In case of a non-clustered participant, the return value is always
SpaceMode.PRIMARY. Hence, no election process will take place and the listener will
not be called.
addSpaceModeListener in interface IInternalRemoteJSpaceAdminlistener - a listener to be called back on space mode changes.SpaceMode of the space.RemoteException - if an exception occurred executing this remote method.ISpaceModeListener,
SpaceModepublic void removeSpaceModeListener(ISpaceModeListener listener) throws RemoteException
IInternalRemoteJSpaceAdminremoveSpaceModeListener in interface IInternalRemoteJSpaceAdminlistener - a listener to be removed.RemoteException - if an exception occurred executing this remote method.IInternalRemoteJSpaceAdmin.addSpaceModeListener(ISpaceModeListener)public NIODetails getNIODetails() throws RemoteException
NIOInfoProvidergetNIODetails in interface NIOInfoProviderRemoteExceptionpublic NIOStatistics getNIOStatistics() throws RemoteException
NIOInfoProvidergetNIOStatistics in interface NIOInfoProviderRemoteExceptionpublic void enableLRMIMonitoring()
throws RemoteException
NIOInfoProviderNIOInfoProvider.fetchLRMIMonitoringDetails()enableLRMIMonitoring in interface NIOInfoProviderRemoteExceptionpublic void disableLRMIMonitoring()
throws RemoteException
NIOInfoProviderNIOInfoProvider.enableLRMIMonitoring()disableLRMIMonitoring in interface NIOInfoProviderRemoteExceptionpublic LRMIMonitoringDetails fetchLRMIMonitoringDetails() throws RemoteException
NIOInfoProviderNIOInfoProvider.enableLRMIMonitoring()fetchLRMIMonitoringDetails in interface NIOInfoProviderRemoteExceptionpublic long getCurrentTimestamp()
throws RemoteException
getCurrentTimestamp in interface OSInfoProviderRemoteExceptionpublic OSDetails getOSDetails() throws RemoteException
getOSDetails in interface OSInfoProviderRemoteExceptionpublic OSStatistics getOSStatistics() throws RemoteException
getOSStatistics in interface OSInfoProviderRemoteExceptionpublic JVMDetails getJVMDetails() throws RemoteException
getJVMDetails in interface JVMInfoProviderRemoteExceptionpublic JVMStatistics getJVMStatistics() throws RemoteException
getJVMStatistics in interface JVMInfoProviderRemoteExceptionpublic void runGc()
throws RemoteException
runGc in interface JVMInfoProviderRemoteExceptionpublic String[] getZones() throws RemoteException
getZones in interface GridZoneProviderRemoteExceptionpublic void forceMoveToPrimary()
throws RemoteException
IInternalRemoteJSpaceAdminforceMoveToPrimary in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic String getReplicationDump() throws RemoteException
getReplicationDump in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic Map<String,LocalCacheDetails> getLocalCacheDetails() throws RemoteException
getLocalCacheDetails in interface IInternalRemoteJSpaceAdminRemoteExceptionpublic Map<String,LocalViewDetails> getLocalViewDetails() throws RemoteException
getLocalViewDetails in interface IInternalRemoteJSpaceAdminRemoteExceptionCopyright © GigaSpaces.