Interface ISpaceProxy
- All Superinterfaces:
ActionMaker,IDotnetProxyAssociated,IJSpace,IPojoSpace,JavaSpace,SecuredService
- All Known Subinterfaces:
IDirectSpaceProxy
- All Known Implementing Classes:
AbstractDirectSpaceProxy,AbstractSpaceCacheContainer,AbstractSpaceProxy,LocalCacheContainer,LocalViewContainer,SpaceProxyImpl
public interface ISpaceProxy
extends IJSpace, ActionMaker, SecuredService, IDotnetProxyAssociated, JavaSpace
A space proxy that extends the
IJSpace interface. Operations that need
to be provided by a space proxy but are not exposed as an API through the IJSpace interface should go here.- Author:
- GigaSpaces
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaggregate(Object template, AggregationSet aggregationSet, Transaction txn, int readModifiers) voidapplyNotifyInfoDefaults(NotifyInfo notifyInfo) asyncAddIndexes(String typeName, SpaceIndex[] indexes, AsyncFutureListener<AddTypeIndexesResult> listener) <T> Future<ChangeResult<T>>asyncChange(Object template, ChangeSet changeSet, Transaction txn, long timeout, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) asyncRead(Object template, Transaction transaction, long timeout, int modifiers, AsyncFutureListener listener) Internal methods only.asyncTake(Object template, Transaction transaction, long timeout, int modifiers, AsyncFutureListener listener) Internal methods only.<T> ChangeResult<T>change(Object template, ChangeSet changeSet, Transaction txn, long timeout, ChangeModifiers modifiers) Change entry in spacebooleanvoidclose()Close the proxy and execute necessary cleanup logic.Generate a unique operation IDexecute(SpaceTask task, Object routing, Transaction tx, AsyncFutureListener listener) Executes a task on a single space.execute(SpaceTask task, Object routing, Transaction tx, AsyncFutureListener listener, Map<String, byte[]> classes) Executes a task on a single space.Returns 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.Deprecated.since 7.0.1.Gets an object representing the space health statusgetTypeDescriptor(String typeName) intinitWriteModifiers(int modifiers) booleanreturns true if the proxy is ClusteredClass<?>loadRemoteClass(String className) Loads a remote class from the space, the class will be loaded locally into a corresponding LRMIClassLoaderread(Object template, Transaction txn, long timeout, int modifiers, boolean ifExists) readById(ReadTakeProxyActionInfo actionInfo) readById(String className, Object id, Object routing, Transaction txn, long timeout, int modifiers, boolean ifExists, QueryResultTypeInternal resultType, String[] projections) Object[]readByIds(ReadTakeByIdsProxyActionInfo actionInfo, boolean returnPackets) Object[]readByIds(String className, Object[] ids, Object[] routings, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) Object[]readByIds(String className, Object[] ids, Object routing, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) readByUid(String uid, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPacket) readEntriesUids(ITemplatePacket template, Transaction transaction, int entriesLimit, int modifiers) Read entries UIDs from space.Object[]readMultiple(Object template, Transaction transaction, int limit, int modifiers, boolean returnOnlyUids) Object[]readMultiple(Object template, Transaction transaction, long timeout, int limit, int minEntriesToWaitFor, int modifiers, boolean returnOnlyUids, boolean ifExist) voidregisterTypeDescriptor(ITypeDesc typeDesc) registerTypeDescriptor(Class<?> type) replaceContextTransaction(Transaction.Created transaction) replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa) take(Object template, Transaction txn, long timeout, int modifiers, boolean ifExists) takeById(ReadTakeProxyActionInfo actionInfo) takeById(String className, Object id, Object routing, int version, Transaction txn, long timeout, int modifiers, boolean ifExists, QueryResultTypeInternal resultType, String[] projections) Object[]takeByIds(ReadTakeByIdsProxyActionInfo actionInfo, boolean returnPackets) Object[]takeByIds(String className, Object[] ids, Object[] routings, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) Object[]takeByIds(String className, Object[] ids, Object routing, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) takeByUid(String uid, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPacket) Object[]takeMultiple(Object template, Transaction transaction, int limit, int modifiers, boolean returnOnlyUids) Object[]takeMultiple(Object template, Transaction transaction, long timeout, int limit, int minEntriesToWaitFor, int modifiers, boolean returnOnlyUids, boolean ifExist) voidunregisterTypeDescriptor(String typeName) writeMultiple(Object[] objects, Transaction txn, long lease, long[] leases, long timeout, int modifiers) Methods inherited from interface com.j_spaces.core.client.ActionMaker
setActionListenerMethods inherited from interface com.gigaspaces.serialization.pbs.IDotnetProxyAssociated
getAppDomainId, getDotnetProxyHandleId, hasAssociatedAppDomain, isTargetOfADotnetProxy, setAppDomainId, setDotnetProxyHandleIdMethods inherited from interface com.j_spaces.core.IJSpace
dropClass, getAdmin, getCacheTypeName, getContainerName, getDirectProxy, getFinderURL, getName, getReadModifiers, getReferentUuid, getUpdateModifiers, getURL, isEmbedded, isFifo, isOptimisticLockingEnabled, isSecured, isStartedWithinGSC, ping, setFifo, setOptimisticLocking, setReadModifiers, setUpdateModifiersMethods inherited from interface com.gigaspaces.client.IPojoSpace
clear, clear, count, count, read, read, readIfExists, readIfExists, readMultiple, readMultiple, snapshot, take, take, takeIfExists, takeMultiple, takeMultiple, update, update, updateMultiple, updateMultiple, write, write, writeMultiple, writeMultiple, writeMultipleMethods inherited from interface net.jini.space.JavaSpace
notify, read, readIfExists, snapshot, take, takeIfExists, writeMethods inherited from interface com.gigaspaces.security.service.SecuredService
isServiceSecured, login
-
Method Details
-
getContextTransaction
Transaction.Created getContextTransaction()Returns the transaction associated with the current context, if any. -
replaceContextTransaction
-
replaceContextTransaction
Transaction.Created replaceContextTransaction(Transaction.Created transaction, ActionListener actionListener, boolean delegatedXa) -
isClustered
boolean isClustered()returns true if the proxy is Clustered- Returns:
- true when the proxy is Clustered
-
getNotificationsDirectProxy
IDirectSpaceProxy getNotificationsDirectProxy()returns itself in case of a direct proxy or the real proxy in case of a local cache or a view. -
getPrivilegedAdmin
Deprecated.since 7.0.1. Is not part of current security model.- Throws:
RemoteException- See Also:
-
execute
AsyncFuture execute(SpaceTask task, Object routing, Transaction tx, AsyncFutureListener listener) throws TransactionException, RemoteException Executes a task on a single space.- Parameters:
task- task (non-null) to execute on single space, according to the routing field.tx- transaction (if any) under which to work.listener- event listener to execute result.- Returns:
- future to retrieve the result in an asynchronous way
- Throws:
TransactionException- if a transaction error occursRemoteException- if a communication error occurs
-
execute
AsyncFuture execute(SpaceTask task, Object routing, Transaction tx, AsyncFutureListener listener, Map<String, byte[]> classes) throws TransactionException, RemoteExceptionExecutes a task on a single space.- Parameters:
task- task (non-null) to execute on single space, according to the routing field.tx- transaction (if any) under which to work.listener- event listener to execute result.- Returns:
- future to retrieve the result in an asynchronous way
- Throws:
TransactionException- if a transaction error occursRemoteException- if a communication error occurs
-
close
void close()Close the proxy and execute necessary cleanup logic. -
asyncTake
AsyncFuture asyncTake(Object template, Transaction transaction, long timeout, int modifiers, AsyncFutureListener listener) throws RemoteException Internal methods only. Take any matching entry from the space, unblocking. Returns an AsyncFuture which returns null if the timeout expires.- Parameters:
template- The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").transaction- The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.modifiers- one or a union ofReadModifiers.listener- event listener to execute result.- Returns:
- object from the space
- Throws:
UnusableEntryException- - if any serialized field of the entry being read cannot be deserialized for any reason TransactionException - if a transaction error occurs InterruptedException - if the thread in which the read occurs is interrupted RemoteException - if a communication error occurs IllegalArgumentException - if a negative timeout value is usedRemoteException- Since:
- 6.6
-
asyncRead
AsyncFuture asyncRead(Object template, Transaction transaction, long timeout, int modifiers, AsyncFutureListener listener) throws RemoteException Internal methods only. Read any matching entry from the space, unblocking. Returns an AsyncFuture which returns null if the timeout expires.- Parameters:
template- The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").transaction- The template used for matching. Matching is done against template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.modifiers- one or a union ofReadModifiers.listener- event listener to execute result.- Returns:
- object from the space
- Throws:
UnusableEntryException- - if any serialized field of the entry being read cannot be deserialized for any reason TransactionException - if a transaction error occurs InterruptedException - if the thread in which the read occurs is interrupted RemoteException - if a communication error occurs IllegalArgumentException - if a negative timeout value is usedRemoteException- Since:
- 6.6
-
read
Object read(Object template, Transaction txn, long timeout, int modifiers, boolean ifExists) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException -
take
Object take(Object template, Transaction txn, long timeout, int modifiers, boolean ifExists) throws UnusableEntryException, TransactionException, InterruptedException, RemoteException -
readMultiple
Object[] readMultiple(Object template, Transaction transaction, int limit, int modifiers, boolean returnOnlyUids) throws TransactionException, UnusableEntryException, RemoteException -
readMultiple
Object[] readMultiple(Object template, Transaction transaction, long timeout, int limit, int minEntriesToWaitFor, int modifiers, boolean returnOnlyUids, boolean ifExist) throws TransactionException, UnusableEntryException, RemoteException -
takeMultiple
Object[] takeMultiple(Object template, Transaction transaction, int limit, int modifiers, boolean returnOnlyUids) throws TransactionException, UnusableEntryException, RemoteException -
takeMultiple
Object[] takeMultiple(Object template, Transaction transaction, long timeout, int limit, int minEntriesToWaitFor, int modifiers, boolean returnOnlyUids, boolean ifExist) throws TransactionException, UnusableEntryException, RemoteException -
readById
Object readById(ReadTakeProxyActionInfo actionInfo) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
takeById
Object takeById(ReadTakeProxyActionInfo actionInfo) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
readById
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 -
takeById
Object takeById(String className, Object id, Object routing, int version, Transaction txn, long timeout, int modifiers, boolean ifExists, QueryResultTypeInternal resultType, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
readByUid
Object readByUid(String uid, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPacket) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
takeByUid
Object takeByUid(String uid, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPacket) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
readByIds
Object[] readByIds(String className, Object[] ids, Object routing, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
readByIds
Object[] readByIds(String className, Object[] ids, Object[] routings, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
readByIds
Object[] readByIds(ReadTakeByIdsProxyActionInfo actionInfo, boolean returnPackets) throws RemoteException, TransactionException, InterruptedException, UnusableEntryException -
takeByIds
Object[] takeByIds(String className, Object[] ids, Object routing, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
takeByIds
Object[] takeByIds(String className, Object[] ids, Object[] routings, Transaction txn, int modifiers, QueryResultTypeInternal resultType, boolean returnPackets, String[] projections) throws RemoteException, UnusableEntryException, TransactionException, InterruptedException -
takeByIds
Object[] takeByIds(ReadTakeByIdsProxyActionInfo actionInfo, boolean returnPackets) throws RemoteException, TransactionException, InterruptedException, UnusableEntryException -
writeMultiple
LeaseContext[] writeMultiple(Object[] objects, Transaction txn, long lease, long[] leases, long timeout, int modifiers) throws TransactionException, RemoteException - Throws:
TransactionExceptionRemoteException
-
getSpaceHealthStatus
Gets an object representing the space health status- Returns:
- object representing the space health status
- Throws:
RemoteException
-
getTypeDescriptor
- Throws:
RemoteException
-
registerTypeDescriptor
- Throws:
RemoteException
-
registerTypeDescriptor
- Throws:
RemoteException
-
unregisterTypeDescriptor
- Throws:
RemoteException
-
asyncAddIndexes
AsyncFuture<AddTypeIndexesResult> asyncAddIndexes(String typeName, SpaceIndex[] indexes, AsyncFutureListener<AddTypeIndexesResult> listener) throws RemoteException - Throws:
RemoteException
-
loadRemoteClass
Loads a remote class from the space, the class will be loaded locally into a corresponding LRMIClassLoader- Throws:
ClassNotFoundException- Since:
- 8.0.1
-
applyNotifyInfoDefaults
-
checkIfConnected
boolean checkIfConnected() -
createNewOperationID
OperationID createNewOperationID()Generate a unique operation ID- Returns:
- Unique operation ID
-
initWriteModifiers
int initWriteModifiers(int modifiers) -
readEntriesUids
ReadTakeEntriesUidsResult readEntriesUids(ITemplatePacket template, Transaction transaction, int entriesLimit, int modifiers) throws RemoteException, TransactionException, UnusableEntryException Read entries UIDs from space.- Throws:
RemoteExceptionTransactionExceptionUnusableEntryException- Since:
- 9.0
-
change
<T> ChangeResult<T> change(Object template, ChangeSet changeSet, Transaction txn, long timeout, ChangeModifiers modifiers) throws RemoteException, TransactionException Change entry in space- Throws:
RemoteExceptionTransactionException- Since:
- 9.1
-
asyncChange
<T> Future<ChangeResult<T>> asyncChange(Object template, ChangeSet changeSet, Transaction txn, long timeout, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) throws RemoteException - Throws:
RemoteException
-
aggregate
AggregationResult aggregate(Object template, AggregationSet aggregationSet, Transaction txn, int readModifiers) throws RemoteException, TransactionException, InterruptedException
-