Reputation: 110
I want to read from backup of the map to improve the performance.But I read the source code of GetOperation and find recordStore.get(dataKey, false) in this class which make read from backup false.
`
@Override
public void run() {
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
result = mapServiceContext.toData(recordStore.get(dataKey, false));
}
`
Then how read from backup of map?
Upvotes: 0
Views: 371
Reputation: 1642
First, <read-backup-data>
has to be enabled.
Second, it works only on a member, so e.g. when you execute a task in an Executor service, and use an IMap.
This means you need a member-side reference to an Imap proxy. It won't work from a client.
Upvotes: 2
Reputation: 1
There is a configuration element <read-backup-data>
in Hazelcast XML configuration. When it is set to "true", it should be enabled.
Upvotes: 0