1 |
758 |
jeremybenn |
|
2 |
|
|
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
|
3 |
|
|
|
4 |
|
|
#ifndef __java_util_concurrent_SynchronousQueue__
|
5 |
|
|
#define __java_util_concurrent_SynchronousQueue__
|
6 |
|
|
|
7 |
|
|
#pragma interface
|
8 |
|
|
|
9 |
|
|
#include <java/util/AbstractQueue.h>
|
10 |
|
|
#include <gcj/array.h>
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
class java::util::concurrent::SynchronousQueue : public ::java::util::AbstractQueue
|
14 |
|
|
{
|
15 |
|
|
|
16 |
|
|
public:
|
17 |
|
|
SynchronousQueue();
|
18 |
|
|
SynchronousQueue(jboolean);
|
19 |
|
|
virtual void put(::java::lang::Object *);
|
20 |
|
|
virtual jboolean offer(::java::lang::Object *, jlong, ::java::util::concurrent::TimeUnit *);
|
21 |
|
|
virtual jboolean offer(::java::lang::Object *);
|
22 |
|
|
virtual ::java::lang::Object * take();
|
23 |
|
|
virtual ::java::lang::Object * poll(jlong, ::java::util::concurrent::TimeUnit *);
|
24 |
|
|
virtual ::java::lang::Object * poll();
|
25 |
|
|
virtual jboolean isEmpty();
|
26 |
|
|
virtual jint size();
|
27 |
|
|
virtual jint remainingCapacity();
|
28 |
|
|
virtual void clear();
|
29 |
|
|
virtual jboolean contains(::java::lang::Object *);
|
30 |
|
|
virtual jboolean remove(::java::lang::Object *);
|
31 |
|
|
virtual jboolean containsAll(::java::util::Collection *);
|
32 |
|
|
virtual jboolean removeAll(::java::util::Collection *);
|
33 |
|
|
virtual jboolean retainAll(::java::util::Collection *);
|
34 |
|
|
virtual ::java::lang::Object * peek();
|
35 |
|
|
virtual ::java::util::Iterator * iterator();
|
36 |
|
|
virtual JArray< ::java::lang::Object * > * toArray();
|
37 |
|
|
virtual JArray< ::java::lang::Object * > * toArray(JArray< ::java::lang::Object * > *);
|
38 |
|
|
virtual jint drainTo(::java::util::Collection *);
|
39 |
|
|
virtual jint drainTo(::java::util::Collection *, jint);
|
40 |
|
|
private:
|
41 |
|
|
void writeObject(::java::io::ObjectOutputStream *);
|
42 |
|
|
void readObject(::java::io::ObjectInputStream *);
|
43 |
|
|
static const jlong serialVersionUID = -3223113410248163686LL;
|
44 |
|
|
public: // actually package-private
|
45 |
|
|
static jint NCPUS;
|
46 |
|
|
static jint maxTimedSpins;
|
47 |
|
|
static jint maxUntimedSpins;
|
48 |
|
|
static const jlong spinForTimeoutThreshold = 1000LL;
|
49 |
|
|
private:
|
50 |
|
|
::java::util::concurrent::SynchronousQueue$Transferer * volatile __attribute__((aligned(__alignof__( ::java::util::AbstractQueue)))) transferer;
|
51 |
|
|
::java::util::concurrent::locks::ReentrantLock * qlock;
|
52 |
|
|
::java::util::concurrent::SynchronousQueue$WaitQueue * waitingProducers;
|
53 |
|
|
::java::util::concurrent::SynchronousQueue$WaitQueue * waitingConsumers;
|
54 |
|
|
public:
|
55 |
|
|
static ::java::lang::Class class$;
|
56 |
|
|
};
|
57 |
|
|
|
58 |
|
|
#endif // __java_util_concurrent_SynchronousQueue__
|