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) |
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() |
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, toString
aggregate, 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, writeMultiple
aggregate, 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, writeMultiple
dropClass, getContainerName, ping
clear, clear, count, count, read, read, readIfExists, readIfExists, readMultiple, readMultiple, snapshot, take, take, takeIfExists, takeMultiple, takeMultiple, update, update, updateMultiple, updateMultiple, write, write, writeMultiple, writeMultiple, writeMultiple
getAppDomainId, getDotnetProxyHandleId, hasAssociatedAppDomain, isTargetOfADotnetProxy, setAppDomainId, setDotnetProxyHandleId
notify, read, readIfExists, snapshot, take, takeIfExists, write
public SpaceProxyImpl(DirectSpaceProxyFactoryImpl factory, ProxySettings proxySettings)
public ExecutorService getThreadPool()
getThreadPool
in interface IDirectSpaceProxy
public IDirectSpaceProxy getDirectProxy()
IJSpace
getDirectProxy
in interface IJSpace
public String getCacheTypeName()
getCacheTypeName
in interface IJSpace
public IDirectSpaceProxy getNotificationsDirectProxy()
ISpaceProxy
getNotificationsDirectProxy
in interface ISpaceProxy
public IQueryManager getQueryManager()
getQueryManager
in interface IDirectSpaceProxy
public SpaceProxyDataEventsManager getDataEventsManager()
getDataEventsManager
in interface IDirectSpaceProxy
public IProxySecurityManager getSecurityManager()
getSecurityManager
in interface IDirectSpaceProxy
public ISpaceProxyTypeManager getTypeManager()
getTypeManager
in interface IDirectSpaceProxy
public void setActionListener(ActionListener actionListener)
ActionMaker
ActionListener
to receive events. Replaces any former
ActionListener
if exists.setActionListener
in interface ActionMaker
public Transaction.Created getContextTransaction()
ISpaceProxy
getContextTransaction
in interface ISpaceProxy
public Transaction.Created replaceContextTransaction(Transaction.Created txn)
replaceContextTransaction
in interface ISpaceProxy
public Transaction.Created replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa)
replaceContextTransaction
in interface ISpaceProxy
public Uuid getReferentUuid()
IJSpace
Uuid
of this space instance.getReferentUuid
in interface IJSpace
getReferentUuid
in interface ReferentUuid
Uuid
associated with the resource this proxy represents. Will not
return null
.public String getName()
IJSpace
public boolean isEmbedded()
IJSpace
isEmbedded
in interface IJSpace
public boolean isSecured()
IJSpace
public boolean isServiceSecured() throws RemoteException
SecuredService
true
.isServiceSecured
in interface SecuredService
true
if secured; false
otherwise.RemoteException
- communication-related exceptions that may occur during the execution
of a remote method call.public boolean isStartedWithinGSC() throws RemoteException
IJSpace
isStartedWithinGSC
in interface IJSpace
RemoteException
public 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 IJSpace
getAdmin
in interface Administrable
RemoteException
- if a communication error occursJoinAdmin
public Object getPrivilegedAdmin() throws RemoteException
getPrivilegedAdmin
in interface ISpaceProxy
RemoteException
IJSpace.getAdmin()
public IJSpace getNonClusteredProxy()
IDirectSpaceProxy
getNonClusteredProxy
in interface IDirectSpaceProxy
public IJSpace getClusteredProxy()
IDirectSpaceProxy
getClusteredProxy
in interface IDirectSpaceProxy
public IStubHandler getStubHandler()
IDirectSpaceProxy
getStubHandler
in interface IDirectSpaceProxy
public IJSpaceContainer getContainer()
IDirectSpaceProxy
getContainer
in interface IDirectSpaceProxy
public void shutdown() throws RemoteException
shutdown
in interface IDirectSpaceProxy
RemoteException
public ContainerConfig getContainerConfig() throws RemoteException
getContainerConfig
in interface IDirectSpaceProxy
RemoteException
public SpaceURL getContainerURL() throws RemoteException
getContainerURL
in interface IDirectSpaceProxy
RemoteException
public SpaceURL getFinderURL()
IJSpace
SpaceURL
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 IJSpace
SpaceURL
object which can be used to find the space proxy while calling
SpaceFinder.find(SpaceURL)
public void setFinderURL(SpaceURL _finderurl)
public SpaceURL getURL()
IJSpace
SpaceURL
instance which was used to initialize the space.public boolean isOptimisticLockingEnabled()
IJSpace
isOptimisticLockingEnabled
in interface IJSpace
public void setOptimisticLocking(boolean enabled)
IJSpace
setOptimisticLocking
in interface IJSpace
public boolean isFifo()
IJSpace
true
if this proxy FIFO enabled, otherwise false
.public void setFifo(boolean enabled)
IJSpace
public int getReadModifiers()
IJSpace
getReadModifiers
in interface IJSpace
public int setReadModifiers(int readModifiers)
IJSpace
setReadModifiers
in interface IJSpace
public int getUpdateModifiers()
IJSpace
getUpdateModifiers
in interface IJSpace
public int setUpdateModifiers(int newModifiers)
IJSpace
setUpdateModifiers
in interface IJSpace
public boolean isGatewayProxy()
isGatewayProxy
in interface IDirectSpaceProxy
public void setGatewayProxy()
public Object getVersion()
getVersion
in interface SameProxyVersionProvider
protected AbstractSpaceProxyActionManager<SpaceProxyImpl> createActionManager()
createActionManager
in class AbstractSpaceProxy
public OperationID createNewOperationID()
ISpaceProxy
createNewOperationID
in interface ISpaceProxy
public long getClientID()
getClientID
in interface IDirectSpaceProxy
public void directClean()
directClean
in interface IDirectSpaceProxy
public void directDropClass(String className)
public SecurityContext login(CredentialsProvider credentialsProvider) throws RemoteException
SecuredService
credentialsProvider
.login
in interface SecuredService
credentialsProvider
- 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 AbstractDirectSpaceProxy
public String getRemoteMemberName()
getRemoteMemberName
in interface IDirectSpaceProxy
public IRemoteSpace getRemoteJSpace()
IDirectSpaceProxy
getRemoteJSpace
in interface IDirectSpaceProxy
public SpaceImpl getSpaceImplIfEmbedded()
getSpaceImplIfEmbedded
in interface IDirectSpaceProxy
public boolean isClustered()
ISpaceProxy
isClustered
in interface ISpaceProxy
protected void finalize() throws Throwable
public void close()
ISpaceProxy
close
in interface ISpaceProxy
public MarshalPivot getMarshalPivot() throws RemoteException
getMarshalPivot
in interface MarshalPivotProvider
RemoteException
public ITypeDesc getTypeDescFromServer(String typeName)
getTypeDescFromServer
in interface IDirectSpaceProxy
public ITypeDesc registerTypeDescInServers(ITypeDesc typeDesc)
registerTypeDescInServers
in interface IDirectSpaceProxy
public Class<?> loadRemoteClass(String className) throws ClassNotFoundException
ISpaceProxy
loadRemoteClass
in interface ISpaceProxy
ClassNotFoundException
public int initWriteModifiers(int modifiers)
initWriteModifiers
in interface ISpaceProxy
public DirectSpaceProxyFactory getFactory()
getFactory
in interface IDirectSpaceProxy
public SpaceClusterInfo getSpaceClusterInfo()
getSpaceClusterInfo
in interface IDirectSpaceProxy
public SpaceProxyRouter getProxyRouter()
getProxyRouter
in interface IDirectSpaceProxy
public void updateProxyRouter(SpaceProxyRouter oldRouter, ClusterTopology chunksMap)
chunksMap
- public void afterClusterInfoChange(SpaceClusterInfo clusterInfo)
IClusterInfoChangedListener
afterClusterInfoChange
in interface IClusterInfoChangedListener
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class AbstractDirectSpaceProxy
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class AbstractDirectSpaceProxy
IOException
ClassNotFoundException
public boolean beforeExecute(SpaceOperationRequest<?> spaceRequest, IRemoteSpace targetSpace, int partitionId, String clusterName, boolean isEmbedded) throws RemoteException
RemoteException
public static void afterExecute(SpaceOperationRequest<?> spaceRequest, IRemoteSpace targetSpace, int partitionId, boolean isRejected)
public void setQuiesceToken(QuiesceToken token)
setQuiesceToken
in interface IDirectSpaceProxy
public ISpaceQuery prepareTemplate(Object template)
prepareTemplate
in interface IDirectSpaceProxy
public void demote(long maxSuspendTime, TimeUnit timeUnit, CredentialsProvider credentialsProvider) throws DemoteFailedException, RemoteException
IDirectSpaceProxy
demote
in interface IDirectSpaceProxy
maxSuspendTime
- maximum suspend time for the operation to completetimeUnit
- max suspend time unit to usecredentialsProvider
- security credentials, or null
, or EmptyCredentialsProvider
DemoteFailedException
RemoteException
Copyright © GigaSpaces.