public class SpaceProxyImpl extends AbstractDirectSpaceProxy implements SameProxyVersionProvider, MarshalPivotProvider, IClusterInfoChangedListener
| Modifier and Type | Class and Description |
|---|---|
static class |
SpaceProxyImpl.Listener
This class is only used by the engine to verify that the proxy is alive.
|
_proxySettings| Constructor and Description |
|---|
SpaceProxyImpl(DirectSpaceProxyFactoryImpl factory,
ProxySettings proxySettings) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterClusterInfoChange(SpaceClusterInfo clusterInfo)
Updates server side components that holds SpaceClusterInfo instances when SpaceClusterInfo changes (i.e horizontal scale event)
|
static void |
afterExecute(SpaceOperationRequest<?> spaceRequest,
IRemoteSpace targetSpace,
int partitionId,
boolean isRejected) |
boolean |
beforeExecute(SpaceOperationRequest<?> spaceRequest,
IRemoteSpace targetSpace,
int partitionId,
String clusterName,
boolean isEmbedded) |
Transaction |
beforeSpaceAction() |
void |
beforeSpaceAction(CommonProxyActionInfo action) |
Transaction |
beforeSpaceAction(Transaction txn) |
SpaceProxyImpl |
cloneProxy() |
void |
close()
Close the proxy and execute necessary cleanup logic.
|
protected AbstractSpaceProxyActionManager<SpaceProxyImpl> |
createActionManager() |
OperationID |
createNewOperationID()
Generate a unique operation ID
|
void |
demote(long maxSuspendTime,
TimeUnit timeUnit,
CredentialsProvider credentialsProvider)
Internal demote API for swapping from primary to backup Space.
|
void |
directClean() |
void |
directDropClass(String className) |
boolean |
equals(Object obj)
overrides implementation of equals() method in AbstractSpaceProxy
|
protected void |
finalize() |
Object |
getAdmin()
Returns the admin object to the remote part of this space.
|
String |
getCacheTypeName() |
long |
getClientID() |
IJSpace |
getClusteredProxy()
Returns a clustered view of this proxy.
|
IJSpaceContainer |
getContainer()
Returns the container proxy this space resides in.
|
ContainerConfig |
getContainerConfig() |
SpaceURL |
getContainerURL() |
Transaction.Created |
getContextTransaction()
Returns the transaction associated with the current context, if any.
|
SpaceProxyDataEventsManager |
getDataEventsManager() |
IDirectSpaceProxy |
getDirectProxy()
returns itself in case of a direct proxy or the real proxy in case of a local cache or a
view.
|
DirectSpaceProxyFactory |
getFactory() |
SpaceURL |
getFinderURL()
Returns the
SpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space. |
MarshalPivot |
getMarshalPivot() |
String |
getName()
Returns the name of this space.
|
IJSpace |
getNonClusteredProxy()
Returns a proxy of the specified space.
|
IDirectSpaceProxy |
getNotificationsDirectProxy()
returns itself in case of a direct proxy or the real proxy in case of a local cache or a
view.
|
Object |
getPrivilegedAdmin()
Get remote admin object for this space.
|
SpaceProxyRouter |
getProxyRouter() |
IQueryManager |
getQueryManager() |
int |
getReadModifiers()
Gets the proxy ReadModifiers.
|
Uuid |
getReferentUuid()
Returns the unique
Uuid of this space instance. |
IRemoteSpace |
getRemoteJSpace()
Returns the reference to initial remote space
|
String |
getRemoteMemberName() |
IProxySecurityManager |
getSecurityManager() |
SpaceClusterInfo |
getSpaceClusterInfo() |
SpaceImpl |
getSpaceImplIfEmbedded() |
IStubHandler |
getStubHandler()
Returns the StubHandler of this space.
|
ExecutorService |
getThreadPool() |
ITypeDesc |
getTypeDescFromServer(String typeName) |
ISpaceProxyTypeManager |
getTypeManager() |
int |
getUpdateModifiers()
Gets the proxyUpdateModifiers.
|
SpaceURL |
getURL()
Returns the
SpaceURL instance which was used to initialize the space. |
Object |
getVersion() |
void |
initProxyRouter(int partitionId) |
int |
initWriteModifiers(int modifiers) |
boolean |
isClustered()
returns true if the proxy is Clustered
|
boolean |
isEmbedded()
Checks whether proxy is connected to embedded or remote space.
|
boolean |
isFifo()
Returns
true if this proxy FIFO enabled, otherwise false. |
boolean |
isGatewayProxy() |
boolean |
isOptimisticLockingEnabled()
Returns status of Optimistic Lock protocol.
|
boolean |
isSecured()
Returns an indication : is this space secured.
|
boolean |
isServiceSecured()
If a security model is defined will return
true. |
boolean |
isStartedWithinGSC()
Returns true if the space started within a GSC.
|
Class<?> |
loadRemoteClass(String className)
Loads a remote class from the space, the class will be loaded locally into a corresponding
LRMIClassLoader
|
SecurityContext |
login(CredentialsProvider credentialsProvider)
Login to a secured service using the provided
credentialsProvider. |
ISpaceQuery |
prepareTemplate(Object template) |
void |
readExternal(ObjectInput in) |
ITypeDesc |
registerTypeDescInServers(ITypeDesc typeDesc) |
Transaction.Created |
replaceContextTransaction(Transaction.Created txn) |
Transaction.Created |
replaceContextTransaction(Transaction.Created transaction,
ActionListener actionListener,
boolean delegatedXa) |
void |
setActionListener(ActionListener actionListener)
Sets a new
ActionListener to receive events. |
void |
setFifo(boolean enabled)
Sets FIFO mode for proxy.
|
void |
setFinderURL(SpaceURL _finderurl) |
void |
setGatewayProxy() |
void |
setOptimisticLocking(boolean enabled)
Enable/Disable Optimistic Lock protocol.
|
void |
setQuiesceToken(QuiesceToken token) |
int |
setReadModifiers(int readModifiers)
Sets the read mode modifiers for proxy level.
|
int |
setUpdateModifiers(int newModifiers)
Sets the update mode modifiers for proxy level.
|
void |
shutdown() |
void |
updateProxyRouter(SpaceProxyRouter oldRouter,
ClusterTopology chunksMap)
Used in client side to update all proxy components with the new map
|
void |
writeExternal(ObjectOutput out) |
getProxySettings, hashCode, toStringaggregate, applyNotifyInfoDefaults, asyncAddIndexes, asyncChange, asyncRead, asyncTake, change, checkIfConnected, clear, clear, count, count, dropClass, execute, getAppDomainId, getContainerName, getDotnetProxyHandleId, getLocalSpace, getRemoteSpace, getSpaceHealthStatus, getTypeDescriptor, hasAssociatedAppDomain, isCacheContainer, isLocalCacheCacheContainer, isLocalViewContainer, isTargetOfADotnetProxy, notify, ping, read, read, read, read, readById, readById, readByIds, readByIds, readByIds, readByUid, readEntriesUids, readIfExists, readIfExists, readIfExists, readMultiple, readMultiple, readMultiple, readMultiple, registerTypeDescriptor, registerTypeDescriptor, setAppDomainId, setDotnetProxyHandleId, snapshot, snapshot, take, take, take, take, takeById, takeById, takeByIds, takeByIds, takeByIds, takeByUid, takeIfExists, takeIfExists, takeIfExists, takeMultiple, takeMultiple, takeMultiple, takeMultiple, unregisterTypeDescriptor, update, update, updateMultiple, updateMultiple, write, write, write, writeMultiple, writeMultiple, writeMultiple, writeMultiple, writeMultipleaggregate, applyNotifyInfoDefaults, asyncAddIndexes, asyncChange, asyncRead, asyncTake, change, checkIfConnected, execute, getSpaceHealthStatus, getTypeDescriptor, read, readById, readById, readByIds, readByIds, readByIds, readByUid, readEntriesUids, readMultiple, readMultiple, registerTypeDescriptor, registerTypeDescriptor, take, takeById, takeById, takeByIds, takeByIds, takeByIds, takeByUid, takeMultiple, takeMultiple, unregisterTypeDescriptor, writeMultipledropClass, getContainerName, pingclear, clear, count, count, read, read, readIfExists, readIfExists, readMultiple, readMultiple, snapshot, take, take, takeIfExists, takeMultiple, takeMultiple, update, update, updateMultiple, updateMultiple, write, write, writeMultiple, writeMultiple, writeMultiplegetAppDomainId, getDotnetProxyHandleId, hasAssociatedAppDomain, isTargetOfADotnetProxy, setAppDomainId, setDotnetProxyHandleIdnotify, read, readIfExists, snapshot, take, takeIfExists, writeenabledSmartExternalizableWithReferencepublic SpaceProxyImpl(DirectSpaceProxyFactoryImpl factory, ProxySettings proxySettings)
public ExecutorService getThreadPool()
getThreadPool in interface IDirectSpaceProxypublic IDirectSpaceProxy getDirectProxy()
IJSpacegetDirectProxy in interface IJSpacepublic String getCacheTypeName()
getCacheTypeName in interface IJSpacepublic IDirectSpaceProxy getNotificationsDirectProxy()
ISpaceProxygetNotificationsDirectProxy in interface ISpaceProxypublic IQueryManager getQueryManager()
getQueryManager in interface IDirectSpaceProxypublic SpaceProxyDataEventsManager getDataEventsManager()
getDataEventsManager in interface IDirectSpaceProxypublic IProxySecurityManager getSecurityManager()
getSecurityManager in interface IDirectSpaceProxypublic ISpaceProxyTypeManager getTypeManager()
getTypeManager in interface IDirectSpaceProxypublic void setActionListener(ActionListener actionListener)
ActionMakerActionListener to receive events. Replaces any former
ActionListener if exists.setActionListener in interface ActionMakerpublic Transaction.Created getContextTransaction()
ISpaceProxygetContextTransaction in interface ISpaceProxypublic Transaction.Created replaceContextTransaction(Transaction.Created txn)
replaceContextTransaction in interface ISpaceProxypublic Transaction.Created replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa)
replaceContextTransaction in interface ISpaceProxypublic Uuid getReferentUuid()
IJSpaceUuid of this space instance.getReferentUuid in interface IJSpacegetReferentUuid in interface ReferentUuidUuid associated with the resource this proxy represents. Will not
return null.public String getName()
IJSpacepublic boolean isEmbedded()
IJSpaceisEmbedded in interface IJSpacepublic boolean isSecured()
IJSpacepublic boolean isServiceSecured()
throws RemoteException
SecuredServicetrue.isServiceSecured in interface SecuredServicetrue if secured; false otherwise.RemoteException - communication-related exceptions that may occur during the execution
of a remote method call.public boolean isStartedWithinGSC()
throws RemoteException
IJSpaceisStartedWithinGSC in interface IJSpaceRemoteExceptionpublic Object getAdmin() throws RemoteException
IJSpace
// get a list of classes and the number of entries of each class
IRemoteJSpaceAdmin remoteAdmin =
(IRemoteJSpaceAdmin)serverAdmin.getAdmin();
Object classList[] = remoteAdmin.getRuntimeInfo().m_ClassNames.toArray();
List numOFEntries = remoteAdmin.getRuntimeInfo().m_NumOFEntries;
getAdmin in interface IJSpacegetAdmin in interface AdministrableRemoteException - if a communication error occursJoinAdminpublic Object getPrivilegedAdmin() throws RemoteException
getPrivilegedAdmin in interface ISpaceProxyRemoteExceptionIJSpace.getAdmin()public IJSpace getNonClusteredProxy()
IDirectSpaceProxygetNonClusteredProxy in interface IDirectSpaceProxypublic IJSpace getClusteredProxy()
IDirectSpaceProxygetClusteredProxy in interface IDirectSpaceProxypublic IStubHandler getStubHandler()
IDirectSpaceProxygetStubHandler in interface IDirectSpaceProxypublic IJSpaceContainer getContainer()
IDirectSpaceProxygetContainer in interface IDirectSpaceProxypublic void shutdown()
throws RemoteException
shutdown in interface IDirectSpaceProxyRemoteExceptionpublic ContainerConfig getContainerConfig() throws RemoteException
getContainerConfig in interface IDirectSpaceProxyRemoteExceptionpublic SpaceURL getContainerURL() throws RemoteException
getContainerURL in interface IDirectSpaceProxyRemoteExceptionpublic SpaceURL getFinderURL()
IJSpaceSpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space. If a client uses this SpaceURL when it calls to SpaceFinder.find(SpaceURL) it should be able to find that
space.
Notice: The SpaceURL returned when calling getURL() is different since in that case
it returns the SpaceURL used to initialize the space (a java:// protocol to start an
embedded space).getFinderURL in interface IJSpaceSpaceURL object which can be used to find the space proxy while calling
SpaceFinder.find(SpaceURL)public void setFinderURL(SpaceURL _finderurl)
public SpaceURL getURL()
IJSpaceSpaceURL instance which was used to initialize the space.public boolean isOptimisticLockingEnabled()
IJSpaceisOptimisticLockingEnabled in interface IJSpacepublic void setOptimisticLocking(boolean enabled)
IJSpacesetOptimisticLocking in interface IJSpacepublic boolean isFifo()
IJSpacetrue if this proxy FIFO enabled, otherwise false.public void setFifo(boolean enabled)
IJSpacepublic int getReadModifiers()
IJSpacegetReadModifiers in interface IJSpacepublic int setReadModifiers(int readModifiers)
IJSpacesetReadModifiers in interface IJSpacepublic int getUpdateModifiers()
IJSpacegetUpdateModifiers in interface IJSpacepublic int setUpdateModifiers(int newModifiers)
IJSpacesetUpdateModifiers in interface IJSpacepublic boolean isGatewayProxy()
isGatewayProxy in interface IDirectSpaceProxypublic void setGatewayProxy()
public Object getVersion()
getVersion in interface SameProxyVersionProviderprotected AbstractSpaceProxyActionManager<SpaceProxyImpl> createActionManager()
createActionManager in class AbstractSpaceProxypublic OperationID createNewOperationID()
ISpaceProxycreateNewOperationID in interface ISpaceProxypublic long getClientID()
getClientID in interface IDirectSpaceProxypublic void directClean()
directClean in interface IDirectSpaceProxypublic void directDropClass(String className)
public SecurityContext login(CredentialsProvider credentialsProvider) throws RemoteException
SecuredServicecredentialsProvider.login in interface SecuredServicecredentialsProvider - provides credentials to be used for authentication.RemoteException - communication-related exceptions that may occur during the
execution of a remote method call.public Transaction beforeSpaceAction()
public void beforeSpaceAction(CommonProxyActionInfo action)
public Transaction beforeSpaceAction(Transaction txn)
public boolean equals(Object obj)
equals in class AbstractDirectSpaceProxypublic String getRemoteMemberName()
getRemoteMemberName in interface IDirectSpaceProxypublic IRemoteSpace getRemoteJSpace()
IDirectSpaceProxygetRemoteJSpace in interface IDirectSpaceProxypublic SpaceImpl getSpaceImplIfEmbedded()
getSpaceImplIfEmbedded in interface IDirectSpaceProxypublic boolean isClustered()
ISpaceProxyisClustered in interface ISpaceProxyprotected void finalize()
throws Throwable
public void close()
ISpaceProxyclose in interface ISpaceProxypublic MarshalPivot getMarshalPivot() throws RemoteException
getMarshalPivot in interface MarshalPivotProviderRemoteExceptionpublic ITypeDesc getTypeDescFromServer(String typeName)
getTypeDescFromServer in interface IDirectSpaceProxypublic ITypeDesc registerTypeDescInServers(ITypeDesc typeDesc)
registerTypeDescInServers in interface IDirectSpaceProxypublic Class<?> loadRemoteClass(String className) throws ClassNotFoundException
ISpaceProxyloadRemoteClass in interface ISpaceProxyClassNotFoundExceptionpublic int initWriteModifiers(int modifiers)
initWriteModifiers in interface ISpaceProxypublic DirectSpaceProxyFactory getFactory()
getFactory in interface IDirectSpaceProxypublic SpaceClusterInfo getSpaceClusterInfo()
getSpaceClusterInfo in interface IDirectSpaceProxypublic SpaceProxyRouter getProxyRouter()
getProxyRouter in interface IDirectSpaceProxypublic void initProxyRouter(int partitionId)
public void updateProxyRouter(SpaceProxyRouter oldRouter, ClusterTopology chunksMap)
chunksMap - public void afterClusterInfoChange(SpaceClusterInfo clusterInfo)
IClusterInfoChangedListenerafterClusterInfoChange in interface IClusterInfoChangedListenerpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractDirectSpaceProxyIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractDirectSpaceProxyIOExceptionClassNotFoundExceptionpublic boolean beforeExecute(SpaceOperationRequest<?> spaceRequest, IRemoteSpace targetSpace, int partitionId, String clusterName, boolean isEmbedded) throws RemoteException
RemoteExceptionpublic static void afterExecute(SpaceOperationRequest<?> spaceRequest, IRemoteSpace targetSpace, int partitionId, boolean isRejected)
public void setQuiesceToken(QuiesceToken token)
setQuiesceToken in interface IDirectSpaceProxypublic ISpaceQuery prepareTemplate(Object template)
prepareTemplate in interface IDirectSpaceProxypublic void demote(long maxSuspendTime,
TimeUnit timeUnit,
CredentialsProvider credentialsProvider)
throws DemoteFailedException,
RemoteException
IDirectSpaceProxydemote in interface IDirectSpaceProxymaxSuspendTime - maximum suspend time for the operation to completetimeUnit - max suspend time unit to usecredentialsProvider - security credentials, or null, or EmptyCredentialsProviderDemoteFailedExceptionRemoteExceptionpublic SpaceProxyImpl cloneProxy()
Copyright © GigaSpaces.