summaryrefslogtreecommitdiff
path: root/libjava/java/util/concurrent/ThreadPoolExecutor.h
blob: b69b1f6559933cc69ba83a88b0ca5a2c78729544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_util_concurrent_ThreadPoolExecutor__
#define __java_util_concurrent_ThreadPoolExecutor__

#pragma interface

#include <java/util/concurrent/AbstractExecutorService.h>
#include <gcj/array.h>


class java::util::concurrent::ThreadPoolExecutor : public ::java::util::concurrent::AbstractExecutorService
{

public: // actually package-private
  virtual void reject(::java::lang::Runnable *);
private:
  ::java::lang::Thread * addThread(::java::lang::Runnable *);
  jboolean addIfUnderCorePoolSize(::java::lang::Runnable *);
  jint addIfUnderMaximumPoolSize(::java::lang::Runnable *);
public: // actually package-private
  virtual ::java::lang::Runnable * getTask();
  virtual void interruptIdleWorkers();
  virtual void workerDone(::java::util::concurrent::ThreadPoolExecutor$Worker *);
public:
  ThreadPoolExecutor(jint, jint, jlong, ::java::util::concurrent::TimeUnit *, ::java::util::concurrent::BlockingQueue *);
  ThreadPoolExecutor(jint, jint, jlong, ::java::util::concurrent::TimeUnit *, ::java::util::concurrent::BlockingQueue *, ::java::util::concurrent::ThreadFactory *);
  ThreadPoolExecutor(jint, jint, jlong, ::java::util::concurrent::TimeUnit *, ::java::util::concurrent::BlockingQueue *, ::java::util::concurrent::RejectedExecutionHandler *);
  ThreadPoolExecutor(jint, jint, jlong, ::java::util::concurrent::TimeUnit *, ::java::util::concurrent::BlockingQueue *, ::java::util::concurrent::ThreadFactory *, ::java::util::concurrent::RejectedExecutionHandler *);
  virtual void execute(::java::lang::Runnable *);
  virtual void shutdown();
  virtual ::java::util::List * shutdownNow();
  virtual jboolean isShutdown();
  virtual jboolean isTerminating();
  virtual jboolean isTerminated();
  virtual jboolean awaitTermination(jlong, ::java::util::concurrent::TimeUnit *);
public: // actually protected
  virtual void finalize();
public:
  virtual void setThreadFactory(::java::util::concurrent::ThreadFactory *);
  virtual ::java::util::concurrent::ThreadFactory * getThreadFactory();
  virtual void setRejectedExecutionHandler(::java::util::concurrent::RejectedExecutionHandler *);
  virtual ::java::util::concurrent::RejectedExecutionHandler * getRejectedExecutionHandler();
  virtual ::java::util::concurrent::BlockingQueue * getQueue();
  virtual jboolean remove(::java::lang::Runnable *);
  virtual void purge();
  virtual void setCorePoolSize(jint);
  virtual jint getCorePoolSize();
  virtual jboolean prestartCoreThread();
  virtual jint prestartAllCoreThreads();
  virtual jboolean allowsCoreThreadTimeOut();
  virtual void allowCoreThreadTimeOut(jboolean);
  virtual void setMaximumPoolSize(jint);
  virtual jint getMaximumPoolSize();
  virtual void setKeepAliveTime(jlong, ::java::util::concurrent::TimeUnit *);
  virtual jlong getKeepAliveTime(::java::util::concurrent::TimeUnit *);
  virtual jint getPoolSize();
  virtual jint getActiveCount();
  virtual jint getLargestPoolSize();
  virtual jlong getTaskCount();
  virtual jlong getCompletedTaskCount();
public: // actually protected
  virtual void beforeExecute(::java::lang::Thread *, ::java::lang::Runnable *);
  virtual void afterExecute(::java::lang::Runnable *, ::java::lang::Throwable *);
  virtual void terminated();
private:
  static JArray< ::java::lang::Runnable * > * EMPTY_RUNNABLE_ARRAY;
  static ::java::lang::RuntimePermission * shutdownPerm;
  ::java::util::concurrent::BlockingQueue * __attribute__((aligned(__alignof__( ::java::util::concurrent::AbstractExecutorService)))) workQueue;
  ::java::util::concurrent::locks::ReentrantLock * mainLock;
  ::java::util::concurrent::locks::Condition * termination;
  ::java::util::HashSet * workers;
  jlong volatile keepAliveTime;
  jboolean volatile allowCoreThreadTimeOut__;
  jint volatile corePoolSize;
  jint volatile maximumPoolSize;
  jint volatile poolSize;
public: // actually package-private
  jint volatile runState;
  static const jint RUNNING = 0;
  static const jint SHUTDOWN = 1;
  static const jint STOP = 2;
  static const jint TERMINATED = 3;
private:
  ::java::util::concurrent::RejectedExecutionHandler * volatile handler;
  ::java::util::concurrent::ThreadFactory * volatile threadFactory;
  jint largestPoolSize;
  jlong completedTaskCount;
  static ::java::util::concurrent::RejectedExecutionHandler * defaultHandler;
public: // actually package-private
  static jboolean $assertionsDisabled;
public:
  static ::java::lang::Class class$;
};

#endif // __java_util_concurrent_ThreadPoolExecutor__