com.hazelcast.cluster.impl
Class ConfigCheck

java.lang.Object
  extended by com.hazelcast.cluster.impl.ConfigCheck
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

public final class ConfigCheck
extends Object
implements IdentifiedDataSerializable

Contains enough information about Hazelcast Config, to do a validation check so that clusters with different configurations don't join.


Constructor Summary
ConfigCheck()
           
ConfigCheck(Config config, String joinerType)
           
 
Method Summary
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 boolean isCompatible(ConfigCheck found)
          Checks if 2 Hazelcast configurations are compatible.
 boolean isSameGroup(ConfigCheck found)
           
 void readData(ObjectDataInput in)
          Reads fields from the input stream
 void writeData(ObjectDataOutput out)
          Writes object fields to output stream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigCheck

public ConfigCheck()

ConfigCheck

public ConfigCheck(Config config,
                   String joinerType)
Method Detail

isCompatible

public boolean isCompatible(ConfigCheck found)
Checks if 2 Hazelcast configurations are compatible.

Parameters:
found -
Returns:
true if compatible. False if part of another group.
Throws:
ConfigMismatchException - if the configuration isn't compatible. An exception is thrown so we can pass a nice message.

isSameGroup

public boolean isSameGroup(ConfigCheck found)

getFactoryId

public int getFactoryId()
Description copied from interface: IdentifiedDataSerializable
Returns DataSerializableFactory factory id for this class.

Specified by:
getFactoryId in interface IdentifiedDataSerializable
Returns:
factory id

getId

public int getId()
Description copied from interface: IdentifiedDataSerializable
Returns type identifier for this class. Id should be unique per DataSerializableFactory.

Specified by:
getId in interface IdentifiedDataSerializable
Returns:
type id

writeData

public void writeData(ObjectDataOutput out)
               throws IOException
Description copied from interface: DataSerializable
Writes object fields to output stream

Specified by:
writeData in interface DataSerializable
Parameters:
out - output
Throws:
IOException

readData

public void readData(ObjectDataInput in)
              throws IOException
Description copied from interface: DataSerializable
Reads fields from the input stream

Specified by:
readData in interface DataSerializable
Parameters:
in - input
Throws:
IOException


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