com.hazelcast.config
Class GroupConfig

java.lang.Object
  extended by com.hazelcast.config.GroupConfig

public final class GroupConfig
extends Object

Contains the configuration for Hazelcast groups.

With groups it is possible to create multiple clusters where each cluster has its own group and doesn't interfere with other clusters.


Field Summary
static String DEFAULT_GROUP_NAME
          Default group name
static String DEFAULT_GROUP_PASSWORD
          Default group password
 
Constructor Summary
GroupConfig()
          Creates a GroupConfig with default group-name and group-password.
GroupConfig(String name)
          Creates a GroupConfig with the given group-name and default group-password
GroupConfig(String name, String password)
          Creates a GroupConfig with the given group-name and group-password
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
          Gets the group name of the group.
 String getPassword()
          Gets the password of the group.
 int hashCode()
           
 GroupConfig setName(String name)
          Sets the group name of the group.
 GroupConfig setPassword(String password)
          Sets the password for the group.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_GROUP_PASSWORD

public static final String DEFAULT_GROUP_PASSWORD
Default group password

See Also:
Constant Field Values

DEFAULT_GROUP_NAME

public static final String DEFAULT_GROUP_NAME
Default group name

See Also:
Constant Field Values
Constructor Detail

GroupConfig

public GroupConfig()
Creates a GroupConfig with default group-name and group-password.


GroupConfig

public GroupConfig(String name)
Creates a GroupConfig with the given group-name and default group-password

Parameters:
name - the name of the group
Throws:
IllegalArgumentException - if name is null.

GroupConfig

public GroupConfig(String name,
                   String password)
Creates a GroupConfig with the given group-name and group-password

Parameters:
name - the name of the group
password - the password of the group
Throws:
IllegalArgumentException - if name or password is null.
Method Detail

getName

public String getName()
Gets the group name of the group.

Returns:
the name

setName

public GroupConfig setName(String name)
Sets the group name of the group.

Parameters:
name - the name to set
Returns:
the updated GroupConfig.
Throws:
IllegalArgumentException - if name is null.

getPassword

public String getPassword()
Gets the password of the group.

Returns:
the password

setPassword

public GroupConfig setPassword(String password)
Sets the password for the group.

Parameters:
password - the password to set
Returns:
the updated GroupConfig.
Throws:
IllegalArgumentException - if password is null.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.