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

Ask Your Question
0

Get previous value for SetOperation

In a change operation where I am returning detailed results, is it possible to get the previous value of a SetOperation. There is a getPreviousValue() for PutInMapOperation but there doesn't appear to be one for SetOperation.

The release notes for 9.7 state that -

The change API now includes an option to get the previous value of a changed field

9.7 Release Notes

asked 2015-06-08 11:30:25 -0500

phil_35 gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

Hi,

There is no api for this. You can write Custom Change Operation: http://docs.gigaspaces.com/xap101/cha... Override change() method

Regards,

Yuval

answered 2015-06-11 02:56:10 -0500

Yuval gravatar image
edit flag offensive delete link more

Comments

It's a pity there is not an api for this so I wouldn't have to resort to creating my own custom operation, which is what I've had to do.

But I have it working so thanks for your help.

phil_35 gravatar imagephil_35 ( 2015-06-12 07:03:47 -0500 )edit
0

Hi,

See example here: http://docs.gigaspaces.com/xap101/cha...

Regards,

Yuval

answered 2015-06-09 06:05:06 -0500

Yuval gravatar image
edit flag offensive delete link more

Comments

That example is specific to an IncrementOperation. I need this for a SetOperation

For PutInMapOperation I can get the previous value using -

Object previousValue = PutInMapOperation.getPreviousValue(operationResult);

But I don't see an equivalent method for a SetOperation.So if a field is changed from "hello" to "world", I would like to be able to get the previous value of that field.

phil_35 gravatar imagephil_35 ( 2015-06-09 08:14:38 -0500 )edit

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: 2015-06-08 11:30:25 -0500

Seen: 157 times

Last updated: Jun 11 '15