activemq-cpp-3.8.2
Main Page
Namespaces
Data Structures
Files
File List
Globals
DedicatedTaskRunner.h
Go to the documentation of this file.
1
/*
2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
*
9
* http://www.apache.org/licenses/LICENSE-2.0
10
*
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
16
*/
17
18
#ifndef _ACTIVEMQ_THREADS_DEDICATEDTASKRUNNER_H_
19
#define _ACTIVEMQ_THREADS_DEDICATEDTASKRUNNER_H_
20
21
#include <
activemq/util/Config.h
>
22
#include <
activemq/threads/TaskRunner.h
>
23
#include <
activemq/threads/Task.h
>
24
25
#include <
decaf/lang/Thread.h
>
26
#include <
decaf/lang/Runnable.h
>
27
#include <
decaf/util/concurrent/Mutex.h
>
28
#include <
decaf/lang/Pointer.h
>
29
30
namespace
activemq {
31
namespace
threads {
32
33
class
AMQCPP_API
DedicatedTaskRunner
:
public
TaskRunner
,
34
public
decaf::lang::Runnable
{
35
private
:
36
37
mutable
decaf::util::concurrent::Mutex
mutex;
38
decaf::lang::Pointer<decaf::lang::Thread>
thread;
39
40
bool
threadTerminated;
41
bool
pending;
42
bool
shutDown;
43
Task
* task;
44
45
private
:
46
47
DedicatedTaskRunner
(
const
DedicatedTaskRunner
&);
48
DedicatedTaskRunner
& operator=(
const
DedicatedTaskRunner
&);
49
50
public
:
51
52
DedicatedTaskRunner
(
Task
* task);
53
virtual
~
DedicatedTaskRunner
();
54
55
virtual
void
start();
56
57
virtual
bool
isStarted()
const
;
58
65
virtual
void
shutdown(
long
long
timeout);
66
70
virtual
void
shutdown();
71
77
virtual
void
wakeup();
78
79
protected
:
80
81
virtual
void
run();
82
83
};
84
85
}}
86
87
#endif
/*_ACTIVEMQ_THREADS_DEDICATEDTASKRUNNER_H_*/
Pointer.h
Config.h
activemq::threads::Task
Represents a unit of work that requires one or more iterations to complete.
Definition:
Task.h:31
decaf::util::concurrent::Mutex
Mutex object that offers recursive support on all platforms as well as providing the ability to use t...
Definition:
Mutex.h:39
AMQCPP_API
#define AMQCPP_API
Definition:
Config.h:30
Task.h
Runnable.h
TaskRunner.h
Thread.h
Mutex.h
decaf::lang::Runnable
Interface for a runnable object - defines a task that can be run by a thread.
Definition:
Runnable.h:29
decaf::lang::Pointer< decaf::lang::Thread >
activemq::threads::TaskRunner
Definition:
TaskRunner.h:27
activemq::threads::DedicatedTaskRunner
Definition:
DedicatedTaskRunner.h:33
src
main
activemq
threads
DedicatedTaskRunner.h
Generated by
1.8.6