public class oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore extends java.lang.Object
{
private final org.slf4j.Logger log;
private final oadd.org.apache.curator.framework.recipes.locks.LockInternals internals;
private static final java.lang.String LOCK_NAME;
public void <init>(oadd.org.apache.curator.framework.CuratorFramework, java.lang.String, int)
{
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
int v;
java.lang.String v;
oadd.org.apache.curator.framework.CuratorFramework v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: oadd.org.apache.curator.framework.CuratorFramework;
v := @parameter: java.lang.String;
v := @parameter: int;
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: void <init>(oadd.org.apache.curator.framework.CuratorFramework,java.lang.String,int,oadd.org.apache.curator.framework.recipes.shared.SharedCountReader)>(v, v, v, null);
return;
}
public void <init>(oadd.org.apache.curator.framework.CuratorFramework, java.lang.String, oadd.org.apache.curator.framework.recipes.shared.SharedCountReader)
{
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
java.lang.String v;
oadd.org.apache.curator.framework.CuratorFramework v;
oadd.org.apache.curator.framework.recipes.shared.SharedCountReader v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: oadd.org.apache.curator.framework.CuratorFramework;
v := @parameter: java.lang.String;
v := @parameter: oadd.org.apache.curator.framework.recipes.shared.SharedCountReader;
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: void <init>(oadd.org.apache.curator.framework.CuratorFramework,java.lang.String,int,oadd.org.apache.curator.framework.recipes.shared.SharedCountReader)>(v, v, 0, v);
return;
}
private void <init>(oadd.org.apache.curator.framework.CuratorFramework, java.lang.String, int, oadd.org.apache.curator.framework.recipes.shared.SharedCountReader)
{
org.slf4j.Logger v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$1 v;
oadd.org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
oadd.org.apache.curator.framework.recipes.locks.LockInternals v;
oadd.org.apache.curator.framework.CuratorFramework v;
int v, v;
java.lang.Class v;
java.lang.String v;
oadd.org.apache.curator.framework.recipes.shared.SharedCountReader v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: oadd.org.apache.curator.framework.CuratorFramework;
v := @parameter: java.lang.String;
v := @parameter: int;
v := @parameter: oadd.org.apache.curator.framework.recipes.shared.SharedCountReader;
specialinvoke v.<java.lang.Object: void <init>()>();
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(v);
v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: org.slf4j.Logger log> = v;
v = new oadd.org.apache.curator.framework.recipes.locks.LockInternals;
v = new oadd.org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver;
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.StandardLockInternalsDriver: void <init>()>();
if v == null goto label;
v = interfaceinvoke v.<oadd.org.apache.curator.framework.recipes.shared.SharedCountReader: int getCount()>();
goto label;
label:
v = v;
label:
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.LockInternals: void <init>(oadd.org.apache.curator.framework.CuratorFramework,oadd.org.apache.curator.framework.recipes.locks.LockInternalsDriver,java.lang.String,java.lang.String,int)>(v, v, v, "lock-", v);
v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.LockInternals internals> = v;
if v == null goto label;
v = new oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$1;
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$1: void <init>(oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore)>(v);
interfaceinvoke v.<oadd.org.apache.curator.framework.recipes.shared.SharedCountReader: void addListener(java.lang.Object)>(v);
label:
return;
}
public void returnAll(java.util.Collection)
{
java.util.Iterator v;
java.util.Collection v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
java.lang.Object v;
boolean v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: java.util.Collection;
v = interfaceinvoke v.<java.util.Collection: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
staticinvoke <oadd.org.apache.curator.utils.CloseableUtils: void closeQuietly(java.io.Closeable)>(v);
goto label;
label:
return;
}
public void returnLease(oadd.org.apache.curator.framework.recipes.locks.Lease)
{
oadd.org.apache.curator.framework.recipes.locks.Lease v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: oadd.org.apache.curator.framework.recipes.locks.Lease;
staticinvoke <oadd.org.apache.curator.utils.CloseableUtils: void closeQuietly(java.io.Closeable)>(v);
return;
}
public oadd.org.apache.curator.framework.recipes.locks.Lease acquire() throws java.lang.Exception
{
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
oadd.org.apache.curator.framework.recipes.locks.Lease v;
oadd.org.apache.curator.framework.recipes.locks.LockInternals v;
java.lang.String v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v = v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.LockInternals internals>;
v = virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.LockInternals: java.lang.String attemptLock(long,java.util.concurrent.TimeUnit,byte[])>(-1L, null, null);
v = specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.Lease makeLease(java.lang.String)>(v);
return v;
}
public java.util.Collection acquire(int) throws java.lang.Exception
{
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
oadd.org.apache.curator.framework.recipes.locks.Lease v;
oadd.org.apache.curator.framework.recipes.locks.LockInternals v;
oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList v, v;
java.lang.Exception v;
oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder v;
int v, v;
java.lang.String v;
boolean v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: int;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <oadd.org.apache.curator.shaded.com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.Object)>(v, "qty cannot be 0");
v = staticinvoke <oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder builder()>();
label:
v = v;
v = v - 1;
if v <= 0 goto label;
v = v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.LockInternals internals>;
v = virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.LockInternals: java.lang.String attemptLock(long,java.util.concurrent.TimeUnit,byte[])>(-1L, null, null);
v = specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.Lease makeLease(java.lang.String)>(v);
virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder add(java.lang.Object)>(v);
goto label;
label:
v := @caughtexception;
staticinvoke <oadd.org.apache.curator.utils.ThreadUtils: boolean checkInterrupted(java.lang.Throwable)>(v);
v = virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList build()>();
virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: void returnAll(java.util.Collection)>(v);
throw v;
label:
v = virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList build()>();
return v;
catch java.lang.Exception from label to label with label;
}
public oadd.org.apache.curator.framework.recipes.locks.Lease acquire(long, java.util.concurrent.TimeUnit) throws java.lang.Exception
{
java.util.concurrent.TimeUnit v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
oadd.org.apache.curator.framework.recipes.locks.Lease v;
long v;
oadd.org.apache.curator.framework.recipes.locks.LockInternals v;
java.lang.String v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v = v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.LockInternals internals>;
v = virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.LockInternals: java.lang.String attemptLock(long,java.util.concurrent.TimeUnit,byte[])>(v, v, null);
if v == null goto label;
v = specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.Lease makeLease(java.lang.String)>(v);
goto label;
label:
v = null;
label:
return v;
}
public java.util.Collection acquire(int, long, java.util.concurrent.TimeUnit) throws java.lang.Exception
{
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
oadd.org.apache.curator.framework.recipes.locks.Lease v;
long v, v, v, v, v, v;
oadd.org.apache.curator.framework.recipes.locks.LockInternals v;
oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList v, v, v;
byte v;
int v, v;
java.lang.String v;
boolean v;
java.lang.Exception v;
java.util.concurrent.TimeUnit v, v, v;
oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: int;
v := @parameter: long;
v := @parameter: java.util.concurrent.TimeUnit;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = virtualinvoke v.<java.util.concurrent.TimeUnit: long convert(long,java.util.concurrent.TimeUnit)>(v, v);
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <oadd.org.apache.curator.shaded.com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.Object)>(v, "qty cannot be 0");
v = staticinvoke <oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder builder()>();
label:
v = v;
v = v - 1;
if v <= 0 goto label;
v = staticinvoke <java.lang.System: long currentTimeMillis()>();
v = v - v;
v = v - v;
v = v cmp 0L;
if v <= 0 goto label;
v = v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.LockInternals internals>;
v = <java.util.concurrent.TimeUnit: java.util.concurrent.TimeUnit MILLISECONDS>;
v = virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.LockInternals: java.lang.String attemptLock(long,java.util.concurrent.TimeUnit,byte[])>(v, v, null);
goto label;
label:
v = null;
label:
if v != null goto label;
v = virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList build()>();
virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: void returnAll(java.util.Collection)>(v);
label:
return null;
label:
v = specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: oadd.org.apache.curator.framework.recipes.locks.Lease makeLease(java.lang.String)>(v);
virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder add(java.lang.Object)>(v);
goto label;
label:
v := @caughtexception;
staticinvoke <oadd.org.apache.curator.utils.ThreadUtils: boolean checkInterrupted(java.lang.Throwable)>(v);
v = virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList build()>();
virtualinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore: void returnAll(java.util.Collection)>(v);
throw v;
label:
v = virtualinvoke v.<oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList$Builder: oadd.org.apache.curator.shaded.com.google.common.collect.ImmutableList build()>();
return v;
catch java.lang.Exception from label to label with label;
catch java.lang.Exception from label to label with label;
}
private oadd.org.apache.curator.framework.recipes.locks.Lease makeLease(java.lang.String)
{
java.lang.String v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$2 v;
oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore v;
v := @this: oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore;
v := @parameter: java.lang.String;
v = new oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$2;
specialinvoke v.<oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore$2: void <init>(oadd.org.apache.curator.framework.recipes.locks.InterProcessSemaphore,java.lang.String)>(v, v);
return v;
}
}