PreferenceLock.h

Go to the documentation of this file.
00001 #ifndef JAVA_UTIL_PREFERENCELOCK_H
00002 #define JAVA_UTIL_PREFERENCELOCK_H 1
00003 
00004 #ifndef JAVA_UTIL_READWRITELOCK_H
00005 #include <java_util/ReadWriteLock.h>
00006 #endif /* JAVA_UTIL_READWRITELOCK_H */
00007 
00008 namespace java {
00009   namespace util {
00010 
00015     class JAVA_UTIL_SPEC PreferenceLock : virtual public Object, virtual public ReadWriteLock {
00016 
00017     public:
00018 
00019       enum PREFERENCE_MODE {
00020         FAIR_PREFERENCE = 0,
00021         WRITER_PREFERENCE,
00022         READER_PREFERENCE
00023       };
00024 
00025       PreferenceLock(jint policy = FAIR_PREFERENCE);
00026 
00032       virtual Ref<Lock> reader() const;
00033 
00039       virtual Ref<Lock> writer() const;
00040 
00041     private:
00042 
00043       ObjectRef impl;
00044       REGISTER_MEMBERS;
00045 
00046     };
00047 
00048   } // namespace util
00049 } // namespace java
00050 
00051 #endif /* JAVA_UTIL_PREFERENCELOCK_H */

Generated on Fri May 16 11:54:43 2008 for CrossPlatformJavaLikeC++API by  doxygen 1.5.3