|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.core.Hazelcast
public final class Hazelcast
Factory for HazelcastInstance
's, a node in a cluster.
Method Summary | |
---|---|
static Set<HazelcastInstance> |
getAllHazelcastInstances()
Returns all active/running HazelcastInstances on this JVM. |
static HazelcastInstance |
getHazelcastInstanceByName(String instanceName)
Returns an existing HazelcastInstance with instanceName. |
static HazelcastInstance |
getOrCreateHazelcastInstance(Config config)
Gets or creates the HazelcastInstance with a certain name. |
static HazelcastInstance |
newHazelcastInstance()
Creates a new HazelcastInstance (a new node in a cluster). |
static HazelcastInstance |
newHazelcastInstance(Config config)
Creates a new HazelcastInstance (a new node in a cluster). |
static void |
setOutOfMemoryHandler(OutOfMemoryHandler outOfMemoryHandler)
Sets OutOfMemoryHandler to be used when an OutOfMemoryError is caught by Hazelcast threads. |
static void |
shutdownAll()
Shuts down all running Hazelcast Instances on this JVM. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void shutdownAll()
newHazelcastInstance(Config)
public static HazelcastInstance newHazelcastInstance(Config config)
shutdownAll()
.
config
- Configuration for the new HazelcastInstance (member)
shutdownAll()
,
getHazelcastInstanceByName(String)
public static HazelcastInstance newHazelcastInstance()
shutdownAll()
.
Hazelcast will look into two places for the configuration file:
shutdownAll()
,
getHazelcastInstanceByName(String)
public static HazelcastInstance getHazelcastInstanceByName(String instanceName)
shutdownAll()
.
instanceName
- Name of the HazelcastInstance (member)
newHazelcastInstance(Config)
,
shutdownAll()
public static HazelcastInstance getOrCreateHazelcastInstance(Config config)
config
- the Config.
NullPointerException
- if config is null.
IllegalArgumentException
- if the instance name of the config is null or empty.public static Set<HazelcastInstance> getAllHazelcastInstances()
shutdownAll()
.
newHazelcastInstance(Config)
,
getHazelcastInstanceByName(String)
,
shutdownAll()
public static void setOutOfMemoryHandler(OutOfMemoryHandler outOfMemoryHandler)
Warning: OutOfMemoryHandler may not be called although JVM throws OutOfMemoryError. Because error may be thrown from an external (user thread) thread and Hazelcast may not be informed about OutOfMemoryError.
outOfMemoryHandler
- set when an OutOfMemoryError is caught by Hazelcast threadsOutOfMemoryError
,
OutOfMemoryHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |