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

Ask Your Question
0

Get all object types in the space using the admin API

Hi,

We are creating a tool to migrate the space to another space when we have changes in the schema. In order to make this tool easier to use, we don't want to specify the class name of every type of object we want to copy, but copy all of them by default and just specify the exceptions.

How can I do that from the admin API (or any other API)? I guess that can be done because the GS UI can list all the objects in the space and the number of instances.

Thanks,

Diego

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

asked 2011-04-29 13:58:54 -0500

dgaviola 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
0

Diego,
Here you go:

GigaSpace gigaspace;
IJSpace spaceProxy = gigaspace.getSpace();
IRemoteJSpaceAdmin spaceAdmin = spaceProxy.getAdmin();
SpaceRuntimeInfo rtInfo = spaceAdmin.getRuntimeInfo();

The SpaceRuntimeInfo will have the list of space classes.

See more:
spaces/core/admin/SpaceRuntimeInfo.html">http://www.gigaspaces.com/docs/JavaDoc8.0/com/jspaces/core/admin/SpaceRuntimeInfo.html

Shay

answered 2011-04-29 14:11:56 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

You might want also take a look on this: http://www.gigaspaces.com/wiki/displa...

The JDBC Adapter is not supported with XAP 8 , but the space copy API is supported.

Shay

shay hassidim gravatar imageshay hassidim ( 2011-04-29 14:14:32 -0500 )edit

Thanks! Your above answered worked perfectly. I will take a look at the dump utility as well.

Thanks,

Diego

dgaviola gravatar imagedgaviola ( 2011-04-29 14:39:13 -0500 )edit

If you are using XAP 8.0.X you should probably have a look at:

http://www.gigaspaces.com/wiki/display/XAP8/Document%28Schema-Free%29API
and
http://www.gigaspaces.com/wiki/display/XAP8/DynamicProperties

Which can be used for schema evolution in a much nicer way.
But this is relevant for your future implementation.

Eitan

eitany gravatar imageeitany ( 2011-04-30 02:18:15 -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: 2011-04-29 13:58:54 -0500

Seen: 83 times

Last updated: Apr 29 '11