//
//  Generated by the J2ObjC translator.  DO NOT EDIT!
//  source: /Users/free6om/Documents/open-source/j2objc/j2objc/guava/sources/com/google/common/util/concurrent/Monitor.java
//

#include "J2ObjC_header.h"

#pragma push_macro("ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL")
#if ComGoogleCommonUtilConcurrentMonitor_RESTRICT
#define ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL 0
#else
#define ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL 1
#endif
#undef ComGoogleCommonUtilConcurrentMonitor_RESTRICT

#if !defined (_ComGoogleCommonUtilConcurrentMonitor_) && (ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL || ComGoogleCommonUtilConcurrentMonitor_INCLUDE)
#define _ComGoogleCommonUtilConcurrentMonitor_

@class ComGoogleCommonUtilConcurrentMonitor_Guard;
@class JavaLangThread;
@class JavaUtilConcurrentTimeUnitEnum;

@interface ComGoogleCommonUtilConcurrentMonitor : NSObject

#pragma mark Public

- (instancetype)init;

- (instancetype)initWithBoolean:(jboolean)fair;

- (void)enter;

- (jboolean)enterWithLong:(jlong)time
withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (jboolean)enterIfWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)enterIfWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                         withLong:(jlong)time
                               withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (jboolean)enterIfInterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)enterIfInterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                                      withLong:(jlong)time
                                            withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (void)enterInterruptibly;

- (jboolean)enterInterruptiblyWithLong:(jlong)time
    withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (void)enterWhenWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)enterWhenWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                           withLong:(jlong)time
                                 withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (void)enterWhenUninterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)enterWhenUninterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                                          withLong:(jlong)time
                                                withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (jint)getOccupiedDepth;

- (jint)getQueueLength;

- (jint)getWaitQueueLengthWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)hasQueuedThreadWithJavaLangThread:(JavaLangThread *)thread;

- (jboolean)hasQueuedThreads;

- (jboolean)hasWaitersWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)isFair;

- (jboolean)isOccupied;

- (jboolean)isOccupiedByCurrentThread;

- (void)leave;

- (jboolean)tryEnter;

- (jboolean)tryEnterIfWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (void)waitForWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)waitForWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                         withLong:(jlong)time
                               withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

- (void)waitForUninterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard;

- (jboolean)waitForUninterruptiblyWithComGoogleCommonUtilConcurrentMonitor_Guard:(ComGoogleCommonUtilConcurrentMonitor_Guard *)guard
                                                                        withLong:(jlong)time
                                              withJavaUtilConcurrentTimeUnitEnum:(JavaUtilConcurrentTimeUnitEnum *)unit;

@end

J2OBJC_EMPTY_STATIC_INIT(ComGoogleCommonUtilConcurrentMonitor)

FOUNDATION_EXPORT void ComGoogleCommonUtilConcurrentMonitor_init(ComGoogleCommonUtilConcurrentMonitor *self);

FOUNDATION_EXPORT ComGoogleCommonUtilConcurrentMonitor *new_ComGoogleCommonUtilConcurrentMonitor_init() NS_RETURNS_RETAINED;

FOUNDATION_EXPORT void ComGoogleCommonUtilConcurrentMonitor_initWithBoolean_(ComGoogleCommonUtilConcurrentMonitor *self, jboolean fair);

FOUNDATION_EXPORT ComGoogleCommonUtilConcurrentMonitor *new_ComGoogleCommonUtilConcurrentMonitor_initWithBoolean_(jboolean fair) NS_RETURNS_RETAINED;

J2OBJC_TYPE_LITERAL_HEADER(ComGoogleCommonUtilConcurrentMonitor)

#endif

#if !defined (_ComGoogleCommonUtilConcurrentMonitor_Guard_) && (ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL || ComGoogleCommonUtilConcurrentMonitor_Guard_INCLUDE)
#define _ComGoogleCommonUtilConcurrentMonitor_Guard_

@class ComGoogleCommonUtilConcurrentMonitor;
@protocol JavaUtilConcurrentLocksCondition;

@interface ComGoogleCommonUtilConcurrentMonitor_Guard : NSObject {
 @public
  __weak ComGoogleCommonUtilConcurrentMonitor *monitor_;
  id<JavaUtilConcurrentLocksCondition> condition_;
  jint waiterCount_;
  ComGoogleCommonUtilConcurrentMonitor_Guard *next_;
}

#pragma mark Public

- (jboolean)isSatisfied;

#pragma mark Protected

- (instancetype)initWithComGoogleCommonUtilConcurrentMonitor:(ComGoogleCommonUtilConcurrentMonitor *)monitor;

@end

J2OBJC_EMPTY_STATIC_INIT(ComGoogleCommonUtilConcurrentMonitor_Guard)

J2OBJC_FIELD_SETTER(ComGoogleCommonUtilConcurrentMonitor_Guard, condition_, id<JavaUtilConcurrentLocksCondition>)
J2OBJC_FIELD_SETTER(ComGoogleCommonUtilConcurrentMonitor_Guard, next_, ComGoogleCommonUtilConcurrentMonitor_Guard *)

FOUNDATION_EXPORT void ComGoogleCommonUtilConcurrentMonitor_Guard_initWithComGoogleCommonUtilConcurrentMonitor_(ComGoogleCommonUtilConcurrentMonitor_Guard *self, ComGoogleCommonUtilConcurrentMonitor *monitor);

J2OBJC_TYPE_LITERAL_HEADER(ComGoogleCommonUtilConcurrentMonitor_Guard)

#endif

#pragma pop_macro("ComGoogleCommonUtilConcurrentMonitor_INCLUDE_ALL")
