net.corda.node.utilities

## Class ServiceIdentityGenerator

- net.corda.node.utilities.ServiceIdentityGenerator

-     public class ServiceIdentityGenerator

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ServiceIdentityGenerator` | `INSTANCE`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `generateToDisk(java.util.List<? extends java.nio.file.Path> dirs, java.lang.String serviceId, java.lang.String serviceName, int threshold)` Generates signing key pairs and a common distributed service identity for a set of nodes. The key pairs and the group identity get serialized to disk in the corresponding node directories. This method should be called before any of the nodes are started.

- - ### Field Detail

    - #### INSTANCE

          public static ServiceIdentityGenerator INSTANCE

  - ### Method Detail

    - #### generateToDisk

          public void generateToDisk(java.util.List<? extends java.nio.file.Path> dirs,
                                     java.lang.String serviceId,
                                     java.lang.String serviceName,
                                     int threshold)

      Generates signing key pairs and a common distributed service identity for a set of nodes. The key pairs and the group identity get serialized to disk in the corresponding node directories. This method should be called before any of the nodes are started.

      Parameters:
        `dirs` - List of node directories to place the generated identity and key pairs in.
        `serviceId` - The service id of the distributed service.
        `serviceName` - The legal name of the distributed service.
        `threshold` - The threshold for the generated group `class CompositeKey.Node`.