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

Ask Your Question

Polling container lease time

I'm using a polling container to modify space objects that are written to the space.

The original space objects are written with a finite lease time - I want them to expire at some point.

However, after the space objects are modified in the polling container and are written back to the space (by returning the modified value), the lease time is automatically set to "infinite" - it will never expire.

I would like GS to maintain the original lease time of the object when returning the modified object in the polling container event method.

How do I do this?

My current work around is to return null in the polling container event method and to manually handle writing the object(s) back to the space with the desired lease time but I prefer not to do that.


P.S., Using XAP 9.6 in case this is a bug that's been fixed

asked 2015-03-23 14:03:23 -0500

Steve McCarthy gravatar image

updated 2015-03-23 14:05:53 -0500

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

if you want to control the lease duration you should write the objects instead of return these from the event method. Your event method can have void as a return value. You don't need to return a null in such a case.

If you are interested to modify only the lease duration here is a simple and optimized way to do this: http://docs.gigaspaces.com/xap100/cha...

answered 2015-03-23 23:51:42 -0500

shay hassidim gravatar image
edit flag offensive delete link more


What I really wanted is for the polling container not to change the original lease duration.

Is that an option XAP could support in the future?


Steve McCarthy gravatar imageSteve McCarthy ( 2015-03-25 12:07:32 -0500 )edit

Sure it can be supported. I can’t see why it won’t. Please submit a feature request via support.


shay hassidim gravatar imageshay hassidim ( 2015-03-25 12:54:38 -0500 )edit

Sure, I'll submit that feature request. I was actually quite surprised when I realized that XAP was automatically modifying the lease duration to never expire even though the original objects were written to the space with a finite lease duration. I would have thought that maintaining the original lease duration should be the default behavior but apparently that is not the case. Thanks.

Steve McCarthy gravatar imageSteve McCarthy ( 2015-03-25 14:04:05 -0500 )edit

Are you using take to read the object?

answered 2015-03-23 15:37:08 -0500

DeWayne gravatar image
edit flag offensive delete link more


I'm using MultiReadReceiveOperationHandler.

Steve McCarthy gravatar imageSteve McCarthy ( 2015-03-23 16:04:22 -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


Asked: 2015-03-23 14:03:23 -0500

Seen: 768 times

Last updated: Mar 23 '15