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

Ask Your Question

Number of partitions

Hi there,

I'm calculating the number of partitions in the space using the following:

public int getNumberOfPartitions(){
        int partitions = 1;
        String totalmembers = gigaSpace.getSpace().getURL().getProperty(SpaceURL.CLUSTERTOTAL_MEMBERS);
        if (total_members != null){
            partitions =
        return partitions;

But the getProperty method is deprecated. Is there a different method/way of doing the above. I'm using XAP 9.0

Thanks in advance

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2013-01-06 22:46:45 -0600

robertral gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

That's the right way getting the number of partitions : {code} Admin admin = new AdminFactory().createAdmin(); int partitionCount = admin.getSpaces().waitFor("mySpace", 5, TimeUnit.SECONDS).getPartitions().length; {code}


answered 2013-01-06 23:17:00 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Thanks for the quick reply

answered 2013-01-07 04:18:05 -0600

robertral gravatar image
edit flag offensive delete link more

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: 2013-01-06 22:46:45 -0600

Seen: 37 times

Last updated: Jan 07 '13