com.hazelcast.instance

## Class HazelcastInstanceFactory

- java.lang.Object
- - com.hazelcast.instance.HazelcastInstanceFactory

-     @PrivateApi
      public final class HazelcastInstanceFactory
      extends Object

  Central manager for all Hazelcast members of the JVM. All creation functionality will be stored here and a particular instance of a member will delegate here.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `HazelcastInstanceFactory.InstanceFuture<T>`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `createInstanceName(Config config)`
    `static Set<HazelcastInstance>` | `getAllHazelcastInstances()`
    `static HazelcastInstance` | `getHazelcastInstance(String instanceName)`
    `static String` | `getInstanceName(String instanceName, Config config)` Return real name for the hazelcast instance's instance
    `static HazelcastInstance` | `getOrCreateHazelcastInstance(Config config)`
    `static HazelcastInstance` | `newHazelcastInstance(Config config)` Creates a new Hazelcast instance.
    `static HazelcastInstance` | `newHazelcastInstance(Config config, String instanceName, NodeContext nodeContext)` Creates a new Hazelcast instance.
    `static void` | `remove(HazelcastInstanceImpl instance)`
    `static void` | `shutdownAll()`
    `static void` | `terminateAll()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getAllHazelcastInstances

          public static Set<HazelcastInstance> getAllHazelcastInstances()

    - #### getHazelcastInstance

          public static HazelcastInstance getHazelcastInstance(String instanceName)

    - #### getOrCreateHazelcastInstance

          public static HazelcastInstance getOrCreateHazelcastInstance(Config config)

    - #### newHazelcastInstance

          public static HazelcastInstance newHazelcastInstance(Config config)

      Creates a new Hazelcast instance.
      Parameters:
        `config` - the configuration to use; if `null`, the set of defaults as specified in the XSD for the configuration XML will be used.
      Returns:
        the configured `HazelcastInstance`

    - #### createInstanceName

          public static String createInstanceName(Config config)

    - #### getInstanceName

          public static String getInstanceName(String instanceName,
                                               Config config)

      Return real name for the hazelcast instance's instance
      Parameters:
        `instanceName` - - template of the name
        `config` - - config
      Returns:
        - real hazelcast instance's name

    - #### newHazelcastInstance

          public static HazelcastInstance newHazelcastInstance(Config config,
                                                               String instanceName,
                                                               NodeContext nodeContext)

      Creates a new Hazelcast instance.
      Parameters:
        `config` - the configuration to use; if `null`, the set of defaults as specified in the XSD for the configuration XML will be used.
        `instanceName` - the name of the `HazelcastInstance`
        `nodeContext` - the `NodeContext` to use
      Returns:
        the configured `HazelcastInstance`

    - #### shutdownAll

          public static void shutdownAll()

    - #### terminateAll

          public static void terminateAll()

    - #### remove

          public static void remove(HazelcastInstanceImpl instance)

Copyright © 2020. All rights reserved.