org.mmbase.applications.community.modules
Class RelationBreaker

java.lang.Object
  extended byjava.lang.Thread
      extended byorg.mmbase.applications.community.modules.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:
$Id: RelationBreaker.java,v 1.7 2003/06/18 20:03:55 michiel Exp $
Author:
Dirk-Jan Hoekstra

Field Summary
 
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.applications.community.modules.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, holdsLock, 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
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.applications.community.modules.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.



MMBase build 1.7.1.20041002