org.apache.openjpa.slice
Class SliceThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.apache.openjpa.slice.SliceThread
All Implemented Interfaces:
Runnable

public class SliceThread
extends Thread

A thread to execute operation against each database slice.

Author:
Pinaki Poddar

Nested Class Summary
(package private) static class SliceThread.SliceThreadFactory
           
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SliceThread(String name, Thread parent, Runnable r)
           
SliceThread(Thread parent, Runnable r)
           
 
Method Summary
 Thread getParent()
          Gets the parent thread of this receiver.
static ExecutorService newPool(int size)
          Create a pool of given size.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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

SliceThread

public SliceThread(String name,
                   Thread parent,
                   Runnable r)

SliceThread

public SliceThread(Thread parent,
                   Runnable r)
Method Detail

getParent

public Thread getParent()
Gets the parent thread of this receiver.


newPool

public static ExecutorService newPool(int size)
Create a pool of given size. The thread factory is specialized to create SliceThread which gets preferential treatment for locking.



Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.