GigaSpaces XAP 9.1 API

org.openspaces.core
Class DefaultGigaSpace

java.lang.Object
  extended by org.openspaces.core.DefaultGigaSpace
All Implemented Interfaces:
GigaSpace, org.openspaces.core.internal.InternalGigaSpace

public class DefaultGigaSpace
extends Object
implements GigaSpace, org.openspaces.core.internal.InternalGigaSpace

Default implementation of GigaSpace. Constructed with IJSpace, TransactionProvider and ExceptionTranslator.

Operations are delegated to IJSpace with transactions acquired using TransactionProvider. Any exceptions thrown during the operations are translated using ExceptionTranslator.

Allows to set default timeouts for read and take operations and default lease for write operation.

Author:
kimchy

Constructor Summary
DefaultGigaSpace(IJSpace space, TransactionProvider txProvider, ExceptionTranslator exTranslator, int defaultIsolationLevel)
          Constructs a new DefaultGigaSpace implementation.
 
Method Summary
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, long timeout)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> Future<ChangeResult<T>>
asyncChange(IdQuery<T> query, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener)
          Changes an existing object in space in an asynchronous manner, returning immidiately with a future.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout, int modifiers, AsyncFutureListener<T> listener)
           
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template, long timeout)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template, long timeout, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template, long timeout, int modifiers)
           
<T> AsyncFuture<T>
asyncRead(T template, long timeout, int modifiers, AsyncFutureListener<T> listener)
           
<T> AsyncFuture<T>
asyncRead(T template, long timeout, ReadModifiers modifiers)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncRead(T template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener)
          Reads any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout, int modifiers, AsyncFutureListener<T> listener)
           
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template, long timeout)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template, long timeout, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template, long timeout, int modifiers)
           
<T> AsyncFuture<T>
asyncTake(T template, long timeout, int modifiers, AsyncFutureListener<T> listener)
           
<T> AsyncFuture<T>
asyncTake(T template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> AsyncFuture<T>
asyncTake(T template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener)
          Take (remove) any matching entry from the space in an asynchronous manner.
<T> ChangeResult<T>
change(IdQuery<T> query, ChangeSet changeSet)
          Changes an existing object in space, returning a change result which provides details of the operation affect.
<T> ChangeResult<T>
change(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers)
          Changes an existing object in space, returning a change result which provides details of the operation affect.
<T> ChangeResult<T>
change(IdQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout)
          Changes an existing object in space, returning a change result which provides details of the operation affect.
<T> ChangeResult<T>
change(IdQuery<T> query, ChangeSet changeSet, long timeout)
          Changes an existing object in space, returning a change result which provides details of the operation affect.
 void clear(Object template)
          Removes the entries that match the specified template and the specified transaction from this space.
 int clear(Object template, ClearModifiers modifiers)
          Removes the entries that match the specified template and the specified transaction from this space.
 int clear(Object template, int modifiers)
           
 int count(Object template)
          Count any matching entry from the space.
 int count(Object template, CountModifiers modifiers)
          Count any matching entries from the space.
 int count(Object template, int modifiers)
           
<T extends Serializable,R>
AsyncFuture<R>
distExecute(DistributedTask<T,R> task, AsyncFutureListener<R> listener)
           
<T extends Serializable,R>
AsyncFuture<R>
execute(DistributedTask<T,R> task)
          Executes the task on all the primary space nodes within the cluster (broadcast).
<T extends Serializable,R>
AsyncFuture<R>
execute(DistributedTask<T,R> task, AsyncFutureListener<R> listener)
           
<T extends Serializable,R>
AsyncFuture<R>
execute(DistributedTask<T,R> task, Object... routings)
          Executes a task on all the nodes that correspond to the list of routing values.
<T extends Serializable>
AsyncFuture<T>
execute(Task<T> task)
          Executes a task on a specific space node.
<T extends Serializable>
AsyncFuture<T>
execute(Task<T> task, AsyncFutureListener<T> listener)
          Executes a task on a specific space node.
<T extends Serializable>
AsyncFuture<T>
execute(Task<T> task, Object routing)
          Executes a task on a specific space node.
<T extends Serializable>
AsyncFuture<T>
execute(Task<T> task, Object routing, AsyncFutureListener<T> listener)
          Executes a task on a specific space node.
<T extends Serializable,R>
ExecutorBuilder<T,R>
executorBuilder(AsyncResultsReducer<T,R> reducer)
          Constructs an executor builder allowing to accumulate different tasks required to be executed into a single execute mechanism with all the results reduced by the reducer provided.
 GigaSpace getClustered()
          Returns a clustered view of this GigaSpace instance.
 Transaction getCurrentTransaction()
          Returns the current running transaction.
 ExceptionTranslator getExceptionTranslator()
          Returns the exception translator associated with this GigaSpace instance.
 int getModifiersForIsolationLevel()
          Gets the isolation level from the current running transaction (enabling the usage of Spring declarative isolation level settings).
 String getName()
          Returns the name of the GigaSpace.
 IJSpace getSpace()
          Returns the IJSpace used by this GigaSpace implementation to delegate different space operations.
 TransactionProvider getTxProvider()
          Returns the transaction provider allowing to access the current running transaction.
 GigaSpaceTypeManager getTypeManager()
          Gets the type manager of this GigaSpace instance.
 IteratorBuilder iterator()
          Returns an iterator builder allowing to configure and create a GSIterator over the Space.
<T> T
read(ISpaceQuery<T> template)
          Read any matching object from the space, blocking until one exists.
<T> T
read(ISpaceQuery<T> template, long timeout)
          Read any matching object from the space, blocking until one exists.
<T> T
read(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> T
read(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
          Read any matching object from the space, blocking until one exists.
<T> T
read(T template)
          Read any matching object from the space, blocking until one exists.
<T> T
read(T template, long timeout)
          Read any matching object from the space, blocking until one exists.
<T> T
read(T template, long timeout, int modifiers)
           
<T> T
read(T template, long timeout, ReadModifiers modifiers)
          Read any matching object from the space, blocking until one exists.
<T> T
readById(Class<T> clazz, Object id)
          Read an object from the space matching its id and the class.
<T> T
readById(Class<T> clazz, Object id, Object routing)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readById(Class<T> clazz, Object id, Object routing, long timeout)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readById(Class<T> clazz, Object id, Object routing, long timeout, int modifiers)
           
<T> T
readById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readById(IdQuery<T> query)
          Read an object from the space matching the specified id query.
<T> T
readById(IdQuery<T> query, long timeout)
          Read an object from the space matching the specified id query.
<T> T
readById(IdQuery<T> query, long timeout, int modifiers)
           
<T> T
readById(IdQuery<T> query, long timeout, ReadModifiers modifiers)
          Read an object from the space matching the specified id query.
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids)
          Read objects from the space matching their IDs and the specified class.
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, int modifiers)
           
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object routing)
          Read objects from the space matching their IDs, the specified class and routing key.
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object[] routings)
          Read objects from the space matching their IDs, the specified class and the routing keys.
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object[] routings, int modifiers)
           
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object[] routings, ReadModifiers modifiers)
          Read objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object routing, int modifiers)
           
<T> ReadByIdsResult<T>
readByIds(Class<T> clazz, Object[] ids, Object routing, ReadModifiers modifiers)
          Read objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.
<T> ReadByIdsResult<T>
readByIds(IdsQuery<T> query)
          Read objects from the space matching the specified IDs query.
<T> ReadByIdsResult<T>
readByIds(IdsQuery<T> query, int modifiers)
           
<T> ReadByIdsResult<T>
readByIds(IdsQuery<T> query, ReadModifiers modifiers)
          Read objects from the space matching the specified IDs query, with the provided ReadModifiers.
<T> T
readIfExists(ISpaceQuery<T> template)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExists(ISpaceQuery<T> template, long timeout)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExists(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> T
readIfExists(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExists(T template)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExists(T template, long timeout)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExists(T template, long timeout, int modifiers)
           
<T> T
readIfExists(T template, long timeout, ReadModifiers modifiers)
          Read any matching object from the space, returning null if there currently is none.
<T> T
readIfExistsById(Class<T> clazz, Object id)
          Read an object from the space matching its id and the class.
<T> T
readIfExistsById(Class<T> clazz, Object id, Object routing)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, int modifiers)
           
<T> T
readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers)
          Read an object from the space matching its id, the class and the routing value.
<T> T
readIfExistsById(IdQuery<T> query)
          Read an object from the space matching the specified id query.
<T> T
readIfExistsById(IdQuery<T> query, long timeout)
          Read an object from the space matching the specified id query.
<T> T
readIfExistsById(IdQuery<T> query, long timeout, int modifiers)
           
<T> T
readIfExistsById(IdQuery<T> query, long timeout, ReadModifiers modifiers)
          Read an object from the space matching the specified id query.
<T> T[]
readMultiple(ISpaceQuery<T> template)
          Read any matching entries from the space.
<T> T[]
readMultiple(ISpaceQuery<T> template, int maxEntries)
          Read any matching entries from the space.
<T> T[]
readMultiple(ISpaceQuery<T> template, int maxEntries, int modifiers)
           
<T> T[]
readMultiple(ISpaceQuery<T> template, int maxEntries, ReadModifiers modifiers)
          Read any matching entries from the space.
<T> T[]
readMultiple(T template)
          Read any matching entries from the space.
<T> T[]
readMultiple(T template, int maxEntries)
          Read any matching entries from the space.
<T> T[]
readMultiple(T template, int maxEntries, int modifiers)
           
<T> T[]
readMultiple(T template, int maxEntries, ReadModifiers modifiers)
          Read any matching entries from the space.
 void setDefaultReadTimeout(long defaultReadTimeout)
          Sets the default read timeout when executing read(Object) or readIfExists(Object) operations.
 void setDefaultTakeTimeout(long defaultTakeTimeout)
          Sets the default take timeout when executing take(Object) or takeIfExists(Object) operations.
 void setDefaultWriteLease(long defaultWriteLease)
          Sets the default write lease when executing write(Object).
 void setName(String name)
           
<T> ISpaceQuery<T>
snapshot(Object entry)
          The process of serializing an entry for transmission to a JavaSpaces service will be identical if the same entry is used twice.
<T> T
take(ISpaceQuery<T> template)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
take(ISpaceQuery<T> template, long timeout)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
take(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> T
take(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
take(T template)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
take(T template, long timeout)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
take(T template, long timeout, int modifiers)
           
<T> T
take(T template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space, blocking until one exists.
<T> T
takeById(Class<T> clazz, Object id)
          Take (remove) an object from the space matching its id and the class.
<T> T
takeById(Class<T> clazz, Object id, Object routing)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeById(Class<T> clazz, Object id, Object routing, long timeout)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeById(Class<T> clazz, Object id, Object routing, long timeout, int modifiers)
           
<T> T
takeById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeById(IdQuery<T> query)
          Take (remove) an object from the space matching the specified id query.
<T> T
takeById(IdQuery<T> query, long timeout)
          Take (remove) an object from the space matching the specified id query.
<T> T
takeById(IdQuery<T> query, long timeout, int modifiers)
           
<T> T
takeById(IdQuery<T> query, long timeout, TakeModifiers modifiers)
          Take (remove) an object from the space matching the specified id query.
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids)
          Take (remove) objects from the space matching their IDs and the specified class.
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, int modifiers)
           
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object routing)
          Take (remove) objects from the space matching their IDs, the specified class and routing key.
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object[] routings)
          Take (remove) objects from the space matching their IDs, the specified class and the routing keys.
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object[] routings, int modifiers)
           
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object[] routings, TakeModifiers modifiers)
          Take (remove) objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object routing, int modifiers)
           
<T> TakeByIdsResult<T>
takeByIds(Class<T> clazz, Object[] ids, Object routing, TakeModifiers modifiers)
          Take (remove) objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.
<T> TakeByIdsResult<T>
takeByIds(IdsQuery<T> query)
          Take (remove) objects from the space matching the specified IDs query.
<T> TakeByIdsResult<T>
takeByIds(IdsQuery<T> query, int modifiers)
           
<T> TakeByIdsResult<T>
takeByIds(IdsQuery<T> query, TakeModifiers modifiers)
          Take (remove) objects from the space matching the specified IDs query, with the provided ReadModifiers.
<T> T
takeIfExists(ISpaceQuery<T> template)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExists(ISpaceQuery<T> template, long timeout)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExists(ISpaceQuery<T> template, long timeout, int modifiers)
           
<T> T
takeIfExists(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExists(T template)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExists(T template, long timeout)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExists(T template, long timeout, int modifiers)
           
<T> T
takeIfExists(T template, long timeout, TakeModifiers modifiers)
          Take (remove) any matching entry from the space, returning null if there currently is none.
<T> T
takeIfExistsById(Class<T> clazz, Object id)
          Take (remove) an object from the space matching its id and the class.
<T> T
takeIfExistsById(Class<T> clazz, Object id, Object routing)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, int modifiers)
           
<T> T
takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers)
          Take (remove) an object from the space matching its id, the class and the routing value.
<T> T
takeIfExistsById(IdQuery<T> query)
          Take (remove) an object from the space matching the specified id query.
<T> T
takeIfExistsById(IdQuery<T> query, long timeout)
          Take (remove) an object from the space matching the specified id query.
<T> T
takeIfExistsById(IdQuery<T> query, long timeout, int modifiers)
           
<T> T
takeIfExistsById(IdQuery<T> query, long timeout, TakeModifiers modifiers)
          Take (remove) an object from the space matching the specified id query.
<T> T[]
takeMultiple(ISpaceQuery<T> template)
          Takes (removes) all the entries matching the specified template from this space.
<T> T[]
takeMultiple(ISpaceQuery<T> template, int maxEntries)
          Takes (removes) all the entries matching the specified template from this space.
<T> T[]
takeMultiple(ISpaceQuery<T> template, int maxEntries, int modifiers)
           
<T> T[]
takeMultiple(ISpaceQuery<T> template, int maxEntries, TakeModifiers modifiers)
          Takes (removes) all the entries matching the specified template from this space.
<T> T[]
takeMultiple(T template)
          Takes (removes) all the entries matching the specified template from this space.
<T> T[]
takeMultiple(T template, int maxEntries)
          Takes (removes) all the entries matching the specified template from this space.
<T> T[]
takeMultiple(T template, int maxEntries, int modifiers)
           
<T> T[]
takeMultiple(T template, int maxEntries, TakeModifiers modifiers)
          Takes (removes) all the entries matching the specified template from this space.
 String toString()
           
<T> AsyncFuture<T>
wrapFuture(AsyncFuture<T> future, Transaction tx)
           
<T> AsyncFutureListener<T>
wrapListener(AsyncFutureListener<T> listener, Transaction tx)
           
<T> LeaseContext<T>
write(T entry)
          Writes a new object to the space, returning its LeaseContext.
<T> LeaseContext<T>
write(T entry, long lease)
          Writes a new object to the space, returning its LeaseContext.
<T> LeaseContext<T>
write(T entry, long lease, long timeout, int modifiers)
           
<T> LeaseContext<T>
write(T entry, long lease, long timeout, WriteModifiers modifiers)
          Writes a new object to the space, returning its LeaseContext.
<T> LeaseContext<T>
write(T entry, WriteModifiers modifiers)
          Writes a new object to the space, returning its LeaseContext.
<T> LeaseContext<T>[]
writeMultiple(T[] entries)
          Writes the specified entries to this space.
<T> LeaseContext<T>[]
writeMultiple(T[] entries, long lease)
          Writes the specified entries to this space.
<T> LeaseContext<T>[]
writeMultiple(T[] entries, long[] leases, int updateModifiers)
           
<T> LeaseContext<T>[]
writeMultiple(T[] entries, long[] leases, WriteModifiers modifiers)
          Writes the specified entries to this space.
<T> LeaseContext<T>[]
writeMultiple(T[] entries, long lease, int updateModifiers)
           
<T> LeaseContext<T>[]
writeMultiple(T[] entries, long lease, WriteModifiers modifiers)
          Writes the specified entries to this space.
<T> LeaseContext<T>[]
writeMultiple(T[] entries, WriteModifiers modifiers)
          Writes the specified entries to this space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultGigaSpace

public DefaultGigaSpace(IJSpace space,
                        TransactionProvider txProvider,
                        ExceptionTranslator exTranslator,
                        int defaultIsolationLevel)
Constructs a new DefaultGigaSpace implementation.

Parameters:
space - The space implementation to delegate operations to
txProvider - The transaction provider for declarative transaction ex.
exTranslator - Exception translator to translate low level exceptions into GigaSpaces runtime exception
defaultIsolationLevel - The default isolation level for read operations without modifiers. Maps to TransactionDefinition.getIsolationLevel() levels values.
Method Detail

setName

public void setName(String name)

getName

public String getName()
Description copied from interface: GigaSpace
Returns the name of the GigaSpace. If it is configured with Spring for example, will return the bean name, if not, will default to the space name.

Specified by:
getName in interface GigaSpace

setDefaultReadTimeout

public void setDefaultReadTimeout(long defaultReadTimeout)
Sets the default read timeout when executing read(Object) or readIfExists(Object) operations.


setDefaultTakeTimeout

public void setDefaultTakeTimeout(long defaultTakeTimeout)
Sets the default take timeout when executing take(Object) or takeIfExists(Object) operations.


setDefaultWriteLease

public void setDefaultWriteLease(long defaultWriteLease)
Sets the default write lease when executing write(Object).


getSpace

public IJSpace getSpace()
Description copied from interface: GigaSpace
Returns the IJSpace used by this GigaSpace implementation to delegate different space operations.

Allows the use of space operations that are not exposed by this interface, as well as use as a parameter to other low level GigaSpace components.

If a transaction object is required for low level operations (as low level operations do not have declarative transaction ex) the GigaSpace.getTxProvider() should be used to acquire the current running transaction.

Specified by:
getSpace in interface GigaSpace

getClustered

public GigaSpace getClustered()
Description copied from interface: GigaSpace
Returns a clustered view of this GigaSpace instance.
 GigaSpace gigaSpace = new GigaSpaceConfigurer(space).clustered(true).gigaSpace();
 

If this instance is already a clustered view (was initially constructed using the clustered flag), will return the same instance being used to issue the call.

If this is a GigaSpace that works directly with a cluster member, will return a clustered view (as if it was constructed with the clustered flag set). Note that this method might return different instances when being called by different threads.

 GigaSpace nonClusteredViewOfGigaSpace= ... // acquire non-clustered view of a clustered space
 GigaSpace space=nonClusteredViewofGigaSpace.getClustered();
 // space != nonClusteredViewOfSpace
 
 GigaSpace clusteredViewOfGigaSpace= ... // acquire clustered view of a clustered space
 GigaSpace space=clusteredViewofGigaSpace.getClustered();
 // space == clusteredViewOfSpace
 

Specified by:
getClustered in interface GigaSpace
See Also:
GigaSpaceConfigurer.clustered(boolean)

getTxProvider

public TransactionProvider getTxProvider()
Description copied from interface: GigaSpace
Returns the transaction provider allowing to access the current running transaction.

Specified by:
getTxProvider in interface GigaSpace

getExceptionTranslator

public ExceptionTranslator getExceptionTranslator()
Description copied from interface: GigaSpace
Returns the exception translator associated with this GigaSpace instance.

Specified by:
getExceptionTranslator in interface GigaSpace

clear

public void clear(Object template)
           throws DataAccessException
Description copied from interface: GigaSpace
Removes the entries that match the specified template and the specified transaction from this space.

If the clear operation conducted without transaction (null as value) it will clear all entries that are not under transaction. Therefore entries under transaction would not be removed from the space.

The clear operation supports inheritance, therefore template class matching objects and its sub classes matching objects are part of the candidates population to be removed from the space. You can in fact clean all space objects (that are not under transaction) by calling: gigaSpace.clear(null).

Notice: The clear operation does not remove notify templates, i.e. registration for notifications.

Specified by:
clear in interface GigaSpace
Parameters:
template - the template to use for matching
Throws:
DataAccessException - In the event of an error, DataAccessException will wrap a ClearException, accessible via DataAccessException.getRootCause().

clear

public int clear(Object template,
                 int modifiers)
          throws DataAccessException
Specified by:
clear in interface GigaSpace
Throws:
DataAccessException

clear

public int clear(Object template,
                 ClearModifiers modifiers)
          throws DataAccessException
Description copied from interface: GigaSpace
Removes the entries that match the specified template and the specified transaction from this space.

If the clear operation conducted without transaction (null as value) it will clear all entries that are not under transaction. Therefore entries under transaction would not be removed from the space.

The clear operation supports inheritance, therefore template class matching objects and its sub classes matching objects are part of the candidates population to be removed from the space. You can in fact remove all space objects (that are not under transaction) by calling: gigaSpace.clear(null).

Notice: The clear operation does not remove notify templates i.e. registration for notifications.

Specified by:
clear in interface GigaSpace
Parameters:
template - the template to use for matching
modifiers - one or a union of ClearModifiers.
Throws:
DataAccessException - In the event of an error, DataAccessException will wrap a ClearException, accessible via DataAccessException.getRootCause().

count

public int count(Object template)
          throws DataAccessException
Description copied from interface: GigaSpace
Count any matching entry from the space. If a running within a transaction will count all the entries visible under the transaction.

Specified by:
count in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
Returns:
The number of matching entries
Throws:
DataAccessException

count

public int count(Object template,
                 int modifiers)
          throws DataAccessException
Specified by:
count in interface GigaSpace
Throws:
DataAccessException

count

public int count(Object template,
                 CountModifiers modifiers)
          throws DataAccessException
Description copied from interface: GigaSpace
Count any matching entries from the space. If this is running within a transaction will count all the entries visible under the transaction.

Allows to specify modifiers using ReadModifiers which allows to programmatically control the isolation level this count operation will be performed under.

Specified by:
count in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
modifiers - one or a union of CountModifiers.
Returns:
The number of matching entries
Throws:
DataAccessException

snapshot

public <T> ISpaceQuery<T> snapshot(Object entry)
                        throws DataAccessException
Description copied from interface: GigaSpace

The process of serializing an entry for transmission to a JavaSpaces service will be identical if the same entry is used twice. This is most likely to be an issue with templates that are used repeatedly to search for entries with read or take.

The client-side implementations of read and take cannot reasonably avoid this duplicated effort, since they have no efficient way of checking whether the same template is being used without intervening modification.

The snapshot method gives the JavaSpaces service implementor a way to reduce the impact of repeated use of the same entry. Invoking snapshot with an Entry will return another Entry object that contains a snapshot of the original entry. Using the returned snapshot entry is equivalent to using the unmodified original entry in all operations on the same JavaSpaces service.

Modifications to the original entry will not affect the snapshot. You can snapshot a null template; snapshot may or may not return null given a null template. The entry returned from snapshot will be guaranteed equivalent to the original unmodified object only when used with the space. Using the snapshot with any other JavaSpaces service will generate an IllegalArgumentException unless the other space can use it because of knowledge about the JavaSpaces service that generated the snapshot.

The snapshot will be a different object from the original, may or may not have the same hash code, and equals may or may not return true when invoked with the original object, even if the original object is unmodified. A snapshot is guaranteed to work only within the virtual machine in which it was generated. If a snapshot is passed to another virtual machine (for example, in a parameter of an RMI call), using it--even with the same JavaSpaces service--may generate an IllegalArgumentException.

Specified by:
snapshot in interface GigaSpace
Parameters:
entry - The entry to snapshot
Returns:
The snapshot
Throws:
DataAccessException

readById

public <T> T readById(Class<T> clazz,
                      Object id)
Description copied from interface: GigaSpace
Read an object from the space matching its id and the class. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Specified by:
readById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
Returns:
A matching object, or null if no matching is found within the timeout value.

readById

public <T> T readById(Class<T> clazz,
                      Object id,
                      Object routing)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
readById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
Returns:
A matching object, or null if no matching is found within the timeout value.

readById

public <T> T readById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Specified by:
readById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.

readById

public <T> T readById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout,
                      int modifiers)
Specified by:
readById in interface GigaSpace

readById

public <T> T readById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout,
                      ReadModifiers modifiers)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Specified by:
readById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of ReadModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.

readById

public <T> T readById(IdQuery<T> query)
           throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Specified by:
readById in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

readById

public <T> T readById(IdQuery<T> query,
                      long timeout)
           throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Specified by:
readById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

readById

public <T> T readById(IdQuery<T> query,
                      long timeout,
                      int modifiers)
           throws DataAccessException
Specified by:
readById in interface GigaSpace
Throws:
DataAccessException

readById

public <T> T readById(IdQuery<T> query,
                      long timeout,
                      ReadModifiers modifiers)
           throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Specified by:
readById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of ReadModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

read

public <T> T read(T template)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
read in interface GigaSpace
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").
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

read

public <T> T read(T template,
                  long timeout)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
read in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

read

public <T> T read(T template,
                  long timeout,
                  int modifiers)
       throws DataAccessException
Specified by:
read in interface GigaSpace
Throws:
DataAccessException

read

public <T> T read(T template,
                  long timeout,
                  ReadModifiers modifiers)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Overloads GigaSpace.read(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
read in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

read

public <T> T read(ISpaceQuery<T> template)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
read in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

read

public <T> T read(ISpaceQuery<T> template,
                  long timeout)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
read in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

read

public <T> T read(ISpaceQuery<T> template,
                  long timeout,
                  int modifiers)
       throws DataAccessException
Specified by:
read in interface GigaSpace
Throws:
DataAccessException

read

public <T> T read(ISpaceQuery<T> template,
                  long timeout,
                  ReadModifiers modifiers)
       throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, blocking until one exists. Return null if the timeout expires.

Overloads GigaSpace.read(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
read in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncRead in interface GigaSpace
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").
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncRead in interface GigaSpace
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").
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncRead in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncRead in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout,
                                    int modifiers)
                         throws DataAccessException
Specified by:
asyncRead in interface GigaSpace
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout,
                                    ReadModifiers modifiers)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Overloads GigaSpace.asyncRead(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
asyncRead in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout,
                                    int modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Specified by:
asyncRead in interface GigaSpace
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(T template,
                                    long timeout,
                                    ReadModifiers modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Overloads GigaSpace.asyncRead(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
asyncRead in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout,
                                    int modifiers)
                         throws DataAccessException
Specified by:
asyncRead in interface GigaSpace
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout,
                                    ReadModifiers modifiers)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Overloads GigaSpace.asyncRead(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout,
                                    int modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Specified by:
asyncRead in interface GigaSpace
Throws:
DataAccessException

asyncRead

public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template,
                                    long timeout,
                                    ReadModifiers modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Reads any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Overloads GigaSpace.asyncRead(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
asyncRead in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
listener - A listener to be notified when a result arrives
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExistsById

public <T> T readIfExistsById(Class<T> clazz,
                              Object id)
Description copied from interface: GigaSpace
Read an object from the space matching its id and the class. Returns null if there is no match.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
Returns:
A matching object, or null if no matching is found within the timeout value.

readIfExistsById

public <T> T readIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
Returns:
A matching object, or null if no matching is found within the timeout value.

readIfExistsById

public <T> T readIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.

readIfExistsById

public <T> T readIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout,
                              int modifiers)
Specified by:
readIfExistsById in interface GigaSpace

readIfExistsById

public <T> T readIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout,
                              ReadModifiers modifiers)
Description copied from interface: GigaSpace
Read an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of ReadModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.

readIfExistsById

public <T> T readIfExistsById(IdQuery<T> query)
                   throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

readIfExistsById

public <T> T readIfExistsById(IdQuery<T> query,
                              long timeout)
                   throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

readIfExistsById

public <T> T readIfExistsById(IdQuery<T> query,
                              long timeout,
                              int modifiers)
                   throws DataAccessException
Specified by:
readIfExistsById in interface GigaSpace
Throws:
DataAccessException

readIfExistsById

public <T> T readIfExistsById(IdQuery<T> query,
                              long timeout,
                              ReadModifiers modifiers)
                   throws DataAccessException
Description copied from interface: GigaSpace
Read an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of ReadModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(T template)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
readIfExists in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(T template,
                          long timeout)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExists in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(T template,
                          long timeout,
                          int modifiers)
               throws DataAccessException
Specified by:
readIfExists in interface GigaSpace
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(T template,
                          long timeout,
                          ReadModifiers modifiers)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Overloads GigaSpace.read(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
readIfExists in interface GigaSpace
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").
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(ISpaceQuery<T> template)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
readIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(ISpaceQuery<T> template,
                          long timeout)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
readIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(ISpaceQuery<T> template,
                          long timeout,
                          int modifiers)
               throws DataAccessException
Specified by:
readIfExists in interface GigaSpace
Throws:
DataAccessException

readIfExists

public <T> T readIfExists(ISpaceQuery<T> template,
                          long timeout,
                          ReadModifiers modifiers)
               throws DataAccessException
Description copied from interface: GigaSpace
Read any matching object from the space, returning null if there currently is none. Matching and timeouts are done as in read, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Overloads GigaSpace.read(Object,long) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
readIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching object. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the object read from the space.
Throws:
DataAccessException

readMultiple

public <T> T[] readMultiple(T template)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an unbounded array of matches. Returns an empty array if no match was found. Same as calling readMultiple(template, Integer.MAX_VALUE).

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

readMultiple

public <T> T[] readMultiple(T template,
                            int maxEntries)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

readMultiple

public <T> T[] readMultiple(T template,
                            int maxEntries,
                            int modifiers)
                 throws DataAccessException
Specified by:
readMultiple in interface GigaSpace
Throws:
DataAccessException

readMultiple

public <T> T[] readMultiple(T template,
                            int maxEntries,
                            ReadModifiers modifiers)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

Overloads GigaSpace.readMultiple(Object,int) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

readMultiple

public <T> T[] readMultiple(ISpaceQuery<T> template)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an unbounded array of matches. Returns an empty array if no match was found.

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

readMultiple

public <T> T[] readMultiple(ISpaceQuery<T> template,
                            int maxEntries)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

readMultiple

public <T> T[] readMultiple(ISpaceQuery<T> template,
                            int maxEntries,
                            int modifiers)
                 throws DataAccessException
Specified by:
readMultiple in interface GigaSpace
Throws:
DataAccessException

readMultiple

public <T> T[] readMultiple(ISpaceQuery<T> template,
                            int maxEntries,
                            ReadModifiers modifiers)
                 throws DataAccessException
Description copied from interface: GigaSpace
Read any matching entries from the space. Matching is done as in read without timeout (JavaSpace.NO_WAIT). Returns an array with matches bound by maxEntries. Returns an empty array if no match was found.

Overloads GigaSpace.readMultiple(Object,int) by adding a modifiers parameter. Equivalent when called with the default modifier - ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.

Specified by:
readMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
modifiers - one or a union of ReadModifiers.
Returns:
A copy of the entries read from the space.
Throws:
DataAccessException - In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().

takeById

public <T> T takeById(Class<T> clazz,
                      Object id)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id and the class. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.takeById(Class, Object, Object) can be used to specify the routing.

Specified by:
takeById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
Returns:
A matching object, or null if no matching is found within the timeout value.

takeById

public <T> T takeById(Class<T> clazz,
                      Object id,
                      Object routing)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
takeById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
Returns:
A matching object, or null if no matching is found within the timeout value.

takeById

public <T> T takeById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Specified by:
takeById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.

takeById

public <T> T takeById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout,
                      int modifiers)
Specified by:
takeById in interface GigaSpace

takeById

public <T> T takeById(Class<T> clazz,
                      Object id,
                      Object routing,
                      long timeout,
                      TakeModifiers modifiers)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Specified by:
takeById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of TakeModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.

takeById

public <T> T takeById(IdQuery<T> query)
           throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Specified by:
takeById in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

takeById

public <T> T takeById(IdQuery<T> query,
                      long timeout)
           throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Specified by:
takeById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

takeById

public <T> T takeById(IdQuery<T> query,
                      long timeout,
                      int modifiers)
           throws DataAccessException
Specified by:
takeById in interface GigaSpace
Throws:
DataAccessException

takeById

public <T> T takeById(IdQuery<T> query,
                      long timeout,
                      TakeModifiers modifiers)
           throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Specified by:
takeById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of TakeModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

take

public <T> T take(T template)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
take in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
Returns:
A removed entry from the space
Throws:
DataAccessException

take

public <T> T take(T template,
                  long timeout)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
take in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

take

public <T> T take(T template,
                  long timeout,
                  int modifiers)
       throws DataAccessException
Specified by:
take in interface GigaSpace
Throws:
DataAccessException

take

public <T> T take(T template,
                  long timeout,
                  TakeModifiers modifiers)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
take in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

take

public <T> T take(ISpaceQuery<T> template)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
take in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A removed entry from the space
Throws:
DataAccessException

take

public <T> T take(ISpaceQuery<T> template,
                  long timeout)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
take in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

take

public <T> T take(ISpaceQuery<T> template,
                  long timeout,
                  int modifiers)
       throws DataAccessException
Specified by:
take in interface GigaSpace
Throws:
DataAccessException

take

public <T> T take(ISpaceQuery<T> template,
                  long timeout,
                  TakeModifiers modifiers)
       throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, blocking until one exists. Return null if the timeout expires.

Specified by:
take in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
listener - A listener to be notified when a result arrives
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
listener - A listener to be notified when a result arrives
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout,
                                    int modifiers)
                         throws DataAccessException
Specified by:
asyncTake in interface GigaSpace
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout,
                                    TakeModifiers modifiers)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout,
                                    int modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Specified by:
asyncTake in interface GigaSpace
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(T template,
                                    long timeout,
                                    TakeModifiers modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
listener - A listener to be notified when a result arrives
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
listener - A listener to be notified when a result arrives.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
listener - A listener to be notified when a result arrives.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout,
                                    int modifiers)
                         throws DataAccessException
Specified by:
asyncTake in interface GigaSpace
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout,
                                    TakeModifiers modifiers)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout,
                                    int modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Specified by:
asyncTake in interface GigaSpace
Throws:
DataAccessException

asyncTake

public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template,
                                    long timeout,
                                    TakeModifiers modifiers,
                                    AsyncFutureListener<T> listener)
                         throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space in an asynchronous manner. Returns immediately with a future. The future can then be used to check if there is a match or not. Once a match is found or the timeout expires, the future will return a result (null in case there was no match).

Specified by:
asyncTake in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
listener - A listener to be notified when a result arrives.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExistsById

public <T> T takeIfExistsById(Class<T> clazz,
                              Object id)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id and the class. Returns null if there is no match.

Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.takeById(Class, Object, Object) can be used to specify the routing.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
Returns:
A matching object, or null if no matching is found within the timeout value.

takeIfExistsById

public <T> T takeIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match.

Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
Returns:
A matching object, or null if no matching is found within the timeout value.

takeIfExistsById

public <T> T takeIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.

takeIfExistsById

public <T> T takeIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout,
                              int modifiers)
Specified by:
takeIfExistsById in interface GigaSpace

takeIfExistsById

public <T> T takeIfExistsById(Class<T> clazz,
                              Object id,
                              Object routing,
                              long timeout,
                              TakeModifiers modifiers)
Description copied from interface: GigaSpace
Take (remove) an object from the space matching its id, the class and the routing value. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in takeById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
clazz - The class of the entry
id - The id of the entry
routing - The routing value
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of TakeModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.

takeIfExistsById

public <T> T takeIfExistsById(IdQuery<T> query)
                   throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match.

The timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Note, if the space is partitioned, and the Entry has a specific property for its routing value, the operation will broadcast to all partitions. The GigaSpace.readById(Class, Object, Object) can be used to specify the routing.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

takeIfExistsById

public <T> T takeIfExistsById(IdQuery<T> query,
                              long timeout)
                   throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

takeIfExistsById

public <T> T takeIfExistsById(IdQuery<T> query,
                              long timeout,
                              int modifiers)
                   throws DataAccessException
Specified by:
takeIfExistsById in interface GigaSpace
Throws:
DataAccessException

takeIfExistsById

public <T> T takeIfExistsById(IdQuery<T> query,
                              long timeout,
                              TakeModifiers modifiers)
                   throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) an object from the space matching the specified id query. Returns null if there is no match within the specified timeout.

Matching and timeouts are done as in readById, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExistsById in interface GigaSpace
Parameters:
query - Query to search by.
timeout - The timeout value to wait for a matching entry if it does not exists within the space
modifiers - one or a union of TakeModifiers.
Returns:
A matching object, or null if no matching is found within the timeout value.
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(T template)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(T template,
                          long timeout)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(T template,
                          long timeout,
                          int modifiers)
               throws DataAccessException
Specified by:
takeIfExists in interface GigaSpace
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(T template,
                          long timeout,
                          TakeModifiers modifiers)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the 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 JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(ISpaceQuery<T> template)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to JavaSpace.NO_WAIT.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(ISpaceQuery<T> template,
                          long timeout)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(ISpaceQuery<T> template,
                          long timeout,
                          int modifiers)
               throws DataAccessException
Specified by:
takeIfExists in interface GigaSpace
Throws:
DataAccessException

takeIfExists

public <T> T takeIfExists(ISpaceQuery<T> template,
                          long timeout,
                          TakeModifiers modifiers)
               throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) any matching entry from the space, returning null if there currently is none. Matching and timeouts are done as in take, except that blocking in this call is done only if necessary to wait for transactional state to settle.

Specified by:
takeIfExists in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
timeout - How long the client is willing to wait for a transactionally proper matching entry. A timeout of JavaSpace.NO_WAIT means to wait no time at all; this is equivalent to a wait of zero.
modifiers - one or a union of TakeModifiers.
Returns:
A removed entry from the space
Throws:
DataAccessException

takeMultiple

public <T> T[] takeMultiple(T template)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space. Same as calling takeMultiple(template, Integer.MAX_VALUE).

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

takeMultiple

public <T> T[] takeMultiple(T template,
                            int maxEntries)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space.

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

takeMultiple

public <T> T[] takeMultiple(ISpaceQuery<T> template)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space.

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

takeMultiple

public <T> T[] takeMultiple(ISpaceQuery<T> template,
                            int maxEntries)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space.

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

takeMultiple

public <T> T[] takeMultiple(T template,
                            int maxEntries,
                            int modifiers)
                 throws DataAccessException
Specified by:
takeMultiple in interface GigaSpace
Throws:
DataAccessException

takeMultiple

public <T> T[] takeMultiple(T template,
                            int maxEntries,
                            TakeModifiers modifiers)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space.

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - The template used for matching. Matching is done against the template with null fields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the different ISpaceQuery classes
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
modifiers - one or a union of TakeModifiers.
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

takeMultiple

public <T> T[] takeMultiple(ISpaceQuery<T> template,
                            int maxEntries,
                            int modifiers)
                 throws DataAccessException
Specified by:
takeMultiple in interface GigaSpace
Throws:
DataAccessException

takeMultiple

public <T> T[] takeMultiple(ISpaceQuery<T> template,
                            int maxEntries,
                            TakeModifiers modifiers)
                 throws DataAccessException
Description copied from interface: GigaSpace
Takes (removes) all the entries matching the specified template from this space.

Specified by:
takeMultiple in interface GigaSpace
Parameters:
template - A query to be executed against the space. Most common one is SQLQuery.
maxEntries - A limit on the number of entries to be returned. Use Integer.MAX_VALUE for the uppermost limit.
modifiers - one or a union of TakeModifiers.
Returns:
Removed matched entries from the space
Throws:
DataAccessException - In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().

write

public <T> LeaseContext<T> write(T entry)
                      throws DataAccessException
Description copied from interface: GigaSpace
Writes a new object to the space, returning its LeaseContext.

By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object,long,long,int). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.write(Object,long).

Specified by:
write in interface GigaSpace
Parameters:
entry - The entry to write to the space
Returns:
A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update. UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

Throws:
DataAccessException

write

public <T> LeaseContext<T> write(T entry,
                                 long lease)
                      throws DataAccessException
Description copied from interface: GigaSpace
Writes a new object to the space, returning its LeaseContext.

By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object,long,long,int). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

Specified by:
write in interface GigaSpace
Parameters:
entry - The entry to write to the space
lease - The lease the entry will be written with, in milliseconds.
Returns:
A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update. UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

Throws:
DataAccessException

write

public <T> LeaseContext<T> write(T entry,
                                 WriteModifiers modifiers)
                      throws DataAccessException
Description copied from interface: GigaSpace
Writes a new object to the space, returning its LeaseContext.

By default uses the WriteModifiers.UPDATE_OR_WRITE modifier (see GigaSpace.write(Object,long,long,int). In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.write(Object,long).

Specified by:
write in interface GigaSpace
Parameters:
entry - The entry to write to the space
modifiers - one or a union of WriteModifiers.
Returns:
A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update. UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

Throws:
DataAccessException

write

public <T> LeaseContext<T> write(T entry,
                                 long lease,
                                 long timeout,
                                 int modifiers)
                      throws DataAccessException
Specified by:
write in interface GigaSpace
Throws:
DataAccessException

write

public <T> LeaseContext<T> write(T entry,
                                 long lease,
                                 long timeout,
                                 WriteModifiers modifiers)
                      throws DataAccessException
Description copied from interface: GigaSpace
Writes a new object to the space, returning its LeaseContext.

By default uses the WriteModifiers.UPDATE_OR_WRITE modifier. In order to force the operation to perform "write" only (a bit more performant), the WriteModifiers.WRITE_ONLY modifier can be used resulting in an EntryAlreadyInSpaceException if the entry already exists in the space (it must have an id for this exception to be raised).

If the object has a primary key that isn't auto - generated, and the modifiers value is one of WriteModifiers.UPDATE_OR_WRITE, WriteModifiers.UPDATE_ONLY or WriteModifiers.PARTIAL_UPDATE, it will call to the update method, returning a LeaseContext holder. This lease is unknown to the grantor, unless an actual 'write' was performed.

Specified by:
write in interface GigaSpace
Parameters:
entry - The entry to write to the space
lease - The lease the entry will be written with, in milliseconds.
timeout - The timeout of an update operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
modifiers - one or a union of WriteModifiers.
Returns:
A usable Lease on a successful write, or null if performed with the proxy configured with NoWriteLease flag.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied, LeaseContext.getObject() returns null on a successful write or the previous value - on successful update. UpdateOperationTimeoutException is thrown if timeout occurred while trying to update the object.

Throws:
DataAccessException

change

public <T> ChangeResult<T> change(IdQuery<T> query,
                                  ChangeSet changeSet)
Description copied from interface: GigaSpace
Changes an existing object in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
change in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
Returns:
A ChangeResult containing the details of the change operation affect.

change

public <T> ChangeResult<T> change(IdQuery<T> query,
                                  ChangeSet changeSet,
                                  ChangeModifiers modifiers)
Description copied from interface: GigaSpace
Changes an existing object in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
change in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
Returns:
A ChangeResult containing the details of the change operation affect.

change

public <T> ChangeResult<T> change(IdQuery<T> query,
                                  ChangeSet changeSet,
                                  long timeout)
Description copied from interface: GigaSpace
Changes an existing object in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
change in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
Returns:
A ChangeResult containing the details of the change operation affect.

change

public <T> ChangeResult<T> change(IdQuery<T> query,
                                  ChangeSet changeSet,
                                  ChangeModifiers modifiers,
                                  long timeout)
Description copied from interface: GigaSpace
Changes an existing object in space, returning a change result which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
change in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
Returns:
A ChangeResult containing the details of the change operation affect.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               AsyncFutureListener<ChangeResult<T>> listener)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
listener - A listener to be notified when a result arrives.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               long timeout)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               long timeout,
                                               AsyncFutureListener<ChangeResult<T>> listener)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
listener - A listener to be notified when a result arrives.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               ChangeModifiers modifiers)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               ChangeModifiers modifiers,
                                               AsyncFutureListener<ChangeResult<T>> listener)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
listener - A listener to be notified when a result arrives.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               ChangeModifiers modifiers,
                                               long timeout)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

asyncChange

public <T> Future<ChangeResult<T>> asyncChange(IdQuery<T> query,
                                               ChangeSet changeSet,
                                               ChangeModifiers modifiers,
                                               long timeout,
                                               AsyncFutureListener<ChangeResult<T>> listener)
Description copied from interface: GigaSpace
Changes an existing object in space in an asynchronous manner, returning immidiately with a future. The future can be used to check the change operation results which provides details of the operation affect. The change operation is designed for performance optimization, By allowing to change an existing object unlike with regular updating write operation which usually requires reading the object before applying to update to it. As part of the optimization, when the operation is replicated, on a best effort it will try to replicate only the required data which is needed to apply the changes on the entry in the replicated target.

Modifiers can be used to specify behavior of the change operation, by default uses the ChangeModifiers.NONE modifier.

Specified by:
asyncChange in interface GigaSpace
Parameters:
query - Query to search by.
changeSet - Changes to apply to the matched entry.
modifiers - one or a union of ChangeModifiers
timeout - The timeout of the operation, in milliseconds. If the entry is locked by another transaction wait for the specified number of milliseconds for it to be released.
listener - A listener to be notified when a result arrives.
Returns:
A future containing the details of the change operation affect which arrived asynchronously.

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries)
                                throws DataAccessException
Description copied from interface: GigaSpace
Writes the specified entries to this space.

The entry will be written using the default lease this interface is configured with (using the its factory). In order to explicitly define the lease, please use GigaSpace.writeMultiple(Object[],long).

Specified by:
writeMultiple in interface GigaSpace
Parameters:
entries - The entries to write to the space.
Returns:
Leases for the written entries
Throws:
DataAccessException - In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           WriteModifiers modifiers)
                                throws DataAccessException
Description copied from interface: GigaSpace
Writes the specified entries to this space.

Specified by:
writeMultiple in interface GigaSpace
Parameters:
entries - The entries to write to the space.
modifiers - one or a union of WriteModifiers.
Returns:
Leases for the written entries
Throws:
DataAccessException - In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           long lease)
                                throws DataAccessException
Description copied from interface: GigaSpace
Writes the specified entries to this space.

Specified by:
writeMultiple in interface GigaSpace
Parameters:
entries - The entries to write to the space.
lease - The lease the entry will be written with, in milliseconds.
Returns:
Leases for the written entries
Throws:
DataAccessException - In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           long lease,
                                           int updateModifiers)
                                throws DataAccessException
Specified by:
writeMultiple in interface GigaSpace
Throws:
DataAccessException

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           long lease,
                                           WriteModifiers modifiers)
                                throws DataAccessException
Description copied from interface: GigaSpace
Writes the specified entries to this space. Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

Specified by:
writeMultiple in interface GigaSpace
Parameters:
entries - the entries to write.
lease - the requested lease time, in milliseconds
modifiers - one or a union of WriteModifiers.
Returns:
array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

  • LeaseContext.getObject() returns:
    • null - on a successful write
    • previous value - on successful update
  • or, OperationTimeoutException - thrown if timeout occurred
Throws:
DataAccessException - In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           long[] leases,
                                           int updateModifiers)
                                throws DataAccessException
Specified by:
writeMultiple in interface GigaSpace
Throws:
DataAccessException

writeMultiple

public <T> LeaseContext<T>[] writeMultiple(T[] entries,
                                           long[] leases,
                                           WriteModifiers modifiers)
                                throws DataAccessException
Description copied from interface: GigaSpace
Writes the specified entries to this space. Same as a single write but for a group of entities sharing the same transaction (if any), applied with the same specified operation modifier. The semantics of a single write and a batch update are similar - the return value for each corresponds to it's cell in the returned array. see 'returns' for possible return values.

Specified by:
writeMultiple in interface GigaSpace
Parameters:
entries - the entries to write.
leases - the requested lease time per entry, in milliseconds
modifiers - one or a union of WriteModifiers.
Returns:
array in which each cell is corresponding to the written entry at the same index in the entries array, each cell is a usable Lease on a successful write, or null if performed with NoWriteLease attribute.

when WriteModifiers.UPDATE_OR_WRITE modifier is applied,

  • LeaseContext.getObject() returns:
    • null - on a successful write
    • previous value - on successful update
  • or, OperationTimeoutException - thrown if timeout occurred
Throws:
DataAccessException - In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().

iterator

public IteratorBuilder iterator()
Description copied from interface: GigaSpace
Returns an iterator builder allowing to configure and create a GSIterator over the Space.

Specified by:
iterator in interface GigaSpace

execute

public <T extends Serializable> AsyncFuture<T> execute(Task<T> task)
Description copied from interface: GigaSpace
Executes a task on a specific space node. The space node it will execute on should be controlled by having a method that return the routing value annotated with SpaceRouting.

In order to control the routing externally, use GigaSpace.execute(org.openspaces.core.executor.Task, Object).

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable> AsyncFuture<T> execute(Task<T> task,
                                                       AsyncFutureListener<T> listener)
Description copied from interface: GigaSpace
Executes a task on a specific space node. The space node it will execute on should be controlled by having a method that return the routing value annotated with SpaceRouting.

In order to control the routing externally, use GigaSpace.execute(org.openspaces.core.executor.Task, Object).

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
listener - A listener to be notified when execution completes
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable> AsyncFuture<T> execute(Task<T> task,
                                                       Object routing)
Description copied from interface: GigaSpace
Executes a task on a specific space node. The space node it will execute on should is controlled by the routing value provided as a second parameter.

The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

In order to control the using the Task itself, use GigaSpace.execute(org.openspaces.core.executor.Task).

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
routing - The routing value that will control on which node the task will be executed on
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable> AsyncFuture<T> execute(Task<T> task,
                                                       Object routing,
                                                       AsyncFutureListener<T> listener)
Description copied from interface: GigaSpace
Executes a task on a specific space node. The space node it will execute on should is controlled by the routing value provided as a second parameter.

The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

In order to control the using the Task itself, use GigaSpace.execute(org.openspaces.core.executor.Task).

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
routing - The routing value that will control on which node the task will be executed on
listener - A listener to be notified when execution completes
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable,R> AsyncFuture<R> execute(DistributedTask<T,R> task,
                                                         Object... routings)
Description copied from interface: GigaSpace
Executes a task on all the nodes that correspond to the list of routing values. The task is executed on each space node with all the results reduced by the AsyncResultsReducer.reduce(java.util.List) operation.

The routing object itself does not have to be the actual routing value, but can be a POJO that defined a method annotated with @SpaceRouting annotation (this works well when wanting to use entries as the routing parameters).

The task can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

The future actual result will be the reduced result of the execution, or the exception thrown during during the reduce operation. The moderator can be used as a mechanism to listen for results as they arrive.

The last parameter can be of type AsyncFutureListener which, this case, it will be used to register a listener to be notified of the result.

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
routings - A list of routing values, each resulting in an execution of the task on the space node it corresponds to
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable,R> AsyncFuture<R> execute(DistributedTask<T,R> task)
Description copied from interface: GigaSpace
Executes the task on all the primary space nodes within the cluster (broadcast). The task is executed on each space node with all the results reduced by the AsyncResultsReducer.reduce(java.util.List) operation.

The task can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

The future actual result will be the reduced result of the execution, or the exception thrown during during the reduce operation. The moderator can be used as a mechanism to listen for results as they arrive.

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
execute in interface GigaSpace
Parameters:
task - The task to execute
Returns:
a Future representing pending completion of the task, and whose get() method will return the task value upon completion.

execute

public <T extends Serializable,R> AsyncFuture<R> execute(DistributedTask<T,R> task,
                                                         AsyncFutureListener<R> listener)

distExecute

public <T extends Serializable,R> AsyncFuture<R> distExecute(DistributedTask<T,R> task,
                                                             AsyncFutureListener<R> listener)

executorBuilder

public <T extends Serializable,R> ExecutorBuilder<T,R> executorBuilder(AsyncResultsReducer<T,R> reducer)
Description copied from interface: GigaSpace
Constructs an executor builder allowing to accumulate different tasks required to be executed into a single execute mechanism with all the results reduced by the reducer provided.

The reducer can optionally implement AsyncResultFilter that can control if tasks should continue to accumulate or it should break and execute the reduce operation on the results received so far.

The space that the task is executed within can be accessible by marking a field with type GigaSpace using the TaskGigaSpace annotation. Another option is by implementing the TaskGigaSpaceAware interface.

Resource injection can be enabled by marking the task with AutowireTask or with AutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either the Autowired or javax.annotation.Resource annotations (assuming they are enabled using context:annotation-config). Bean life cycle methods, such as ClusterInfoAware and ApplicationContextAware are also available.

Specified by:
executorBuilder in interface GigaSpace
Parameters:
reducer - The reducer to reduce the results of all the different tasks added.
Returns:
The executor builder.

getCurrentTransaction

public Transaction getCurrentTransaction()
Description copied from interface: GigaSpace
Returns the current running transaction. Can be null if no transaction is in progress.

Specified by:
getCurrentTransaction in interface GigaSpace

getModifiersForIsolationLevel

public int getModifiersForIsolationLevel()
Gets the isolation level from the current running transaction (enabling the usage of Spring declarative isolation level settings). If there is no transaction in progress or the transaction isolation is TransactionDefinition.ISOLATION_DEFAULT will use the default isolation level associated with this class.

Specified by:
getModifiersForIsolationLevel in interface GigaSpace

toString

public String toString()
Overrides:
toString in class Object

wrapListener

public <T> AsyncFutureListener<T> wrapListener(AsyncFutureListener<T> listener,
                                               Transaction tx)

wrapFuture

public <T> AsyncFuture<T> wrapFuture(AsyncFuture<T> future,
                                     Transaction tx)
Specified by:
wrapFuture in interface org.openspaces.core.internal.InternalGigaSpace

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids)
Description copied from interface: GigaSpace
Read objects from the space matching their IDs and the specified class.

Note, if the space is partitioned and the Class defines a specific property for its routing value (which means that the ID property is not used for routing), the operation will broadcast to all partitions. The GigaSpace.readByIds(Class, Object[], Object) overload can be used to specify the routing explicitly.

Specified by:
readByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
Returns:
a ReadByIdsResult containing the matched results.

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        int modifiers)
Specified by:
readByIds in interface GigaSpace

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing,
                                        int modifiers)
Specified by:
readByIds in interface GigaSpace

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing,
                                        ReadModifiers modifiers)
Description copied from interface: GigaSpace
Read objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.

Note, if routing key is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

Specified by:
readByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routing - The routing of the provided object IDs.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a ReadByIdsResult containing the matched results.

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings,
                                        int modifiers)
Specified by:
readByIds in interface GigaSpace

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings,
                                        ReadModifiers modifiers)
Description copied from interface: GigaSpace
Read objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.

Note, the IDs array and routing keys array are correlated and should be of the same size. The routing key of ID i in the IDs array is the element at position i in the routing keys array. If routingKeys is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

Specified by:
readByIds in interface GigaSpace
Parameters:
clazz - The class type.
ids - The objects\ IDs array.
routings - The object routing keys array.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a ReadByIdsResult containing the matched results.

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing)
Description copied from interface: GigaSpace
Read objects from the space matching their IDs, the specified class and routing key.

Note, if routing key is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

Specified by:
readByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routing - The routing of the provided object IDs.
Returns:
a ReadByIdsResult containing the matched results.

readByIds

public <T> ReadByIdsResult<T> readByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings)
Description copied from interface: GigaSpace
Read objects from the space matching their IDs, the specified class and the routing keys.

Note, the IDs array and routing keys array are correlated and should be of the same size. The routing key of ID i in the IDs array is the element at position i in the routing keys array. If routingKeys is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

Specified by:
readByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routings - The object routing keys array.
Returns:
a ReadByIdsResult containing the matched results.

readByIds

public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query)
                             throws DataAccessException
Description copied from interface: GigaSpace
Read objects from the space matching the specified IDs query.

Specified by:
readByIds in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
a ReadByIdsResult containing the matched results.
Throws:
DataAccessException

readByIds

public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query,
                                        int modifiers)
                             throws DataAccessException
Specified by:
readByIds in interface GigaSpace
Throws:
DataAccessException

readByIds

public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query,
                                        ReadModifiers modifiers)
                             throws DataAccessException
Description copied from interface: GigaSpace
Read objects from the space matching the specified IDs query, with the provided ReadModifiers.

Specified by:
readByIds in interface GigaSpace
Parameters:
query - Query to search by.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a ReadByIdsResult containing the matched results.
Throws:
DataAccessException

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        int modifiers)
Specified by:
takeByIds in interface GigaSpace

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing,
                                        int modifiers)
Specified by:
takeByIds in interface GigaSpace

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing,
                                        TakeModifiers modifiers)
Description copied from interface: GigaSpace
Take (remove) objects from the space matching their IDs, the specified class type and routing key, with the provided ReadModifiers.

Note, if routing key is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

Specified by:
takeByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routing - The routing of the provided object IDs.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a TakeByIdsResult containing the matched results.

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings,
                                        int modifiers)
Specified by:
takeByIds in interface GigaSpace

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings,
                                        TakeModifiers modifiers)
Description copied from interface: GigaSpace
Take (remove) objects from the space matching their IDs, the specified class and the routing keys, with the provided ReadModifiers.

Note, the IDs array and routing keys array are correlated and should be of the same size. The routing key of ID i in the IDs array is the element at position i in the routing keys array. If routingKeys is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

ReadModifiers.FIFO is not supported by this operation - the results are always ordered in correlation with the input IDs array.

Specified by:
takeByIds in interface GigaSpace
Parameters:
clazz - The class type.
ids - The objects\ IDs array.
routings - The object routing keys array.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a TakeByIdsResult containing the matched results.

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids)
Description copied from interface: GigaSpace
Take (remove) objects from the space matching their IDs and the specified class.

Note, if the space is partitioned, or the Class defines a specific property for its routing value (which means that the ID property is not used for routing), the operation will broadcast to all partitions. The GigaSpace.takeByIds(Class, Object[], Object) overload can be used to specify the routing explicitly.

Specified by:
takeByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
Returns:
a TakeByIdsResult containing the matched results.

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object routing)
Description copied from interface: GigaSpace
Take (remove) objects from the space matching their IDs, the specified class and routing key.

Note, if routing key is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

Specified by:
takeByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routing - The routing of the provided object IDs.
Returns:
a TakeByIdsResult containing the matched results.

takeByIds

public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz,
                                        Object[] ids,
                                        Object[] routings)
Description copied from interface: GigaSpace
Take (remove) objects from the space matching their IDs, the specified class and the routing keys.

Note, the IDs array and routing keys array are correlated and should be of the same size. The routing key of ID i in the IDs array is the element at position i in the routing keys array. If routingKeys is null and the cluster is partitioned, the operation will broadcast to all of the partitions.

Specified by:
takeByIds in interface GigaSpace
Parameters:
clazz - The class.
ids - The object IDs array.
routings - The object routing keys array.
Returns:
a TakeByIdsResult containing the matched results.

takeByIds

public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query)
                             throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) objects from the space matching the specified IDs query.

Specified by:
takeByIds in interface GigaSpace
Parameters:
query - Query to search by.
Returns:
a ReadByIdsResult containing the matched results.
Throws:
DataAccessException

takeByIds

public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query,
                                        int modifiers)
                             throws DataAccessException
Specified by:
takeByIds in interface GigaSpace
Throws:
DataAccessException

takeByIds

public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query,
                                        TakeModifiers modifiers)
                             throws DataAccessException
Description copied from interface: GigaSpace
Take (remove) objects from the space matching the specified IDs query, with the provided ReadModifiers.

Specified by:
takeByIds in interface GigaSpace
Parameters:
query - Query to search by.
modifiers - The read modifier to use (One or several of ReadModifiers).
Returns:
a ReadByIdsResult containing the matched results.
Throws:
DataAccessException

getTypeManager

public GigaSpaceTypeManager getTypeManager()
Description copied from interface: GigaSpace
Gets the type manager of this GigaSpace instance.

Specified by:
getTypeManager in interface GigaSpace
See Also:
GigaSpaceTypeManager

GigaSpaces XAP 9.1 API

Copyright © GigaSpaces.