|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapGridAgent
A MapGridAgent is used to process operations against map entries in a remote (server-side) ObjectGrid.
An agent is submitted using an ObjectMap's AgentManager
and is run on the server ObjectGrid
instances that host the data in the map. The agent is routed to one or more server instances based on
the partitions that the optional keys resolve to.
If the map is associated with an entity, then the provided key should be an entity instance and the keys returned from processAllEntries map should be an entity with at least all the key attributes populated. Agent implementations should implement the EntityAgentMixin interface to allow automatic key to entity conversion.
MapGridAgents are invoked in a separate, independent transaction from the client's transaction. A single client request may result in multiple transactions. This can happen if the ObjectGrid processes a thousand keys using 10 transactions on 10 threads for example, 100 keys per thread.
Keys are processed in arbitrary order sequentially or in parallel and may be grouped into one or more transactions. Agents may run more than once for a key if a subsequent agent call fails in the same transaction, however an agent will only commit a successful process call one time.
EntityAgentMixin
Method Summary | |
---|---|
Object |
process(Session s,
ObjectMap map,
Object key)
This method is called once per key per partition. |
Map |
processAllEntries(Session s,
ObjectMap map)
This method is called once per partition. |
Method Detail |
---|
Object process(Session s, ObjectMap map, Object key)
s
- The Session to use for any work. Transactions are controlled by the caller.map
- The ObjectMap this agent was invoked forkey
- The key of the entry to process.
Map processAllEntries(Session s, ObjectMap map)
The MapGridAgent instance may have additional state to filter the set of entries usually using a query against the partition.
s
- The Session to use for any work. Transactions are controlled by the caller.map
- The ObjectMap this agent was invoked for.
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |