org.openrdf.sesame.sailimpl.rdbms
Class OptimizeThread

java.lang.Object
  extended byorg.openrdf.sesame.sailimpl.rdbms.OptimizeThread
All Implemented Interfaces:
Runnable

public class OptimizeThread
extends Object
implements Runnable


Method Summary
 void forceBreak()
          forces the loop breaking of the current OptimizeThread. so all the ables to be optimized
static void onShutDown()
          onShutDown() - break the waiting loop of the currently active OptimizeThread instance and force it to optimize the collected tables.
static void optimizeTable(RdfSchemaRepository sail, String table)
          The entry point of the OptimizeThread class. if there is no pending optimization this method create a OptimizeThread instance and adds the table name to it.
 void run()
          run() - wait minutes*60 x timeunits ms before commiting the table optimization
static void setTimeout(int minutes)
          Changes the number of time units that the OptimizeThread should wait before actual optimization is performed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onShutDown

public static void onShutDown()
onShutDown() - break the waiting loop of the currently active OptimizeThread instance and force it to optimize the collected tables. It waits until the whole optimization finishes.


setTimeout

public static void setTimeout(int minutes)
Changes the number of time units that the OptimizeThread should wait before actual optimization is performed.

Parameters:
minutes - - number of units x 60 to wait

optimizeTable

public static void optimizeTable(RdfSchemaRepository sail,
                                 String table)
The entry point of the OptimizeThread class. if there is no pending optimization this method create a OptimizeThread instance and adds the table name to it. If the 'minutes' is zero no thread is created and optimization is performed immediatly

Parameters:
sail - - sail from which the request is made
table - - the name of the table to optimize

run

public void run()
run() - wait minutes*60 x timeunits ms before commiting the table optimization

Specified by:
run in interface Runnable

forceBreak

public void forceBreak()
forces the loop breaking of the current OptimizeThread. so all the ables to be optimized



Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.