Services Configuration

This configuration is used for Hazelcast Service Provider Interface (SPI). The following are example configurations.


<services enable-defaults="true">
   <service enabled="true">
            <property name="">value</property>


Config config = new Config();
ServicesConfig servicesConfig = config.getServicesConfig();

servicesConfig.setEnableDefaults( true );

ServiceConfig svcConfig = servicesConfig.getServiceConfig();
svcConfig.setEnabled( true ).setName( "MyService" )
         .setClassName( "MyServiceClass" );

svcConfig.setProperty( "", "value" );

SPI configuration has the following elements.

  • name: Name of the service to be registered.
  • class-name: Name of the class that you develop for your service.
  • properties: The custom properties that you can add to your service. You enable/disable these properties and set their values using this element.
  • configuration: You can include configuration items which you develop using the Config object in your code.