Example #1
0
  @SuppressWarnings("unchecked")
  public <S> ProxyObject<S> proxyFor(long id, Class<S> clazz) {

    ProxyObject<S> proxy = (ProxyObject<S>) proxying.get(id);

    if (proxy == null) {

      synchronized (proxying) {
        proxy = (ProxyObject<S>) proxying.get(id);
        if (proxy != null) {
          return proxy;
        }

        proxy = new ProxyObject<S>(this, id, clazz);

        proxying.put(proxy.getId(), proxy);
      }
    }

    return proxy;
  }
Example #2
0
 public T async() {
   return rootClient.async();
 }
Example #3
0
 public <R> T async(final Callback<R> callback) {
   return rootClient.async(callback);
 }
Example #4
0
 public T sync() {
   return rootClient.sync();
 }