Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Read from specific partition by routing id

Hi,

I want to query the space for around 100 agreements for a 1 customer from an external pu which has a clustered proxy and agreements have their own id but their routing id is customer i.e. all the agreements for a customer will reside in the same partition as customer. However agreements can operate independently hence they are not children of customer.

Does gigaspace provides any method that i can directly query a specific partition by passing only routing id and not using the IdQuery

asked 2017-10-24 00:54:25 -0600

Harvey gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

You may use SQLQuery.setRouting(Object). Example:

Object routingKey = ...;
SQLQuery<Agreement> query = new SQLQuery<>(Agreement.class, "myProperty=?", myPropertyValue);
query.setRouting(routingKey);
Agreement [] agreements = gigaSpace.readMultiple(query);

The core above executes query only against the partition identified by the routing key.

answered 2017-10-25 01:25:07 -0600

Alexey Serdyuk gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-10-24 00:54:25 -0600

Seen: 49 times

Last updated: Oct 25