Registering Non-Generic Classes
You can use either of the two ways described below (using the NCache Mangement Center or Command Line Tools) to register your non-generic classes for compact serialization.
Important
For Java, before deploying your JAR files, ensure that your Environment Variable for Java Home is set and have the appropriate JDK installed as discussed in the NCache Installation Guide.
Using the NCache Management Center
Launch the NCache Management Center by browsing https://localhost:8251 or
https://<public-ip>:8252
on Windows and Linux.In the left navigation bar, click on Clustered Caches or Local Caches, based on the cache to configure.
Against the cache name, click on View Details.
This opens up the detailed configuration page for the cache. Go to the Advanced Settings tab and click on Compact Serialization in the left bar.
Click the Add Types button, and a new Select Compact Classes dialog box will open.
Against Library, click on "..." and select the required file which contains the classes. The classes will be listed from the selected assembly in the Loaded Class list box.
Select the desired classes, which you want to register with NCache for compact serialization, and click Add Classes.
- Click OK to add classes. It lists fully qualified names of all selected classes in the Compact Serialization tab.
- Click on Save Changes to apply this configuration to the cache.
Using Command Line Tools
The Add Compact Type tool enables the user to register a custom object for compact serialization for the given caches.
This command defines a compact type for demoCache. You can define further types one by one repeating the step for other types.
add-compacttype -cachename demoCache -assemblypath /user/Data.jar -class com.Data.Customer
See Also
Unregister Non-Generic Classes
Register Generic Classes
Register Generic Classes using Generic Type Handler
Register Classes for Portable Data Sharing