Batch Operations

Because in most installations, ActiveSpaces is deployed with seeders on many machines on the same network, some of the operations might need a complete network round trip to complete. Therefore, large improvements in throughput can be achieved by parallelizing operations using the batch versions of the space operations whenever possible.

For example it is always faster to use the putAll method than to do a series of repeated individual puts in a loop. This throughput improvement is due to the fact that the individual operations of the batch are executed asynchronously and are therefore parallelized, providing improvement in overall throughput for the application. Batch versions of the space methods are named adding the 'All' suffix to the method's name (e.g., putAll) and return a ResultList object.

The ResultList contains a multiple ways to get the individual Result objects for each of the operations contained in the batch, as well as convenience methods such as hasException() which is true if any of the operations failed, or methods to get lists of SpaceEntries for operations that returned OK rather than NOT_FOUND.

Related reference