ca.sqlpower.wabit
Interface WabitBackgroundWorker

All Superinterfaces:
WabitObject
All Known Subinterfaces:
ResultSetProducer
All Known Implementing Classes:
OlapQuery, QueryCache

public interface WabitBackgroundWorker
extends WabitObject

A Wabit Background Worker is a Wabit Object that encapsulates some sort of background processing. For example, OlapQuery is a type of WabitObject that can handle the running of an MDX query in the background. QueryCache is the SQL-centred cousin of OlapQuery, and its background task is executing SQL queries.


Method Summary
 void cancel()
          If this worker is currently doing something in the background, calling this method requests the background processing be canceled.
 boolean isRunning()
          Returns true if this Wabit object is doing something in the background.
 
Methods inherited from interface ca.sqlpower.wabit.WabitObject
addChild, addWabitListener, allowsChildren, begin, childPositionOffset, cleanup, commit, generateNewUUID, getChildren, getChildren, getDependencies, getName, getParent, getUUID, removeChild, removeDependency, removeWabitListener, rollback, setName, setParent, setUUID
 

Method Detail

isRunning

boolean isRunning()
Returns true if this Wabit object is doing something in the background.

Note to implementers: this method is likely to be used for inter-thread communication. Be sure to use proper synchronization when passing the flag between threads!


cancel

void cancel()
If this worker is currently doing something in the background, calling this method requests the background processing be canceled. It is not guaranteed that cancellation will happen immediately or at all, because the background processing might involve something like database I/O with a JDBC driver that doesn't properly support cancellation.



Copyright © 2009. All Rights Reserved.