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 class
ChannelIndexMap.Entry
-
Field Summary
Fields Modifier and Type Field Description private int
count
private ChannelIndexMap.Entry[]
data
private ChannelIndexMap.Entry
entryPool
private float
loadFactor
private int
size
private int
threshold
-
Constructor Summary
Constructors Constructor Description ChannelIndexMap(int size, float loadFactor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
emptyPool()
ChannelOutput
get(long key)
java.util.Enumeration
getChannels()
boolean
put(long key, SharedChannelOutput value)
Puts a value into the index if the key does not already exist.private void
rehash()
boolean
remove(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()
-
-