|Pivotal GemFire Native Client User's Guide / Pivotal GemFire Native Client C++ API|
You can use one of two methods to implement a user-defined object in a Java client that works with C++ clients: Instantiator.register and DataSerializable.
With the Instantiator.register method, a client sends a RegistrationMessage to every Java VM in its distributed system. The message announces the mapping between a user-defined classId and class name. The other JVMs can deserialize the byte array with the correct class.
If two clients are in different distributed systems, a RegistrationMessage cannot be sent between them. For example: a put made by a client in one distributed system will hang when a client in another distributed system performs a get in pure Java mode. Similarly, a put made by a C++ client will cause a Java client to hang.
45 <2-byte-length> <class-name>
A Java client can deserialize the byte array, but a C++ client cannot convert the Java class name to a C++ class name.
User u = new User("", 0);
See Java Serialization Example for a code sample that shows how to set up user object classes in a Java client.