Class SpaceImpl
java.lang.Object
com.gigaspaces.internal.service.AbstractGigaSpacesService
com.j_spaces.core.service.AbstractService
com.gigaspaces.internal.server.space.SpaceImpl
- All Implemented Interfaces:
GridZoneProvider,JVMInfoProvider,OSInfoProvider,RemoteOperationsExecutor,IRemoteSpace,ILRMIService,NIOInfoProvider,RemoteSecuredService,IInternalRemoteJSpaceAdmin,IRemoteJSpaceAdmin,StatisticsAdmin,Service,ServiceProxyAccessor,Remote,EventListener,Administrable,TransactionConstants,TransactionParticipant,DiscoveryListener
public class SpaceImpl
extends AbstractService
implements IRemoteSpace, IInternalRemoteJSpaceAdmin, DiscoveryListener, TransactionParticipant, StatisticsAdmin
-
Field Summary
FieldsFields inherited from class com.j_spaces.core.service.AbstractService
m_adminExporter, m_adminImplFields inherited from class com.gigaspaces.internal.service.AbstractGigaSpacesService
SERVICE_ATTRIBUTE_MODIFY_AWAITFields inherited from interface com.j_spaces.core.admin.IRemoteJSpaceAdmin
REPLICATION_STATUS_ACTIVE, REPLICATION_STATUS_DISABLED, REPLICATION_STATUS_DISCONNECTEDFields inherited from interface net.jini.core.transaction.server.TransactionConstants
ABORTED, ACTIVE, COMMITTED, NOTCHANGED, PREPARED, VOTING -
Constructor Summary
ConstructorsConstructorDescriptionSpaceImpl(String spaceName, String containerName, JSpaceContainerImpl container, SpaceURL url, JSpaceAttributes spaceConfig, Properties customProperties, boolean isSecondary, boolean securityEnabled, LifeCycle lifeCycle) -
Method Summary
Modifier and TypeMethodDescriptionvoidabort(TransactionManager mgr, long id) Requests that the participant roll back any changes for the specified transaction and unlock any resources locked by the transaction.voidabort(TransactionManager mgr, Object id) voidabortImpl(TransactionManager mgr, Object id, boolean supportsTwoPhaseReplication, OperationID operationID) voidaddSpaceModeListener(ISpaceModeListener listener) Adds a listener to be called back withISpaceModeListenermode changes.Adds a listener to be called back withSuspendTypeChangedInternalListenersuspend type changes.protected voidAppendInitialLookupAttributes(List<Entry> lookupAttributes) static voidapplyEntryPacketOutFilter(IEntryPacket entryPacket, int modifiers, AbstractProjectionTemplate projectionTemplate) voidassertAuthorizedForPrivilege(Privilege privilege, SpaceContext spaceContext) voidassertAuthorizedForType(String typeName, SpaceAuthority.SpacePrivilege privilege, SpaceContext spaceContext) asyncRead(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers, IFuture result) voidbeforeOperation(boolean isCheckForStandBy, boolean checkQuiesceMode, SpaceContext sc) voidbeforeOperation(boolean isCheckForStandBy, boolean checkQuiesceMode, SpaceContext sc, Privilege opPrivilegeRequired) voidbeforeTypeOperation(boolean isCheckForStandBy, SpaceContext sc, Privilege privilege, String className) voidbeginPacketOperation(boolean isCheckForStandBy, SpaceContext sc, Privilege privilege, ITransportPacket packet) voidvoidvoidchangeSpaceState(int state, boolean electable, boolean replicable) Change space state to given state - lookup attributes are updated as wellcheckChunkMapGeneration(int clientGeneration) voidcheckPacketAccessPrivileges(SpaceContext sc, Privilege privilege, ITransportPacket packet) Check if a user's has sufficient privileges to perform this operation.voidclear(ITemplatePacket template, Transaction txn, int modifiers, SpaceContext sc) voidvoidcloseServerIterator(UUID uuid) voidcommit(TransactionManager mgr, long id) Requests that the participant make all of itsPREPAREDchanges for the specified transaction visible outside of the transaction and unlock any resources locked by the transaction.voidcommit(TransactionManager mgr, long id, int numOfParticipants) Requests that the participant make all of itsPREPAREDchanges for the specified transaction visible outside of the transaction and unlock any resources locked by the transaction.voidcommit(TransactionManager mgr, Object id) voidcommit(TransactionManager mgr, Object id, int numOfParticipants) voidcommitImpl(TransactionManager mgr, Object id, int numOfParticipants, boolean supportsTwoPhaseReplication, OperationID operationID, boolean mayBeFromReplication) connect(SpaceConnectRequest request) count(ITemplatePacket template, Transaction txn, SpaceContext sc, int modifiers) intintcountTransactions(int type, int status) protected SpaceProxyImplcreateProxy(boolean isClustered, boolean useEmbeddedCredentials) createServerTransaction(TransactionManager mgr, Object id, int numOfParticipants) createSpaceSettingsWithNewClusterTopology(ClusterTopology newTopology) voiddemote(long maxSuspendTime, TimeUnit unit, SpaceContext sc) Demote leadership and become a backup Space, in the specified operation timeout.voiddirectDropCLassForAllProxies(String className) voidDisabled lrmi monitoring (gigaspaces internal remoting layer).voiddisable remote.voiddiscarded(DiscoveryEvent event) Called when one or more lookup service registrars has been discarded.voiddiscovered(DiscoveryEvent event) Called when one or more lookup service registrars has been discovered.voiddropClass(String className, SpaceContext sc) Drop all Class entries and all its templates from the space.voidEnables lrmi monitoring (gigaspaces internal remoting layer), this will cause the target to start track lrmi invocations which can later be viewed by calling.executeAction(SystemTask systemTask) executeDurableTask(UUID uuid, SpaceContext spaceContext) <T extends RemoteOperationResult>
TexecuteOperation(RemoteOperationRequest<T> request) <T extends RemoteOperationResult>
TexecuteOperationAsync(RemoteOperationRequest<T> request) voidexecuteOperationOneway(RemoteOperationRequest<?> request) executeTask(SpaceTask task, Transaction tx, SpaceContext sc, boolean newRouter) static StringextractContainerName(String fullName) static StringextractInstanceId(String fullName) static StringextractInstanceIdFromContainerName(String containerName) Return lrmi (gigaspaces internal remoting layer) services monitoring details.protected StringfilterUnicastHosts(String configuredHosts) Applies partition-based LUS selection using modulo distribution.intFlush redo-log packets from memory to underlying storage.voidForcefully make this space to be primarystatic ObjectfromBytes(byte[] bytes, List<ClassLoader> classLoaders) getAdmin()Return service admin proxygetClassDescriptor(String className) Get the basic class information from the space directory.getClassDescriptor(String className, boolean asVirtualType) Get the basic class information from the space directory.getClassTypeInfo(String className) Get the basic class information from the space directory.byte[]Returns a byte representation of the cluster configuration file.Return the present ClusterPolicy objects.ReturnsSpaceConfigof this space.longReturns the deploy path of this space instance, when deployed in the service grid.getEntriesTieredMetaDataByIds(String typeName, Object[] ids) getLockedObjects is called by the GUI.getMetricSnapshots(Collection<String> prefixes) getMVCCDirtyEntryMetaDataUnderTransaction(String typeName, Object id, long transactionId) getMVCCEntryMetaData(String typeName, Object id) getName()Returns the Space Name.getNextBatchFromServerIterator(ITemplatePacket template, SpaceContext sc, int modifiers, ServerIteratorRequestInfo serverIteratorRequestInfo) Returns the transport configuration.Returns the transport statistics.org.slf4j.LoggerintintObject[]return the replication status of all my replication group returns an array of remote member names and an array of replication status to them.ReturnsSpaceRuntimeInfo.getRuntimeInfo(String className) ReturnsSpaceRuntimeInfofor specific class name and its subclasses.Returns a proxy object for this object.protected StringReturn the internal instance of embedded not-clustered space proxy.Create a list of all space component handlersReturn the info about the space classloaderGet the currentSpaceModewhich represents the current state of this participant in the election process.Return the internal instance of space proxy.returns the universal unique identifier of the remote spaceintgetState()Returns the particular condition of this space.Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for all filter operation codes.getStatistics(int operationCode) Returns aStatisticsContextfor specific filter operation code.getStatistics(Integer[] operationCodes) Returns statistics repository that contains a map of operation codes toStatisticsContextobjects for passed specific filter operation codes.longChecks statistics sampling rate.String[]Returns a string array contains statistics values for each operation.protected IJSpacegetTemplatesInfo(String className) Returns a list of pending templates.getTransactionsInfo(int type, int status) Returns all the transactions with the specific parameters.Generates and returns a unique idgetURL()Returns the SpaceURL object which initialized that specific space instance.String[]getZones()voidinitAndRecoverFromDataStorage(boolean isWarm) Initialize main space componentsvoidinternalClean(boolean isInternalUse, boolean isRestart, boolean isWarmInit) booleanbooleanisActive()booleanbooleanisBackup()booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanChecks if space statistics is available.voidClass<?>loadRemoteClass(String className) login(SecurityContext securityContext) Login to a secured service using the providedSecurityContextnotify(ITemplatePacket template, Transaction txn, long lease, SpaceContext sc, NotifyInfo info) voidping()Ping to space to see if alive.intprepare(TransactionManager mgr, long id) Requests that the participant prepare itself to commit the transaction, and to vote on the outcome of the transaction.prepare(TransactionManager mgr, long id, boolean needClusteredProxy) intprepare(TransactionManager mgr, Object id) prepare(TransactionManager mgr, Object parm2, boolean needClusteredProxy) intprepare(TransactionManager mgr, Object id, int numOfParticipants) prepare(TransactionManager mgr, Object parm2, int numOfParticipants, boolean needClusteredProxy) intprepareAndCommit(TransactionManager mgr, long id) A combination ofprepareandcommit, which can be used by the manager when there is just one participant left to prepare and all other participants (if any) have responded withNOTCHANGED.intprepareAndCommit(TransactionManager mgr, Object id) intprepareAndCommitImpl(TransactionManager mgr, Object id, OperationID operationID) booleanvoidquiesce(String description, QuiesceToken token, boolean readonly) read(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers) readByIds(ITemplatePacket template, Transaction txn, boolean take, SpaceContext spaceContext, int modifiers) readMultiple(ITemplatePacket template, Transaction txn, boolean take, int maxEntries, SpaceContext sc, boolean returnOnlyUid, int modifiers) readMultiple(ITemplatePacket template, Transaction txn, boolean take, int maxEntries, SpaceContext sc, boolean returnOnlyUid, int modifiers, int minEntries, long timeout, boolean isIfExist) readNew(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers) voidvoidvoidvoidremoveSpaceModeListener(ISpaceModeListener listener) Removes this listener so that it no longer receives call backs of space mode changes.voidRemoves this listener so that it no longer receives call backs of space suspend type changes.longlongObject[]voidrenewLease(TransactionManager mgr, long id, long time) Notify the transaction participant about transaction lease renewalvoidrenewServerIteratorLease(UUID uuid) voidrestart()Restarts the space.booleanvoidbooleanrunDurableTask(Map<String, byte[]> classes, DistributedSpaceTask distributedSpaceTask, UUID uuid, SpaceContext spaceContext, String name, String description, boolean immediatelyStart) voidrunGc()voidsetClusterConfigFile(byte[] config) set the cluster configuration according to the given byte representation of the configuration file.static voidsetConfig(String spaceName, String containerName, JSpaceAttributes config, String spaceFileURL) voidsetStatisticsSamplingRate(long rate) Set statistics sampling rate.voidshutdown()Shutdown this space, do not destroy it.voidshutdown(boolean isDestroy, boolean shutdowContainer) Attempt to shutdown this service .voidsnapshot(ITemplatePacket template) voidsnapshot(ITemplatePacket template, SpaceContext sc) spaceCopy(IRemoteSpace remoteProxy, String remoteSpaceUrl, String remoteSpaceName, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize, SpaceContext sc, SpaceContext remoteSpaceContext) Given ISpaceInternal of a remote space, Copy all entries/notify templates from the space.spaceCopy(String remoteUrl, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize) Given Url of a remote space, Copy all entries/notify templates from the space.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.Igor.G 13/3/2005 ver 5.01.voidstart()Attempt to start this space.voidvoidstop()Attempt to stop this space.voidbooleanterminateDurableTask(UUID uuid) toString()voidvoidupdate(IEntryPacket entry, Transaction txn, long lease, long timeout, SpaceContext sc, int modifiers, boolean newRouter) voidtrigger read of chunks map from zk and update clusterInfovoidupdateXmlConfigEntry(String configEntry, String configValue) Update specified configuration entry.booleanvoidwaitForDrain(long timeoutMs, long minTimeToWait, boolean isBackupOnly, org.slf4j.Logger logger) voidwaitForZkUpdate(Step step, String key, Status status) write(IEntryPacket[] entries, Transaction txn, long lease, long[] leases, SpaceContext sc, long timeout, int modifiers, boolean newRouter) write(IEntryPacket entry, Transaction txn, long lease, int modifiers, boolean fromReplication, SpaceContext sc) LeaseContext<?>[]writeOld(IEntryPacket[] entries, Transaction txn, long lease, long[] leases, SpaceContext sc, int modifiers) zkClassName(String uuid, String classname) Methods inherited from class com.j_spaces.core.service.AbstractService
registerLookupServiceMethods inherited from class com.gigaspaces.internal.service.AbstractGigaSpacesService
addLookupAttributes, addLookupAttributes, getExporter, getJoinManager, getLifeCycle, getUuid, modifyLookupAttributes, registerLookupService, unregisterFromLookupService
-
Field Details
-
COMPONENT
- See Also:
-
_cleanUnusedEmbeddedGlobalXtns
public final boolean _cleanUnusedEmbeddedGlobalXtns
-
-
Constructor Details
-
SpaceImpl
public SpaceImpl(String spaceName, String containerName, JSpaceContainerImpl container, SpaceURL url, JSpaceAttributes spaceConfig, Properties customProperties, boolean isSecondary, boolean securityEnabled, LifeCycle lifeCycle) throws CreateException, RemoteException - Throws:
CreateExceptionRemoteException
-
-
Method Details
-
runDurableTask
public boolean runDurableTask(Map<String, byte[]> classes, DistributedSpaceTask distributedSpaceTask, UUID uuid, SpaceContext spaceContext, String name, String description, boolean immediatelyStart) throws RemoteException- Throws:
RemoteException
-
executeDurableTask
- Throws:
Exception
-
durableTasks
-
zkClassName
-
zkClass
-
fromBytes
-
terminateDurableTask
-
getZkConfig
-
getZookeeperLastPrimaryHandler
-
getContainerName
- Specified by:
getContainerNamein classAbstractService
-
getInstanceId
-
getNodeName
-
getURL
Returns the SpaceURL object which initialized that specific space instance. Note that the SpaceURL object contains important information on the space and container configuration/setup such as the space url used, the space/container/cluster schema used and other attributes.The IJSpaceContainer keeps also its reference of the SpaceURL which launched the container.
- Returns:
- SpaceURL Returns the SpaceURL object which initialized that specific space instance.
-
getCustomProperties
-
getJspaceAttr
-
getContainer
-
getOperationLogger
public org.slf4j.Logger getOperationLogger() -
isPrivate
public boolean isPrivate() -
getServiceName
- Specified by:
getServiceNamein interfaceILRMIService- Specified by:
getServiceNamein classAbstractGigaSpacesService
-
getServiceTypeDescription
- Overrides:
getServiceTypeDescriptionin classAbstractGigaSpacesService
-
getAdmin
Description copied from class:AbstractServiceReturn service admin proxy- Specified by:
getAdminin interfaceAdministrable- Overrides:
getAdminin classAbstractService- Returns:
- an object that implements whatever administration interfaces are appropriate for the particular service.
- See Also:
-
extractInstanceIdFromContainerName
-
extractContainerName
-
extractInstanceId
-
isSecuredSpace
public boolean isSecuredSpace() -
getEngine
-
getQuiesceHandler
-
getDirectPersistencyRecoveryHelper
-
beforeOperation
public void beforeOperation(boolean isCheckForStandBy, boolean checkQuiesceMode, SpaceContext sc) throws RemoteException - Throws:
RemoteException
-
beforeOperation
public void beforeOperation(boolean isCheckForStandBy, boolean checkQuiesceMode, SpaceContext sc, Privilege opPrivilegeRequired) throws RemoteException - Throws:
RemoteException
-
beforeTypeOperation
public void beforeTypeOperation(boolean isCheckForStandBy, SpaceContext sc, Privilege privilege, String className) throws RemoteException - Throws:
RemoteException
-
beginPacketOperation
public void beginPacketOperation(boolean isCheckForStandBy, SpaceContext sc, Privilege privilege, ITransportPacket packet) throws RemoteException - Throws:
RemoteException
-
checkPacketAccessPrivileges
public void checkPacketAccessPrivileges(SpaceContext sc, Privilege privilege, ITransportPacket packet) Check if a user's has sufficient privileges to perform this operation.- Parameters:
sc- Holds the security contextprivilege- The privilege required to perform this operation.packet- The packet applied to this operation (can benull).
-
internalClean
public void internalClean(boolean isInternalUse, boolean isRestart, boolean isWarmInit) -
cleanOnDestroy
public void cleanOnDestroy() -
getPrimarySpaceModeListeners
-
getPartitionIdOneBased
public int getPartitionIdOneBased() -
getPartitionId
public int getPartitionId() -
registerToClusterInfoChangedEvent
-
isMvccEnabled
public boolean isMvccEnabled() -
removeClusterInfoChangedListener
-
getSpaceProxy
Return the internal instance of space proxy.- Returns:
- If cluster policy contains LB or FO, then return clustered proxy,otherwise regular proxy
- Throws:
RemoteException
-
getSingleProxy
Return the internal instance of embedded not-clustered space proxy.- Throws:
RemoteException
-
getTaskProxy
- Throws:
RemoteException
-
createProxy
protected SpaceProxyImpl createProxy(boolean isClustered, boolean useEmbeddedCredentials) throws RemoteException - Throws:
RemoteException
-
createSpaceSettingsWithNewClusterTopology
-
isClusteredSpace
public boolean isClusteredSpace() -
getSpaceStub
- Throws:
RemoteException
-
toString
-
setConfig
public static void setConfig(String spaceName, String containerName, JSpaceAttributes config, String spaceFileURL) throws RemoteException - Throws:
RemoteException
-
getConfigReader
-
getSpaceUuid
Description copied from interface:IRemoteSpacereturns the universal unique identifier of the remote space- Specified by:
getSpaceUuidin interfaceIRemoteSpace
-
shutdown
Shutdown this space, do not destroy it.- Specified by:
shutdownin classAbstractService- Throws:
RemoteException- See Also:
-
shutdown
Attempt to shutdown this service .- Parameters:
isDestroy- specify that space should be destroyed.shutdowContainer- If hastruevalue and space container contains one space, it will be also shutdown.- Throws:
RemoteException
-
unregister
- Throws:
RemoteException
-
loadDynamicCLassDef
-
restoreDurableTasks
public void restoreDurableTasks() -
initAndRecoverFromDataStorage
public void initAndRecoverFromDataStorage(boolean isWarm) throws RemoteException, CreateException, SpaceComponentsInitializeException Initialize main space components- Parameters:
isWarm- if set to true - the space will recover from database- Throws:
RemoteExceptionCreateExceptionSpaceComponentsInitializeException
-
useZooKeeper
public boolean useZooKeeper() -
restartLeaderSelectorHandler
public boolean restartLeaderSelectorHandler() -
getLeaderSelector
-
getClusterFailureDetector
-
updateXmlConfigEntry
Update specified configuration entry.- Throws:
IOException
-
createServerTransaction
public ServerTransaction createServerTransaction(TransactionManager mgr, Object id, int numOfParticipants) -
changeSpaceState
public void changeSpaceState(int state, boolean electable, boolean replicable) Change space state to given state - lookup attributes are updated as well -
getSpaceComponentHandlers
Create a list of all space component handlers- Returns:
- list of all space component handlers
-
getLocalSpaceHealthStatus
-
login
Description copied from interface:RemoteSecuredServiceLogin to a secured service using the providedSecurityContext- Specified by:
loginin interfaceRemoteSecuredService- Parameters:
securityContext- security context to be used for authentication.- Throws:
RemoteException- communication-related exceptions that may occur during the execution of a remote method call.
-
addInternalSpaceModeListener
-
removeInternalSpaceModeListener
-
getServiceProxy
Description copied from interface:ServiceProxyAccessorReturns a proxy object for this object. This value should not benull.- Specified by:
getServiceProxyin interfaceServiceProxyAccessor- Returns:
- a proxy object reference
- Throws:
RemoteException
-
connect
- Specified by:
connectin interfaceIRemoteSpace- Throws:
RemoteException
-
isAborted
public boolean isAborted() -
getSynchronizationListBatch
- Specified by:
getSynchronizationListBatchin interfaceIRemoteSpace- Throws:
RemoteException
-
quiesce
public void quiesce(String description, QuiesceToken token, boolean readonly) throws RemoteException - Specified by:
quiescein interfaceIRemoteSpace- Throws:
RemoteException
-
unquiesce
- Specified by:
unquiescein interfaceIRemoteSpace- Throws:
RemoteException
-
getName
Description copied from interface:IRemoteJSpaceAdminReturns the Space Name.Usage: spaceAdmin.getName()- Specified by:
getNamein interfaceIRemoteJSpaceAdmin- Specified by:
getNamein interfaceIRemoteSpace- Returns:
- the space's name
-
isEmbedded
public boolean isEmbedded()- Specified by:
isEmbeddedin interfaceIRemoteSpace
-
ping
Description copied from interface:IRemoteJSpaceAdminPing 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"); }- Specified by:
pingin interfaceIRemoteJSpaceAdmin- Specified by:
pingin interfaceIRemoteSpace- Throws:
RemoteException- if a communication error occurs- See Also:
-
getSpaceHealthStatus
- Specified by:
getSpaceHealthStatusin interfaceIRemoteSpace- Throws:
RemoteException
-
getQueryProcessor
- Specified by:
getQueryProcessorin interfaceIRemoteSpace
-
getStubHandler
-
getUniqueID
Generates and returns a unique id- Specified by:
getUniqueIDin interfaceIRemoteSpace- Throws:
RemoteException
-
loadRemoteClass
- Specified by:
loadRemoteClassin interfaceIRemoteSpace- Throws:
ClassNotFoundException
-
executeAction
-
isActive
- Specified by:
isActivein interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
isActiveAndNotSuspended
- Specified by:
isActiveAndNotSuspendedin interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
isActiveAsync
- Specified by:
isActiveAsyncin interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
checkChunkMapGeneration
- Specified by:
checkChunkMapGenerationin interfaceRemoteOperationsExecutor
-
executeOperation
public <T extends RemoteOperationResult> T executeOperation(RemoteOperationRequest<T> request) throws RemoteException - Specified by:
executeOperationin interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
executeOperationAsync
public <T extends RemoteOperationResult> T executeOperationAsync(RemoteOperationRequest<T> request) throws RemoteException - Specified by:
executeOperationAsyncin interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
executeOperationOneway
- Specified by:
executeOperationOnewayin interfaceRemoteOperationsExecutor- Throws:
RemoteException
-
write
public WriteEntryResult write(IEntryPacket entry, Transaction txn, long lease, int modifiers, boolean fromReplication, SpaceContext sc) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException -
writeOld
public LeaseContext<?>[] writeOld(IEntryPacket[] entries, Transaction txn, long lease, long[] leases, SpaceContext sc, int modifiers) throws TransactionException, UnknownTypesException, RemoteException -
write
public WriteEntriesResult write(IEntryPacket[] entries, Transaction txn, long lease, long[] leases, SpaceContext sc, long timeout, int modifiers, boolean newRouter) throws TransactionException, UnknownTypesException, RemoteException -
update
public AnswerPacket update(IEntryPacket entry, Transaction txn, long lease, long timeout, SpaceContext sc, int modifiers, boolean newRouter) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException, InterruptedException -
count
public Pair<Integer,SingleExplainPlan> count(ITemplatePacket template, Transaction txn, SpaceContext sc, int modifiers) throws UnusableEntryException, UnknownTypeException, TransactionException, RemoteException -
clear
public Pair<Integer,SingleExplainPlan> clear(ITemplatePacket template, Transaction txn, int modifiers, SpaceContext sc) throws UnusableEntryException, UnknownTypeException, TransactionException, RemoteException -
readNew
public AnswerHolder readNew(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException, InterruptedException -
read
public AnswerPacket read(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException, InterruptedException -
asyncRead
public Object asyncRead(ITemplatePacket template, Transaction txn, long timeout, boolean ifExists, boolean take, IJSpaceProxyListener listener, SpaceContext sc, boolean returnOnlyUid, int modifiers, IFuture result) throws UnusableEntryException, TransactionException, UnknownTypeException, RemoteException, InterruptedException -
getNextBatchFromServerIterator
public ServerIteratorAnswerHolder getNextBatchFromServerIterator(ITemplatePacket template, SpaceContext sc, int modifiers, ServerIteratorRequestInfo serverIteratorRequestInfo) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException, InterruptedException -
closeServerIterator
-
renewServerIteratorLease
-
readMultiple
public IEntryPacket[] readMultiple(ITemplatePacket template, Transaction txn, boolean take, int maxEntries, SpaceContext sc, boolean returnOnlyUid, int modifiers) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException -
readMultiple
public AnswerHolder readMultiple(ITemplatePacket template, Transaction txn, boolean take, int maxEntries, SpaceContext sc, boolean returnOnlyUid, int modifiers, int minEntries, long timeout, boolean isIfExist) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException -
applyEntryPacketOutFilter
public static void applyEntryPacketOutFilter(IEntryPacket entryPacket, int modifiers, AbstractProjectionTemplate projectionTemplate) -
readByIds
public IEntryPacket[] readByIds(ITemplatePacket template, Transaction txn, boolean take, SpaceContext spaceContext, int modifiers) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException, InterruptedException -
getEntriesTieredMetaDataByIds
public Map<Object,EntryTieredMetaData> getEntriesTieredMetaDataByIds(String typeName, Object[] ids) throws Exception - Throws:
Exception
-
getMVCCEntryMetaData
-
getMVCCDirtyEntryMetaDataUnderTransaction
public MVCCEntryMetaData getMVCCDirtyEntryMetaDataUnderTransaction(String typeName, Object id, long transactionId) -
notify
public GSEventRegistration notify(ITemplatePacket template, Transaction txn, long lease, SpaceContext sc, NotifyInfo info) throws TransactionException, UnusableEntryException, UnknownTypeException, RemoteException -
snapshot
public void snapshot(ITemplatePacket template, SpaceContext sc) throws UnusableEntryException, RemoteException - Specified by:
snapshotin interfaceIRemoteSpace- Throws:
UnusableEntryExceptionRemoteException
-
snapshot
- Specified by:
snapshotin interfaceIRemoteSpace- Throws:
UnusableEntryExceptionRemoteException
-
cancel
public void cancel(String entryUID, String classname, int objectType, boolean isFromGateway) throws UnknownLeaseException, RemoteException - Throws:
UnknownLeaseExceptionRemoteException
-
cancel
public void cancel(String entryUID, String classname, int objectType) throws UnknownLeaseException, RemoteException - Specified by:
cancelin interfaceIRemoteSpace- Throws:
UnknownLeaseExceptionRemoteException
-
renew
public long renew(String entryUID, String classname, int objectType, long duration, boolean isFromGateway) throws UnknownLeaseException, RemoteException - Throws:
UnknownLeaseExceptionRemoteException
-
renew
public long renew(String entryUID, String classname, int objectType, long duration) throws LeaseDeniedException, UnknownLeaseException, RemoteException - Specified by:
renewin interfaceIRemoteSpace- Throws:
LeaseDeniedExceptionUnknownLeaseExceptionRemoteException
-
cancelAll
public Exception[] cancelAll(String[] entryUIDs, String[] classnames, int[] objectTypes) throws RemoteException - Specified by:
cancelAllin interfaceIRemoteSpace- Throws:
RemoteException
-
renewAll
public Object[] renewAll(String[] entryUIDs, String[] classnames, int[] objectTypes, long[] durations) throws RemoteException - Specified by:
renewAllin interfaceIRemoteSpace- Throws:
RemoteException
-
abort
public void abort(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException Description copied from interface:TransactionParticipantRequests that the participant roll back any changes for the specified transaction and unlock any resources locked by the transaction. All state associated with the transaction can then be discarded by the participant.- Specified by:
abortin interfaceTransactionParticipant- Parameters:
mgr- the manager of the transactionid- the transaction ID- Throws:
UnknownTransactionException- if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.RemoteException- if there is a communication error
-
abort
public void abort(TransactionManager mgr, Object id) throws UnknownTransactionException, RemoteException - Specified by:
abortin interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
abortImpl
public void abortImpl(TransactionManager mgr, Object id, boolean supportsTwoPhaseReplication, OperationID operationID) throws RemoteException, UnknownTransactionException -
commit
public void commit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException Description copied from interface:TransactionParticipantRequests that the participant make all of itsPREPAREDchanges for the specified transaction visible outside of the transaction and unlock any resources locked by the transaction. All state associated with the transaction can then be discarded by the participant.- Specified by:
commitin interfaceTransactionParticipant- Parameters:
mgr- the manager of the transactionid- the transaction ID- Throws:
UnknownTransactionException- if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.RemoteException- if there is a communication error
-
commit
public void commit(TransactionManager mgr, Object id) throws UnknownTransactionException, RemoteException - Specified by:
commitin interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
commit
public void commit(TransactionManager mgr, long id, int numOfParticipants) throws UnknownTransactionException, RemoteException Description copied from interface:TransactionParticipantRequests that the participant make all of itsPREPAREDchanges for the specified transaction visible outside of the transaction and unlock any resources locked by the transaction. All state associated with the transaction can then be discarded by the participant.- Specified by:
commitin interfaceTransactionParticipant- Parameters:
mgr- the manager of the transactionid- the transaction IDnumOfParticipants- the total number of transaction participants this is needed only in commit , since prepareAndCommit is called for single participant- Throws:
UnknownTransactionException- if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.RemoteException- if there is a communication error
-
commit
public void commit(TransactionManager mgr, Object id, int numOfParticipants) throws UnknownTransactionException, RemoteException - Specified by:
commitin interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
commitImpl
public void commitImpl(TransactionManager mgr, Object id, int numOfParticipants, boolean supportsTwoPhaseReplication, OperationID operationID, boolean mayBeFromReplication) throws RemoteException, UnknownTransactionException -
prepare
public int prepare(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException Description copied from interface:TransactionParticipantRequests that the participant prepare itself to commit the transaction, and to vote on the outcome of the transaction. The participant responds with eitherPREPARED, indicating that it is prepared;ABORT, indicating that it will abort, orNOTCHANGED, indicating that it did not have any state changed by the transaction (i.e., it was read-only). If the response isPREPARED, the participant must wait until it receives a commit or abort call from the transaction manager; it may query the transaction manager if needed as to the state of the transaction. If the response isABORT, the participant should roll its state back to undo any changes that occurred due to operations performed under the transaction; it can then discard any information about the transaction. If the response isNOTCHANGED, the participant can immediately discard any knowledge of the transaction.- Specified by:
preparein interfaceTransactionParticipant- Parameters:
mgr- the manager of the transactionid- the transaction ID- Returns:
- an
intrepresenting this participant's state - Throws:
UnknownTransactionException- if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.RemoteException- if there is a communication error
-
prepare
public int prepare(TransactionManager mgr, Object id) throws UnknownTransactionException, RemoteException - Specified by:
preparein interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepare
public int prepare(TransactionManager mgr, Object id, int numOfParticipants) throws UnknownTransactionException, RemoteException - Specified by:
preparein interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepare
public Object prepare(TransactionManager mgr, long id, boolean needClusteredProxy) throws UnknownTransactionException, RemoteException - Specified by:
preparein interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepare
public Object prepare(TransactionManager mgr, Object parm2, boolean needClusteredProxy) throws UnknownTransactionException, RemoteException - Specified by:
preparein interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepare
public Object prepare(TransactionManager mgr, Object parm2, int numOfParticipants, boolean needClusteredProxy) throws UnknownTransactionException, RemoteException - Specified by:
preparein interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepareAndCommit
public int prepareAndCommit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException Description copied from interface:TransactionParticipantA combination ofprepareandcommit, which can be used by the manager when there is just one participant left to prepare and all other participants (if any) have responded withNOTCHANGED. The participant's implementation of this method must be equivalent to:public int prepareAndCommit(TransactionManager mgr, long id) throws UnknownTransactionException, RemoteException { int result = prepare(mgr, id); if (result == PREPARED) { commit(mgr, id); result = COMMITTED; } return result; }- Specified by:
prepareAndCommitin interfaceTransactionParticipant- Parameters:
mgr- the manager of the transactionid- the transaction ID- Returns:
- an
intrepresenting its state - Throws:
UnknownTransactionException- if the transaction is unknown to the transaction manager, either because the transaction ID is incorrect or because the transaction is complete and its state has been discarded by the manager.RemoteException- if there is a communication error- See Also:
-
prepareAndCommit
public int prepareAndCommit(TransactionManager mgr, Object id) throws UnknownTransactionException, RemoteException - Specified by:
prepareAndCommitin interfaceIRemoteSpace- Throws:
UnknownTransactionExceptionRemoteException
-
prepareAndCommitImpl
public int prepareAndCommitImpl(TransactionManager mgr, Object id, OperationID operationID) throws RemoteException, UnknownTransactionException -
renewLease
public void renewLease(TransactionManager mgr, long id, long time) throws LeaseDeniedException, UnknownLeaseException, RemoteException Description copied from interface:TransactionParticipantNotify the transaction participant about transaction lease renewal- Specified by:
renewLeasein interfaceTransactionParticipant- Throws:
LeaseDeniedExceptionUnknownLeaseExceptionRemoteException
-
executeTask
public Object executeTask(SpaceTask task, Transaction tx, SpaceContext sc, boolean newRouter) throws RemoteException, ExecutionException - Throws:
RemoteExceptionExecutionException
-
getReplicationRouterConnectionProxy
- Specified by:
getReplicationRouterConnectionProxyin interfaceIRemoteSpace- Throws:
RemoteException
-
getNIODetails
Description copied from interface:NIOInfoProviderReturns the transport configuration. Note, does not change during application lifecycle, should be cached on the client side.- Specified by:
getNIODetailsin interfaceNIOInfoProvider
-
getNIOStatistics
Description copied from interface:NIOInfoProviderReturns the transport statistics.- Specified by:
getNIOStatisticsin interfaceNIOInfoProvider
-
enableLRMIMonitoring
Description copied from interface:NIOInfoProviderEnables lrmi monitoring (gigaspaces internal remoting layer), this will cause the target to start track lrmi invocations which can later be viewed by calling.NIOInfoProvider.fetchLRMIMonitoringDetails()- Specified by:
enableLRMIMonitoringin interfaceNIOInfoProvider- Throws:
RemoteException
-
disableLRMIMonitoring
Description copied from interface:NIOInfoProviderDisabled lrmi monitoring (gigaspaces internal remoting layer).NIOInfoProvider.enableLRMIMonitoring()- Specified by:
disableLRMIMonitoringin interfaceNIOInfoProvider- Throws:
RemoteException
-
fetchLRMIMonitoringDetails
Description copied from interface:NIOInfoProviderReturn lrmi (gigaspaces internal remoting layer) services monitoring details. This will only work if lrmi monitoring was previously enabled, either by admin API, Jmx or system property.NIOInfoProvider.enableLRMIMonitoring()- Specified by:
fetchLRMIMonitoringDetailsin interfaceNIOInfoProvider- Throws:
RemoteException
-
getCurrentTimestamp
public long getCurrentTimestamp()- Specified by:
getCurrentTimestampin interfaceOSInfoProvider
-
getOSDetails
- Specified by:
getOSDetailsin interfaceOSInfoProvider
-
getOSStatistics
- Specified by:
getOSStatisticsin interfaceOSInfoProvider
-
getJVMDetails
- Specified by:
getJVMDetailsin interfaceJVMInfoProvider
-
getJVMStatistics
- Specified by:
getJVMStatisticsin interfaceJVMInfoProvider
-
runGc
public void runGc()- Specified by:
runGcin interfaceJVMInfoProvider
-
getZones
- Specified by:
getZonesin interfaceGridZoneProvider
-
isStatisticsAvailable
public boolean isStatisticsAvailable()Description copied from interface:StatisticsAdminChecks if space statistics is available.- Specified by:
isStatisticsAvailablein interfaceStatisticsAdmin- Returns:
trueif space statistics is available
-
getStatisticsStringArray
Description copied from interface:StatisticsAdminReturns a string array contains statistics values for each operation. For example: WRITE count: 10000, average time for last 2 seconds is 4293.1 READ count: 10000, average time for last 2 seconds is 4293.1- Specified by:
getStatisticsStringArrayin interfaceStatisticsAdmin- Returns:
- array of Strings that represents the space statistics
- Throws:
StatisticsNotAvailable- when space statistics are not available
-
getStatisticsSamplingRate
Description copied from interface:StatisticsAdminChecks statistics sampling rate.- Specified by:
getStatisticsSamplingRatein interfaceStatisticsAdmin- Returns:
- the statistics sampling rate
- Throws:
StatisticsNotAvailable- when space statistics are not available
-
setStatisticsSamplingRate
Description copied from interface:StatisticsAdminSet statistics sampling rate.- Specified by:
setStatisticsSamplingRatein interfaceStatisticsAdmin- Parameters:
rate- the rate to sample the space for statistics- Throws:
StatisticsNotAvailable- when space statistics are not available
-
getStatistics
Description copied from interface:StatisticsAdminReturns statistics repository that contains a map of operation codes toStatisticsContextobjects for all filter operation codes.- Specified by:
getStatisticsin interfaceStatisticsAdmin- Returns:
- map of operation codes to
StatisticsContext - Throws:
StatisticsNotAvailable- when space statistics are not available
-
getStatistics
Description copied from interface:StatisticsAdminReturns aStatisticsContextfor specific filter operation code.- Specified by:
getStatisticsin interfaceStatisticsAdmin- Parameters:
operationCode- filter operation code defined inFilterOperationCodes- Returns:
- StatisticsContext for the given operation code
- Throws:
StatisticsNotAvailable- when space statistics are not available- See Also:
-
getStatistics
public Map<Integer,StatisticsContext> getStatistics(Integer[] operationCodes) throws StatisticsNotAvailable Description copied from interface:StatisticsAdminReturns statistics repository that contains a map of operation codes toStatisticsContextobjects for passed specific filter operation codes.- Specified by:
getStatisticsin interfaceStatisticsAdmin- Parameters:
operationCodes- filter array of operation codes defined inFilterOperationCodes- Returns:
- map of operation codes to
StatisticsContext - Throws:
StatisticsNotAvailable- when space statistics are not available
-
getHolder
- Specified by:
getHolderin interfaceStatisticsAdmin
-
getMetricSnapshots
- Specified by:
getMetricSnapshotsin interfaceStatisticsAdmin- Parameters:
prefixes- collection of metrics prefixes- Returns:
- map of metrics with their values as map values
- Throws:
RemoteException
-
getRuntimeInfo
Description copied from interface:IRemoteJSpaceAdminReturnsSpaceRuntimeInfo.Usage: SpaceRuntimeInfo runtime = spaceAdmin.getRuntimeInfo(); List classNames = runtime.m_ClassNames; List numOfEntries = runtime.m_NumOFEntries;- Specified by:
getRuntimeInfoin interfaceIRemoteJSpaceAdmin- Returns:
- SpaceRuntimeInfo which holds the classes and the number of entries currently in the space.
- Throws:
RemoteException- if a communication error occurs
-
getRuntimeInfo
Description copied from interface:IRemoteJSpaceAdminReturnsSpaceRuntimeInfofor 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;- Specified by:
getRuntimeInfoin interfaceIRemoteJSpaceAdmin- 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
- Specified by:
getReplicationStatisticsin interfaceIRemoteJSpaceAdmin- Throws:
RemoteException
-
getConfig
Description copied from interface:IRemoteJSpaceAdminReturnsSpaceConfigof this space.Usage: SpaceConfig config = spaceAdmin.getConfig(); if (config != null) boolean isClustered = config.m_isClustered;- Specified by:
getConfigin interfaceIRemoteJSpaceAdmin- Returns:
- SpaceConfig - Contains all information about the space configuration.
-
start
Description copied from interface:IInternalRemoteJSpaceAdminAttempt to start this space.Usage: spaceAdmin.start();- Specified by:
startin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException- - Failed to start space.SpaceAlreadyStartedException- - The space is already started
-
startInternal
- Throws:
RemoteException
-
filterUnicastHosts
Applies partition-based LUS selection using modulo distribution.Each partition registers with K out of N LUS instances (configurable via
com.gs.lus.registration.count). When K=0 (default) or K >= N, all LUS instances are used — backward compatible.- Overrides:
filterUnicastHostsin classAbstractService
-
stop
Description copied from interface:IInternalRemoteJSpaceAdminAttempt to stop this space.Usage: spaceAdmin.stop();- Specified by:
stopin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException- - Failed to stop space.SpaceAlreadyStoppedException- - The space is already stopped
-
stopInternal
- Throws:
RemoteException
-
restart
Description copied from interface:IInternalRemoteJSpaceAdminRestarts the space.Usage: try { spaceAdmin.restart(); } catch( java.rmi.RemoteException ex ) { System.err.println("Failed to restart space: " + ((IJSpace)space).getName()); System.err.println("Exception: " + ex); }- Specified by:
restartin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException- Failed to restart space.
-
getSpaceInstanceRemoteClassLoaderInfo
Description copied from interface:IRemoteJSpaceAdminReturn the info about the space classloader- Specified by:
getSpaceInstanceRemoteClassLoaderInfoin interfaceIRemoteJSpaceAdmin- Returns:
- a SpaceInstanceRemoteClassLoaderInfo that represents the space classloader's
-
getReplicationStatus
return the replication status of all my replication group returns an array of remote member names and an array of replication status to them.- Specified by:
getReplicationStatusin interfaceIRemoteJSpaceAdmin- 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
-
getClusterPolicy
Description copied from interface:IRemoteJSpaceAdminReturn the present ClusterPolicy objects.- Specified by:
getClusterPolicyin interfaceIRemoteJSpaceAdmin- Returns:
- a ClusterPolicy that represents current cluster
-
getClusterInfo
-
getClassTypeInfo
Description copied from interface:IRemoteJSpaceAdminGet 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;- Specified by:
getClassTypeInfoin interfaceIRemoteJSpaceAdmin- 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
-
dropClass
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.- Specified by:
dropClassin interfaceIRemoteJSpaceAdmin- Parameters:
className- - name of class to delete.- Throws:
RemoteException- if a communication error occursDropClassException- Failed to drop desired class.
-
directDropCLassForAllProxies
-
getState
public int getState()Description copied from interface:IRemoteJSpaceAdminReturns the particular condition of this space.- Specified by:
getStatein interfaceIRemoteJSpaceAdmin- Returns:
- state - ISpaceState.STOPPED, ISpaceState.STARTED and etc.
- See Also:
-
disableStub
Description copied from interface:IInternalRemoteJSpaceAdmindisable remote.- Specified by:
disableStubin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException- if a communication error occurs
-
getRuntimeHolder
- Specified by:
getRuntimeHolderin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException
-
isStartedWithinGSC
public boolean isStartedWithinGSC()- Specified by:
isStartedWithinGSCin interfaceIInternalRemoteJSpaceAdmin
-
getDeployPath
Returns the deploy path of this space instance, when deployed in the service grid. NOTE: When not deployed in the service grid, this method may return null. -
spaceCopy
public SpaceCopyStatus spaceCopy(String remoteUrl, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize) Description copied from interface:IInternalRemoteJSpaceAdminGiven 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 );- Specified by:
spaceCopyin interfaceIInternalRemoteJSpaceAdmin- Parameters:
remoteUrl- 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.- Returns:
- SpaceCopyStatus Contains the status information of spaceCopy operation.
-
spaceCopy
public SpaceCopyStatus spaceCopy(String remoteUrl, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize, SpaceContext sc) throws RemoteException Description copied from interface:IInternalRemoteJSpaceAdminGiven 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 );- Specified by:
spaceCopyin interfaceIInternalRemoteJSpaceAdmin- Parameters:
remoteUrl- 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.- Returns:
- SpaceCopyStatus Contains the status information of spaceCopy operation.
- Throws:
RemoteException- if a communication error occurs
-
spaceCopy
public SpaceCopyStatus spaceCopy(IRemoteSpace remoteProxy, String remoteSpaceUrl, String remoteSpaceName, ITemplatePacket template, boolean includeNotifyTemplates, int chunkSize, SpaceContext sc, SpaceContext remoteSpaceContext) throws RemoteException Description copied from interface:IInternalRemoteJSpaceAdminGiven ISpaceInternal of a remote space, Copy all entries/notify templates from the space.Usage: SpaceCopyStatus copyStatus = spaceAdmin.spaceCopy( remoteProxy, remoteURL, remoteName, template, false 1000, sc); System.out.println("Copy-Status: " + copyStatus );- Specified by:
spaceCopyin interfaceIInternalRemoteJSpaceAdmin- Parameters:
remoteProxy- 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.sc- SpaceContext for security check in the server side.remoteSpaceContext- remoteSpaceContext for security check in the server side.- Returns:
- SpaceCopyStatus Contains the status information of spaceCopy operation.
- Throws:
RemoteException- if a communication error occurs
-
getTransactionsInfo
Description copied from interface:IInternalRemoteJSpaceAdminReturns all the transactions with the specific parameters.- Specified by:
getTransactionsInfoin interfaceIInternalRemoteJSpaceAdmin- Parameters:
type- 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 inTransactionConstants- Returns:
- all the TransactionInfos of the transactions that matches the given parameters
- Throws:
RemoteException- if a communication error occurs
-
countTransactions
- Specified by:
countTransactionsin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException
-
getTemplatesInfo
Description copied from interface:IInternalRemoteJSpaceAdminReturns a list of pending templates.- Specified by:
getTemplatesInfoin interfaceIInternalRemoteJSpaceAdmin- Parameters:
className- name of the class to search- Returns:
- list of pending template for the given class
- Throws:
RemoteException
-
getConnectionsInfo
- Specified by:
getConnectionsInfoin interfaceIInternalRemoteJSpaceAdmin- Returns:
- returns all the transport connection information for this Space.
- Throws:
RemoteException
-
countIncomingConnections
- Specified by:
countIncomingConnectionsin interfaceIInternalRemoteJSpaceAdmin- Returns:
- returns all the transport connection information for this Space.
- Throws:
RemoteException
-
getLockedObjects
getLockedObjects is called by the GUI. it returns Info about all the locked Object by the given Transaction.- Specified by:
getLockedObjectsin interfaceIInternalRemoteJSpaceAdmin- Parameters:
txn- - the Transaction that locks the Objects.- Returns:
- List of UnderTxnLockedObject
- Throws:
RemoteException
-
getSpaceMode
Description copied from interface:IInternalRemoteJSpaceAdminGet the currentSpaceModewhich 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.- Specified by:
getSpaceModein interfaceIInternalRemoteJSpaceAdmin- Returns:
- the current
SpaceModeof the space.
-
isPrimary
public boolean isPrimary() -
isBackup
public boolean isBackup() -
addSpaceModeListener
Description copied from interface:IInternalRemoteJSpaceAdminAdds a listener to be called back withISpaceModeListenermode 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.- Specified by:
addSpaceModeListenerin interfaceIInternalRemoteJSpaceAdmin- Parameters:
listener- a listener to be called back on space mode changes.- Returns:
- the current
SpaceModeof the space. - See Also:
-
removeSpaceModeListener
Description copied from interface:IInternalRemoteJSpaceAdminRemoves this listener so that it no longer receives call backs of space mode changes. Invocation has no additional effect if the listener was already removed or was not existent in the first place.- Specified by:
removeSpaceModeListenerin interfaceIInternalRemoteJSpaceAdmin- Parameters:
listener- a listener to be removed.- See Also:
-
getClassDescriptor
Description copied from interface:IInternalRemoteJSpaceAdminGet 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;- Specified by:
getClassDescriptorin interfaceIInternalRemoteJSpaceAdmin- 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
-
getClassDescriptor
Description copied from interface:IInternalRemoteJSpaceAdminGet 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;- Specified by:
getClassDescriptorin interfaceIInternalRemoteJSpaceAdmin- 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
-
forceMoveToPrimary
Description copied from interface:IInternalRemoteJSpaceAdminForcefully make this space to be primary- Specified by:
forceMoveToPrimaryin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException
-
getReplicationDump
- Specified by:
getReplicationDumpin interfaceIInternalRemoteJSpaceAdmin
-
flushRedoLogToStorage
Description copied from interface:IInternalRemoteJSpaceAdminFlush redo-log packets from memory to underlying storage. Should be called when the space is in quiesce mode.- Specified by:
flushRedoLogToStoragein interfaceIInternalRemoteJSpaceAdmin- Returns:
- number of flushed packets
- Throws:
RemoteException
-
assertAuthorizedForType
public void assertAuthorizedForType(String typeName, SpaceAuthority.SpacePrivilege privilege, SpaceContext spaceContext) -
assertAuthorizedForPrivilege
-
isRecovering
public boolean isRecovering() -
getRecoveryIndicator
-
getLocalCacheDetails
- Specified by:
getLocalCacheDetailsin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException
-
getLocalViewDetails
- Specified by:
getLocalViewDetailsin interfaceIInternalRemoteJSpaceAdmin- Throws:
RemoteException
-
isLocalCache
public boolean isLocalCache() -
spaceCopy
public SpaceCopyStatus spaceCopy(String remoteUrl, Object template, boolean includeNotifyTemplates, int chunkSize) Igor.G 13/3/2005 ver 5.01. This method will never invoked! We have an abstraction problem with IRemoteJSpaceAdmin, JSpaceAdminProxy and SpaceInternal, so added this non-impl method only to make compiler happy :(- Specified by:
spaceCopyin interfaceIRemoteJSpaceAdmin- 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.
-
spaceCopy
public SpaceCopyStatus spaceCopy(IJSpace remoteSpace, Object template, boolean includeNotifyTemplates, int chunkSize) - Specified by:
spaceCopyin interfaceIRemoteJSpaceAdmin
-
discarded
Description copied from interface:DiscoveryListenerCalled when one or more lookup service registrars has been discarded. The method should return quickly; e.g., it should not make remote calls.- Specified by:
discardedin interfaceDiscoveryListener- Parameters:
event- the event that describes the discarded registrars
-
discovered
Description copied from interface:DiscoveryListenerCalled when one or more lookup service registrars has been discovered. The method should return quickly; e.g., it should not make remote calls.- Specified by:
discoveredin interfaceDiscoveryListener- Parameters:
event- the event that describes the discovered registrars
-
getClusterConfigFile
Description copied from interface:IInternalRemoteJSpaceAdminReturns a byte representation of the cluster configuration file.- Specified by:
getClusterConfigFilein interfaceIInternalRemoteJSpaceAdmin- Returns:
- byte representation of the cluster configuration file
- Throws:
RemoteException- if a communication error occurs
-
setClusterConfigFile
Description copied from interface:IInternalRemoteJSpaceAdminset the cluster configuration according to the given byte representation of the configuration file.- Specified by:
setClusterConfigFilein interfaceIInternalRemoteJSpaceAdmin- Parameters:
config- byte representation of the configuration file- Throws:
RemoteException- if a communication error occurs
-
AppendInitialLookupAttributes
protected void AppendInitialLookupAttributes(List<Entry> lookupAttributes) throws ServiceRegistrationException - Overrides:
AppendInitialLookupAttributesin classAbstractGigaSpacesService- Throws:
ServiceRegistrationException
-
demote
public void demote(long maxSuspendTime, TimeUnit unit, SpaceContext sc) throws DemoteFailedException, RemoteException Description copied from interface:IRemoteSpaceDemote leadership and become a backup Space, in the specified operation timeout.- Specified by:
demotein interfaceIRemoteSpace- Parameters:
maxSuspendTime- The maximum time allowed to be in suspended state, after which the operation is aborted.unit- The unit of time for the maxSuspendTime parameter.sc- The SpaceContext for security check in the server side.- Throws:
DemoteFailedExceptionRemoteException
-
waitForDrain
public void waitForDrain(long timeoutMs, long minTimeToWait, boolean isBackupOnly, org.slf4j.Logger logger) throws TimeoutException - Throws:
TimeoutException
-
addSpaceSuspendTypeListener
Description copied from interface:IInternalRemoteJSpaceAdminAdds a listener to be called back withSuspendTypeChangedInternalListenersuspend type changes.- Specified by:
addSpaceSuspendTypeListenerin interfaceIInternalRemoteJSpaceAdmin- Parameters:
listener- -SuspendTypeChangedInternalListenerthat will receive notification when a space suspend type changes (SuspendType)
-
removeSpaceSuspendTypeListener
Description copied from interface:IInternalRemoteJSpaceAdminRemoves this listener so that it no longer receives call backs of space suspend type changes.- Specified by:
removeSpaceSuspendTypeListenerin interfaceIInternalRemoteJSpaceAdmin- Parameters:
listener- -SuspendTypeChangedInternalListenerthat will stop receiving notification when a space suspend type changes (SuspendType)
-
updateClusterInfo
public void updateClusterInfo()Description copied from interface:IRemoteJSpaceAdmintrigger read of chunks map from zk and update clusterInfo- Specified by:
updateClusterInfoin interfaceIRemoteJSpaceAdmin
-
getPuName
-
getAttributeStore
-
waitForZkUpdate
-
clearBroadcastTables
public void clearBroadcastTables() -
pullBroadcastTables
public boolean pullBroadcastTables()
-