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

Ask Your Question
0

Get previous on update event

Is it possible in your notify container get the previous version in an update event?

@Notify
@EventDriven
@NotifyType(update = true)
public class TestContainer {

    @SpaceDataEvent
    void onEvent(final SpaceObject newVersion, final SpaceObject oldVersion) {
    }
}

Something like this.

asked 2018-03-01 06:30:41 -0500

GS_User gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

There is no API to do this.

There is however a way to get a notification when an object that initially matched no longer matches.

See: https://docs.gigaspaces.com/xap/12.2/...

Alternatively, you could have a field in your Java class that records a state using an Enum. Your code/logic can determine what steps should be taken when this state changes.

Or you could have a field inside the object that is a list and maintains past values.

answered 2018-03-02 13:51:21 -0500

Dixson Huie gravatar image
edit flag offensive delete link more

Comments

I saw some commented out code though in gigaspaces 12.2.1 suggesting a feature like this will be available in the future.

GS_User gravatar imageGS_User ( 2018-03-19 13:10:55 -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: 2018-03-01 06:30:41 -0500

Seen: 112 times

Last updated: Mar 02