Acquires a resource of type {code T} from the pool.

@return the acquired resource
425605
@Override
  public T acquire() throws IOException {
    try {
      return acquire(100  /* no timeout */, TimeUnit.DAYS);
    } catch (TimeoutException e) {
      // Never should timeout in acquire().
      throw new RuntimeException(e);
    }
  }
1097563
public com.google.protobuf.ByteString
      getResourceBytes() {
    java.lang.Object ref = resource_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      resource_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
441643
@Override
    public T getUsing(@Nullable T using) {
        try {
            T result = (T) new ObjectInputStream(in).readObject();
            bytes.readPosition(0);
            return result;
        } catch (IOException | ClassNotFoundException e) {
            throw new RuntimeException(e);
        }
    }
843811
public static tmtrafficaction[] get(nitro_service service) throws Exception{
		tmtrafficaction obj = new tmtrafficaction();
		tmtrafficaction[] response = (tmtrafficaction[])obj.get_resources(service);
		return response;
	}
307066
public V get(ResourceType type, PoolInfo poolInfo) {
    Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type);
    if (poolInfoMap == null) {
      return null;
    }
    return poolInfoMap.get(poolInfo);
  }
409977
public Class<T> getT() {
        Type subTyping = Types.getBaseClass(getClass(), Descriptor.class);
        if (!(subTyping instanceof ParameterizedType)) {
            throw new IllegalStateException(getClass()+" doesn't extend Descriptor with a type parameter.");
        }
        return Types.erasure(Types.getTypeArgument(subTyping, 0));
    }
687655
public static Resource getResource(Object adaptable) {
    if (adaptable instanceof Resource) {
      return (Resource)adaptable;
    }
    else if (adaptable instanceof SlingHttpServletRequest) {
      SlingHttpServletRequest request = (SlingHttpServletRequest)adaptable;
      return request.getResource();
    }
    return null;
  }
1374181
public Object get()
    {
        synchronized(this)
        {
            if (freePool.isEmpty() || usedPool.size() >= capacity)
            {
                try
                {
                    wait(1000);
                } 
                catch (InterruptedException e)
                {
                }

                // The timeout value was reached
                if (freePool.isEmpty())
                    add(new SimpleDateFormat());
            }

            Object o = freePool.get(0);
            freePool.remove(o);
            usedPool.add(o);
            return o;
        }
    }
798394
public ResourceUsage getResourceUsage() {
    int totalMapperGrants = 0;
    int totalReducerGrants = 0;
    synchronized (lockObject) {
      for (Map.Entry<Integer, ResourceGrant> entry :
          grantedResources.entrySet()) {
        switch(entry.getValue().getType()) {
        case MAP:
          ++totalMapperGrants;
          break;
        case REDUCE:
          ++totalReducerGrants;
          break;
        case JOBTRACKER:
          // Ignore for now
          break;
        default:
          throw new RuntimeException("Illegal type " +
                                     entry.getValue().getType());
        }
      }
    }
    return new ResourceUsage(totalMapperGrants, totalReducerGrants);
  }
1263840
public static tmtrafficaction get(nitro_service service, String name) throws Exception{
		tmtrafficaction obj = new tmtrafficaction();
		obj.set_name(name);
		tmtrafficaction response = (tmtrafficaction) obj.get_resource(service);
		return response;
	}
1186311
public T copy() {
        T copy = Instantiator.of(type).instantiate();
        return copyInto(copy);
    }
187982
public final <T extends Iced> T get() {
    touch();
    Iced pojo = (Iced)_pojo;    // Read once!
    if( pojo != null ) return (T)pojo;
    pojo = TypeMap.newInstance(_type);
    return (T)(_pojo = pojo.reloadFromBytes(memOrLoad()));
  }
716645
public synchronized static <T> T get(Object id)
    {
        SoftReference reference = pool.get(id);
        if (reference == null) return null;
        return (T) reference.get();
    }
599834
public static tmformssoaction[] get(nitro_service service) throws Exception{
		tmformssoaction obj = new tmformssoaction();
		tmformssoaction[] response = (tmformssoaction[])obj.get_resources(service);
		return response;
	}
952257
public static ns[] get(nitro_service client) throws Exception
	{
		ns resource = new ns();
		resource.validate("get");
		return (ns[]) resource.get_resources(client);
	}
96881
public <T extends Iced> T get() {
    touch();
    Iced pojo = (Iced)_pojo;    // Read once!
    if( pojo != null ) return (T)pojo;
    pojo = TypeMap.newInstance(_type);
    pojo.read(new AutoBuffer(memOrLoad()));
    pojo.init(_key);
    return (T)(_pojo = pojo);
  }
1089860
@Override
    public T get() {
        final Supplier<T> delegate = this.delegate;
        return delegate != null ? delegate.get() : null;
    }