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

Ask Your Question
0

Write/Update/ Delete classification in notify container

Hi,

When implementing a notify container, I understand that we can put a notification on Write of a event, Update of an event or delete of an event.

Once the event is passed to the method public Data eventListener(Data event) which is annotated with @SpaceDataEvent, is there any way to know if the object was updated or deleted or created, without querying the space ?

asked 2017-05-10 08:13:35 -0600

Harvey gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-05-10 09:53:14 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

i read the above documents, i understand that when using a notify container we do get a notification if a matching entry is updated, deleted or created, but how do i classify on what action i have been notified ? If its updation, deletion or creation

Harvey gravatar imageHarvey ( 2017-05-10 12:39:18 -0600 )edit

The EntryArrivedRemoteEvent includes the info you need.

Just include it with the @SpaceDataEvent method:

@SpaceDataEvent
    public void myEventHandler(Trade data, GigaSpace gigaSpace, TransactionStatus txStatus,
                               EntryArrivedRemoteEvent entryArrivedRemoteEvent) {

    NotifyActionType eventType = entryArrivedRemoteEvent.getNotifyActionType();
    …

    }
shay hassidim gravatar imageshay hassidim ( 2017-05-11 06:52:09 -0600 )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: 2017-05-10 08:13:35 -0600

Seen: 453 times

Last updated: May 10