com.hazelcast.mapreduce.impl
Class HashMapAdapter<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by com.hazelcast.mapreduce.impl.HashMapAdapter<K,V>
Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable, Serializable, Cloneable, Map<K,V>

public class HashMapAdapter<K,V>
extends HashMap<K,V>
implements IdentifiedDataSerializable

Simple HashMap adapter class to implement DataSerializable serialization semantics to not loose hands on serialization while sending intermediate results.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
HashMapAdapter()
           
HashMapAdapter(int initialCapacity)
           
HashMapAdapter(int initialCapacity, float loadFactor)
           
HashMapAdapter(Map<? extends K,? extends V> m)
           
 
Method Summary
 int getFactoryId()
          Returns DataSerializableFactory factory id for this class.
 int getId()
          Returns type identifier for this class.
 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.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

HashMapAdapter

public HashMapAdapter(int initialCapacity,
                      float loadFactor)

HashMapAdapter

public HashMapAdapter(int initialCapacity)

HashMapAdapter

public HashMapAdapter()

HashMapAdapter

public HashMapAdapter(Map<? extends K,? extends V> m)
Method Detail

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.