Top Description Methods
org.apache.derby.iapi.services.daemon

public Interface IndexStatisticsDaemon

Known Direct Implementers
org.apache.derby.impl.services.daemon.IndexStatisticsDaemonImpl
Imports
org.apache.derby.shared.common.error.StandardException, org.apache.derby.iapi.sql.conn.LanguageConnectionContext, org.apache.derby.iapi.sql.dictionary.ConglomerateDescriptor, .TableDescriptor

Daemon acting as a coordinator for creating and updating index statistics.

There are two modes of operation:

The modes differ in how the operation affects other operations in the running system, and also how errors are dealt with. The background mode will try to affect other operations as little as possible, and errors won't be reported unless they are severe. The explicit mode will do more to make sure the operation succeeds (for instance by using locks), and will report all errors.

Method Summary

Modifier and TypeMethod and Description
public void
runExplicitly(LanguageConnectionContext
connection used to carry out the work
lcc
,
TableDescriptor
base table
td
,
ConglomerateDescriptor[]
index conglomerates (non-index conglomerates are ignored)
cds
,
String
descriptive text for the context in which the work is being run (i.e. ALTER TABLE)
runContext
)

Creates/updates index statistics for the specified conglomerates/indexes.

public void
schedule(TableDescriptor
base table
td
)

Schedules creation/update of the index statistics associated with the specified table.

public void
stop()

Stops the background daemon.

Method Detail

runExplicitlyback to summary
public void runExplicitly(LanguageConnectionContext lcc, TableDescriptor td, ConglomerateDescriptor[] cds, String runContext) throws StandardException

Creates/updates index statistics for the specified conglomerates/indexes.

Parameters
lcc:LanguageConnectionContext

connection used to carry out the work

td:TableDescriptor

base table

cds:ConglomerateDescriptor[]

index conglomerates (non-index conglomerates are ignored)

runContext:String

descriptive text for the context in which the work is being run (i.e. ALTER TABLE)

Exceptions
StandardException:
if something goes wrong
scheduleback to summary
public void schedule(TableDescriptor td)

Schedules creation/update of the index statistics associated with the specified table.

Note that the scheduling request may be denied. Typical situations where that will happen is if the work queue is full, or if work has already been scheduled for the specified table.

Parameters
td:TableDescriptor

base table

stopback to summary
public void stop()

Stops the background daemon.

Any ongoing tasks will be aborted as soon as possible, and it will not be possible to schedule new tasks. Note that runExplicitly can still be used.