net.corda.node.services.identity

## Class InMemoryIdentityService

- SingletonSerializeAsToken
- - net.corda.node.services.identity.InMemoryIdentityService

- All Implemented Interfaces:
    IdentityService, SerializeAsToken

      public class InMemoryIdentityService
      extends SingletonSerializeAsToken
      implements IdentityService

  Simple identity service which caches parties and provides functionality for efficient lookup.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface net.corda.core.node.services.IdentityService

      `IdentityService.DefaultImpls`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InMemoryIdentityService()` Simple identity service which caches parties and provides functionality for efficient lookup.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Iterable<net.corda.core.crypto.Party>` | `getAllIdentities()` Get all identities known to the service. This is expensive, and `InMemoryIdentityService.partyFromKey` or partyFromName should be used in preference where possible.
    `Party` | `partyFromAnonymous(AnonymousParty party)`
    `Party` | `partyFromAnonymous(PartyAndReference partyRef)`
    `Party` | `partyFromKey(CompositeKey key)`
    `Party` | `partyFromName(java.lang.String name)`
    `void` | `registerIdentity(Party party)`

    - ### Methods inherited from class net.corda.core.serialization.SingletonSerializeAsToken

      `toToken`

    - ### Methods inherited from interface net.corda.core.node.services.IdentityService

      `getAllIdentities, partyFromAnonymous, partyFromAnonymous, partyFromKey, partyFromName, registerIdentity`

    - ### Methods inherited from interface net.corda.core.serialization.SerializeAsToken

      `toToken`

- - ### Constructor Detail

    - #### InMemoryIdentityService

          public InMemoryIdentityService()

      Simple identity service which caches parties and provides functionality for efficient lookup.

  - ### Method Detail

    - #### registerIdentity

          public void registerIdentity(Party party)

    - #### getAllIdentities

          public java.lang.Iterable<net.corda.core.crypto.Party> getAllIdentities()

      Get all identities known to the service. This is expensive, and `InMemoryIdentityService.partyFromKey` or partyFromName should be used in preference where possible.

      See Also:
        `InMemoryIdentityService.partyFromKey`

    - #### partyFromKey

          public Party partyFromKey(CompositeKey key)

    - #### partyFromName

          public Party partyFromName(java.lang.String name)

    - #### partyFromAnonymous

          public Party partyFromAnonymous(AnonymousParty party)

    - #### partyFromAnonymous

          public Party partyFromAnonymous(PartyAndReference partyRef)