Class AbstractSpaceCacheContainer
java.lang.Object
com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy
com.gigaspaces.internal.client.cache.AbstractSpaceCacheContainer
- All Implemented Interfaces:
IPojoSpace, ISpaceCache, ISpaceProxy, SecuredService, IDotnetProxyAssociated, ActionMaker, IJSpace, JavaSpace
- Direct Known Subclasses:
LocalCacheContainer, LocalViewContainer
- Since:
- 8.0.5
- Author:
- Niv Ingberg
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSpaceCacheContainer(IDirectSpaceProxy remoteProxy, SpaceCacheConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the proxy and execute necessary cleanup logic.////////////////////////////////////////////protected abstract AbstractSpaceCacheprotected voidfinalize()getAdmin()Returns the admin object to the remote part of this space.abstract SpaceCacheConfigReturns the transaction associated with the current context, if any.returns itself in case of a direct proxy or the real proxy in case of a local cache or a view.Returns theSpaceURLobject which was used as the argument forSpaceFinder.find(SpaceURL)while looking for the space.Returns a direct proxy to the local space.getName()Returns the name of this space.int////////////////////////////////////////////////Returns the uniqueUuidof this space instance.Returns a direct proxy to the remote space.intGets the proxyUpdateModifiers.getURL()Returns theSpaceURLinstance which was used to initialize the space.voidprotected abstract org.slf4j.LoggerintinitWriteModifiers(int modifiers) booleanbooleanreturns true if the proxy is Clusteredboolean/////////////////////////////////////////////////booleanisFifo()Returnstrueif this proxy FIFO enabled, otherwisefalse.booleanReturns status of Optimistic Lock protocol.booleanReturns an indication : is this space secured.booleanIf a security model is defined will returntrue.booleanReturns 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 LRMIClassLoaderlogin(CredentialsProvider credentialsProvider) ////////////////////////////////////////////protected voidvoidonCacheFailure(AbstractSpaceCache failedCache) readById(ReadTakeProxyActionInfo actionInfo) readById(String className, Object id, Object routing, Transaction txn, long timeout, int modifiers, boolean ifExists, QueryResultTypeInternal resultType, String[] projections) replaceContextTransaction(Transaction.Created transaction) replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa) voidsetActionListener(ActionListener actionListener) Sets a newActionListenerto receive events.voidsetFifo(boolean enabled) Sets FIFO mode for proxy.voidsetOptimisticLocking(boolean enabled) Enable/Disable Optimistic Lock protocol.intsetReadModifiers(int modifiers) Sets the read mode modifiers for proxy level.intsetUpdateModifiers(int modifiers) Sets the update mode modifiers for proxy level.toString()voidverifyProjectionsAreSupported(AbstractProjectionTemplate projectionTemplate) Methods inherited from class AbstractSpaceProxy
aggregate, applyNotifyInfoDefaults, asyncAddIndexes, asyncChange, asyncRead, asyncTake, change, checkIfConnected, clear, clear, clear, count, count, createActionManager, dropClass, execute, execute, getAppDomainId, getContainerName, getDotnetProxyHandleId, getSpaceHealthStatus, getTypeDescriptor, hasAssociatedAppDomain, isLocalCacheCacheContainer, isLocalViewContainer, isTargetOfADotnetProxy, notify, ping, read, read, read, read, 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, writeMultipleMethods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IJSpace
getCacheTypeNameMethods inherited from interface ISpaceProxy
getNotificationsDirectProxy
-
Field Details
-
_logger
protected final org.slf4j.Logger _logger -
_cacheID
-
-
Constructor Details
-
AbstractSpaceCacheContainer
-
-
Method Details
-
initLogger
protected abstract org.slf4j.Logger initLogger() -
verifyProjectionsAreSupported
-
getCacheId
-
getCacheState
-
getCacheConfig
-
finalize
-
toString
-
close
public void close()Description copied from interface:ISpaceProxyClose the proxy and execute necessary cleanup logic.- Specified by:
closein interfaceISpaceCache- Specified by:
closein interfaceISpaceProxy
-
assertCacheConnected
- Throws:
SpaceCacheException
-
getLocalSpace
Description copied from interface:ISpaceCacheReturns a direct proxy to the local space.- Specified by:
getLocalSpacein interfaceISpaceCache- Overrides:
getLocalSpacein classAbstractSpaceProxy
-
getRemoteSpace
Description copied from interface:ISpaceCacheReturns a direct proxy to the remote space.- Specified by:
getRemoteSpacein interfaceISpaceCache- Overrides:
getRemoteSpacein classAbstractSpaceProxy
-
initialize
-
onCacheFailure
-
createSpaceCache
-
isEmbedded
public boolean isEmbedded()/////////////////////////////////////////////////- Specified by:
isEmbeddedin interfaceIJSpace
-
isClustered
public boolean isClustered()Description copied from interface:ISpaceProxyreturns true if the proxy is Clustered- Specified by:
isClusteredin interfaceISpaceProxy- Returns:
- true when the proxy is Clustered
-
isSecured
-
isServiceSecured
Description copied from interface:SecuredServiceIf a security model is defined will returntrue.- Specified by:
isServiceSecuredin interfaceSecuredService- Returns:
trueif secured;falseotherwise.- Throws:
RemoteException- communication-related exceptions that may occur during the execution of a remote method call.
-
isStartedWithinGSC
Description copied from interface:IJSpaceReturns true if the space started within a GSC.- Specified by:
isStartedWithinGSCin interfaceIJSpace- Throws:
RemoteException
-
getName
-
getFinderURL
Description copied from interface:IJSpaceReturns theSpaceURLobject which was used as the argument forSpaceFinder.find(SpaceURL)while looking for the space. If a client uses thisSpaceURLwhen it calls toSpaceFinder.find(SpaceURL)it should be able to find that space. Notice: TheSpaceURLreturned when calling getURL() is different since in that case it returns theSpaceURLused to initialize the space (a java:// protocol to start an embedded space).- Specified by:
getFinderURLin interfaceIJSpace- Returns:
SpaceURLobject which can be used to find the space proxy while callingSpaceFinder.find(SpaceURL)
-
getURL
-
getReferentUuid
Description copied from interface:IJSpaceReturns the uniqueUuidof this space instance.- Specified by:
getReferentUuidin interfaceIJSpace
-
getAdmin
Description copied from interface:IJSpaceReturns the admin object to the remote part of this space.// get a list of classes and the number of entries of each classIRemoteJSpaceAdminremoteAdmin = (IRemoteJSpaceAdmin)serverAdmin.getAdmin(); Object classList[] = remoteAdmin.getRuntimeInfo().m_ClassNames.toArray(); List numOFEntries = remoteAdmin.getRuntimeInfo().m_NumOFEntries;- Specified by:
getAdminin interfaceIJSpace- Returns:
- the remoteAdmin object to the remote part of this space.
- Throws:
RemoteException- if a communication error occurs
-
getDirectProxy
Description copied from interface:IJSpacereturns itself in case of a direct proxy or the real proxy in case of a local cache or a view.- Specified by:
getDirectProxyin interfaceIJSpace- Returns:
- IDirectSpaceProxy
-
getPrivilegedAdmin
- Specified by:
getPrivilegedAdminin interfaceISpaceProxy- Throws:
RemoteException- See Also:
-
isFifo
-
setFifo
-
isOptimisticLockingEnabled
public boolean isOptimisticLockingEnabled()Description copied from interface:IJSpaceReturns status of Optimistic Lock protocol.- Specified by:
isOptimisticLockingEnabledin interfaceIJSpace
-
setOptimisticLocking
public void setOptimisticLocking(boolean enabled) Description copied from interface:IJSpaceEnable/Disable Optimistic Lock protocol.- Specified by:
setOptimisticLockingin interfaceIJSpace
-
initWriteModifiers
public int initWriteModifiers(int modifiers) - Specified by:
initWriteModifiersin interfaceISpaceProxy
-
getContextTransaction
Description copied from interface:ISpaceProxyReturns the transaction associated with the current context, if any.- Specified by:
getContextTransactionin interfaceISpaceProxy
-
replaceContextTransaction
- Specified by:
replaceContextTransactionin interfaceISpaceProxy
-
replaceContextTransaction
public Transaction.Created replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa) - Specified by:
replaceContextTransactionin interfaceISpaceProxy
-
setActionListener
Description copied from interface:ActionMakerSets a newActionListenerto receive events. Replaces any formerActionListenerif exists.- Specified by:
setActionListenerin interfaceActionMaker
-
getReadModifiers
public int getReadModifiers()////////////////////////////////////////////////- Specified by:
getReadModifiersin interfaceIJSpace
-
setReadModifiers
public int setReadModifiers(int modifiers) Description copied from interface:IJSpaceSets the read mode modifiers for proxy level.- Specified by:
setReadModifiersin interfaceIJSpace
-
getUpdateModifiers
public int getUpdateModifiers()Description copied from interface:IJSpaceGets the proxyUpdateModifiers.- Specified by:
getUpdateModifiersin interfaceIJSpace
-
setUpdateModifiers
public int setUpdateModifiers(int modifiers) Description copied from interface:IJSpaceSets the update mode modifiers for proxy level.- Specified by:
setUpdateModifiersin interfaceIJSpace
-
login
////////////////////////////////////////////- Specified by:
loginin interfaceSecuredService- Parameters:
credentialsProvider- provides credentials to be used for authentication.- Throws:
RemoteException- communication-related exceptions that may occur during the execution of a remote method call.
-
loadRemoteClass
Description copied from interface:ISpaceProxyLoads a remote class from the space, the class will be loaded locally into a corresponding LRMIClassLoader- Specified by:
loadRemoteClassin interfaceISpaceProxy- Throws:
ClassNotFoundException
-
createNewOperationID
////////////////////////////////////////////- Specified by:
createNewOperationIDin interfaceISpaceProxy- Returns:
- Unique operation ID
-
readById
public Object readById(ReadTakeProxyActionInfo actionInfo) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException - Specified by:
readByIdin interfaceISpaceProxy- Overrides:
readByIdin classAbstractSpaceProxy- Throws:
RemoteExceptionUnusableEntryExceptionTransactionExceptionInterruptedException
-
readById
public Object readById(String className, Object id, Object routing, Transaction txn, long timeout, int modifiers, boolean ifExists, QueryResultTypeInternal resultType, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException - Specified by:
readByIdin interfaceISpaceProxy- Overrides:
readByIdin classAbstractSpaceProxy- Throws:
RemoteExceptionUnusableEntryExceptionTransactionExceptionInterruptedException
-
isCacheContainer
public boolean isCacheContainer()- Overrides:
isCacheContainerin classAbstractSpaceProxy
-
notifyLocalSpaceOnInternalStateChange
-