data
Class Board
java.lang.Object
data.Board
public class Board
- extends java.lang.Object
Field Summary |
(package private) java.util.concurrent.ConcurrentHashMap<java.lang.String,BoardObject> |
objectHm
|
(package private) long |
timeout
Expire time in ms after that a BoardObject will be obsolete |
Constructor Summary |
Board()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
objectHm
java.util.concurrent.ConcurrentHashMap<java.lang.String,BoardObject> objectHm
timeout
long timeout
- Expire time in ms after that a
BoardObject
will be obsolete
Board
public Board()
addObject
public BoardObject addObject(java.lang.String key,
BoardObject newObject)
- Parameters:
key
- newObject
-
- Returns:
- Previous
BoardObject
or null if it was not found
getObject
public BoardObject getObject(java.lang.String key)
- Parameters:
key
-
- Returns:
- The
BoardObject
for the key or null if not found on the board.
removeObject
public BoardObject removeObject(java.lang.String key)
- Parameters:
key
- BoardObject
identifier.
- Returns:
- Previous
BoardObject
or null if it was not found.
clear
public void clear()
- Empties the internal data structure.
getIterator
public java.util.Iterator<java.util.Map.Entry<java.lang.String,BoardObject>> getIterator()
getSet
public java.util.Set<java.util.Map.Entry<java.lang.String,BoardObject>> getSet()
getTimeout
public long getTimeout()
- Returns:
- The timeout of a
BoardObject
in ms before it will be considered obsolete.
setTimeout
public void setTimeout(long timeout)
- Parameters:
timeout
- The timeout in ms of a BoardObject
before it will be considered obsolete.
removeIfObsolete
void removeIfObsolete(java.lang.String key)
- Not public methods must be called here!
Due to recursion.
removeIfObsolete
void removeIfObsolete()
- Not public methods must be called here!
Due to recursion.
getTopicList
public java.util.ArrayList<java.lang.String> getTopicList(java.lang.String topic)
- Parameters:
topic
- String identifying the topic.
- Returns:
- An
ArrayList
of all board keys belonging to the given topic.
Usually the topic is the Object class name.
getArrayList
public BoardObject[] getArrayList()