This commit is contained in:
2022-06-10 21:38:30 +09:00
commit 27f5152838
51323 changed files with 12934539 additions and 0 deletions
@@ -0,0 +1,14 @@
.class synthetic Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$1;
.super Ljava/lang/Object;
.source "AbstractCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,38 @@
.class final enum Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$1;
.super Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.source "AbstractCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4009
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;-><init>(Ljava/lang/String;ILorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$1;)V
return-void
.end method
# virtual methods
.method public oppositeState()Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
return-object v0
.end method
@@ -0,0 +1,38 @@
.class final enum Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$2;
.super Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.source "AbstractCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4009
name = null
.end annotation
# direct methods
.method public constructor <init>(Ljava/lang/String;I)V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, p2, v0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;-><init>(Ljava/lang/String;ILorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$1;)V
return-void
.end method
# virtual methods
.method public oppositeState()Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
return-object v0
.end method
@@ -0,0 +1,129 @@
.class public abstract enum Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.super Ljava/lang/Enum;
.source "AbstractCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x4409
name = "State"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Enum<",
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;",
">;"
}
.end annotation
# static fields
.field private static final synthetic $VALUES:[Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.field public static final enum CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.field public static final enum OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
# direct methods
.method public static constructor <clinit>()V
.locals 5
.line 1
new-instance v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$1;
const-string v1, "CLOSED"
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$1;-><init>(Ljava/lang/String;I)V
sput-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.line 2
new-instance v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$2;
const-string v3, "OPEN"
const/4 v4, 0x1
invoke-direct {v1, v3, v4}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State$2;-><init>(Ljava/lang/String;I)V
sput-object v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
const/4 v3, 0x2
new-array v3, v3, [Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
aput-object v0, v3, v2
aput-object v1, v3, v4
.line 3
sput-object v3, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->$VALUES:[Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;I)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
.line 1
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public synthetic constructor <init>(Ljava/lang/String;ILorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$1;)V
.locals 0
.line 2
invoke-direct {p0, p1, p2}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;-><init>(Ljava/lang/String;I)V
return-void
.end method
.method public static valueOf(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.locals 1
.line 1
const-class v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
return-object p0
.end method
.method public static values()[Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->$VALUES:[Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-virtual {v0}, [Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
return-object v0
.end method
# virtual methods
.method public abstract oppositeState()Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.end method
@@ -0,0 +1,215 @@
.class public abstract Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;
.super Ljava/lang/Object;
.source "AbstractCircuitBreaker.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/CircuitBreaker;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/CircuitBreaker<",
"TT;>;"
}
.end annotation
# static fields
.field public static final PROPERTY_NAME:Ljava/lang/String; = "open"
# instance fields
.field private final changeSupport:Ljava/beans/PropertyChangeSupport;
.field public final state:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 2
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
sget-object v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->state:Ljava/util/concurrent/atomic/AtomicReference;
.line 3
new-instance v0, Ljava/beans/PropertyChangeSupport;
invoke-direct {v0, p0}, Ljava/beans/PropertyChangeSupport;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeSupport:Ljava/beans/PropertyChangeSupport;
return-void
.end method
.method public static isOpen(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Z
.locals 1
.line 2
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
if-ne p0, v0, :cond_0
const/4 p0, 0x1
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return p0
.end method
# virtual methods
.method public addChangeListener(Ljava/beans/PropertyChangeListener;)V
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeSupport:Ljava/beans/PropertyChangeSupport;
invoke-virtual {v0, p1}, Ljava/beans/PropertyChangeSupport;->addPropertyChangeListener(Ljava/beans/PropertyChangeListener;)V
return-void
.end method
.method public changeState(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
.locals 3
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->state:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->oppositeState()Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
move-result-object v1
invoke-virtual {v0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeSupport:Ljava/beans/PropertyChangeSupport;
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Z
move-result v1
xor-int/lit8 v1, v1, 0x1
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Z
move-result p1
const-string v2, "open"
invoke-virtual {v0, v2, v1, p1}, Ljava/beans/PropertyChangeSupport;->firePropertyChange(Ljava/lang/String;ZZ)V
:cond_0
return-void
.end method
.method public abstract checkState()Z
.end method
.method public close()V
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-virtual {p0, v0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeState(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
return-void
.end method
.method public abstract incrementAndCheckState(Ljava/lang/Object;)Z
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.end method
.method public isClosed()Z
.locals 1
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen()Z
move-result v0
xor-int/lit8 v0, v0, 0x1
return v0
.end method
.method public isOpen()Z
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->state:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-static {v0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Z
move-result v0
return v0
.end method
.method public open()V
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-virtual {p0, v0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeState(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
return-void
.end method
.method public removeChangeListener(Ljava/beans/PropertyChangeListener;)V
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeSupport:Ljava/beans/PropertyChangeSupport;
invoke-virtual {v0, p1}, Ljava/beans/PropertyChangeSupport;->removePropertyChangeListener(Ljava/beans/PropertyChangeListener;)V
return-void
.end method
@@ -0,0 +1,114 @@
.class public abstract Lorg/apache/commons/lang3/concurrent/AtomicInitializer;
.super Ljava/lang/Object;
.source "AtomicInitializer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;"
}
.end annotation
# instance fields
.field private final reference:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
return-void
.end method
# virtual methods
.method public get()Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_0
.line 2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AtomicInitializer;->initialize()Ljava/lang/Object;
move-result-object v0
.line 3
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/AtomicInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
const/4 v2, 0x0
invoke-virtual {v1, v2, v0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_0
.line 4
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
:cond_0
return-object v0
.end method
.method public abstract initialize()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.end method
@@ -0,0 +1,132 @@
.class public abstract Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;
.super Ljava/lang/Object;
.source "AtomicSafeInitializer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;"
}
.end annotation
# instance fields
.field private final factory:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer<",
"TT;>;>;"
}
.end annotation
.end field
.field private final reference:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->factory:Ljava/util/concurrent/atomic/AtomicReference;
.line 3
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
return-void
.end method
# virtual methods
.method public final get()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
:cond_0
:goto_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_1
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->factory:Ljava/util/concurrent/atomic/AtomicReference;
const/4 v1, 0x0
invoke-virtual {v0, v1, p0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 3
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->reference:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AtomicSafeInitializer;->initialize()Ljava/lang/Object;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
goto :goto_0
:cond_1
return-object v0
.end method
.method public abstract initialize()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.end method
@@ -0,0 +1,99 @@
.class Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;
.super Ljava/lang/Object;
.source "BackgroundInitializer.java"
# interfaces
.implements Ljava/util/concurrent/Callable;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "InitializationTask"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/util/concurrent/Callable<",
"TT;>;"
}
.end annotation
# instance fields
.field private final execFinally:Ljava/util/concurrent/ExecutorService;
.field public final synthetic this$0:Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
# direct methods
.method public constructor <init>(Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;Ljava/util/concurrent/ExecutorService;)V
.locals 0
.line 1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;->this$0:Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p2, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;->execFinally:Ljava/util/concurrent/ExecutorService;
return-void
.end method
# virtual methods
.method public call()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;->this$0:Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
invoke-virtual {v0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->initialize()Ljava/lang/Object;
move-result-object v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;->execFinally:Ljava/util/concurrent/ExecutorService;
if-eqz v1, :cond_0
.line 3
invoke-interface {v1}, Ljava/util/concurrent/ExecutorService;->shutdown()V
:cond_0
return-object v0
:catchall_0
move-exception v0
.line 4
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;->execFinally:Ljava/util/concurrent/ExecutorService;
if-eqz v1, :cond_1
.line 5
invoke-interface {v1}, Ljava/util/concurrent/ExecutorService;->shutdown()V
:cond_1
throw v0
.end method
@@ -0,0 +1,423 @@
.class public abstract Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.super Ljava/lang/Object;
.source "BackgroundInitializer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;"
}
.end annotation
# instance fields
.field private executor:Ljava/util/concurrent/ExecutorService;
.field private externalExecutor:Ljava/util/concurrent/ExecutorService;
.field private future:Ljava/util/concurrent/Future;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/Future<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;-><init>(Ljava/util/concurrent/ExecutorService;)V
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/ExecutorService;)V
.locals 0
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
invoke-virtual {p0, p1}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->setExternalExecutor(Ljava/util/concurrent/ExecutorService;)V
return-void
.end method
.method private createExecutor()Ljava/util/concurrent/ExecutorService;
.locals 1
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getTaskCount()I
move-result v0
invoke-static {v0}, Ljava/util/concurrent/Executors;->newFixedThreadPool(I)Ljava/util/concurrent/ExecutorService;
move-result-object v0
return-object v0
.end method
.method private createTask(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/Callable;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/ExecutorService;",
")",
"Ljava/util/concurrent/Callable<",
"TT;>;"
}
.end annotation
.line 1
new-instance v0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;
invoke-direct {v0, p0, p1}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer$InitializationTask;-><init>(Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;Ljava/util/concurrent/ExecutorService;)V
return-object v0
.end method
# virtual methods
.method public get()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
:try_start_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getFuture()Ljava/util/concurrent/Future;
move-result-object v0
invoke-interface {v0}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
move-result-object v0
:try_end_0
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0
return-object v0
:catch_0
move-exception v0
.line 2
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Thread;->interrupt()V
.line 3
new-instance v1, Lorg/apache/commons/lang3/concurrent/ConcurrentException;
invoke-direct {v1, v0}, Lorg/apache/commons/lang3/concurrent/ConcurrentException;-><init>(Ljava/lang/Throwable;)V
throw v1
:catch_1
move-exception v0
.line 4
invoke-static {v0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->handleCause(Ljava/util/concurrent/ExecutionException;)V
const/4 v0, 0x0
return-object v0
.end method
.method public final declared-synchronized getActiveExecutor()Ljava/util/concurrent/ExecutorService;
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->executor:Ljava/util/concurrent/ExecutorService;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized getExternalExecutor()Ljava/util/concurrent/ExecutorService;
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->externalExecutor:Ljava/util/concurrent/ExecutorService;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-object v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getFuture()Ljava/util/concurrent/Future;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/concurrent/Future<",
"TT;>;"
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->future:Ljava/util/concurrent/Future;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
.line 2
monitor-exit p0
return-object v0
.line 3
:cond_0
:try_start_1
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "start() must be called first!"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getTaskCount()I
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public abstract initialize()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.end method
.method public declared-synchronized isStarted()Z
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->future:Ljava/util/concurrent/Future;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized setExternalExecutor(Ljava/util/concurrent/ExecutorService;)V
.locals 1
monitor-enter p0
.line 1
:try_start_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->isStarted()Z
move-result v0
if-nez v0, :cond_0
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->externalExecutor:Ljava/util/concurrent/ExecutorService;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 3
monitor-exit p0
return-void
.line 4
:cond_0
:try_start_1
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Cannot set ExecutorService after start()!"
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized start()Z
.locals 2
monitor-enter p0
.line 1
:try_start_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->isStarted()Z
move-result v0
if-nez v0, :cond_1
.line 2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getExternalExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->executor:Ljava/util/concurrent/ExecutorService;
if-nez v0, :cond_0
.line 3
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->createExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->executor:Ljava/util/concurrent/ExecutorService;
goto :goto_0
:cond_0
const/4 v0, 0x0
.line 4
:goto_0
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->executor:Ljava/util/concurrent/ExecutorService;
invoke-direct {p0, v0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->createTask(Ljava/util/concurrent/ExecutorService;)Ljava/util/concurrent/Callable;
move-result-object v0
invoke-interface {v1, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/util/concurrent/Callable;)Ljava/util/concurrent/Future;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->future:Ljava/util/concurrent/Future;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
const/4 v0, 0x1
.line 5
monitor-exit p0
return v0
:cond_1
const/4 v0, 0x0
.line 6
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
@@ -0,0 +1,14 @@
.class synthetic Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$1;
.super Ljava/lang/Object;
.source "BasicThreadFactory.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,226 @@
.class public Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.super Ljava/lang/Object;
.source "BasicThreadFactory.java"
# interfaces
.implements Lorg/apache/commons/lang3/builder/Builder;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "Builder"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/builder/Builder<",
"Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;",
">;"
}
.end annotation
# instance fields
.field private daemonFlag:Ljava/lang/Boolean;
.field private exceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
.field private namingPattern:Ljava/lang/String;
.field private priority:Ljava/lang/Integer;
.field private wrappedFactory:Ljava/util/concurrent/ThreadFactory;
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static synthetic access$000(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/util/concurrent/ThreadFactory;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
return-object p0
.end method
.method public static synthetic access$100(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/String;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->namingPattern:Ljava/lang/String;
return-object p0
.end method
.method public static synthetic access$200(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Integer;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->priority:Ljava/lang/Integer;
return-object p0
.end method
.method public static synthetic access$300(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Boolean;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->daemonFlag:Ljava/lang/Boolean;
return-object p0
.end method
.method public static synthetic access$400(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Thread$UncaughtExceptionHandler;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->exceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
return-object p0
.end method
# virtual methods
.method public bridge synthetic build()Ljava/lang/Object;
.locals 1
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->build()Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
move-result-object v0
return-object v0
.end method
.method public build()Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
.locals 2
.line 2
new-instance v0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
const/4 v1, 0x0
invoke-direct {v0, p0, v1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;-><init>(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$1;)V
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->reset()V
return-object v0
.end method
.method public daemon(Z)Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.locals 0
.line 1
invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object p1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->daemonFlag:Ljava/lang/Boolean;
return-object p0
.end method
.method public namingPattern(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Naming pattern must not be null!"
.line 1
invoke-static {p1, v1, v0}, Lorg/apache/commons/lang3/Validate;->notNull(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->namingPattern:Ljava/lang/String;
return-object p0
.end method
.method public priority(I)Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.locals 0
.line 1
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object p1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->priority:Ljava/lang/Integer;
return-object p0
.end method
.method public reset()V
.locals 1
const/4 v0, 0x0
.line 1
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
.line 2
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->exceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
.line 3
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->namingPattern:Ljava/lang/String;
.line 4
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->priority:Ljava/lang/Integer;
.line 5
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->daemonFlag:Ljava/lang/Boolean;
return-void
.end method
.method public uncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Uncaught exception handler must not be null!"
.line 1
invoke-static {p1, v1, v0}, Lorg/apache/commons/lang3/Validate;->notNull(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->exceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
return-object p0
.end method
.method public wrappedFactory(Ljava/util/concurrent/ThreadFactory;)Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
.locals 2
const/4 v0, 0x0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Wrapped ThreadFactory must not be null!"
.line 1
invoke-static {p1, v1, v0}, Lorg/apache/commons/lang3/Validate;->notNull(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
return-object p0
.end method
@@ -0,0 +1,283 @@
.class public Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;
.super Ljava/lang/Object;
.source "BasicThreadFactory.java"
# interfaces
.implements Ljava/util/concurrent/ThreadFactory;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;
}
.end annotation
# instance fields
.field private final daemonFlag:Ljava/lang/Boolean;
.field private final namingPattern:Ljava/lang/String;
.field private final priority:Ljava/lang/Integer;
.field private final threadCounter:Ljava/util/concurrent/atomic/AtomicLong;
.field private final uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
.field private final wrappedFactory:Ljava/util/concurrent/ThreadFactory;
# direct methods
.method private constructor <init>(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)V
.locals 1
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$000(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/util/concurrent/ThreadFactory;
move-result-object v0
if-nez v0, :cond_0
.line 4
invoke-static {}, Ljava/util/concurrent/Executors;->defaultThreadFactory()Ljava/util/concurrent/ThreadFactory;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
goto :goto_0
.line 5
:cond_0
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$000(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/util/concurrent/ThreadFactory;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
.line 6
:goto_0
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$100(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/String;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->namingPattern:Ljava/lang/String;
.line 7
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$200(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Integer;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->priority:Ljava/lang/Integer;
.line 8
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$300(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Boolean;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->daemonFlag:Ljava/lang/Boolean;
.line 9
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;->access$400(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)Ljava/lang/Thread$UncaughtExceptionHandler;
move-result-object p1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
.line 10
new-instance p1, Ljava/util/concurrent/atomic/AtomicLong;
invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->threadCounter:Ljava/util/concurrent/atomic/AtomicLong;
return-void
.end method
.method public synthetic constructor <init>(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$1;)V
.locals 0
.line 1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;-><init>(Lorg/apache/commons/lang3/concurrent/BasicThreadFactory$Builder;)V
return-void
.end method
.method private initializeThread(Ljava/lang/Thread;)V
.locals 4
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getNamingPattern()Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_0
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->threadCounter:Ljava/util/concurrent/atomic/AtomicLong;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicLong;->incrementAndGet()J
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v0
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getNamingPattern()Ljava/lang/String;
move-result-object v1
const/4 v2, 0x1
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
aput-object v0, v2, v3
invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {p1, v0}, Ljava/lang/Thread;->setName(Ljava/lang/String;)V
.line 4
:cond_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
move-result-object v0
if-eqz v0, :cond_1
.line 5
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
move-result-object v0
invoke-virtual {p1, v0}, Ljava/lang/Thread;->setUncaughtExceptionHandler(Ljava/lang/Thread$UncaughtExceptionHandler;)V
.line 6
:cond_1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getPriority()Ljava/lang/Integer;
move-result-object v0
if-eqz v0, :cond_2
.line 7
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getPriority()Ljava/lang/Integer;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/Thread;->setPriority(I)V
.line 8
:cond_2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getDaemonFlag()Ljava/lang/Boolean;
move-result-object v0
if-eqz v0, :cond_3
.line 9
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getDaemonFlag()Ljava/lang/Boolean;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
move-result v0
invoke-virtual {p1, v0}, Ljava/lang/Thread;->setDaemon(Z)V
:cond_3
return-void
.end method
# virtual methods
.method public final getDaemonFlag()Ljava/lang/Boolean;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->daemonFlag:Ljava/lang/Boolean;
return-object v0
.end method
.method public final getNamingPattern()Ljava/lang/String;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->namingPattern:Ljava/lang/String;
return-object v0
.end method
.method public final getPriority()Ljava/lang/Integer;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->priority:Ljava/lang/Integer;
return-object v0
.end method
.method public getThreadCount()J
.locals 2
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->threadCounter:Ljava/util/concurrent/atomic/AtomicLong;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
move-result-wide v0
return-wide v0
.end method
.method public final getUncaughtExceptionHandler()Ljava/lang/Thread$UncaughtExceptionHandler;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->uncaughtExceptionHandler:Ljava/lang/Thread$UncaughtExceptionHandler;
return-object v0
.end method
.method public final getWrappedFactory()Ljava/util/concurrent/ThreadFactory;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->wrappedFactory:Ljava/util/concurrent/ThreadFactory;
return-object v0
.end method
.method public newThread(Ljava/lang/Runnable;)Ljava/lang/Thread;
.locals 1
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->getWrappedFactory()Ljava/util/concurrent/ThreadFactory;
move-result-object v0
invoke-interface {v0, p1}, Ljava/util/concurrent/ThreadFactory;->newThread(Ljava/lang/Runnable;)Ljava/lang/Thread;
move-result-object p1
.line 2
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/BasicThreadFactory;->initializeThread(Ljava/lang/Thread;)V
return-object p1
.end method
@@ -0,0 +1,132 @@
.class public Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;
.super Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.source "CallableBackgroundInitializer.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"TT;>;"
}
.end annotation
# instance fields
.field private final callable:Ljava/util/concurrent/Callable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/Callable<",
"TT;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/util/concurrent/Callable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Callable<",
"TT;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;-><init>()V
.line 2
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;->checkCallable(Ljava/util/concurrent/Callable;)V
.line 3
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;->callable:Ljava/util/concurrent/Callable;
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/Callable;Ljava/util/concurrent/ExecutorService;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Callable<",
"TT;>;",
"Ljava/util/concurrent/ExecutorService;",
")V"
}
.end annotation
.line 4
invoke-direct {p0, p2}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;-><init>(Ljava/util/concurrent/ExecutorService;)V
.line 5
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;->checkCallable(Ljava/util/concurrent/Callable;)V
.line 6
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;->callable:Ljava/util/concurrent/Callable;
return-void
.end method
.method private checkCallable(Ljava/util/concurrent/Callable;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/concurrent/Callable<",
"TT;>;)V"
}
.end annotation
const/4 v0, 0x0
if-eqz p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
move p1, v0
:goto_0
new-array v0, v0, [Ljava/lang/Object;
const-string v1, "Callable must not be null!"
.line 1
invoke-static {p1, v1, v0}, Lorg/apache/commons/lang3/Validate;->isTrue(ZLjava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
# virtual methods
.method public initialize()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/CallableBackgroundInitializer;->callable:Ljava/util/concurrent/Callable;
invoke-interface {v0}, Ljava/util/concurrent/Callable;->call()Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,39 @@
.class public interface abstract Lorg/apache/commons/lang3/concurrent/CircuitBreaker;
.super Ljava/lang/Object;
.source "CircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# virtual methods
.method public abstract checkState()Z
.end method
.method public abstract close()V
.end method
.method public abstract incrementAndCheckState(Ljava/lang/Object;)Z
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.end method
.method public abstract isClosed()Z
.end method
.method public abstract isOpen()Z
.end method
.method public abstract open()V
.end method
@@ -0,0 +1,45 @@
.class public Lorg/apache/commons/lang3/concurrent/CircuitBreakingException;
.super Ljava/lang/RuntimeException;
.source "CircuitBreakingException.java"
# static fields
.field private static final serialVersionUID:J = 0x138ad934e39c833cL
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/RuntimeException;-><init>()V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.locals 0
.line 3
invoke-direct {p0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 0
.line 2
invoke-direct {p0, p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Throwable;)V
.locals 0
.line 4
invoke-direct {p0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
return-void
.end method
@@ -0,0 +1,32 @@
.class public interface abstract Lorg/apache/commons/lang3/concurrent/Computable;
.super Ljava/lang/Object;
.source "Computable.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<I:",
"Ljava/lang/Object;",
"O:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# virtual methods
.method public abstract compute(Ljava/lang/Object;)Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"(TI;)TO;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
.end method
@@ -0,0 +1,44 @@
.class public Lorg/apache/commons/lang3/concurrent/ConcurrentException;
.super Ljava/lang/Exception;
.source "ConcurrentException.java"
# static fields
.field private static final serialVersionUID:J = 0x5be89589f59f3c52L
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Exception;-><init>()V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 0
.line 3
invoke-static {p2}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->checkedException(Ljava/lang/Throwable;)Ljava/lang/Throwable;
move-result-object p2
invoke-direct {p0, p1, p2}, Ljava/lang/Exception;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Throwable;)V
.locals 0
.line 2
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->checkedException(Ljava/lang/Throwable;)Ljava/lang/Throwable;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/Exception;-><init>(Ljava/lang/Throwable;)V
return-void
.end method
@@ -0,0 +1,30 @@
.class public interface abstract Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
.super Ljava/lang/Object;
.source "ConcurrentInitializer.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
# virtual methods
.method public abstract get()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.end method
@@ -0,0 +1,44 @@
.class public Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
.super Ljava/lang/RuntimeException;
.source "ConcurrentRuntimeException.java"
# static fields
.field private static final serialVersionUID:J = -0x5b589c52f7efcef6L
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/RuntimeException;-><init>()V
return-void
.end method
.method public constructor <init>(Ljava/lang/String;Ljava/lang/Throwable;)V
.locals 0
.line 3
invoke-static {p2}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->checkedException(Ljava/lang/Throwable;)Ljava/lang/Throwable;
move-result-object p2
invoke-direct {p0, p1, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
return-void
.end method
.method public constructor <init>(Ljava/lang/Throwable;)V
.locals 0
.line 2
invoke-static {p1}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->checkedException(Ljava/lang/Throwable;)Ljava/lang/Throwable;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
return-void
.end method
@@ -0,0 +1,113 @@
.class final Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;
.super Ljava/lang/Object;
.source "ConcurrentUtils.java"
# interfaces
.implements Ljava/util/concurrent/Future;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ConstantFuture"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Ljava/util/concurrent/Future<",
"TT;>;"
}
.end annotation
# instance fields
.field private final value:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;->value:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public cancel(Z)Z
.locals 0
const/4 p1, 0x0
return p1
.end method
.method public get()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;->value:Ljava/lang/Object;
return-object v0
.end method
.method public get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(J",
"Ljava/util/concurrent/TimeUnit;",
")TT;"
}
.end annotation
.line 2
iget-object p1, p0, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;->value:Ljava/lang/Object;
return-object p1
.end method
.method public isCancelled()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public isDone()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
@@ -0,0 +1,453 @@
.class public Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;
.super Ljava/lang/Object;
.source "ConcurrentUtils.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static checkedException(Ljava/lang/Throwable;)Ljava/lang/Throwable;
.locals 4
const/4 v0, 0x0
if-eqz p0, :cond_0
.line 1
instance-of v1, p0, Ljava/lang/RuntimeException;
if-nez v1, :cond_0
instance-of v1, p0, Ljava/lang/Error;
if-nez v1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
move v1, v0
:goto_0
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "Not a checked exception: "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v1, v2, v0}, Lorg/apache/commons/lang3/Validate;->isTrue(ZLjava/lang/String;[Ljava/lang/Object;)V
return-object p0
.end method
.method public static constantFuture(Ljava/lang/Object;)Ljava/util/concurrent/Future;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)",
"Ljava/util/concurrent/Future<",
"TT;>;"
}
.end annotation
.line 1
new-instance v0, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;
invoke-direct {v0, p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils$ConstantFuture;-><init>(Ljava/lang/Object;)V
return-object v0
.end method
.method public static createIfAbsent(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/ConcurrentMap<",
"TK;TV;>;TK;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TV;>;)TV;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
if-eqz p0, :cond_2
if-nez p2, :cond_0
goto :goto_0
.line 1
:cond_0
invoke-interface {p0, p1}, Ljava/util/concurrent/ConcurrentMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
if-nez v0, :cond_1
.line 2
invoke-interface {p2}, Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;->get()Ljava/lang/Object;
move-result-object p2
invoke-static {p0, p1, p2}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->putIfAbsent(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
return-object p0
:cond_1
return-object v0
:cond_2
:goto_0
const/4 p0, 0x0
return-object p0
.end method
.method public static createIfAbsentUnchecked(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/ConcurrentMap<",
"TK;TV;>;TK;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TV;>;)TV;"
}
.end annotation
.line 1
:try_start_0
invoke-static {p0, p1, p2}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->createIfAbsent(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
move-result-object p0
:try_end_0
.catch Lorg/apache/commons/lang3/concurrent/ConcurrentException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
.line 2
new-instance p1, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
invoke-virtual {p0}, Ljava/lang/Exception;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {p1, p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;-><init>(Ljava/lang/Throwable;)V
throw p1
.end method
.method public static extractCause(Ljava/util/concurrent/ExecutionException;)Lorg/apache/commons/lang3/concurrent/ConcurrentException;
.locals 2
if-eqz p0, :cond_1
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object v0
if-nez v0, :cond_0
goto :goto_0
.line 2
:cond_0
invoke-static {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->throwCause(Ljava/util/concurrent/ExecutionException;)V
.line 3
new-instance v0, Lorg/apache/commons/lang3/concurrent/ConcurrentException;
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getMessage()Ljava/lang/String;
move-result-object v1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {v0, v1, p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
return-object v0
:cond_1
:goto_0
const/4 p0, 0x0
return-object p0
.end method
.method public static extractCauseUnchecked(Ljava/util/concurrent/ExecutionException;)Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
.locals 2
if-eqz p0, :cond_1
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object v0
if-nez v0, :cond_0
goto :goto_0
.line 2
:cond_0
invoke-static {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->throwCause(Ljava/util/concurrent/ExecutionException;)V
.line 3
new-instance v0, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getMessage()Ljava/lang/String;
move-result-object v1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {v0, v1, p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
return-object v0
:cond_1
:goto_0
const/4 p0, 0x0
return-object p0
.end method
.method public static handleCause(Ljava/util/concurrent/ExecutionException;)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
invoke-static {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->extractCause(Ljava/util/concurrent/ExecutionException;)Lorg/apache/commons/lang3/concurrent/ConcurrentException;
move-result-object p0
if-nez p0, :cond_0
return-void
.line 2
:cond_0
throw p0
.end method
.method public static handleCauseUnchecked(Ljava/util/concurrent/ExecutionException;)V
.locals 0
.line 1
invoke-static {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->extractCauseUnchecked(Ljava/util/concurrent/ExecutionException;)Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
move-result-object p0
if-nez p0, :cond_0
return-void
.line 2
:cond_0
throw p0
.end method
.method public static initialize(Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;)TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
if-eqz p0, :cond_0
.line 1
invoke-interface {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;->get()Ljava/lang/Object;
move-result-object p0
goto :goto_0
:cond_0
const/4 p0, 0x0
:goto_0
return-object p0
.end method
.method public static initializeUnchecked(Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;)TT;"
}
.end annotation
.line 1
:try_start_0
invoke-static {p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentUtils;->initialize(Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;)Ljava/lang/Object;
move-result-object p0
:try_end_0
.catch Lorg/apache/commons/lang3/concurrent/ConcurrentException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
.line 2
new-instance v0, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;
invoke-virtual {p0}, Ljava/lang/Exception;->getCause()Ljava/lang/Throwable;
move-result-object p0
invoke-direct {v0, p0}, Lorg/apache/commons/lang3/concurrent/ConcurrentRuntimeException;-><init>(Ljava/lang/Throwable;)V
throw v0
.end method
.method public static putIfAbsent(Ljava/util/concurrent/ConcurrentMap;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/ConcurrentMap<",
"TK;TV;>;TK;TV;)TV;"
}
.end annotation
if-nez p0, :cond_0
const/4 p0, 0x0
return-object p0
.line 1
:cond_0
invoke-interface {p0, p1, p2}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
if-eqz p0, :cond_1
move-object p2, p0
:cond_1
return-object p2
.end method
.method private static throwCause(Ljava/util/concurrent/ExecutionException;)V
.locals 1
.line 1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object v0
instance-of v0, v0, Ljava/lang/RuntimeException;
if-nez v0, :cond_1
.line 2
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object v0
instance-of v0, v0, Ljava/lang/Error;
if-nez v0, :cond_0
return-void
.line 3
:cond_0
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p0
check-cast p0, Ljava/lang/Error;
throw p0
.line 4
:cond_1
invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p0
check-cast p0, Ljava/lang/RuntimeException;
throw p0
.end method
@@ -0,0 +1,199 @@
.class public Lorg/apache/commons/lang3/concurrent/ConstantInitializer;
.super Ljava/lang/Object;
.source "ConstantInitializer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;"
}
.end annotation
# static fields
.field private static final FMT_TO_STRING:Ljava/lang/String; = "ConstantInitializer@%d [ object = %s ]"
# instance fields
.field private final object:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->object:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public equals(Ljava/lang/Object;)Z
.locals 1
if-ne p0, p1, :cond_0
const/4 p1, 0x1
return p1
.line 1
:cond_0
instance-of v0, p1, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;
if-nez v0, :cond_1
const/4 p1, 0x0
return p1
.line 2
:cond_1
check-cast p1, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object v0
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object p1
invoke-static {v0, p1}, Ljava/util/Objects;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public get()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
.method public final getObject()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->object:Ljava/lang/Object;
return-object v0
.end method
.method public hashCode()I
.locals 1
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->hashCode()I
move-result v0
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 3
const/4 v0, 0x2
new-array v0, v0, [Ljava/lang/Object;
.line 1
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
move-result v1
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
const/4 v2, 0x0
aput-object v1, v0, v2
.line 2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ConstantInitializer;->getObject()Ljava/lang/Object;
move-result-object v1
invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
const/4 v2, 0x1
aput-object v1, v0, v2
const-string v1, "ConstantInitializer@%d [ object = %s ]"
.line 3
invoke-static {v1, v0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,14 @@
.class synthetic Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;
.super Ljava/lang/Object;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,87 @@
.class Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
.super Ljava/lang/Object;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "CheckIntervalData"
.end annotation
# instance fields
.field private final checkIntervalStart:J
.field private final eventCount:I
# direct methods
.method public constructor <init>(IJ)V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
iput p1, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->eventCount:I
.line 3
iput-wide p2, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->checkIntervalStart:J
return-void
.end method
# virtual methods
.method public getCheckIntervalStart()J
.locals 2
.line 1
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->checkIntervalStart:J
return-wide v0
.end method
.method public getEventCount()I
.locals 1
.line 1
iget v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->eventCount:I
return v0
.end method
.method public increment(I)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
.locals 4
if-eqz p1, :cond_0
.line 1
new-instance v0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getEventCount()I
move-result v1
add-int/2addr v1, p1
.line 2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getCheckIntervalStart()J
move-result-wide v2
invoke-direct {v0, v1, v2, v3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
goto :goto_0
:cond_0
move-object v0, p0
:goto_0
return-object v0
.end method
@@ -0,0 +1,71 @@
.class abstract Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
.super Ljava/lang/Object;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x409
name = "StateStrategy"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
.locals 0
.line 2
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;-><init>()V
return-void
.end method
# virtual methods
.method public abstract fetchCheckInterval(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;)J
.end method
.method public isCheckIntervalFinished(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;J)Z
.locals 2
.line 1
invoke-virtual {p2}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getCheckIntervalStart()J
move-result-wide v0
sub-long/2addr p3, v0
invoke-virtual {p0, p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;->fetchCheckInterval(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;)J
move-result-wide p1
cmp-long p1, p3, p1
if-lez p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public abstract isStateTransition(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
.end method
@@ -0,0 +1,74 @@
.class Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyClosed;
.super Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "StateStrategyClosed"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;-><init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
return-void
.end method
.method public synthetic constructor <init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
.locals 0
.line 2
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyClosed;-><init>()V
return-void
.end method
# virtual methods
.method public fetchCheckInterval(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;)J
.locals 2
.line 1
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->getOpeningInterval()J
move-result-wide v0
return-wide v0
.end method
.method public isStateTransition(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
.locals 0
.line 1
invoke-virtual {p3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getEventCount()I
move-result p2
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->getOpeningThreshold()I
move-result p1
if-le p2, p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
@@ -0,0 +1,88 @@
.class Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyOpen;
.super Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "StateStrategyOpen"
.end annotation
# direct methods
.method private constructor <init>()V
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;-><init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
return-void
.end method
.method public synthetic constructor <init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
.locals 0
.line 2
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyOpen;-><init>()V
return-void
.end method
# virtual methods
.method public fetchCheckInterval(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;)J
.locals 2
.line 1
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->getClosingInterval()J
move-result-wide v0
return-wide v0
.end method
.method public isStateTransition(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
.locals 4
.line 1
invoke-virtual {p3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getCheckIntervalStart()J
move-result-wide v0
.line 2
invoke-virtual {p2}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getCheckIntervalStart()J
move-result-wide v2
cmp-long p3, v0, v2
if-eqz p3, :cond_0
.line 3
invoke-virtual {p2}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->getEventCount()I
move-result p2
invoke-virtual {p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->getClosingThreshold()I
move-result p1
if-ge p2, p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
@@ -0,0 +1,537 @@
.class public Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;
.super Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;
.source "EventCountCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyOpen;,
Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyClosed;,
Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;,
Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker<",
"Ljava/lang/Integer;",
">;"
}
.end annotation
# static fields
.field private static final STRATEGY_MAP:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;",
"Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;",
">;"
}
.end annotation
.end field
# instance fields
.field private final checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;",
">;"
}
.end annotation
.end field
.field private final closingInterval:J
.field private final closingThreshold:I
.field private final openingInterval:J
.field private final openingThreshold:I
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
invoke-static {}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->createStrategyMap()Ljava/util/Map;
move-result-object v0
sput-object v0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->STRATEGY_MAP:Ljava/util/Map;
return-void
.end method
.method public constructor <init>(IJLjava/util/concurrent/TimeUnit;)V
.locals 6
move-object v0, p0
move v1, p1
move-wide v2, p2
move-object v4, p4
move v5, p1
.line 8
invoke-direct/range {v0 .. v5}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;-><init>(IJLjava/util/concurrent/TimeUnit;I)V
return-void
.end method
.method public constructor <init>(IJLjava/util/concurrent/TimeUnit;I)V
.locals 9
move-object v0, p0
move v1, p1
move-wide v2, p2
move-object v4, p4
move v5, p5
move-wide v6, p2
move-object v8, p4
.line 7
invoke-direct/range {v0 .. v8}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;-><init>(IJLjava/util/concurrent/TimeUnit;IJLjava/util/concurrent/TimeUnit;)V
return-void
.end method
.method public constructor <init>(IJLjava/util/concurrent/TimeUnit;IJLjava/util/concurrent/TimeUnit;)V
.locals 5
.line 1
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
new-instance v1, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
const/4 v2, 0x0
const-wide/16 v3, 0x0
invoke-direct {v1, v2, v3, v4}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
invoke-direct {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
.line 3
iput p1, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->openingThreshold:I
.line 4
invoke-virtual {p4, p2, p3}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide p1
iput-wide p1, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->openingInterval:J
.line 5
iput p5, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->closingThreshold:I
.line 6
invoke-virtual {p8, p6, p7}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide p1
iput-wide p1, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->closingInterval:J
return-void
.end method
.method private changeStateAndStartNewCheckInterval(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
.locals 4
.line 1
invoke-virtual {p0, p1}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->changeState(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
.line 2
iget-object p1, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
new-instance v0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->now()J
move-result-wide v1
const/4 v3, 0x0
invoke-direct {v0, v3, v1, v2}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
invoke-virtual {p1, v0}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
return-void
.end method
.method private static createStrategyMap()Ljava/util/Map;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Map<",
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;",
"Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;",
">;"
}
.end annotation
.line 1
new-instance v0, Ljava/util/EnumMap;
const-class v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
invoke-direct {v0, v1}, Ljava/util/EnumMap;-><init>(Ljava/lang/Class;)V
.line 2
sget-object v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->CLOSED:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
new-instance v2, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyClosed;
const/4 v3, 0x0
invoke-direct {v2, v3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyClosed;-><init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 3
sget-object v1, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->OPEN:Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
new-instance v2, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyOpen;
invoke-direct {v2, v3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategyOpen;-><init>(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$1;)V
invoke-virtual {v0, v1, v2}, Ljava/util/EnumMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
return-object v0
.end method
.method private nextCheckIntervalData(ILorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;J)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
.locals 0
.line 1
invoke-static {p3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->stateStrategy(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
move-result-object p3
invoke-virtual {p3, p0, p2, p4, p5}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;->isCheckIntervalFinished(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;J)Z
move-result p3
if-eqz p3, :cond_0
.line 2
new-instance p2, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
invoke-direct {p2, p1, p4, p5}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
goto :goto_0
.line 3
:cond_0
invoke-virtual {p2, p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;->increment(I)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
move-result-object p2
:goto_0
return-object p2
.end method
.method private performStateCheck(I)Z
.locals 8
.line 1
:cond_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->now()J
move-result-wide v4
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->state:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
move-object v6, v0
check-cast v6, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
.line 3
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
move-object v7, v0
check-cast v7, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
move-object v0, p0
move v1, p1
move-object v2, v7
move-object v3, v6
.line 4
invoke-direct/range {v0 .. v5}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->nextCheckIntervalData(ILorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;J)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
move-result-object v0
.line 5
invoke-direct {p0, v7, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->updateCheckIntervalData(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
move-result v1
if-eqz v1, :cond_0
.line 6
invoke-static {v6}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->stateStrategy(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
move-result-object p1
invoke-virtual {p1, p0, v7, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;->isStateTransition(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
move-result p1
if-eqz p1, :cond_1
.line 7
invoke-virtual {v6}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;->oppositeState()Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;
move-result-object v6
.line 8
invoke-direct {p0, v6}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->changeStateAndStartNewCheckInterval(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)V
.line 9
:cond_1
invoke-static {v6}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Z
move-result p1
xor-int/lit8 p1, p1, 0x1
return p1
.end method
.method private static stateStrategy(Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker$State;)Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
.locals 1
.line 1
sget-object v0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->STRATEGY_MAP:Ljava/util/Map;
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p0
check-cast p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$StateStrategy;
return-object p0
.end method
.method private updateCheckIntervalData(Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;)Z
.locals 1
if-eq p1, p2, :cond_1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
.line 2
invoke-virtual {v0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
goto :goto_0
:cond_0
const/4 p1, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p1, 0x1
:goto_1
return p1
.end method
# virtual methods
.method public checkState()Z
.locals 1
const/4 v0, 0x0
.line 1
invoke-direct {p0, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->performStateCheck(I)Z
move-result v0
return v0
.end method
.method public close()V
.locals 5
.line 1
invoke-super {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->close()V
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
new-instance v1, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->now()J
move-result-wide v2
const/4 v4, 0x0
invoke-direct {v1, v4, v2, v3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
return-void
.end method
.method public getClosingInterval()J
.locals 2
.line 1
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->closingInterval:J
return-wide v0
.end method
.method public getClosingThreshold()I
.locals 1
.line 1
iget v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->closingThreshold:I
return v0
.end method
.method public getOpeningInterval()J
.locals 2
.line 1
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->openingInterval:J
return-wide v0
.end method
.method public getOpeningThreshold()I
.locals 1
.line 1
iget v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->openingThreshold:I
return v0
.end method
.method public incrementAndCheckState()Z
.locals 1
const/4 v0, 0x1
.line 3
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
invoke-virtual {p0, v0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->incrementAndCheckState(Ljava/lang/Integer;)Z
move-result v0
return v0
.end method
.method public incrementAndCheckState(Ljava/lang/Integer;)Z
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/CircuitBreakingException;
}
.end annotation
const/4 p1, 0x1
.line 2
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->performStateCheck(I)Z
move-result p1
return p1
.end method
.method public bridge synthetic incrementAndCheckState(Ljava/lang/Object;)Z
.locals 0
.line 1
check-cast p1, Ljava/lang/Integer;
invoke-virtual {p0, p1}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->incrementAndCheckState(Ljava/lang/Integer;)Z
move-result p1
return p1
.end method
.method public now()J
.locals 2
.line 1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
return-wide v0
.end method
.method public open()V
.locals 5
.line 1
invoke-super {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->open()V
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->checkIntervalData:Ljava/util/concurrent/atomic/AtomicReference;
new-instance v1, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker;->now()J
move-result-wide v2
const/4 v4, 0x0
invoke-direct {v1, v4, v2, v3}, Lorg/apache/commons/lang3/concurrent/EventCountCircuitBreaker$CheckIntervalData;-><init>(IJ)V
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
return-void
.end method
@@ -0,0 +1,136 @@
.class public abstract Lorg/apache/commons/lang3/concurrent/LazyInitializer;
.super Ljava/lang/Object;
.source "LazyInitializer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentInitializer<",
"TT;>;"
}
.end annotation
# static fields
.field private static final NO_INIT:Ljava/lang/Object;
# instance fields
.field private volatile object:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
# direct methods
.method public static constructor <clinit>()V
.locals 1
.line 1
new-instance v0, Ljava/lang/Object;
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
sput-object v0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->NO_INIT:Ljava/lang/Object;
return-void
.end method
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 2
sget-object v0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->NO_INIT:Ljava/lang/Object;
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->object:Ljava/lang/Object;
return-void
.end method
# virtual methods
.method public get()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->object:Ljava/lang/Object;
.line 2
sget-object v1, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->NO_INIT:Ljava/lang/Object;
if-ne v0, v1, :cond_1
.line 3
monitor-enter p0
.line 4
:try_start_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->object:Ljava/lang/Object;
if-ne v0, v1, :cond_0
.line 5
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->initialize()Ljava/lang/Object;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/LazyInitializer;->object:Ljava/lang/Object;
.line 6
:cond_0
monitor-exit p0
goto :goto_0
:catchall_0
move-exception v0
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v0
:cond_1
:goto_0
return-object v0
.end method
.method public abstract initialize()Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"()TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/ConcurrentException;
}
.end annotation
.end method
@@ -0,0 +1,78 @@
.class Lorg/apache/commons/lang3/concurrent/Memoizer$1;
.super Ljava/lang/Object;
.source "Memoizer.java"
# interfaces
.implements Ljava/util/concurrent/Callable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lorg/apache/commons/lang3/concurrent/Memoizer;->compute(Ljava/lang/Object;)Ljava/lang/Object;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/lang/Object;",
"Ljava/util/concurrent/Callable<",
"TO;>;"
}
.end annotation
# instance fields
.field public final synthetic this$0:Lorg/apache/commons/lang3/concurrent/Memoizer;
.field public final synthetic val$arg:Ljava/lang/Object;
# direct methods
.method public constructor <init>(Lorg/apache/commons/lang3/concurrent/Memoizer;Ljava/lang/Object;)V
.locals 0
.line 1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/Memoizer$1;->this$0:Lorg/apache/commons/lang3/concurrent/Memoizer;
iput-object p2, p0, Lorg/apache/commons/lang3/concurrent/Memoizer$1;->val$arg:Ljava/lang/Object;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public call()Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()TO;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/Memoizer$1;->this$0:Lorg/apache/commons/lang3/concurrent/Memoizer;
invoke-static {v0}, Lorg/apache/commons/lang3/concurrent/Memoizer;->access$000(Lorg/apache/commons/lang3/concurrent/Memoizer;)Lorg/apache/commons/lang3/concurrent/Computable;
move-result-object v0
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/Memoizer$1;->val$arg:Ljava/lang/Object;
invoke-interface {v0, v1}, Lorg/apache/commons/lang3/concurrent/Computable;->compute(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
return-object v0
.end method
@@ -0,0 +1,238 @@
.class public Lorg/apache/commons/lang3/concurrent/Memoizer;
.super Ljava/lang/Object;
.source "Memoizer.java"
# interfaces
.implements Lorg/apache/commons/lang3/concurrent/Computable;
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"<I:",
"Ljava/lang/Object;",
"O:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;",
"Lorg/apache/commons/lang3/concurrent/Computable<",
"TI;TO;>;"
}
.end annotation
# instance fields
.field private final cache:Ljava/util/concurrent/ConcurrentMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ConcurrentMap<",
"TI;",
"Ljava/util/concurrent/Future<",
"TO;>;>;"
}
.end annotation
.end field
.field private final computable:Lorg/apache/commons/lang3/concurrent/Computable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/apache/commons/lang3/concurrent/Computable<",
"TI;TO;>;"
}
.end annotation
.end field
.field private final recalculate:Z
# direct methods
.method public constructor <init>(Lorg/apache/commons/lang3/concurrent/Computable;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/apache/commons/lang3/concurrent/Computable<",
"TI;TO;>;)V"
}
.end annotation
const/4 v0, 0x0
.line 1
invoke-direct {p0, p1, v0}, Lorg/apache/commons/lang3/concurrent/Memoizer;-><init>(Lorg/apache/commons/lang3/concurrent/Computable;Z)V
return-void
.end method
.method public constructor <init>(Lorg/apache/commons/lang3/concurrent/Computable;Z)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lorg/apache/commons/lang3/concurrent/Computable<",
"TI;TO;>;Z)V"
}
.end annotation
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
new-instance v0, Ljava/util/concurrent/ConcurrentHashMap;
invoke-direct {v0}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->cache:Ljava/util/concurrent/ConcurrentMap;
.line 4
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->computable:Lorg/apache/commons/lang3/concurrent/Computable;
.line 5
iput-boolean p2, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->recalculate:Z
return-void
.end method
.method public static synthetic access$000(Lorg/apache/commons/lang3/concurrent/Memoizer;)Lorg/apache/commons/lang3/concurrent/Computable;
.locals 0
.line 1
iget-object p0, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->computable:Lorg/apache/commons/lang3/concurrent/Computable;
return-object p0
.end method
.method private launderException(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
.locals 2
.line 1
instance-of v0, p1, Ljava/lang/RuntimeException;
if-eqz v0, :cond_0
.line 2
check-cast p1, Ljava/lang/RuntimeException;
return-object p1
.line 3
:cond_0
instance-of v0, p1, Ljava/lang/Error;
if-eqz v0, :cond_1
.line 4
check-cast p1, Ljava/lang/Error;
throw p1
.line 5
:cond_1
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "Unchecked exception"
invoke-direct {v0, v1, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
.end method
# virtual methods
.method public compute(Ljava/lang/Object;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(TI;)TO;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
.line 1
:goto_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->cache:Ljava/util/concurrent/ConcurrentMap;
invoke-interface {v0, p1}, Ljava/util/concurrent/ConcurrentMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/concurrent/Future;
if-nez v0, :cond_0
.line 2
new-instance v0, Lorg/apache/commons/lang3/concurrent/Memoizer$1;
invoke-direct {v0, p0, p1}, Lorg/apache/commons/lang3/concurrent/Memoizer$1;-><init>(Lorg/apache/commons/lang3/concurrent/Memoizer;Ljava/lang/Object;)V
.line 3
new-instance v1, Ljava/util/concurrent/FutureTask;
invoke-direct {v1, v0}, Ljava/util/concurrent/FutureTask;-><init>(Ljava/util/concurrent/Callable;)V
.line 4
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->cache:Ljava/util/concurrent/ConcurrentMap;
invoke-interface {v0, p1, v1}, Ljava/util/concurrent/ConcurrentMap;->putIfAbsent(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/concurrent/Future;
if-nez v0, :cond_0
.line 5
invoke-virtual {v1}, Ljava/util/concurrent/FutureTask;->run()V
move-object v0, v1
.line 6
:cond_0
:try_start_0
invoke-interface {v0}, Ljava/util/concurrent/Future;->get()Ljava/lang/Object;
move-result-object p1
:try_end_0
.catch Ljava/util/concurrent/CancellationException; {:try_start_0 .. :try_end_0} :catch_1
.catch Ljava/util/concurrent/ExecutionException; {:try_start_0 .. :try_end_0} :catch_0
return-object p1
:catch_0
move-exception v1
.line 7
iget-boolean v2, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->recalculate:Z
if-eqz v2, :cond_1
.line 8
iget-object v2, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->cache:Ljava/util/concurrent/ConcurrentMap;
invoke-interface {v2, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z
.line 9
:cond_1
invoke-virtual {v1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;
move-result-object p1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/Memoizer;->launderException(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;
move-result-object p1
throw p1
.line 10
:catch_1
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/Memoizer;->cache:Ljava/util/concurrent/ConcurrentMap;
invoke-interface {v1, p1, v0}, Ljava/util/concurrent/ConcurrentMap;->remove(Ljava/lang/Object;Ljava/lang/Object;)Z
goto :goto_0
.end method
@@ -0,0 +1,14 @@
.class synthetic Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$1;
.super Ljava/lang/Object;
.source "MultiBackgroundInitializer.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
@@ -0,0 +1,245 @@
.class public Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;
.super Ljava/lang/Object;
.source "MultiBackgroundInitializer.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x9
name = "MultiBackgroundInitializerResults"
.end annotation
# instance fields
.field private final exceptions:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentException;",
">;"
}
.end annotation
.end field
.field private final initializers:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;>;"
}
.end annotation
.end field
.field private final resultObjects:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
# direct methods
.method private constructor <init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;>;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Ljava/lang/Object;",
">;",
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/ConcurrentException;",
">;)V"
}
.end annotation
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 3
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->initializers:Ljava/util/Map;
.line 4
iput-object p2, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->resultObjects:Ljava/util/Map;
.line 5
iput-object p3, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->exceptions:Ljava/util/Map;
return-void
.end method
.method public synthetic constructor <init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$1;)V
.locals 0
.line 1
invoke-direct {p0, p1, p2, p3}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;-><init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)V
return-void
.end method
.method private checkName(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;"
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->initializers:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
if-eqz v0, :cond_0
return-object v0
.line 2
:cond_0
new-instance v0, Ljava/util/NoSuchElementException;
const-string v1, "No child initializer with name "
invoke-static {v1, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/util/NoSuchElementException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public getException(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/ConcurrentException;
.locals 1
.line 1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->checkName(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->exceptions:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lorg/apache/commons/lang3/concurrent/ConcurrentException;
return-object p1
.end method
.method public getInitializer(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
")",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;"
}
.end annotation
.line 1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->checkName(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
move-result-object p1
return-object p1
.end method
.method public getResultObject(Ljava/lang/String;)Ljava/lang/Object;
.locals 1
.line 1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->checkName(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->resultObjects:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public initializerNames()Ljava/util/Set;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/Set<",
"Ljava/lang/String;",
">;"
}
.end annotation
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->initializers:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;
move-result-object v0
invoke-static {v0}, Ljava/util/Collections;->unmodifiableSet(Ljava/util/Set;)Ljava/util/Set;
move-result-object v0
return-object v0
.end method
.method public isException(Ljava/lang/String;)Z
.locals 1
.line 1
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->checkName(Ljava/lang/String;)Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->exceptions:Ljava/util/Map;
invoke-interface {v0, p1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method public isSuccessful()Z
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;->exceptions:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
move-result v0
return v0
.end method
@@ -0,0 +1,371 @@
.class public Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;
.super Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.source "MultiBackgroundInitializer.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;",
">;"
}
.end annotation
# instance fields
.field private final childInitializers:Ljava/util/Map;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Map<",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;>;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>()V
.locals 1
.line 1
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;-><init>()V
.line 2
new-instance v0, Ljava/util/HashMap;
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->childInitializers:Ljava/util/Map;
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/ExecutorService;)V
.locals 0
.line 3
invoke-direct {p0, p1}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;-><init>(Ljava/util/concurrent/ExecutorService;)V
.line 4
new-instance p1, Ljava/util/HashMap;
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->childInitializers:Ljava/util/Map;
return-void
.end method
# virtual methods
.method public addInitializer(Ljava/lang/String;Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"Lorg/apache/commons/lang3/concurrent/BackgroundInitializer<",
"*>;)V"
}
.end annotation
const/4 v0, 0x1
const/4 v1, 0x0
if-eqz p1, :cond_0
move v2, v0
goto :goto_0
:cond_0
move v2, v1
:goto_0
const-string v3, "Name of child initializer must not be null!"
new-array v4, v1, [Ljava/lang/Object;
.line 1
invoke-static {v2, v3, v4}, Lorg/apache/commons/lang3/Validate;->isTrue(ZLjava/lang/String;[Ljava/lang/Object;)V
if-eqz p2, :cond_1
goto :goto_1
:cond_1
move v0, v1
:goto_1
const-string v2, "Child initializer must not be null!"
new-array v1, v1, [Ljava/lang/Object;
.line 2
invoke-static {v0, v2, v1}, Lorg/apache/commons/lang3/Validate;->isTrue(ZLjava/lang/String;[Ljava/lang/Object;)V
.line 3
monitor-enter p0
.line 4
:try_start_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->isStarted()Z
move-result v0
if-nez v0, :cond_2
.line 5
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->childInitializers:Ljava/util/Map;
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.line 6
monitor-exit p0
return-void
.line 7
:cond_2
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "addInitializer() must not be called after start()!"
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw p1
:catchall_0
move-exception p1
.line 8
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw p1
.end method
.method public getTaskCount()I
.locals 3
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->childInitializers:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v0
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v0
const/4 v1, 0x1
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_0
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v2
check-cast v2, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.line 2
invoke-virtual {v2}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getTaskCount()I
move-result v2
add-int/2addr v1, v2
goto :goto_0
:cond_0
return v1
.end method
.method public bridge synthetic initialize()Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->initialize()Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;
move-result-object v0
return-object v0
.end method
.method public initialize()Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 2
monitor-enter p0
.line 3
:try_start_0
new-instance v0, Ljava/util/HashMap;
iget-object v1, p0, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer;->childInitializers:Ljava/util/Map;
invoke-direct {v0, v1}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
.line 4
monitor-exit p0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 5
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getActiveExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v1
.line 6
invoke-virtual {v0}, Ljava/util/HashMap;->values()Ljava/util/Collection;
move-result-object v2
invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_0
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
.line 7
invoke-virtual {v3}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->getExternalExecutor()Ljava/util/concurrent/ExecutorService;
move-result-object v4
if-nez v4, :cond_0
.line 8
invoke-virtual {v3, v1}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->setExternalExecutor(Ljava/util/concurrent/ExecutorService;)V
.line 9
:cond_0
invoke-virtual {v3}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->start()Z
goto :goto_0
.line 10
:cond_1
new-instance v1, Ljava/util/HashMap;
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
.line 11
new-instance v2, Ljava/util/HashMap;
invoke-direct {v2}, Ljava/util/HashMap;-><init>()V
.line 12
invoke-virtual {v0}, Ljava/util/HashMap;->entrySet()Ljava/util/Set;
move-result-object v3
invoke-interface {v3}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
move-result-object v3
:goto_1
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
move-result v4
if-eqz v4, :cond_2
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v4
check-cast v4, Ljava/util/Map$Entry;
.line 13
:try_start_1
invoke-interface {v4}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v5
invoke-interface {v4}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;
invoke-virtual {v6}, Lorg/apache/commons/lang3/concurrent/BackgroundInitializer;->get()Ljava/lang/Object;
move-result-object v6
invoke-virtual {v1, v5, v6}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:try_end_1
.catch Lorg/apache/commons/lang3/concurrent/ConcurrentException; {:try_start_1 .. :try_end_1} :catch_0
goto :goto_1
:catch_0
move-exception v5
.line 14
invoke-interface {v4}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
move-result-object v4
invoke-virtual {v2, v4, v5}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_1
.line 15
:cond_2
new-instance v3, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;
const/4 v4, 0x0
invoke-direct {v3, v0, v1, v2, v4}, Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$MultiBackgroundInitializerResults;-><init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lorg/apache/commons/lang3/concurrent/MultiBackgroundInitializer$1;)V
return-object v3
:catchall_0
move-exception v0
.line 16
:try_start_2
monitor-exit p0
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
throw v0
.end method
@@ -0,0 +1,153 @@
.class public Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;
.super Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;
.source "ThresholdCircuitBreaker.java"
# annotations
.annotation system Ldalvik/annotation/Signature;
value = {
"Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker<",
"Ljava/lang/Long;",
">;"
}
.end annotation
# static fields
.field private static final INITIAL_COUNT:J
# instance fields
.field private final threshold:J
.field private final used:Ljava/util/concurrent/atomic/AtomicLong;
# direct methods
.method public constructor <init>(J)V
.locals 3
.line 1
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicLong;
const-wide/16 v1, 0x0
invoke-direct {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicLong;-><init>(J)V
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->used:Ljava/util/concurrent/atomic/AtomicLong;
.line 3
iput-wide p1, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->threshold:J
return-void
.end method
# virtual methods
.method public checkState()Z
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/CircuitBreakingException;
}
.end annotation
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->isOpen()Z
move-result v0
return v0
.end method
.method public close()V
.locals 3
.line 1
invoke-super {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->close()V
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->used:Ljava/util/concurrent/atomic/AtomicLong;
const-wide/16 v1, 0x0
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicLong;->set(J)V
return-void
.end method
.method public getThreshold()J
.locals 2
.line 1
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->threshold:J
return-wide v0
.end method
.method public incrementAndCheckState(Ljava/lang/Long;)Z
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/commons/lang3/concurrent/CircuitBreakingException;
}
.end annotation
.line 2
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->threshold:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-nez v0, :cond_0
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->open()V
.line 4
:cond_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->used:Ljava/util/concurrent/atomic/AtomicLong;
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicLong;->addAndGet(J)J
move-result-wide v0
.line 5
iget-wide v2, p0, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->threshold:J
cmp-long p1, v0, v2
if-lez p1, :cond_1
.line 6
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/AbstractCircuitBreaker;->open()V
.line 7
:cond_1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->checkState()Z
move-result p1
return p1
.end method
.method public bridge synthetic incrementAndCheckState(Ljava/lang/Object;)Z
.locals 0
.line 1
check-cast p1, Ljava/lang/Long;
invoke-virtual {p0, p1}, Lorg/apache/commons/lang3/concurrent/ThresholdCircuitBreaker;->incrementAndCheckState(Ljava/lang/Long;)Z
move-result p1
return p1
.end method
@@ -0,0 +1,47 @@
.class Lorg/apache/commons/lang3/concurrent/TimedSemaphore$1;
.super Ljava/lang/Object;
.source "TimedSemaphore.java"
# interfaces
.implements Ljava/lang/Runnable;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->startTimer()Ljava/util/concurrent/ScheduledFuture;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic this$0:Lorg/apache/commons/lang3/concurrent/TimedSemaphore;
# direct methods
.method public constructor <init>(Lorg/apache/commons/lang3/concurrent/TimedSemaphore;)V
.locals 0
.line 1
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore$1;->this$0:Lorg/apache/commons/lang3/concurrent/TimedSemaphore;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore$1;->this$0:Lorg/apache/commons/lang3/concurrent/TimedSemaphore;
invoke-virtual {v0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->endOfPeriod()V
return-void
.end method
@@ -0,0 +1,636 @@
.class public Lorg/apache/commons/lang3/concurrent/TimedSemaphore;
.super Ljava/lang/Object;
.source "TimedSemaphore.java"
# static fields
.field public static final NO_LIMIT:I = 0x0
.field private static final THREAD_POOL_SIZE:I = 0x1
# instance fields
.field private acquireCount:I
.field private final executorService:Ljava/util/concurrent/ScheduledExecutorService;
.field private lastCallsPerPeriod:I
.field private limit:I
.field private final ownExecutor:Z
.field private final period:J
.field private periodCount:J
.field private shutdown:Z
.field private task:Ljava/util/concurrent/ScheduledFuture;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ScheduledFuture<",
"*>;"
}
.end annotation
.end field
.field private totalAcquireCount:J
.field private final unit:Ljava/util/concurrent/TimeUnit;
# direct methods
.method public constructor <init>(JLjava/util/concurrent/TimeUnit;I)V
.locals 6
const/4 v1, 0x0
move-object v0, p0
move-wide v2, p1
move-object v4, p3
move v5, p4
.line 1
invoke-direct/range {v0 .. v5}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;-><init>(Ljava/util/concurrent/ScheduledExecutorService;JLjava/util/concurrent/TimeUnit;I)V
return-void
.end method
.method public constructor <init>(Ljava/util/concurrent/ScheduledExecutorService;JLjava/util/concurrent/TimeUnit;I)V
.locals 7
.line 2
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const-wide/16 v0, 0x1
const-wide v2, 0x7fffffffffffffffL
const-string v6, "Time period must be greater than 0!"
move-wide v4, p2
.line 3
invoke-static/range {v0 .. v6}, Lorg/apache/commons/lang3/Validate;->inclusiveBetween(JJJLjava/lang/String;)V
.line 4
iput-wide p2, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->period:J
.line 5
iput-object p4, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->unit:Ljava/util/concurrent/TimeUnit;
const/4 p2, 0x0
if-eqz p1, :cond_0
.line 6
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->executorService:Ljava/util/concurrent/ScheduledExecutorService;
.line 7
iput-boolean p2, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->ownExecutor:Z
goto :goto_0
.line 8
:cond_0
new-instance p1, Ljava/util/concurrent/ScheduledThreadPoolExecutor;
const/4 p3, 0x1
invoke-direct {p1, p3}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;-><init>(I)V
.line 9
invoke-virtual {p1, p2}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;->setContinueExistingPeriodicTasksAfterShutdownPolicy(Z)V
.line 10
invoke-virtual {p1, p2}, Ljava/util/concurrent/ScheduledThreadPoolExecutor;->setExecuteExistingDelayedTasksAfterShutdownPolicy(Z)V
.line 11
iput-object p1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->executorService:Ljava/util/concurrent/ScheduledExecutorService;
.line 12
iput-boolean p3, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->ownExecutor:Z
.line 13
:goto_0
invoke-virtual {p0, p5}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->setLimit(I)V
return-void
.end method
.method private acquirePermit()Z
.locals 2
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getLimit()I
move-result v0
if-lez v0, :cond_1
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getLimit()I
move-result v1
if-ge v0, v1, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
return v0
.line 2
:cond_1
:goto_0
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
const/4 v1, 0x1
add-int/2addr v0, v1
iput v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
return v1
.end method
.method private prepareAcquire()V
.locals 2
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->isShutdown()Z
move-result v0
if-nez v0, :cond_1
.line 2
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->task:Ljava/util/concurrent/ScheduledFuture;
if-nez v0, :cond_0
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->startTimer()Ljava/util/concurrent/ScheduledFuture;
move-result-object v0
iput-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->task:Ljava/util/concurrent/ScheduledFuture;
:cond_0
return-void
.line 4
:cond_1
new-instance v0, Ljava/lang/IllegalStateException;
const-string v1, "TimedSemaphore is shut down!"
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
throw v0
.end method
# virtual methods
.method public declared-synchronized acquire()V
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
monitor-enter p0
.line 1
:try_start_0
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->prepareAcquire()V
.line 2
:cond_0
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquirePermit()Z
move-result v0
if-nez v0, :cond_1
.line 3
invoke-virtual {p0}, Ljava/lang/Object;->wait()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_1
if-eqz v0, :cond_0
.line 4
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized endOfPeriod()V
.locals 5
monitor-enter p0
.line 1
:try_start_0
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
iput v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->lastCallsPerPeriod:I
.line 2
iget-wide v1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->totalAcquireCount:J
int-to-long v3, v0
add-long/2addr v1, v3
iput-wide v1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->totalAcquireCount:J
.line 3
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->periodCount:J
const-wide/16 v2, 0x1
add-long/2addr v0, v2
iput-wide v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->periodCount:J
const/4 v0, 0x0
.line 4
iput v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
.line 5
invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 6
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getAcquireCount()I
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquireCount:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getAvailablePermits()I
.locals 2
monitor-enter p0
.line 1
:try_start_0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getLimit()I
move-result v0
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getAcquireCount()I
move-result v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
sub-int/2addr v0, v1
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public declared-synchronized getAverageCallsPerPeriod()D
.locals 4
monitor-enter p0
.line 1
:try_start_0
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->periodCount:J
const-wide/16 v2, 0x0
cmp-long v2, v0, v2
if-nez v2, :cond_0
const-wide/16 v0, 0x0
goto :goto_0
:cond_0
iget-wide v2, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->totalAcquireCount:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
long-to-double v2, v2
long-to-double v0, v0
div-double v0, v2, v0
:goto_0
monitor-exit p0
return-wide v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getExecutorService()Ljava/util/concurrent/ScheduledExecutorService;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->executorService:Ljava/util/concurrent/ScheduledExecutorService;
return-object v0
.end method
.method public declared-synchronized getLastAcquiresPerPeriod()I
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->lastCallsPerPeriod:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized getLimit()I
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->limit:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public getPeriod()J
.locals 2
.line 1
iget-wide v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->period:J
return-wide v0
.end method
.method public getUnit()Ljava/util/concurrent/TimeUnit;
.locals 1
.line 1
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->unit:Ljava/util/concurrent/TimeUnit;
return-object v0
.end method
.method public declared-synchronized isShutdown()Z
.locals 1
monitor-enter p0
.line 1
:try_start_0
iget-boolean v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->shutdown:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public final declared-synchronized setLimit(I)V
.locals 0
monitor-enter p0
.line 1
:try_start_0
iput p1, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->limit:I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 2
monitor-exit p0
return-void
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method public declared-synchronized shutdown()V
.locals 2
monitor-enter p0
.line 1
:try_start_0
iget-boolean v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->shutdown:Z
if-nez v0, :cond_2
.line 2
iget-boolean v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->ownExecutor:Z
if-eqz v0, :cond_0
.line 3
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getExecutorService()Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
invoke-interface {v0}, Ljava/util/concurrent/ScheduledExecutorService;->shutdownNow()Ljava/util/List;
.line 4
:cond_0
iget-object v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->task:Ljava/util/concurrent/ScheduledFuture;
if-eqz v0, :cond_1
const/4 v1, 0x0
.line 5
invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledFuture;->cancel(Z)Z
:cond_1
const/4 v0, 0x1
.line 6
iput-boolean v0, p0, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->shutdown:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 7
:cond_2
monitor-exit p0
return-void
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method
.method public startTimer()Ljava/util/concurrent/ScheduledFuture;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/concurrent/ScheduledFuture<",
"*>;"
}
.end annotation
.line 1
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getExecutorService()Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v0
new-instance v1, Lorg/apache/commons/lang3/concurrent/TimedSemaphore$1;
invoke-direct {v1, p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore$1;-><init>(Lorg/apache/commons/lang3/concurrent/TimedSemaphore;)V
.line 2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getPeriod()J
move-result-wide v2
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getPeriod()J
move-result-wide v4
invoke-virtual {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->getUnit()Ljava/util/concurrent/TimeUnit;
move-result-object v6
.line 3
invoke-interface/range {v0 .. v6}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleAtFixedRate(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
move-result-object v0
return-object v0
.end method
.method public declared-synchronized tryAcquire()Z
.locals 1
monitor-enter p0
.line 1
:try_start_0
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->prepareAcquire()V
.line 2
invoke-direct {p0}, Lorg/apache/commons/lang3/concurrent/TimedSemaphore;->acquirePermit()Z
move-result v0
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return v0
:catchall_0
move-exception v0
monitor-exit p0
throw v0
.end method