Пример #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;
  }
Пример #2
0
 public T async() {
   return rootClient.async();
 }
Пример #3
0
 public <R> T async(final Callback<R> callback) {
   return rootClient.async(callback);
 }
Пример #4
0
 public T sync() {
   return rootClient.sync();
 }