| java.util.concurrent.ConcurrentHashMap org.apache.catalina.tribes.tipis.AbstractReplicatedMap
All known Subclasses: org.apache.catalina.tribes.tipis.ReplicatedMap, org.apache.catalina.tribes.tipis.LazyReplicatedMap,
Inner Class :public static class MapEntry implements Map.Entry | |
Inner Class :public static class MapMessage implements Serializable | |
Method Summary | |
public boolean | accept(Serializable msg, Member sender) | public void | breakdown() | protected void | broadcast(int msgtype, boolean rpc) | public void | clear() | public void | clear(boolean notify) | public Object | clone() | public boolean | containsKey(Object key) Returns true if the key has an entry in the map. | public boolean | containsValue(Object value) | public Set | entrySet() | public Set | entrySetFull() Returns the entire contents of the map
Map.Entry.getValue() will return a LazyReplicatedMap.MapEntry object containing all the information
about the object. | public boolean | equals(Object o) | public Member[] | excludeFromSet(Member[] mbrs, Member[] set) | public void | finalize() | public Object | get(Object key) | public long | getAccessTimeout() | public Channel | getChannel() | public int | getChannelSendOptions() | public ClassLoader[] | getExternalLoaders() | public MapEntry | getInternal(Object key) | public byte[] | getMapContextName() | public Member[] | getMapMembers(HashMap members) | public Member[] | getMapMembers() | public Member[] | getMapMembersExcl(Member[] exclude) | public Object | getMapOwner() | public int | getNextBackupIndex() | public Member | getNextBackupNode() | public RpcChannel | getRpcChannel() | public long | getRpcTimeout() | abstract protected int | getStateMessageType() | public Object | getStateMutex() | public int | hashCode() | public void | heartbeat() | public boolean | inSet(Member m, Member[] set) | protected void | init(Object owner, Channel channel, String mapContextName, long timeout, int channelSendOptions, ClassLoader[] cls) | public boolean | isEmpty() | public boolean | isStateTransferred() | public Set | keySet() | public Set | keySetFull() | public void | leftOver(Serializable msg, Member sender) If the reply has already been sent to the requesting thread,
the rpc callback can handle any data that comes in after the fact. | public void | mapMemberAdded(Member member) | public void | memberAdded(Member member) | protected void | memberAlive(Member member) | public void | memberDisappeared(Member member) | public void | messageReceived(Serializable msg, Member sender) | protected void | ping(long timeout) Sends a ping out to all the members in the cluster, not just map members
that this map is alive. | protected void | printMap(String header) | abstract protected Member[] | publishEntryInfo(Object key, Object value) | public Object | put(Object key, Object value) | public Object | put(Object key, Object value, boolean notify) | public void | putAll(Map m) | public Object | remove(Object key) | public Object | remove(Object key, boolean notify) | protected boolean | removeEldestEntry(Map.Entry eldest) | public void | replicate(Object key, boolean complete) | public void | replicate(boolean complete) This can be invoked by a periodic thread to replicate out any changes. | public Serializable | replyRequest(Serializable msg, Member sender) | public void | setAccessTimeout(long accessTimeout) | public void | setChannelSendOptions(int channelSendOptions) | public void | setExternalLoaders(ClassLoader[] externalLoaders) | public void | setMapOwner(Object mapOwner) | public int | size() | public int | sizeFull() | public void | transferState() | public Collection | values() | protected Member[] | wrap(Member m) |
DEFAULT_INITIAL_CAPACITY | final public static int DEFAULT_INITIAL_CAPACITY(Code) | | The default initial capacity - MUST be a power of two.
|
DEFAULT_LOAD_FACTOR | final public static float DEFAULT_LOAD_FACTOR(Code) | | The load factor used when none specified in constructor.
|
accessTimeout | protected transient long accessTimeout(Code) | | Since the map keeps internal membership
this is the timeout for a ping message to be responded to
If a remote map doesn't respond within this timeframe,
its considered dead.
|
channel | protected transient Channel channel(Code) | | Reference to the channel for sending messages
|
channelSendOptions | protected transient int channelSendOptions(Code) | | Our default send options
|
currentNode | protected transient int currentNode(Code) | | The node we are currently backing up data to, this index will rotate
on a round robin basis
|
externalLoaders | protected transient ClassLoader[] externalLoaders(Code) | | External class loaders if serialization and deserialization is to be performed successfully.
|
mapContextName | protected transient byte[] mapContextName(Code) | | The Map context name makes this map unique, this
allows us to have more than one map shared
through one channel
|
mapMembers | protected transient HashMap mapMembers(Code) | | A list of members in our map
|
mapOwner | protected transient Object mapOwner(Code) | | The owner of this map, ala a SessionManager for example
|
mapname | protected transient String mapname(Code) | | Readable string of the mapContextName value
|
rpcChannel | protected transient RpcChannel rpcChannel(Code) | | The RpcChannel to send RPC messages through
|
rpcTimeout | protected transient long rpcTimeout(Code) | | Timeout for RPC messages, how long we will wait for a reply
|
stateMutex | protected transient Object stateMutex(Code) | | Simple lock object for transfers
|
stateTransferred | protected transient boolean stateTransferred(Code) | | Has the state been transferred
|
AbstractReplicatedMap | public AbstractReplicatedMap(Object owner, Channel channel, long timeout, String mapContextName, int initialCapacity, float loadFactor, int channelSendOptions, ClassLoader[] cls)(Code) | | Creates a new map
Parameters: channel - The channel to use for communication Parameters: timeout - long - timeout for RPC messags Parameters: mapContextName - String - unique name for this map, to allow multiple maps per channel Parameters: initialCapacity - int - the size of this map, see HashMap Parameters: loadFactor - float - load factor, see HashMap Parameters: cls - - a list of classloaders to be used for deserialization of objects. |
breakdown | public void breakdown()(Code) | | |
broadcast | protected void broadcast(int msgtype, boolean rpc) throws ChannelException(Code) | | Helper method to broadcast a message to all members in a channel
Parameters: msgtype - int Parameters: rpc - boolean throws: ChannelException - |
clear | public void clear()(Code) | | |
clear | public void clear(boolean notify)(Code) | | |
containsKey | public boolean containsKey(Object key)(Code) | | Returns true if the key has an entry in the map.
The entry can be a proxy or a backup entry, invoking get(key)
will make this entry primary for the group
Parameters: key - Object boolean |
containsValue | public boolean containsValue(Object value)(Code) | | |
entrySetFull | public Set entrySetFull()(Code) | | Returns the entire contents of the map
Map.Entry.getValue() will return a LazyReplicatedMap.MapEntry object containing all the information
about the object.
Set |
finalize | public void finalize()(Code) | | |
getAccessTimeout | public long getAccessTimeout()(Code) | | |
getChannelSendOptions | public int getChannelSendOptions()(Code) | | |
getMapContextName | public byte[] getMapContextName()(Code) | | |
getNextBackupIndex | public int getNextBackupIndex()(Code) | | |
getRpcTimeout | public long getRpcTimeout()(Code) | | |
getStateMessageType | abstract protected int getStateMessageType()(Code) | | |
hashCode | public int hashCode()(Code) | | |
heartbeat | public void heartbeat()(Code) | | |
init | protected void init(Object owner, Channel channel, String mapContextName, long timeout, int channelSendOptions, ClassLoader[] cls)(Code) | | Initializes the map by creating the RPC channel, registering itself as a channel listener
This method is also responsible for initiating the state transfer
Parameters: owner - Object Parameters: channel - Channel Parameters: mapContextName - String Parameters: timeout - long Parameters: channelSendOptions - int Parameters: cls - ClassLoader[] |
isEmpty | public boolean isEmpty()(Code) | | |
isStateTransferred | public boolean isStateTransferred()(Code) | | |
leftOver | public void leftOver(Serializable msg, Member sender)(Code) | | If the reply has already been sent to the requesting thread,
the rpc callback can handle any data that comes in after the fact.
Parameters: msg - Serializable Parameters: sender - Member |
mapMemberAdded | public void mapMemberAdded(Member member)(Code) | | |
memberAlive | protected void memberAlive(Member member)(Code) | | We have received a member alive notification
Parameters: member - Member |
memberDisappeared | public void memberDisappeared(Member member)(Code) | | |
ping | protected void ping(long timeout) throws ChannelException(Code) | | Sends a ping out to all the members in the cluster, not just map members
that this map is alive.
Parameters: timeout - long throws: ChannelException - |
putAll | public void putAll(Map m)(Code) | | Copies all values from one map to this instance
Parameters: m - Map |
remove | public Object remove(Object key)(Code) | | Removes an object from this map, it will also remove it from
Parameters: key - Object Object |
removeEldestEntry | protected boolean removeEldestEntry(Map.Entry eldest)(Code) | | |
replicate | public void replicate(Object key, boolean complete)(Code) | | Replicates any changes to the object since the last time
The object has to be primary, ie, if the object is a proxy or a backup, it will not be replicated
Parameters: complete - - if set to true, the object is replicated to its backupif set to false, only objects that implement ReplicatedMapEntry and the isDirty() returns true willbe replicated |
replicate | public void replicate(boolean complete)(Code) | | This can be invoked by a periodic thread to replicate out any changes.
For maps that don't store objects that implement ReplicatedMapEntry, this
method should be used infrequently to avoid large amounts of data transfer
Parameters: complete - boolean |
setAccessTimeout | public void setAccessTimeout(long accessTimeout)(Code) | | |
setChannelSendOptions | public void setChannelSendOptions(int channelSendOptions)(Code) | | |
setExternalLoaders | public void setExternalLoaders(ClassLoader[] externalLoaders)(Code) | | |
sizeFull | public int sizeFull()(Code) | | |
transferState | public void transferState()(Code) | | |
wrap | protected Member[] wrap(Member m)(Code) | | Helper methods, wraps a single member in an array
Parameters: m - Member Member[] |
|
|