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

Ask Your Question
0

Getting Routing Field

Hi

I have a generic space browser command line Utility which gets the class MetaData by some thing like following. I am able to get all information about the class but I couldn't figure out on how to get Routing Field. It would be if some one can help me out.

IRemoteJSpaceAdmin spaceAdmin = (IRemoteJSpaceAdmin) space .getAdmin(); SpaceRuntimeInfo rtInfo = spaceAdmin.getRuntimeInfo(); List<string> classes = rtInfo.m_ClassNames; for (int i = 0; i < classes.size(); i++) { String curEntry = classes.get(i); System.out.println("- " + classes.get(i) + " (" + rtInfo.m_NumOFEntries.get(i) + ")"); BasicTypeInfo curEntryType = spaceAdmin .getClassTypeInfo(curEntry); fieldValueTypes.put(curEntry, curEntryType.m_FieldsTypes); fieldNames.put(curEntry, curEntryType.m_FieldsNames); superClassList.put(curEntry, curEntryType.m_SuperClasses); indexFields.put(curEntry, curEntryType.m_IndexedFields); * How do I Routing Field **** }

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

asked 2009-10-27 15:49:32 -0500

venkatg gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

First you should receive class descriptor by the follwoing way:
    ITypeDesc typeDesc = spaceAdmin.getClassDescriptor( className );
Afterwards routing field can be retrived from type descriptor instance:
typeDesc.getRoutingPropertyName();

answered 2009-10-29 03:00:10 -0500

evgeny gravatar image
edit flag offensive delete link more
0

((IInternalRemoteJSpaceAdmin)space.getAdmin()).getClassDescriptor(<class name>).getRoutingFieldName()

HTH
\-- Vanio

answered 2009-10-28 16:14:13 -0500

vanio 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

Stats

Asked: 2009-10-27 15:49:32 -0500

Seen: 14 times

Last updated: Oct 29 '09