public final class DirtyRows extends java.lang.Thread implements ServerProcess
Modifier and Type | Field and Description |
---|---|
static boolean |
DISABLE_RESTART
disabled the auto restart of dirty rows loader.
|
static java.util.concurrent.atomic.AtomicBoolean |
DISABLE_STALE_READ
disabled the dirty read detection.
|
static java.lang.ThreadLocal<java.lang.Boolean> |
DISABLE_TRANSACTION_VALIDATE
disabled the validate of parameters.
|
static java.util.concurrent.atomic.AtomicLong |
MAX_PROCESS_TIME
The MAXIMUM PROCESSING TIME of one call.
|
static java.util.concurrent.atomic.AtomicLong |
MIN_WARNING_PROCESS_TIME
The MINIMUM WARNING PROCESSING TIME of one call.
|
static java.lang.String |
PROPERTY_DIRTY_READ_DELAY
The property to disable the dirty read delay
|
static java.lang.String |
PROPERTY_DIRTY_ROWS_MAX_PROCESS_TIME
The property to set the default maximum processing time.
|
static java.lang.String |
PROPERTY_DIRTY_ROWS_WARNING_PROCESS_TIME
The property to set the default maximum processing time.
|
static java.lang.String |
PROPERTY_DISABLE_DIRTY_ROWS_CHECK
The property to disable the dirty rows check.
|
static java.lang.String |
PROPERTY_DISABLE_DIRTY_ROWS_RESTART
The property to disable the dirty rows auto restart.
|
static java.lang.String |
PROPERTY_DISABLE_STALE_READ
The property to disable the dirty read.
|
static java.lang.String |
PROPERTY_RETRY_READ_DELAY
The property to disable the retry read delay
|
static long |
RETRY_READ_DELAY
disabled the retry read delay
|
static long |
STALE_READ_DELAY
disabled the dirty read delay
|
static java.lang.String |
THREAD_NAME
The thread name
|
static long |
WARNING_PROCESS_TIME
The WARNING PROCESSING TIME of one call.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkUp()
Check if the background loader is running.
|
static PossibleRowsHolder |
dirtyRows(VirtualDB layer,
GlobalKeyId baseClassId)
get the known dirty rows for this base class.
|
static long |
getMaxProccessTime()
Get the max processing time
|
static int |
getPendingCount()
get the pending count
|
static long |
getStaleReadCount()
get the stale read count
|
static long |
getWarningProccessTime()
Get the warning processing time
|
boolean |
isCurrent()
Is this the current process ?
|
boolean |
isPaused()
Is this process paused ?
|
boolean |
isTerminated()
Is this process terminated ?
|
static void |
lastError()
Check if there has been an issue.
|
java.lang.String |
makeThreadName()
get the progress message
|
static Marker |
mark()
create a marker which will be notified when the back ground loading has finished.
|
void |
paused()
This process has been paused.
|
static boolean |
recordThreadPublishedRows(boolean turnOn)
start recording of published rows
|
void |
resumed()
This process has been resumed.
|
void |
run()
load the dirty rows as fast as possible.
|
static void |
schedule(VirtualDB layer,
long transNr,
java.lang.String rootId,
java.lang.String rowList)
schedule the processing of the rows to be loaded.
|
static void |
setMaxProccessTime(long maxProcessTime)
Set the max processing time
|
static void |
setWarningProccessTime(long warningProcessTime)
Set the warning processing time
|
static boolean |
simulateBlock(boolean flag)
simulate block
|
void |
terminated()
This process has been terminated.
|
static HashLongMap |
threadPublishedRows()
the published dirty rows for this thread.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final java.lang.String PROPERTY_DISABLE_DIRTY_ROWS_CHECK
public static final java.lang.String THREAD_NAME
public static final java.lang.String PROPERTY_DISABLE_DIRTY_ROWS_RESTART
public static final boolean DISABLE_RESTART
public static final java.lang.String PROPERTY_DISABLE_STALE_READ
public static final java.util.concurrent.atomic.AtomicBoolean DISABLE_STALE_READ
public static final java.lang.ThreadLocal<java.lang.Boolean> DISABLE_TRANSACTION_VALIDATE
public static final java.lang.String PROPERTY_DIRTY_READ_DELAY
public static final long STALE_READ_DELAY
public static final java.lang.String PROPERTY_RETRY_READ_DELAY
public static final long RETRY_READ_DELAY
public static final java.lang.String PROPERTY_DIRTY_ROWS_MAX_PROCESS_TIME
public static final java.util.concurrent.atomic.AtomicLong MAX_PROCESS_TIME
public static final java.lang.String PROPERTY_DIRTY_ROWS_WARNING_PROCESS_TIME
public static final long WARNING_PROCESS_TIME
public static final java.util.concurrent.atomic.AtomicLong MIN_WARNING_PROCESS_TIME
@CheckReturnValue public static long getStaleReadCount()
public static boolean simulateBlock(boolean flag)
flag
- true to turn on.@CheckReturnValue public boolean isPaused()
@CheckReturnValue public boolean isCurrent()
@CheckReturnValue public boolean isTerminated()
@CheckReturnValue public static long getMaxProccessTime()
public static void setMaxProccessTime(long maxProcessTime)
maxProcessTime
- set the current max processing time.@CheckReturnValue public static long getWarningProccessTime()
public static void setWarningProccessTime(long warningProcessTime)
warningProcessTime
- set the current warning processing time.public static void checkUp()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static void lastError() throws java.lang.Exception
java.lang.Exception
- if there has been an error since the last time this method was called.@CheckReturnValue public static int getPendingCount()
public static boolean recordThreadPublishedRows(boolean turnOn)
turnOn
- true to turn on@CheckReturnValue @Nullable public static HashLongMap threadPublishedRows()
@CheckReturnValue @Nonnull public static PossibleRowsHolder dirtyRows(@Nonnull VirtualDB layer, @Nonnull GlobalKeyId baseClassId)
layer
- The layerbaseClassId
- the base class@CheckReturnValue @Nonnull public static Marker mark()
public static void schedule(@Nonnull VirtualDB layer, @Nonnegative long transNr, @Nonnull java.lang.String rootId, @Nonnull java.lang.String rowList) throws java.lang.Exception
layer
- The layertransNr
- the transaction (ZERO means just load the latest)rootId
- the class of the rowsrowList
- The row listjava.lang.Exception
- A serious problempublic void paused()
paused
in interface ServerProcess
public void resumed()
resumed
in interface ServerProcess
public void terminated()
terminated
in interface ServerProcess
@CheckReturnValue public java.lang.String makeThreadName()
makeThreadName
in interface ServerProcess
stSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.