Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
2.2. Creating CacheManagers
2.2.1. Create a New RemoteCacheManager Link kopierenLink in die Zwischenablage kopiert!
Link kopierenLink in die Zwischenablage kopiert!
Use the following configuration to configure a new
RemoteCacheManager:
Configuration Explanation
An explanation of each line of the provided configuration is as follows:
- Use the
ConfigurationBuilder()method to configure a new builder. The.addServer()property adds a remote server, specified via the.host(<hostname|ip>)and.port(<port>)properties.Configuration conf = new ConfigurationBuilder().addServer().host(<hostname|ip>).port(<port>).build();
Configuration conf = new ConfigurationBuilder().addServer().host(<hostname|ip>).port(<port>).build();Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a new
RemoteCacheManagerusing the supplied configuration.RemoteCacheManager manager = new RemoteCacheManager(conf);
RemoteCacheManager manager = new RemoteCacheManager(conf);Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Retrieve the default cache from the remote server.
RemoteCache defaultCache = manager.getCache();
RemoteCache defaultCache = manager.getCache();Copy to Clipboard Copied! Toggle word wrap Toggle overflow