Package org.jcsp.net
Class ChannelIndexMap
- java.lang.Object
-
- org.jcsp.net.ChannelIndexMap
-
class ChannelIndexMap extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classChannelIndexMap.Entry
-
Field Summary
Fields Modifier and Type Field Description private intcountprivate ChannelIndexMap.Entry[]dataprivate ChannelIndexMap.EntryentryPoolprivate floatloadFactorprivate intsizeprivate intthreshold
-
Constructor Summary
Constructors Constructor Description ChannelIndexMap(int size, float loadFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemptyPool()ChannelOutputget(long key)java.util.EnumerationgetChannels()booleanput(long key, SharedChannelOutput value)Puts a value into the index if the key does not already exist.private voidrehash()booleanremove(long key, SharedChannelOutput ch)
-
-
-
Field Detail
-
threshold
private int threshold
-
count
private int count
-
loadFactor
private float loadFactor
-
size
private int size
-
data
private ChannelIndexMap.Entry[] data
-
entryPool
private ChannelIndexMap.Entry entryPool
-
-
Method Detail
-
get
public ChannelOutput get(long key)
-
put
public boolean put(long key, SharedChannelOutput value)Puts a value into the index if the key does not already exist.
-
remove
public boolean remove(long key, SharedChannelOutput ch)
-
rehash
private void rehash()
-
getChannels
public java.util.Enumeration getChannels()
-
emptyPool
public void emptyPool()
-
-