org.mmbase.module.community
Class RelationBreaker

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.mmbase.module.community.RelationBreaker
All Implemented Interfaces:
java.lang.Runnable

Deprecated. use NodeBreaker instead

public class RelationBreaker
extends java.lang.Thread

RelationBreaker stores relation numbers with an expiretime. After the expiretime has expired the relation is removed. Unfortunately, this class doesn't work. See docs for more info.

Version:
5 Jan 2001
Author:
Dirk-Jan Hoekstra

Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RelationBreaker(MMBase mmb, long checkInterval, TemporaryNodeManager tmpNodeManager)
          Deprecated. Creates a new relation breaker.
 
Method Summary
 void add(java.lang.String id, long expireTime)
          Deprecated. Adds a relation to be watched.
 void remove(org.mmbase.module.community.RelationHolder relationHolder, int i)
          Deprecated. Removes a relation.
 void remove(java.lang.String id)
          Deprecated. Removes a relation.
 void run()
          Deprecated. Runs the thread that checks for expired relations.
 boolean update(java.lang.String id, long expireTime)
          Deprecated. Updates a relation to be watched, preventing it from being removed prematurely.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationBreaker

public RelationBreaker(MMBase mmb,
                       long checkInterval,
                       TemporaryNodeManager tmpNodeManager)
Deprecated. 
Creates a new relation breaker. Used by the Channel builder.
Parameters:
mmb - reference to MMBase
checkinterval - the interval at which the relation breaker checks for expired relations
tmpNodeManager - the temporary node manager that holds the relations.
Method Detail

add

public void add(java.lang.String id,
                long expireTime)
Deprecated. 
Adds a relation to be watched. This method starts the breaker if it hasn't been done already.
Parameters:
id - the id of the referred relation
expireTime - expiration time of the relation

update

public boolean update(java.lang.String id,
                      long expireTime)
Deprecated. 
Updates a relation to be watched, preventing it from being removed prematurely.
Parameters:
id - the id of the referred relation
expireTime - the new expiration time of the relation

remove

public void remove(java.lang.String id)
Deprecated. 
Removes a relation. This also removes the relation from the temporary node manager cache. XXX: doesn't work
Parameters:
id - the id of the referred relation

remove

public void remove(org.mmbase.module.community.RelationHolder relationHolder,
                   int i)
Deprecated. 
Removes a relation. This also removes the relation from the temporary node manager cache. XXX: doesn't work
Parameters:
relationHolder - the RelationHolder of the referred relation
i - index of the holder in the internal list

run

public void run()
Deprecated. 
Runs the thread that checks for expired relations.
Overrides:
run in class java.lang.Thread


MMBase build 1.6.5.20030923