當前位置: 首頁>>代碼示例>>Java>>正文


Java AsyncCallback.VoidCallback方法代碼示例

本文整理匯總了Java中org.apache.zookeeper.AsyncCallback.VoidCallback方法的典型用法代碼示例。如果您正苦於以下問題:Java AsyncCallback.VoidCallback方法的具體用法?Java AsyncCallback.VoidCallback怎麽用?Java AsyncCallback.VoidCallback使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.zookeeper.AsyncCallback的用法示例。


在下文中一共展示了AsyncCallback.VoidCallback方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MultiCallback

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
MultiCallback(int expected, AsyncCallback.VoidCallback cb, Object context) {
    this.expected = expected;
    this.cb = cb;
    this.context = context;
    if (expected == 0) {
        cb.processResult(Code.OK.intValue(), null, context);
    }
}
 
開發者ID:gerritjvv,項目名稱:bigstreams,代碼行數:9,代碼來源:BookKeeperTools.java

示例2: performBackgroundOperation

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
@Override
public void performBackgroundOperation(final OperationAndData<String> operationAndData)
        throws Exception
{
    try
    {
        final TimeTrace   trace = client.getZookeeperClient().startTracer("RemoteWatches-Background");

        AsyncCallback.VoidCallback callback = new AsyncCallback.VoidCallback()
        {
            @Override
            public void processResult(int rc, String path, Object ctx)
            {
                trace.commit();
                CuratorEvent event = new CuratorEventImpl(client, CuratorEventType.REMOVE_WATCHES, rc, path, null, ctx, null, null, null, null, null, null);
                client.processBackgroundOperation(operationAndData, event);
            }
        };

        ZooKeeper zkClient = client.getZooKeeper();
        NamespaceWatcher namespaceWatcher = makeNamespaceWatcher(operationAndData.getData());
        if(namespaceWatcher == null)
        {
            zkClient.removeAllWatches(operationAndData.getData(), watcherType, local, callback, operationAndData.getContext());
        }
        else
        {
            zkClient.removeWatches(operationAndData.getData(), namespaceWatcher, watcherType, local, callback, operationAndData.getContext());
        }
    }
    catch ( Throwable e )
    {
        backgrounding.checkError(e, null);
    }
}
 
開發者ID:apache,項目名稱:curator,代碼行數:36,代碼來源:RemoveWatchesBuilderImpl.java

示例3: sync

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException {
  checkZk().sync(path, null, null);
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:4,代碼來源:RecoverableZooKeeper.java

示例4: sync

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) {
  this.zk.sync(path, null, null);
}
 
開發者ID:fengchen8086,項目名稱:LCIndex-HBase-0.94.16,代碼行數:4,代碼來源:RecoverableZooKeeper.java

示例5: sync

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) throws KeeperException {
  long startTime = EnvironmentEdgeManager.currentTime();
  checkZk().sync(path, cb, null);
}
 
開發者ID:apache,項目名稱:hbase,代碼行數:5,代碼來源:RecoverableZooKeeper.java

示例6: delete

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
@Override
public void delete(String path, int version, AsyncCallback.VoidCallback cb, Object ctx) {
    delegate.delete(path, version, cb, ctx);
}
 
開發者ID:NGDATA,項目名稱:hbase-indexer,代碼行數:5,代碼來源:ZooKeeperImpl.java

示例7: sync

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
@Override
public void sync(String path, AsyncCallback.VoidCallback cb, Object ctx) {
    delegate.sync(path, cb, ctx);
}
 
開發者ID:NGDATA,項目名稱:hbase-indexer,代碼行數:5,代碼來源:ZooKeeperImpl.java

示例8: delete

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
void delete(String path, int version, AsyncCallback.VoidCallback cb, Object ctx); 
開發者ID:NGDATA,項目名稱:hbase-indexer,代碼行數:2,代碼來源:ZooKeeperItf.java

示例9: sync

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
void sync(String path, AsyncCallback.VoidCallback cb, Object ctx); 
開發者ID:NGDATA,項目名稱:hbase-indexer,代碼行數:2,代碼來源:ZooKeeperItf.java


注:本文中的org.apache.zookeeper.AsyncCallback.VoidCallback方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。