Class DefaultGigaSpace
- All Implemented Interfaces:
GigaSpace,InternalGigaSpace
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
ConstructorsConstructorDescriptionDefaultGigaSpace(GigaSpaceConfigurer configurer) Constructs a new DefaultGigaSpace implementation. -
Method Summary
Modifier and TypeMethodDescriptionaggregate(ISpaceQuery<T> query, AggregationSet aggregationSet) Executes the specified query along with the specified aggregations collocated at the space.aggregate(ISpaceQuery<T> query, AggregationSet aggregationSet, ReadModifiers readModifiers) <T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers) Changes an existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, long timeout) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers) Changes an existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.<T> Future<ChangeResult<T>>asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) Changes existing objects in space in an asynchronous manner, returning immidiately with a future.asyncLoad(SpaceDataSourceLoadRequest spaceDataSourceLoadRequest) Loads data from aSpaceDataSourceon demand The Space data source is created withSpaceDataSourceFactoryLoaded data can be adapted using theSpaceTypeSchemaAdapter<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, 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, 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(ISpaceQuery<T> template, 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, 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, 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>asyncRead(T template, 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, 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, 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(ISpaceQuery<T> template, 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, 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, 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> AsyncFuture<T>asyncTake(T template, AsyncFutureListener<T> listener) Take (remove) any matching entry from the space in an asynchronous manner.<T> ChangeResult<T>change(ISpaceQuery<T> query, ChangeSet changeSet) Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>change(ISpaceQuery<T> query, ChangeSet changeSet, long timeout) Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers) Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>change(T template, ChangeSet changeSet, ChangeModifiers modifiers) Changes existing objects in space, returning a change result which provides details of the operation affect.<T> ChangeResult<T>change(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Changes existing objects in space, returning a change result which provides details of the operation affect.voidRemoves the entries that match the specified template and the specified transaction from this space.intclear(Object template, ClearModifiers modifiers) Removes the entries that match the specified template and the specified transaction from this space.voidclose()intCount any matching entry from the space.intcount(Object template, CountModifiers modifiers) Count any matching entries from the space.<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>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>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.executeDurable(UUID uuid) <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.static byte[]getClassBytes(Class<?> clazz) Returns a clustered view of thisGigaSpaceinstance.Returns the current running transaction.Gets the defaultChangeModifiersset during thisGigaSpaceconfiguration.Gets the defaultClearModifiersset during thisGigaSpaceconfiguration.Gets the defaultCountModifiersset during thisGigaSpaceconfiguration.intGets the defaultIsolationLevel.Gets the defaultReadModifiersset during thisGigaSpaceconfiguration.longGets the default read timeout when executingread(Object)orreadIfExists(Object)operations.Gets the defaultTakeModifiersset during thisGigaSpaceconfiguration.longGets the default take timeout when executingtake(Object)ortakeIfExists(Object)operations.longGets the default write lease when executingwrite(Object).Gets the defaultWriteModifiersset during thisGigaSpaceconfiguration.Returns the exception translator associated with this GigaSpace instance.getName()Returns the name of the GigaSpace.getSpace()Returns theIJSpaceused by this GigaSpace implementation to delegate different space operations.Returns the space name.Returns the transaction provider allowing to access the current running transaction.Gets the type manager of this GigaSpace instance.booleanReturns wether or not this space is secured.<T> SpaceIterator<T>iterator(ISpaceQuery<T> template) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(ISpaceQuery<T> template, int batchSize) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(ISpaceQuery<T> template, int batchSize, ReadModifiers modifiers) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(ISpaceQuery<T> template, SpaceIteratorConfiguration spaceIteratorConfiguration) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(T template) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(T template, int batchSize) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(T template, int batchSize, ReadModifiers modifiers) Returns an iterator over the entries in the space which match the specified template.<T> SpaceIterator<T>iterator(T template, SpaceIteratorConfiguration spaceIteratorConfiguration) Returns an iterator over the entries in the space which match the specified template.Creates a new DataEventSession with the default configuration.Creates a new DataEventSession with the specified configuration.<T> ISpaceQuery<T>prepareTemplate(Object template) Translates the template object into pre-processed packet which will be sent to the space.<T> Tread(ISpaceQuery<T> template) Read any matching object from the space, blocking until one exists.<T> Tread(ISpaceQuery<T> template, long timeout) Read any matching object from the space, blocking until one exists.<T> Tread(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers) Read any matching object from the space, blocking until one exists.<T> Tread(T template) Read any matching object from the space, blocking until one exists.<T> Tread(T template, long timeout) Read any matching object from the space, blocking until one exists.<T> Tread(T template, long timeout, ReadModifiers modifiers) Read any matching object from the space, blocking until one exists.<T> TRead an object from the space matching the specified id query.<T> TRead an object from the space matching the specified id query.<T> TreadById(IdQuery<T> query, long timeout, ReadModifiers modifiers) Read an object from the space matching the specified id query.<T> TRead an object from the space matching its id and the class.<T> TRead an object from the space matching its id, the class and the routing value.<T> TRead an object from the space matching its id, the class and the routing value.<T> TreadById(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> ReadByIdsResult<T>Read objects from the space matching the specified IDs query.<T> ReadByIdsResult<T>readByIds(IdsQuery<T> query, ReadModifiers modifiers) Read objects from the space matching the specified IDs query, with the providedReadModifiers.<T> ReadByIdsResult<T>Read objects from the space matching their IDs and the specified class.<T> ReadByIdsResult<T>Read objects from the space matching their IDs, the specified class and routing key.<T> ReadByIdsResult<T>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, ReadModifiers modifiers) Read objects from the space matching their IDs, the specified class and the routing keys, with the providedReadModifiers.<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 providedReadModifiers.<T> TreadIfExists(ISpaceQuery<T> template) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExists(ISpaceQuery<T> template, long timeout) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExists(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExists(T template) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExists(T template, long timeout) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExists(T template, long timeout, ReadModifiers modifiers) Read any matching object from the space, returningnullif there currently is none.<T> TreadIfExistsById(IdQuery<T> query) Read an object from the space matching the specified id query.<T> TreadIfExistsById(IdQuery<T> query, long timeout) Read an object from the space matching the specified id query.<T> TreadIfExistsById(IdQuery<T> query, long timeout, ReadModifiers modifiers) Read an object from the space matching the specified id query.<T> TreadIfExistsById(Class<T> clazz, Object id) Read an object from the space matching its id and the class.<T> TreadIfExistsById(Class<T> clazz, Object id, Object routing) Read an object from the space matching its id, the class and the routing value.<T> TreadIfExistsById(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> TreadIfExistsById(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[]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, 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, ReadModifiers modifiers) Read any matching entries from the space.<T extends Serializable,R>
UUIDregisterDurableTask(DurableTask<T, R> eventTask) voidsetDefaultChangeModifiers(ChangeModifiers modifiers) Sets the defaultChangeModifierswhen excecutionchange(Object, ChangeSet)voidsetDefaultClearModifiers(ClearModifiers modifiers) Sets the defaultClearModifierswhen excecutionwrite(Object)voidsetDefaultCountModifiers(CountModifiers modifiers) Sets the defaultCountModifierswhen excecutioncount(Object)voidsetDefaultReadModifiers(ReadModifiers modifiers) Sets the defaultReadModifierswhen excecutionread(Object)voidsetDefaultReadTimeout(long defaultReadTimeout) Sets the default read timeout when executingread(Object)orreadIfExists(Object)operations.voidsetDefaultTakeModifiers(TakeModifiers modifiers) Sets the defaultTakeModifierswhen excecutiontake(Object)voidsetDefaultTakeTimeout(long defaultTakeTimeout) Sets the default take timeout when executingtake(Object)ortakeIfExists(Object)operations.voidsetDefaultWriteLease(long defaultWriteLease) Sets the default write lease when executingwrite(Object).voidsetDefaultWriteModifiers(WriteModifiers modifiers) Sets the defaultWriteModifierswhen excecutionwrite(Object)voidsetMVCCGenerationsState(MVCCGenerationsState generationsState) voidvoidsetQuiesceToken(QuiesceToken token) <T> ISpaceQuery<T>The process of serializing an entry for transmission to a JavaSpaces service will be identical if the same entry is used twice.<T> Ttake(ISpaceQuery<T> template) Take (remove) any matching entry from the space, blocking until one exists.<T> Ttake(ISpaceQuery<T> template, long timeout) Take (remove) any matching entry from the space, blocking until one exists.<T> Ttake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers) Take (remove) any matching entry from the space, blocking until one exists.<T> Ttake(T template) Take (remove) any matching entry from the space, blocking until one exists.<T> Ttake(T template, long timeout) Take (remove) any matching entry from the space, blocking until one exists.<T> Ttake(T template, long timeout, TakeModifiers modifiers) Take (remove) any matching entry from the space, blocking until one exists.<T> TTake (remove) an object from the space matching the specified id query.<T> TTake (remove) an object from the space matching the specified id query.<T> TtakeById(IdQuery<T> query, long timeout, TakeModifiers modifiers) Take (remove) an object from the space matching the specified id query.<T> TTake (remove) an object from the space matching its id and the class.<T> TTake (remove) an object from the space matching its id, the class and the routing value.<T> TTake (remove) an object from the space matching its id, the class and the routing value.<T> TtakeById(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> TakeByIdsResult<T>Take (remove) objects from the space matching the specified IDs query.<T> TakeByIdsResult<T>takeByIds(IdsQuery<T> query, TakeModifiers modifiers) Take (remove) objects from the space matching the specified IDs query, with the providedReadModifiers.<T> TakeByIdsResult<T>Take (remove) objects from the space matching their IDs and the specified class.<T> TakeByIdsResult<T>Take (remove) objects from the space matching their IDs, the specified class and routing key.<T> TakeByIdsResult<T>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, TakeModifiers modifiers) Take (remove) objects from the space matching their IDs, the specified class and the routing keys, with the providedReadModifiers.<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 providedReadModifiers.<T> TtakeIfExists(ISpaceQuery<T> template) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExists(ISpaceQuery<T> template, long timeout) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExists(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExists(T template) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExists(T template, long timeout) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExists(T template, long timeout, TakeModifiers modifiers) Take (remove) any matching entry from the space, returningnullif there currently is none.<T> TtakeIfExistsById(IdQuery<T> query) Take (remove) an object from the space matching the specified id query.<T> TtakeIfExistsById(IdQuery<T> query, long timeout) Take (remove) an object from the space matching the specified id query.<T> TtakeIfExistsById(IdQuery<T> query, long timeout, TakeModifiers modifiers) Take (remove) an object from the space matching the specified id query.<T> TtakeIfExistsById(Class<T> clazz, Object id) Take (remove) an object from the space matching its id and the class.<T> TtakeIfExistsById(Class<T> clazz, Object id, Object routing) Take (remove) an object from the space matching its id, the class and the routing value.<T> TtakeIfExistsById(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> TtakeIfExistsById(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[]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, 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, TakeModifiers modifiers) Takes (removes) all the entries matching the specified template from this space.toString()<T> T<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 itsLeaseContext.<T> LeaseContext<T>write(T entry, long lease) Writes a new object to the space, returning itsLeaseContext.<T> LeaseContext<T>write(T entry, long lease, long timeout, WriteModifiers modifiers) Writes a new object to the space, returning itsLeaseContext.<T> LeaseContext<T>write(T entry, WriteModifiers modifiers) Writes a new object to the space, returning itsLeaseContext.<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, long timeout, WriteModifiers modifiers) Writes the specified entries to this space.<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, long timeout, WriteModifiers modifiers) Writes the specified entries to this space.<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.
-
Constructor Details
-
DefaultGigaSpace
Constructs a new DefaultGigaSpace implementation.- Parameters:
configurer- The transaction provider for declarative transaction ex.
-
-
Method Details
-
setName
-
getName
Description copied from interface:GigaSpaceReturns 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. -
getSpaceName
Description copied from interface:GigaSpaceReturns the space name.- Specified by:
getSpaceNamein interfaceGigaSpace
-
isSecured
public boolean isSecured()Description copied from interface:GigaSpaceReturns wether or not this space is secured. -
setDefaultReadTimeout
public void setDefaultReadTimeout(long defaultReadTimeout) Sets the default read timeout when executingread(Object)orreadIfExists(Object)operations. -
getDefaultReadTimeout
public long getDefaultReadTimeout()Gets the default read timeout when executingread(Object)orreadIfExists(Object)operations. -
setDefaultTakeTimeout
public void setDefaultTakeTimeout(long defaultTakeTimeout) Sets the default take timeout when executingtake(Object)ortakeIfExists(Object)operations. -
getDefaultTakeTimeout
public long getDefaultTakeTimeout()Gets the default take timeout when executingtake(Object)ortakeIfExists(Object)operations. -
setDefaultWriteLease
public void setDefaultWriteLease(long defaultWriteLease) Sets the default write lease when executingwrite(Object). -
getDefaultWriteLease
public long getDefaultWriteLease()Gets the default write lease when executingwrite(Object). -
getDefaultIsolationLevel
public int getDefaultIsolationLevel()Gets the defaultIsolationLevel. -
setDefaultWriteModifiers
Sets the defaultWriteModifierswhen excecutionwrite(Object) -
setDefaultClearModifiers
Sets the defaultClearModifierswhen excecutionwrite(Object) -
setDefaultCountModifiers
Sets the defaultCountModifierswhen excecutioncount(Object) -
setDefaultReadModifiers
Sets the defaultReadModifierswhen excecutionread(Object) -
setDefaultTakeModifiers
Sets the defaultTakeModifierswhen excecutiontake(Object) -
setDefaultChangeModifiers
Sets the defaultChangeModifierswhen excecutionchange(Object, ChangeSet) -
getDefaultWriteModifiers
Description copied from interface:GigaSpaceGets the defaultWriteModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml.- Specified by:
getDefaultWriteModifiersin interfaceGigaSpace
-
getDefaultClearModifiers
Description copied from interface:GigaSpaceGets the defaultClearModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml.- Specified by:
getDefaultClearModifiersin interfaceGigaSpace
-
getDefaultCountModifiers
Description copied from interface:GigaSpaceGets the defaultCountModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml. If there is an active transaction and that transaction has any isolation level set on it, that isolation level will be merged into the returned modifiers with any previously set isolation level on the modifiers overriden.- Specified by:
getDefaultCountModifiersin interfaceGigaSpace
-
getDefaultReadModifiers
Description copied from interface:GigaSpaceGets the defaultReadModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml. If there is an active transaction and that transaction has any isolation level set on it, that isolation level will be merged into the returned modifiers with any previously set isolation level on the modifiers overriden.- Specified by:
getDefaultReadModifiersin interfaceGigaSpace
-
getDefaultTakeModifiers
Description copied from interface:GigaSpaceGets the defaultTakeModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml.- Specified by:
getDefaultTakeModifiersin interfaceGigaSpace
-
getDefaultChangeModifiers
Description copied from interface:GigaSpaceGets the defaultChangeModifiersset during thisGigaSpaceconfiguration. This value is configured either by using aGigaSpaceConfigureror through the pu.xml.- Specified by:
getDefaultChangeModifiersin interfaceGigaSpace
-
getSpace
Description copied from interface:GigaSpaceReturns theIJSpaceused 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. -
getClustered
Description copied from interface:GigaSpaceReturns a clustered view of thisGigaSpaceinstance.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:
getClusteredin interfaceGigaSpace- See Also:
-
getTxProvider
Description copied from interface:GigaSpaceReturns the transaction provider allowing to access the current running transaction.- Specified by:
getTxProviderin interfaceGigaSpace
-
getExceptionTranslator
Description copied from interface:GigaSpaceReturns the exception translator associated with this GigaSpace instance.- Specified by:
getExceptionTranslatorin interfaceGigaSpace
-
clear
Description copied from interface:GigaSpaceRemoves 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.
-
clear
public int clear(Object template, ClearModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRemoves 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:
clearin interfaceGigaSpace- Parameters:
template- the template to use for matchingmodifiers- one or a union ofClearModifiers.- Returns:
- The number of cleared entries
- Throws:
org.springframework.dao.DataAccessException- In the event of an error, DataAccessException will wrap a ClearException, accessible via DataAccessException.getRootCause().
-
count
Description copied from interface:GigaSpaceCount any matching entry from the space. If a running within a transaction will count all the entries visible under the transaction.- Specified by:
countin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").- Returns:
- The number of matching entries
- Throws:
org.springframework.dao.DataAccessException
-
count
public int count(Object template, CountModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceCount 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
ReadModifierswhich allows to programmatically control the isolation level this count operation will be performed under.- Specified by:
countin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being wildcards ("match anything") other fields being values ("match exactly on the serialized form").modifiers- one or a union ofCountModifiers.- Returns:
- The number of matching entries
- Throws:
org.springframework.dao.DataAccessException
-
snapshot
Description copied from interface:GigaSpaceThe 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
IllegalArgumentExceptionunless 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. -
readById
Description copied from interface:GigaSpaceRead an object from the space matching its id and the class. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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. -
readById
Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
readById
Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif there is no match within the specified timeout.- Specified by:
readByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the space- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readById
public <T> T readById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers) Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif there is no match within the specified timeout.- Specified by:
readByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofReadModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readById
Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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. -
readById
public <T> T readById(IdQuery<T> query, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif there is no match within the specified timeout.- Specified by:
readByIdin interfaceGigaSpace- 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
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
readById
public <T> T readById(IdQuery<T> query, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif there is no match within the specified timeout.- Specified by:
readByIdin interfaceGigaSpace- Parameters:
query- Query to search by.timeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofReadModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
read
public <T> T read(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
readin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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:
org.springframework.dao.DataAccessException
-
read
public <T> T read(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
readin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
read
public <T> T read(T template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.Overloads
GigaSpace.read(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
read
Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
read
public <T> T read(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
readin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
read
public <T> T read(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, blocking until one exists. Returnnullif the timeout expires.Overloads
GigaSpace.read(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(T template, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(T template, long timeout, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.listener- A listener to be notified when a result arrives- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(T template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Overloads
GigaSpace.asyncRead(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(T template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Overloads
GigaSpace.asyncRead(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.listener- A listener to be notified when a result arrives- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.listener- A listener to be notified when a result arrives- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.listener- A listener to be notified when a result arrives- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Overloads
GigaSpace.asyncRead(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
asyncRead
public <T> AsyncFuture<T> asyncRead(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceReads 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 (nullin case there was no match).Overloads
GigaSpace.asyncRead(Object, long)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
asyncReadin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.listener- A listener to be notified when a result arrives- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readIfExistsById
Description copied from interface:GigaSpaceRead an object from the space matching its id and the class. Returnsnullif 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 0.
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:
readIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entry- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readIfExistsById
Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif 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 0.
- Specified by:
readIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing value- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readIfExistsById
Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif 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:
readIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the space- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readIfExistsById
public <T> T readIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, ReadModifiers modifiers) Description copied from interface:GigaSpaceRead an object from the space matching its id, the class and the routing value. Returnsnullif 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:
readIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofReadModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
readIfExistsById
Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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:
readIfExistsByIdin interfaceGigaSpace- Parameters:
query- Query to search by.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
readIfExistsById
public <T> T readIfExistsById(IdQuery<T> query, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif 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:
readIfExistsByIdin interfaceGigaSpace- 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
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
readIfExistsById
public <T> T readIfExistsById(IdQuery<T> query, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead an object from the space matching the specified id query. Returnsnullif 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:
readIfExistsByIdin interfaceGigaSpace- Parameters:
query- Query to search by.timeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofReadModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, 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 0.
- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(T template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, 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 amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(ISpaceQuery<T> template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, 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 0.
- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readIfExists
public <T> T readIfExists(ISpaceQuery<T> template, long timeout, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching object from the space, returningnullif there currently is none. Matching and timeouts are done as inread, 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 amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching object. A timeout of 0 means to wait no time at all.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the object read from the space.
- Throws:
org.springframework.dao.DataAccessException
-
readMultiple
public <T> T[] readMultiple(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an unbounded array of matches. Returns an empty array if no match was found. Same as callingreadMultiple(template, Integer.MAX_VALUE).- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasses- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an array with matches bound bymaxEntries. Returns an empty array if no match was found.- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesmaxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.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, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an array with matches bound bymaxEntries. Returns an empty array if no match was found.Overloads
GigaSpace.readMultiple(Object, int)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesmaxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an unbounded array of matches. Returns an empty array if no match was found.- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an array with matches bound bymaxEntries. Returns an empty array if no match was found.- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.maxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.DataAccessException- In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().
-
wrap
- Throws:
Exception
-
readMultiple
public <T> T[] readMultiple(ISpaceQuery<T> template, int maxEntries, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead any matching entries from the space. Matching is done as inreadwithout timeout (0). Returns an array with matches bound bymaxEntries. Returns an empty array if no match was found.Overloads
GigaSpace.readMultiple(Object, int)by adding amodifiersparameter. Equivalent when called with the default modifier -ReadModifiers.REPEATABLE_READ. Modifiers are used to define the behavior of a read operation.- Specified by:
readMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.maxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.modifiers- one or a union ofReadModifiers.- Returns:
- A copy of the entries read from the space.
- Throws:
org.springframework.dao.DataAccessException- In the event of a read error, DataAccessException will wrap a ReadMultipleException, accessible via DataAccessException.getRootCause().
-
takeById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id and the class. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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. -
takeById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
takeById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif there is no match within the specified timeout.- Specified by:
takeByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the space- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeById
public <T> T takeById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers) Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif there is no match within the specified timeout.- Specified by:
takeByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofTakeModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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. -
takeById
public <T> T takeById(IdQuery<T> query, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif there is no match within the specified timeout.- Specified by:
takeByIdin interfaceGigaSpace- 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
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
takeById
public <T> T takeById(IdQuery<T> query, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif there is no match within the specified timeout.- Specified by:
takeByIdin interfaceGigaSpace- Parameters:
query- Query to search by.timeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofTakeModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
take
public <T> T take(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
takein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
take
public <T> T take(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
takein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
take
public <T> T take(T template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
takein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
take
Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
take
public <T> T take(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
takein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
take
public <T> T take(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, blocking until one exists. Returnnullif the timeout expires.- Specified by:
takein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(T template, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(T template, long timeout, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.listener- A listener to be notified when a result arrives- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(T template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(T template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.listener- A listener to be notified when a result arrives- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).Note, the timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.listener- A listener to be notified when a result arrives.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
asyncTake
public <T> AsyncFuture<T> asyncTake(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers, AsyncFutureListener<T> listener) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (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 (nullin case there was no match).- Specified by:
asyncTakein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.listener- A listener to be notified when a result arrives.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExistsById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id and the class. Returnsnullif 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 0.
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:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entry- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeIfExistsById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif 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 0.
- Specified by:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing value- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeIfExistsById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif 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:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the space- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeIfExistsById
public <T> T takeIfExistsById(Class<T> clazz, Object id, Object routing, long timeout, TakeModifiers modifiers) Description copied from interface:GigaSpaceTake (remove) an object from the space matching its id, the class and the routing value. Returnsnullif 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:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
clazz- The class of the entryid- The id of the entryrouting- The routing valuetimeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofTakeModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value.
-
takeIfExistsById
Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif there is no match.The timeout is the default timeout this interface is configured with (using its factory) and defaults to 0.
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:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
query- Query to search by.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
takeIfExistsById
public <T> T takeIfExistsById(IdQuery<T> query, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif 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:
takeIfExistsByIdin interfaceGigaSpace- 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
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
takeIfExistsById
public <T> T takeIfExistsById(IdQuery<T> query, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) an object from the space matching the specified id query. Returnsnullif 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:
takeIfExistsByIdin interfaceGigaSpace- Parameters:
query- Query to search by.timeout- The timeout value to wait for a matching entry if it does not exists within the spacemodifiers- one or a union ofTakeModifiers.- Returns:
- A matching object, or
nullif no matching is found within the timeout value. - Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, 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 0.
- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being wildcards ( "match anything") other fields being values ("match exactly on the serialized form").- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(T template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(T template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields 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 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(ISpaceQuery<T> template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, 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 0.
- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(ISpaceQuery<T> template, long timeout) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeIfExists
public <T> T takeIfExists(ISpaceQuery<T> template, long timeout, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) any matching entry from the space, returningnullif there currently is none. Matching and timeouts are done as intake, except that blocking in this call is done only if necessary to wait for transactional state to settle.- Specified by:
takeIfExistsin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.timeout- How long the client is willing to wait for a transactionally proper matching entry. A timeout of 0 means to wait no time at all.modifiers- one or a union ofTakeModifiers.- Returns:
- A removed entry from the space
- Throws:
org.springframework.dao.DataAccessException
-
takeMultiple
public <T> T[] takeMultiple(T template) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space. Same as callingtakeMultiple(template, Integer.MAX_VALUE).- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasses- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space.- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesmaxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space.- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space.- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.maxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.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, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space.- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesmaxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.modifiers- one or a union ofTakeModifiers.- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.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, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTakes (removes) all the entries matching the specified template from this space.- Specified by:
takeMultiplein interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.maxEntries- A limit on the number of entries to be returned. UseInteger.MAX_VALUEfor the uppermost limit.modifiers- one or a union ofTakeModifiers.- Returns:
- Removed matched entries from the space
- Throws:
org.springframework.dao.DataAccessException- In the event of a take error, DataAccessException will wrap a TakeMultipleException, accessible via DataAccessException.getRootCause().
-
write
Description copied from interface:GigaSpaceWrites a new object to the space, returning itsLeaseContext.By default uses the
WriteModifiers.UPDATE_OR_WRITEmodifier (seeGigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), theWriteModifiers.WRITE_ONLYmodifier can be used resulting in anEntryAlreadyInSpaceExceptionif 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_ONLYorWriteModifiers.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:
writein interfaceGigaSpace- Parameters:
entry- The entry to write to the space- Returns:
- A usable
Leaseon a successful write, ornullif performed with the proxy configured with NoWriteLease flag.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returnsnullon a successful write or the previous value - on successful update (Only ifWriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null).UpdateOperationTimeoutExceptionis thrown if timeout occurred while trying to update the object. - Throws:
org.springframework.dao.DataAccessException
-
write
public <T> LeaseContext<T> write(T entry, long lease) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites a new object to the space, returning itsLeaseContext.By default uses the
WriteModifiers.UPDATE_OR_WRITEmodifier (seeGigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), theWriteModifiers.WRITE_ONLYmodifier can be used resulting in anEntryAlreadyInSpaceExceptionif 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_ONLYorWriteModifiers.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:
writein interfaceGigaSpace- Parameters:
entry- The entry to write to the spacelease- The lease the entry will be written with, in milliseconds.- Returns:
- A usable
Leaseon a successful write, ornullif performed with the proxy configured with NoWriteLease flag.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returnsnullon a successful write or the previous value - on successful update (Only ifWriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null).UpdateOperationTimeoutExceptionis thrown if timeout occurred while trying to update the object. - Throws:
org.springframework.dao.DataAccessException
-
write
public <T> LeaseContext<T> write(T entry, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites a new object to the space, returning itsLeaseContext.By default uses the
WriteModifiers.UPDATE_OR_WRITEmodifier (seeGigaSpace.write(Object, long, long, WriteModifiers). In order to force the operation to perform "write" only (a bit more performant), theWriteModifiers.WRITE_ONLYmodifier can be used resulting in anEntryAlreadyInSpaceExceptionif 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_ONLYorWriteModifiers.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:
writein interfaceGigaSpace- Parameters:
entry- The entry to write to the spacemodifiers- one or a union ofWriteModifiers.- Returns:
- A usable
Leaseon a successful write, ornullif performed with the proxy configured with NoWriteLease flag.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returnsnullon a successful write or the previous value - on successful update (Only ifWriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null).UpdateOperationTimeoutExceptionis thrown if timeout occurred while trying to update the object. - Throws:
org.springframework.dao.DataAccessException
-
write
public <T> LeaseContext<T> write(T entry, long lease, long timeout, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites a new object to the space, returning itsLeaseContext.By default uses the
WriteModifiers.UPDATE_OR_WRITEmodifier. In order to force the operation to perform "write" only (a bit more performant), theWriteModifiers.WRITE_ONLYmodifier can be used resulting in anEntryAlreadyInSpaceExceptionif 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_ONLYorWriteModifiers.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:
writein interfaceGigaSpace- Parameters:
entry- The entry to write to the spacelease- 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 ofWriteModifiers.- Returns:
- A usable
Leaseon a successful write, ornullif performed with the proxy configured with NoWriteLease flag.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returnsnullon a successful write or the previous value - on successful update (Only ifWriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null).UpdateOperationTimeoutExceptionis thrown if timeout occurred while trying to update the object. - Throws:
org.springframework.dao.DataAccessException
-
aggregate
Description copied from interface:GigaSpaceExecutes the specified query along with the specified aggregations collocated at the space. -
aggregate
public <T> AggregationResult aggregate(ISpaceQuery<T> query, AggregationSet aggregationSet, ReadModifiers readModifiers) -
change
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier. -
change
public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifiers- Returns:
- A
ChangeResultcontaining the details of the change operation affect. - See Also:
-
change
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- 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
ChangeResultcontaining the details of the change operation affect. - See Also:
-
change
public <T> ChangeResult<T> change(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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
ChangeResultcontaining the details of the change operation affect. - See Also:
-
asyncChange
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- 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.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- 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.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- 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.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- 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.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers) Description copied from interface:GigaSpaceChanges an existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifiers- Returns:
- A future containing the details of the change operation affect which arrived asynchronously.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierslistener- A listener to be notified when a result arrives.- Returns:
- A future containing the details of the change operation affect which arrived asynchronously.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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.
- See Also:
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(ISpaceQuery<T> query, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
query- Query to search by.changeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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.
- See Also:
-
change
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.- Returns:
- A
ChangeResultcontaining the details of the change operation affect.
-
change
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifiers- Returns:
- A
ChangeResultcontaining the details of the change operation affect.
-
change
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- 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
ChangeResultcontaining the details of the change operation affect.
-
change
public <T> ChangeResult<T> change(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
changein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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
ChangeResultcontaining the details of the change operation affect.
-
asyncChange
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- 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(T template, ChangeSet changeSet, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- 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
Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- 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(T template, ChangeSet changeSet, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- 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(T template, ChangeSet changeSet, ChangeModifiers modifiers) Description copied from interface:GigaSpaceChanges an existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifiers- Returns:
- A future containing the details of the change operation affect which arrived asynchronously.
-
asyncChange
public <T> Future<ChangeResult<T>> asyncChange(T template, ChangeSet changeSet, ChangeModifiers modifiers, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierslistener- 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(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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(T template, ChangeSet changeSet, ChangeModifiers modifiers, long timeout, AsyncFutureListener<ChangeResult<T>> listener) Description copied from interface:GigaSpaceChanges existing objects 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.NONEmodifier.- Specified by:
asyncChangein interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasseschangeSet- Changes to apply to the matched entry.modifiers- one or a union ofChangeModifierstimeout- 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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites 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:
writeMultiplein interfaceGigaSpace- Parameters:
entries- The entries to write to the space.- Returns:
- Leases for the written entries
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites the specified entries to this space.- Specified by:
writeMultiplein interfaceGigaSpace- Parameters:
entries- The entries to write to the space.modifiers- one or a union ofWriteModifiers.- Returns:
- Leases for the written entries
- Throws:
org.springframework.dao.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 org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites the specified entries to this space.- Specified by:
writeMultiplein interfaceGigaSpace- 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:
org.springframework.dao.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, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites 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:
writeMultiplein interfaceGigaSpace- Parameters:
entries- the entries to write.lease- the requested lease time, in millisecondsmodifiers- one or a union ofWriteModifiers.- 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
Leaseon a successful write, ornullif performed with NoWriteLease attribute.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returns:- null - on a successful write
- previous value -
on successful update (Only if
WriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null)
- or, OperationTimeoutException - thrown if timeout occurred
- Throws:
org.springframework.dao.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, long timeout, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites 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:
writeMultiplein interfaceGigaSpace- Parameters:
entries- the entries to write.lease- the requested lease time, in millisecondstimeout- The timeout of the update operations, in milliseconds. If entries are locked by another transactionmodifiers- one or a union ofWriteModifiers.- 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
Leaseon a successful write, ornullif performed with NoWriteLease attribute.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returns:- null - on a successful write
- previous value -
on successful update (Only if
WriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null)
- or, OperationTimeoutException - thrown if timeout occurred
- Throws:
org.springframework.dao.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, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites 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:
writeMultiplein interfaceGigaSpace- Parameters:
entries- the entries to write.leases- the requested lease time per entry, in millisecondsmodifiers- one or a union ofWriteModifiers.- 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
Leaseon a successful write, ornullif performed with NoWriteLease attribute.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returns:- null - on a successful write
- previous value -
on successful update (Only if
WriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null)
- or, OperationTimeoutException - thrown if timeout occurred
- Throws:
org.springframework.dao.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, long timeout, WriteModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceWrites 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:
writeMultiplein interfaceGigaSpace- Parameters:
entries- the entries to write.leases- the requested lease time per entry, in millisecondstimeout- The timeout of the update operations, in milliseconds. If entries are locked by another transactionmodifiers- one or a union ofWriteModifiers.- 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
Leaseon a successful write, ornullif performed with NoWriteLease attribute.when
WriteModifiers.UPDATE_OR_WRITEmodifier is applied,LeaseContext.getObject()returns:- null - on a successful write
- previous value -
on successful update (Only if
WriteModifiers.RETURN_PREV_ON_UPDATEis used, otherwise null)
- or, OperationTimeoutException - thrown if timeout occurred
- Throws:
org.springframework.dao.DataAccessException- In the event of a write error, DataAccessException will wrap a WriteMultipleException, accessible via DataAccessException.getRootCause().
-
iterator
Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclasses- Returns:
- An iterator over the entries which match the template.
-
iterator
Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesbatchSize- Maximum number of entries to fetch on each batch.- Returns:
- An iterator over the entries which match the template.
-
iterator
Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesbatchSize- Maximum number of entries to fetch on each batch.modifiers- one or a union ofReadModifiers.- Returns:
- An iterator over the entries which match the template.
-
iterator
public <T> SpaceIterator<T> iterator(T template, SpaceIteratorConfiguration spaceIteratorConfiguration) Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- The template used for matching. Matching is done against the template withnullfields being. wildcards ("match anything") other fields being values ("match exactly on the serialized form"). The template can also be one of the differentISpaceQueryclassesspaceIteratorConfiguration-SpaceIteratorConfiguration.- Returns:
- An iterator over the entries which match the template.
-
iterator
Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template. -
iterator
Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template. -
iterator
public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template, int batchSize, ReadModifiers modifiers) Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.batchSize- Maximum number of entries to fetch on each batch.modifiers- one or a union ofReadModifiers.- Returns:
- An iterator over the entries which match the template.
-
iterator
public <T> SpaceIterator<T> iterator(ISpaceQuery<T> template, SpaceIteratorConfiguration spaceIteratorConfiguration) Description copied from interface:GigaSpaceReturns an iterator over the entries in the space which match the specified template.- Specified by:
iteratorin interfaceGigaSpace- Parameters:
template- A query to be executed against the space. Most common one isSQLQuery.spaceIteratorConfiguration-SpaceIteratorConfiguration.- Returns:
- An iterator over the entries which match the template.
-
execute
Description copied from interface:GigaSpaceExecutes 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 withSpaceRouting.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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available. -
execute
public <T extends Serializable> AsyncFuture<T> execute(Task<T> task, AsyncFutureListener<T> listener) Description copied from interface:GigaSpaceExecutes 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 withSpaceRouting.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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available. -
execute
Description copied from interface:GigaSpaceExecutes 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
@SpaceRoutingannotation (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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available.- Specified by:
executein interfaceGigaSpace- Parameters:
task- The task to executerouting- 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:GigaSpaceExecutes 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
@SpaceRoutingannotation (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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available.- Specified by:
executein interfaceGigaSpace- Parameters:
task- The task to executerouting- The routing value that will control on which node the task will be executed onlistener- 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:GigaSpaceExecutes 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 theAsyncResultsReducer.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
@SpaceRoutingannotation (this works well when wanting to use entries as the routing parameters).The task can optionally implement
AsyncResultFilterthat 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
AsyncFutureListenerwhich, 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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available.- Specified by:
executein interfaceGigaSpace- Parameters:
task- The task to executeroutings- 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
Description copied from interface:GigaSpaceExecutes 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 theAsyncResultsReducer.reduce(java.util.List)operation.The task can optionally implement
AsyncResultFilterthat 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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available. -
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:GigaSpaceConstructs 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
AsyncResultFilterthat 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
GigaSpaceusing theTaskGigaSpaceannotation. Another option is by implementing theTaskGigaSpaceAwareinterface.Resource injection can be enabled by marking the task with
AutowireTaskor withAutowireTaskMarker. Resources defined within processing unit (space node) the task is executed on are accessible by using either theAutowiredor javax.annotation.Resource annotations (assuming they are enabled usingcontext:annotation-config). Bean life cycle methods, such asClusterInfoAwareandApplicationContextAwareare also available.- Specified by:
executorBuilderin interfaceGigaSpace- Parameters:
reducer- The reducer to reduce the results of all the different tasks added.- Returns:
- The executor builder.
-
getCurrentTransaction
Description copied from interface:GigaSpaceReturns the current running transaction. Can benullif no transaction is in progress.- Specified by:
getCurrentTransactionin interfaceGigaSpace
-
toString
-
wrapListener
-
wrapFuture
- Specified by:
wrapFuturein interfaceInternalGigaSpace
-
readByIds
Description copied from interface:GigaSpaceRead objects from the space matching their IDs and the specified class.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will broadcast to all partitions. Use
GigaSpace.readByIds(Class, Object[], Object)to specify the routing explicitly and avoid broadcast if needed. -
readByIds
public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object routing, ReadModifiers modifiers) Description copied from interface:GigaSpaceRead objects from the space matching their IDs, the specified class type and routing key, with the providedReadModifiers.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKey. If it is null, the operation will broadcast to all partitions.ReadModifiers.FIFOis not supported by this operation - the results are always ordered in correlation with the input IDs array.- Specified by:
readByIdsin interfaceGigaSpace- 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 ofReadModifiers).- Returns:
- a ReadByIdsResult containing the matched results.
-
readByIds
public <T> ReadByIdsResult<T> readByIds(Class<T> clazz, Object[] ids, Object[] routings, ReadModifiers modifiers) Description copied from interface:GigaSpaceRead objects from the space matching their IDs, the specified class and the routing keys, with the providedReadModifiers.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKeys. If it is null, the operation will broadcast to all partitions.routingKeysshould be correlated withids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.ReadModifiers.FIFOis not supported by this operation - the results are always ordered in correlation with the input IDs array.- Specified by:
readByIdsin interfaceGigaSpace- 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 ofReadModifiers).- Returns:
- a ReadByIdsResult containing the matched results.
-
readByIds
Description copied from interface:GigaSpaceRead objects from the space matching their IDs, the specified class and routing key.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKey. If it is null, the operation will broadcast to all partitions. -
readByIds
Description copied from interface:GigaSpaceRead objects from the space matching their IDs, the specified class and the routing keys.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKeys. If it is null, the operation will broadcast to all partitions.routingKeysshould be correlated withids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array. -
readByIds
public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead objects from the space matching the specified IDs query. -
readByIds
public <T> ReadByIdsResult<T> readByIds(IdsQuery<T> query, ReadModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceRead objects from the space matching the specified IDs query, with the providedReadModifiers.- Specified by:
readByIdsin interfaceGigaSpace- Parameters:
query- Query to search by.modifiers- The read modifier to use (One or several ofReadModifiers).- Returns:
- a ReadByIdsResult containing the matched results.
- Throws:
org.springframework.dao.DataAccessException
-
takeByIds
public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object routing, TakeModifiers modifiers) Description copied from interface:GigaSpaceTake (remove) objects from the space matching their IDs, the specified class type and routing key, with the providedReadModifiers.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKey. If it is null, the operation will broadcast to all partitions.ReadModifiers.FIFOis not supported by this operation - the results are always ordered in correlation with the input IDs array.- Specified by:
takeByIdsin interfaceGigaSpace- 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 ofReadModifiers).- Returns:
- a TakeByIdsResult containing the matched results.
-
takeByIds
public <T> TakeByIdsResult<T> takeByIds(Class<T> clazz, Object[] ids, Object[] routings, TakeModifiers modifiers) Description copied from interface:GigaSpaceTake (remove) objects from the space matching their IDs, the specified class and the routing keys, with the providedReadModifiers.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKeys. If it is null, the operation will broadcast to all partitions.routingKeysshould be correlated withids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array.ReadModifiers.FIFOis not supported by this operation - the results are always ordered in correlation with the input IDs array.- Specified by:
takeByIdsin interfaceGigaSpace- 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 ofReadModifiers).- Returns:
- a TakeByIdsResult containing the matched results.
-
takeByIds
Description copied from interface:GigaSpaceTake (remove) objects from the space matching their IDs and the specified class.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will broadcast to all partitions. Use
GigaSpace.readByIds(Class, Object[], Object)to specify the routing explicitly and avoid broadcast if needed. -
takeByIds
Description copied from interface:GigaSpaceTake (remove) objects from the space matching their IDs, the specified class and routing key.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKey. If it is null, the operation will broadcast to all partitions. -
takeByIds
Description copied from interface:GigaSpaceTake (remove) objects from the space matching their IDs, the specified class and the routing keys.Note, if the space is partitioned and the Class defines that routing is not done via the Id property, the operation will be routed according to
routingKeys. If it is null, the operation will broadcast to all partitions.routingKeysshould be correlated withids, i.e. their length should be the same, and the routing key of ID i in the IDs array is the element at position i in the routing keys array. -
takeByIds
public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) objects from the space matching the specified IDs query. -
takeByIds
public <T> TakeByIdsResult<T> takeByIds(IdsQuery<T> query, TakeModifiers modifiers) throws org.springframework.dao.DataAccessException Description copied from interface:GigaSpaceTake (remove) objects from the space matching the specified IDs query, with the providedReadModifiers.- Specified by:
takeByIdsin interfaceGigaSpace- Parameters:
query- Query to search by.modifiers- The read modifier to use (One or several ofReadModifiers).- Returns:
- a ReadByIdsResult containing the matched results.
- Throws:
org.springframework.dao.DataAccessException
-
newDataEventSession
Description copied from interface:GigaSpaceCreates a new DataEventSession with the default configuration.- Specified by:
newDataEventSessionin interfaceGigaSpace- Returns:
- a new data event session.
-
newDataEventSession
Description copied from interface:GigaSpaceCreates a new DataEventSession with the specified configuration.- Specified by:
newDataEventSessionin interfaceGigaSpace- Parameters:
config- The configuration settings for the new data event session.- Returns:
- a new data event session.
-
getTypeManager
Description copied from interface:GigaSpaceGets the type manager of this GigaSpace instance.- Specified by:
getTypeManagerin interfaceGigaSpace- See Also:
-
setQuiesceToken
- Specified by:
setQuiesceTokenin interfaceGigaSpace
-
setMVCCGenerationsState
- Specified by:
setMVCCGenerationsStatein interfaceGigaSpace
-
prepareTemplate
Description copied from interface:GigaSpaceTranslates the template object into pre-processed packet which will be sent to the space. The process of serializing an entry for transmission to the space will be identical if the same entry is used twice. The prepareTemplate method gives a way to reduce the impact of repeated use of the same entry therefore it is extremely useful when dealing with many template matching operations (i.e read and take). This method will not access the space, all processing is done in client side only.- Specified by:
prepareTemplatein interfaceGigaSpace- Parameters:
template- to be translated intoISpaceQuery- Returns:
- pre-processed
ISpaceQuerywhich represents the translated template - See Also:
-
close
- Throws:
IOException
-
asyncLoad
public AsyncFuture<SpaceDataSourceLoadResult> asyncLoad(SpaceDataSourceLoadRequest spaceDataSourceLoadRequest) Description copied from interface:GigaSpaceLoads data from aSpaceDataSourceon demand The Space data source is created withSpaceDataSourceFactoryLoaded data can be adapted using theSpaceTypeSchemaAdapter- Specified by:
asyncLoadin interfaceGigaSpace- Parameters:
spaceDataSourceLoadRequest-SpaceDataSourceLoadRequest- Returns:
- A future containing the details of the load operation affect which arrived * asynchronously.
-
getClassBytes
public static byte[] getClassBytes(Class<?> clazz) throws IOException, javassist.NotFoundException, javassist.CannotCompileException - Throws:
IOExceptionjavassist.NotFoundExceptionjavassist.CannotCompileException
-
registerDurableTask
- Specified by:
registerDurableTaskin interfaceGigaSpace
-
executeDurable
- Specified by:
executeDurablein interfaceGigaSpace
-
listDurableTasks
- Specified by:
listDurableTasksin interfaceGigaSpace
-
unregisterDurableTask
- Specified by:
unregisterDurableTaskin interfaceGigaSpace
-