Register the Type
To use the
BankAccount type, you must register it with the type system. Then, when an incoming stream contains a
BankAccount, it can be manufactured from the associated
Typically, you would register the type before creating the system.
ClassId is an integer that returns the
ClassId of the instance being serialized. The
ClassId is used by deserialization to determine what instance type to create and deserialize into.
DSFID is an integer that returns the data serialization fixed ID type.
DSFID is used to determine what instance type to create and deserialize into.
DSFID should not be overridden by custom implementations, and it is reserved only for built-in serializable types.
If your application uses its own key types that are too complex to easily force into string, you can probably improve performance by using a custom type and implementing
Equals functions. For example, if you have hybrid data types such as floating point numbers, you can implement your own type that encapsulates the floating point number. Comparing floating point numbers in this way provides greater performance than comparing a string representation of the floating point numbers, with such noticeable improvements as faster cache access and smaller payloads.
See Serialization in Native Client Mode with a Java Server for information about implementing key types for a native client that is used with a Java cache server.
To extend a type that implements
IGFSerializable for your key, override and implement the
Equals methods in the key as needed.