public class com.codahale.metrics.health.AsyncHealthCheckDecorator extends com.codahale.metrics.health.HealthCheck implements java.lang.Runnable
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.codahale.metrics.health.AsyncHealthCheckDecorator
super_class: com.codahale.metrics.health.HealthCheck
{
private static final java.lang.String NO_RESULT_YET_MESSAGE;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "Waiting for first asynchronous check result."
private final com.codahale.metrics.health.HealthCheck healthCheck;
descriptor: Lcom/codahale/metrics/health/HealthCheck;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.concurrent.ScheduledFuture<?> future;
descriptor: Ljava/util/concurrent/ScheduledFuture;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/concurrent/ScheduledFuture<*>;
private final long healthyTtl;
descriptor: J
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final com.codahale.metrics.Clock clock;
descriptor: Lcom/codahale/metrics/Clock;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private volatile com.codahale.metrics.health.HealthCheck$Result result;
descriptor: Lcom/codahale/metrics/health/HealthCheck$Result;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
void <init>(com.codahale.metrics.health.HealthCheck, java.util.concurrent.ScheduledExecutorService, com.codahale.metrics.Clock);
descriptor: (Lcom/codahale/metrics/health/HealthCheck;Ljava/util/concurrent/ScheduledExecutorService;Lcom/codahale/metrics/Clock;)V
flags: (0x0000)
Code:
stack=8, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial com.codahale.metrics.health.HealthCheck.<init>:()V
1: aload 1
ifnull 2
iconst_1
goto 3
StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator com.codahale.metrics.health.HealthCheck java.util.concurrent.ScheduledExecutorService com.codahale.metrics.Clock
StackMap stack:
2: iconst_0
StackMap locals:
StackMap stack: int
3: ldc "healthCheck cannot be null"
invokestatic com.codahale.metrics.health.AsyncHealthCheckDecorator.check:(ZLjava/lang/String;)V
4: aload 2
ifnull 5
iconst_1
goto 6
StackMap locals:
StackMap stack:
5: iconst_0
StackMap locals:
StackMap stack: int
6: ldc "executorService cannot be null"
invokestatic com.codahale.metrics.health.AsyncHealthCheckDecorator.check:(ZLjava/lang/String;)V
7: aload 1
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
ldc Lcom/codahale/metrics/health/annotation/Async;
invokevirtual java.lang.Class.getAnnotation:(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
checkcast com.codahale.metrics.health.annotation.Async
astore 4
start local 4 8: aload 4
ifnull 9
iconst_1
goto 10
StackMap locals: com.codahale.metrics.health.annotation.Async
StackMap stack:
9: iconst_0
StackMap locals:
StackMap stack: int
10: ldc "healthCheck must contain Async annotation"
invokestatic com.codahale.metrics.health.AsyncHealthCheckDecorator.check:(ZLjava/lang/String;)V
11: aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.period:()J
lconst_0
lcmp
ifle 12
iconst_1
goto 13
StackMap locals:
StackMap stack:
12: iconst_0
StackMap locals:
StackMap stack: int
13: ldc "period cannot be less than or equal to zero"
invokestatic com.codahale.metrics.health.AsyncHealthCheckDecorator.check:(ZLjava/lang/String;)V
14: aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.initialDelay:()J
lconst_0
lcmp
iflt 15
iconst_1
goto 16
StackMap locals:
StackMap stack:
15: iconst_0
StackMap locals:
StackMap stack: int
16: ldc "initialDelay cannot be less than zero"
invokestatic com.codahale.metrics.health.AsyncHealthCheckDecorator.check:(ZLjava/lang/String;)V
17: aload 0
aload 3
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.clock:Lcom/codahale/metrics/Clock;
18: aload 0
aload 1
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.healthCheck:Lcom/codahale/metrics/health/HealthCheck;
19: aload 0
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.unit:()Ljava/util/concurrent/TimeUnit;
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.healthyTtl:()J
lconst_0
lcmp
ifgt 20
ldc 2
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.period:()J
lmul
goto 21
StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator com.codahale.metrics.health.HealthCheck java.util.concurrent.ScheduledExecutorService com.codahale.metrics.Clock com.codahale.metrics.health.annotation.Async
StackMap stack: com.codahale.metrics.health.AsyncHealthCheckDecorator java.util.concurrent.TimeUnit
20: aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.healthyTtl:()J
StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator com.codahale.metrics.health.HealthCheck java.util.concurrent.ScheduledExecutorService com.codahale.metrics.Clock com.codahale.metrics.health.annotation.Async
StackMap stack: com.codahale.metrics.health.AsyncHealthCheckDecorator java.util.concurrent.TimeUnit long
21: invokevirtual java.util.concurrent.TimeUnit.toMillis:(J)J
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.healthyTtl:J
22: aload 0
getstatic com.codahale.metrics.health.annotation.Async$InitialState.HEALTHY:Lcom/codahale/metrics/health/annotation/Async$InitialState;
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.initialState:()Lcom/codahale/metrics/health/annotation/Async$InitialState;
invokevirtual com.codahale.metrics.health.annotation.Async$InitialState.equals:(Ljava/lang/Object;)Z
ifeq 23
ldc "Waiting for first asynchronous check result."
invokestatic com.codahale.metrics.health.HealthCheck$Result.healthy:(Ljava/lang/String;)Lcom/codahale/metrics/health/HealthCheck$Result;
goto 24
23: StackMap locals:
StackMap stack: com.codahale.metrics.health.AsyncHealthCheckDecorator
ldc "Waiting for first asynchronous check result."
invokestatic com.codahale.metrics.health.HealthCheck$Result.unhealthy:(Ljava/lang/String;)Lcom/codahale/metrics/health/HealthCheck$Result;
24: StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator com.codahale.metrics.health.HealthCheck java.util.concurrent.ScheduledExecutorService com.codahale.metrics.Clock com.codahale.metrics.health.annotation.Async
StackMap stack: com.codahale.metrics.health.AsyncHealthCheckDecorator com.codahale.metrics.health.HealthCheck$Result
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.result:Lcom/codahale/metrics/health/HealthCheck$Result;
25: getstatic com.codahale.metrics.health.annotation.Async$ScheduleType.FIXED_RATE:Lcom/codahale/metrics/health/annotation/Async$ScheduleType;
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.scheduleType:()Lcom/codahale/metrics/health/annotation/Async$ScheduleType;
invokevirtual com.codahale.metrics.health.annotation.Async$ScheduleType.equals:(Ljava/lang/Object;)Z
ifeq 28
26: aload 0
aload 2
aload 0
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.initialDelay:()J
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.period:()J
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.unit:()Ljava/util/concurrent/TimeUnit;
invokeinterface java.util.concurrent.ScheduledExecutorService.scheduleAtFixedRate:(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.future:Ljava/util/concurrent/ScheduledFuture;
27: goto 29
28: StackMap locals:
StackMap stack:
aload 0
aload 2
aload 0
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.initialDelay:()J
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.period:()J
aload 4
invokeinterface com.codahale.metrics.health.annotation.Async.unit:()Ljava/util/concurrent/TimeUnit;
invokeinterface java.util.concurrent.ScheduledExecutorService.scheduleWithFixedDelay:(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.future:Ljava/util/concurrent/ScheduledFuture;
29: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 30 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
0 30 1 healthCheck Lcom/codahale/metrics/health/HealthCheck;
0 30 2 executorService Ljava/util/concurrent/ScheduledExecutorService;
0 30 3 clock Lcom/codahale/metrics/Clock;
8 30 4 async Lcom/codahale/metrics/health/annotation/Async;
MethodParameters:
Name Flags
healthCheck
executorService
clock
void <init>(com.codahale.metrics.health.HealthCheck, java.util.concurrent.ScheduledExecutorService);
descriptor: (Lcom/codahale/metrics/health/HealthCheck;Ljava/util/concurrent/ScheduledExecutorService;)V
flags: (0x0000)
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokestatic com.codahale.metrics.Clock.defaultClock:()Lcom/codahale/metrics/Clock;
invokespecial com.codahale.metrics.health.AsyncHealthCheckDecorator.<init>:(Lcom/codahale/metrics/health/HealthCheck;Ljava/util/concurrent/ScheduledExecutorService;Lcom/codahale/metrics/Clock;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
0 2 1 healthCheck Lcom/codahale/metrics/health/HealthCheck;
0 2 2 executorService Ljava/util/concurrent/ScheduledExecutorService;
MethodParameters:
Name Flags
healthCheck
executorService
public void run();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.healthCheck:Lcom/codahale/metrics/health/HealthCheck;
invokevirtual com.codahale.metrics.health.HealthCheck.execute:()Lcom/codahale/metrics/health/HealthCheck$Result;
putfield com.codahale.metrics.health.AsyncHealthCheckDecorator.result:Lcom/codahale/metrics/health/HealthCheck$Result;
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
protected com.codahale.metrics.health.HealthCheck$Result check();
descriptor: ()Lcom/codahale/metrics/health/HealthCheck$Result;
flags: (0x0004) ACC_PROTECTED
Code:
stack=7, locals=3, args_size=1
start local 0 0: aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.clock:Lcom/codahale/metrics/Clock;
invokevirtual com.codahale.metrics.Clock.getTime:()J
aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.result:Lcom/codahale/metrics/health/HealthCheck$Result;
invokevirtual com.codahale.metrics.health.HealthCheck$Result.getTime:()J
lsub
aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.healthyTtl:J
lsub
lstore 1
start local 1 1: lload 1
lconst_0
lcmp
ifle 13
2: invokestatic com.codahale.metrics.health.HealthCheck$Result.builder:()Lcom/codahale/metrics/health/HealthCheck$ResultBuilder;
3: invokevirtual com.codahale.metrics.health.HealthCheck$ResultBuilder.unhealthy:()Lcom/codahale/metrics/health/HealthCheck$ResultBuilder;
4: aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.clock:Lcom/codahale/metrics/Clock;
invokevirtual com.codahale.metrics.health.HealthCheck$ResultBuilder.usingClock:(Lcom/codahale/metrics/Clock;)Lcom/codahale/metrics/health/HealthCheck$ResultBuilder;
5: ldc "Result was %s but it expired %d milliseconds ago"
iconst_2
anewarray java.lang.Object
dup
iconst_0
6: aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.result:Lcom/codahale/metrics/health/HealthCheck$Result;
invokevirtual com.codahale.metrics.health.HealthCheck$Result.isHealthy:()Z
ifeq 7
ldc "healthy"
goto 8
StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator long
StackMap stack: com.codahale.metrics.health.HealthCheck$ResultBuilder java.lang.String java.lang.Object[] java.lang.Object[] int
7: ldc "unhealthy"
StackMap locals: com.codahale.metrics.health.AsyncHealthCheckDecorator long
StackMap stack: com.codahale.metrics.health.HealthCheck$ResultBuilder java.lang.String java.lang.Object[] java.lang.Object[] int java.lang.String
8: aastore
dup
iconst_1
9: lload 1
invokestatic java.lang.Long.valueOf:(J)Ljava/lang/Long;
aastore
10: invokevirtual com.codahale.metrics.health.HealthCheck$ResultBuilder.withMessage:(Ljava/lang/String;[Ljava/lang/Object;)Lcom/codahale/metrics/health/HealthCheck$ResultBuilder;
11: invokevirtual com.codahale.metrics.health.HealthCheck$ResultBuilder.build:()Lcom/codahale/metrics/health/HealthCheck$Result;
12: areturn
13: StackMap locals:
StackMap stack:
aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.result:Lcom/codahale/metrics/health/HealthCheck$Result;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
1 14 1 expiration J
Exceptions:
throws java.lang.Exception
boolean tearDown();
descriptor: ()Z
flags: (0x0000)
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.future:Ljava/util/concurrent/ScheduledFuture;
iconst_1
invokeinterface java.util.concurrent.ScheduledFuture.cancel:(Z)Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
public com.codahale.metrics.health.HealthCheck getHealthCheck();
descriptor: ()Lcom/codahale/metrics/health/HealthCheck;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield com.codahale.metrics.health.AsyncHealthCheckDecorator.healthCheck:Lcom/codahale/metrics/health/HealthCheck;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/codahale/metrics/health/AsyncHealthCheckDecorator;
private static void check(boolean, java.lang.String);
descriptor: (ZLjava/lang/String;)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: iload 0
ifne 2
1: new java.lang.IllegalArgumentException
dup
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 expression Z
0 3 1 message Ljava/lang/String;
MethodParameters:
Name Flags
expression
message
}
SourceFile: "AsyncHealthCheckDecorator.java"
InnerClasses:
public Result = com.codahale.metrics.health.HealthCheck$Result of com.codahale.metrics.health.HealthCheck
public ResultBuilder = com.codahale.metrics.health.HealthCheck$ResultBuilder of com.codahale.metrics.health.HealthCheck
public final InitialState = com.codahale.metrics.health.annotation.Async$InitialState of com.codahale.metrics.health.annotation.Async
public final ScheduleType = com.codahale.metrics.health.annotation.Async$ScheduleType of com.codahale.metrics.health.annotation.Async