示例#1
0
 @Override
 public void setTargetSize(int size) {
   if (size < 1) {
     throw new IllegalArgumentException("Target pool size must be at least 1");
   }
   if (shutdown) {
     return;
   }
   allocator.setTargetSize(size);
 }
示例#2
0
 @Override
 public long getLeakedObjectsCount() {
   return allocator.countLeakedObjects();
 }
示例#3
0
 @Override
 public long getFailedAllocationCount() {
   return allocator.getFailedAllocationCount();
 }
示例#4
0
 @Override
 public int getTargetSize() {
   return allocator.getTargetSize();
 }
示例#5
0
 @Override
 public Completion shutdown() {
   shutdown = true;
   return allocator.shutdown(allocatorThread);
 }