net.pakl.rl
Class HashMapDistributed
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap
net.pakl.rl.HashMapDistributed
- All Implemented Interfaces:
- java.io.Externalizable, java.io.Serializable, java.lang.Cloneable, java.util.Map
public class HashMapDistributed
- extends java.util.HashMap
- implements java.io.Externalizable
A custom HashMap class that distributes itself over many machines, thereby
pooling their RAM together. Creates instances of HashMapRemote.
- See Also:
- Serialized Form
|
Method Summary |
java.lang.Object |
get(java.lang.Object key)
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
|
void |
readExternal(java.io.ObjectInput in)
|
void |
writeExternal(java.io.ObjectOutput out)
|
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, 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 |
HashMapDistributed
public HashMapDistributed(int numKeys)
HashMapDistributed
public HashMapDistributed(int numKeys,
int numMachines)
HashMapDistributed
public HashMapDistributed()
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal in interface java.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
get
public java.lang.Object get(java.lang.Object key)
- Specified by:
get in interface java.util.Map- Overrides:
get in class java.util.HashMap
put
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
- Specified by:
put in interface java.util.Map- Overrides:
put in class java.util.HashMap