No. of Instances - 61
No. of Commits - 25
No. of Projects - {'orientdb', 'alluxio', 'hbase', 'jetty.project', 'byte-buddy', 'neo4j', 'ignite', 'presto', 'hadoop', 'Chronicle-Queue', 'atomix', 'vert.x'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: Jdk -> Jdk
Mapping:
- {
@Override public void onConnectSuccess( C conn, long concurrency, Channel channel, ContextInternal context, long actualWeight){
synchronized (Pool.this) {
initConnection(holder,context,concurrency,conn,channel,actualWeight);
}
synchronized (Pool.this) {
if (holder.capacity == 0) {
waitersQueue.add(waiter);
checkPending();
return;
}
waitersCount--;
holder.capacity--;
if (holder.capacity > 0) {
available.add(holder);
}
}
waiter.handler.handle(Future.succeededFuture(holder.connection));
synchronized (Pool.this) {
checkPending();
}
}
@Override public void onConnectFailure( ContextInternal context, Throwable err){
waiter.handler.handle(Future.failedFuture(err));
synchronized (Pool.this) {
waitersCount--;
Pool.this.weight-=initialWeight;
holder.removed=true;
checkPending();
checkClose();
}
}
@Override public void onConcurrencyChange( long concurrency){
synchronized (Pool.this) {
if (holder.removed) {
return;
}
if (holder.concurrency < concurrency) {
long diff=concurrency - holder.concurrency;
if (holder.capacity == 0) {
available.add(holder);
}
holder.capacity+=diff;
holder.concurrency=concurrency;
checkPending();
}
else if (holder.concurrency > concurrency) {
throw new UnsupportedOperationException("Not yet implemented");
}
}
}
@Override public void onRecycle( boolean disposable){
synchronized (Pool.this) {
if (holder.removed) {
return;
}
recycle(holder,1,disposable);
}
}
@Override public void onDiscard(){
synchronized (Pool.this) {
if (holder.removed) {
return;
}
closed(holder);
}
}
}
to {
public void onConnectSuccess( C conn, long concurrency, Channel channel, ContextInternal context, long actualWeight){
synchronized (Pool.this) {
initConnection(holder,context,concurrency,conn,channel,actualWeight);
}
synchronized (Pool.this) {
if (holder.capacity == 0) {
waitersQueue.add(waiter);
checkPending();
return;
}
waitersCount--;
holder.capacity--;
if (holder.capacity > 0) {
available.add(holder);
}
}
waiter.handler.handle(Future.succeededFuture(holder.connection));
synchronized (Pool.this) {
checkPending();
}
}
@Override public void onConnectFailure( ContextInternal context, Throwable err){
waiter.handler.handle(Future.failedFuture(err));
synchronized (Pool.this) {
waitersCount--;
Pool.this.weight-=initialWeight;
holder.removed=true;
checkPending();
checkClose();
}
}
@Override public void onConcurrencyChange( long concurrency){
synchronized (Pool.this) {
if (holder.removed) {
return;
}
if (holder.concurrency < concurrency) {
long diff=concurrency - holder.concurrency;
if (holder.capacity == 0) {
available.add(holder);
}
holder.capacity+=diff;
holder.concurrency=concurrency;
checkPending();
}
else if (holder.concurrency > concurrency) {
throw new UnsupportedOperationException("Not yet implemented");
}
}
}
@Override public void onRecycle( long expirationTimestamp){
if (expirationTimestamp < 0L) {
throw new IllegalArgumentException("Invalid TTL");
}
synchronized (Pool.this) {
if (holder.removed) {
return;
}
recycle(holder,1,expirationTimestamp);
}
}
@Override public void onDiscard(){
synchronized (Pool.this) {
if (holder.removed) {
return;
}
closed(holder);
}
}
}