public abstract class AbstractSpaceCacheContainer extends AbstractSpaceProxy implements ISpaceCache
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractSpaceCacheContainer.StateMonitor |
| Modifier and Type | Field and Description |
|---|---|
protected String |
_cacheID |
protected org.slf4j.Logger |
_logger |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSpaceCacheContainer(IDirectSpaceProxy remoteProxy,
SpaceCacheConfig config) |
| Modifier and Type | Method and Description |
|---|---|
AbstractSpaceCache |
assertCacheConnected() |
void |
close()
Closes space cache (the local cache).
|
OperationID |
createNewOperationID()
Generate a unique operation ID
|
protected abstract AbstractSpaceCache |
createSpaceCache() |
protected void |
finalize() |
Object |
getAdmin()
Returns the admin object to the remote part of this space.
|
abstract SpaceCacheConfig |
getCacheConfig() |
String |
getCacheId() |
SpaceCacheState |
getCacheState() |
Transaction.Created |
getContextTransaction()
Returns the transaction associated with the current context, if any.
|
IDirectSpaceProxy |
getDirectProxy()
returns itself in case of a direct proxy or the real proxy in case of a local cache or a
view.
|
SpaceURL |
getFinderURL()
Returns the
SpaceURL object which was used as the argument for SpaceFinder.find(SpaceURL) while looking for the space. |
IDirectSpaceProxy |
getLocalSpace()
Returns a direct proxy to the local space.
|
String |
getName()
Returns the name of this space.
|
Object |
getPrivilegedAdmin() |
int |
getReadModifiers()
Gets the proxy ReadModifiers.
|
Uuid |
getReferentUuid()
Returns the unique
Uuid of this space instance. |
IDirectSpaceProxy |
getRemoteSpace()
Returns a direct proxy to the remote space.
|
int |
getUpdateModifiers()
Gets the proxyUpdateModifiers.
|
SpaceURL |
getURL()
Returns the
SpaceURL instance which was used to initialize the space. |
void |
initialize() |
protected abstract org.slf4j.Logger |
initLogger() |
int |
initWriteModifiers(int modifiers) |
boolean |
isCacheContainer() |
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 |
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. |
protected void |
notifyLocalSpaceOnInternalStateChange(SpaceCacheState state) |
void |
onCacheFailure(AbstractSpaceCache failedCache) |
Object |
readById(ReadTakeProxyActionInfo actionInfo) |
Object |
readById(String className,
Object id,
Object routing,
Transaction txn,
long timeout,
int modifiers,
boolean ifExists,
QueryResultTypeInternal resultType,
String[] projections) |
Transaction.Created |
replaceContextTransaction(Transaction.Created transaction) |
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 |
setOptimisticLocking(boolean enabled)
Enable/Disable Optimistic Lock protocol.
|
int |
setReadModifiers(int modifiers)
Sets the read mode modifiers for proxy level.
|
int |
setUpdateModifiers(int modifiers)
Sets the update mode modifiers for proxy level.
|
String |
toString() |
void |
verifyProjectionsAreSupported(AbstractProjectionTemplate projectionTemplate) |
aggregate, applyNotifyInfoDefaults, asyncAddIndexes, asyncChange, asyncRead, asyncTake, change, checkIfConnected, clear, clear, count, count, createActionManager, dropClass, 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, writeMultipleclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNotificationsDirectProxygetCacheTypeNameprotected final org.slf4j.Logger _logger
protected final String _cacheID
protected AbstractSpaceCacheContainer(IDirectSpaceProxy remoteProxy, SpaceCacheConfig config)
protected abstract org.slf4j.Logger initLogger()
public void verifyProjectionsAreSupported(AbstractProjectionTemplate projectionTemplate)
public String getCacheId()
public SpaceCacheState getCacheState()
public abstract SpaceCacheConfig getCacheConfig()
protected void finalize()
throws Throwable
public void close()
ISpaceCacheclose in interface ISpaceCacheclose in interface ISpaceProxypublic AbstractSpaceCache assertCacheConnected() throws SpaceCacheException
SpaceCacheExceptionpublic IDirectSpaceProxy getLocalSpace()
ISpaceCachegetLocalSpace in interface ISpaceCachegetLocalSpace in class AbstractSpaceProxypublic IDirectSpaceProxy getRemoteSpace()
ISpaceCachegetRemoteSpace in interface ISpaceCachegetRemoteSpace in class AbstractSpaceProxypublic void initialize()
throws SpaceCacheInitializationException
public void onCacheFailure(AbstractSpaceCache failedCache)
protected abstract AbstractSpaceCache createSpaceCache() throws SpaceCacheInitializationException
public boolean isEmbedded()
IJSpaceisEmbedded in interface IJSpacepublic boolean isClustered()
ISpaceProxyisClustered in interface ISpaceProxypublic 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 String getName()
IJSpacepublic 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 SpaceURL getURL()
IJSpaceSpaceURL instance which was used to initialize the space.public Uuid getReferentUuid()
IJSpaceUuid of this space instance.getReferentUuid in interface IJSpacepublic 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 IJSpaceRemoteException - if a communication error occurspublic IDirectSpaceProxy getDirectProxy()
IJSpacegetDirectProxy in interface IJSpacepublic Object getPrivilegedAdmin() throws RemoteException
getPrivilegedAdmin in interface ISpaceProxyRemoteExceptionIJSpace.getAdmin()public boolean isFifo()
IJSpacetrue if this proxy FIFO enabled, otherwise false.public void setFifo(boolean enabled)
IJSpacepublic boolean isOptimisticLockingEnabled()
IJSpaceisOptimisticLockingEnabled in interface IJSpacepublic void setOptimisticLocking(boolean enabled)
IJSpacesetOptimisticLocking in interface IJSpacepublic int initWriteModifiers(int modifiers)
initWriteModifiers in interface ISpaceProxypublic Transaction.Created getContextTransaction()
ISpaceProxygetContextTransaction in interface ISpaceProxypublic Transaction.Created replaceContextTransaction(Transaction.Created transaction)
replaceContextTransaction in interface ISpaceProxypublic Transaction.Created replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa)
replaceContextTransaction in interface ISpaceProxypublic void setActionListener(ActionListener actionListener)
ActionMakerActionListener to receive events. Replaces any former
ActionListener if exists.setActionListener in interface ActionMakerpublic int getReadModifiers()
IJSpacegetReadModifiers in interface IJSpacepublic int setReadModifiers(int modifiers)
IJSpacesetReadModifiers in interface IJSpacepublic int getUpdateModifiers()
IJSpacegetUpdateModifiers in interface IJSpacepublic int setUpdateModifiers(int modifiers)
IJSpacesetUpdateModifiers in interface IJSpacepublic 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 Class<?> loadRemoteClass(String className) throws ClassNotFoundException
ISpaceProxyloadRemoteClass in interface ISpaceProxyClassNotFoundExceptionpublic OperationID createNewOperationID()
ISpaceProxycreateNewOperationID in interface ISpaceProxypublic Object readById(ReadTakeProxyActionInfo actionInfo) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException
readById in interface ISpaceProxyreadById in class AbstractSpaceProxyRemoteExceptionUnusableEntryExceptionTransactionExceptionInterruptedExceptionpublic 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
readById in interface ISpaceProxyreadById in class AbstractSpaceProxyRemoteExceptionUnusableEntryExceptionTransactionExceptionInterruptedExceptionpublic boolean isCacheContainer()
isCacheContainer in class AbstractSpaceProxyprotected void notifyLocalSpaceOnInternalStateChange(SpaceCacheState state)
Copyright © GigaSpaces.