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

Ask Your Question

Don't Fully Understand GigaSpace.clean()


I think I am missing something basic about how to use GigaSpace.clean() When I call it from a non-PU client against an unpartitioned space then the space gets cleaned. When I call it from a non-PU client against a partitioned space then only one partition gets cleaned. Can someone explain how this method should be used?

I have attached a simple demo program to illustrate the behavior I am seeing. If you want to try it, run it twice - once with an unpartitioned space and once with a partitioned space - and compare the results. You will need to specify the location of the context file as a command line argument to CleanDemoMain.

Many thanks for your help.

-Dan h4. Attachments


{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=3060]{quote}

asked 2009-05-03 16:13:34 -0500

subuta gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

Do u have the gigaspace clustered tag as true?

answered 2009-05-03 16:21:03 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Hi Shay,

Thank you for your reply.

I was not using the clustered flag:

<os-core:space id="cleanDemo" url="jini://*/*/cleanDemo" />
<os-core:giga-space id="gigaSpace" space="cleanDemo"  />

Now I have added it:

<os-core:space id="cleanDemo" url="jini://*/*/cleanDemo" />
<os-core:giga-space id="gigaSpace" space="cleanDemo" clustered="true" />

But I am still getting the same results:

03-May-2009 22:36:29
INFO: Refreshing
display name
startup date [Sun May 03 22:36:29 BST 2009]; root of context hierarchy
03-May-2009 22:36:29
INFO: Loading XML bean definitions from file
03-May-2009 22:36:29

INFO: Bean factory for application context

About to clean

There are: 0

About to write 'em

There are: 5000

About to clean

There are: 2500


subuta gravatar imagesubuta ( 2009-05-03 16:40:00 -0500 )edit

Make sure your template routing field is null.

shay hassidim gravatar imageshay hassidim ( 2009-05-03 17:18:03 -0500 )edit

Small correction: space.clean does not support clustered partitioned space. Use: space.clear (null ) instead. Sorry for missing this. Shay Sent on the Sprint® Now Network from my BlackBerry®

shay hassidim gravatar imageshay hassidim ( 2009-05-03 17:20:00 -0500 )edit

Thanks Shay, that did it.

Sorry I missed this in the doc. Where is it?


subuta gravatar imagesubuta ( 2009-05-03 17:25:18 -0500 )edit

Here is it : http://www.gigaspaces.com/wiki/displa...

This is a page that was part of XAP 6.0 and was revived recently with XAP 6.6 doc.


shay hassidim gravatar imageshay hassidim ( 2009-05-05 06:26:46 -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: 2009-05-03 16:13:34 -0500

Seen: 47 times

Last updated: May 03 '09