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


Java AsyncCallback.StatCallback方法代碼示例

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


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

示例1: performBackgroundOperation

import org.apache.zookeeper.AsyncCallback; //導入方法依賴的package包/類
@Override
public void performBackgroundOperation(final OperationAndData<String> operationAndData) throws Exception
{
    try
    {
        final OperationTrace   trace = client.getZookeeperClient().startAdvancedTracer("ExistsBuilderImpl-Background");
        AsyncCallback.StatCallback callback = new AsyncCallback.StatCallback()
        {
            @Override
            public void processResult(int rc, String path, Object ctx, Stat stat)
            {
                watching.commitWatcher(rc, true);
                trace.setReturnCode(rc).setPath(path).setWithWatcher(watching.hasWatcher()).setStat(stat).commit();
                CuratorEvent event = new CuratorEventImpl(client, CuratorEventType.EXISTS, rc, path, null, ctx, stat, null, null, null, null, null);
                client.processBackgroundOperation(operationAndData, event);
            }
        };
        if ( watching.isWatched() )
        {
            client.getZooKeeper().exists(operationAndData.getData(), true, callback, backgrounding.getContext());
        }
        else
        {
            client.getZooKeeper().exists(operationAndData.getData(), watching.getWatcher(operationAndData.getData()), callback, backgrounding.getContext());
        }
    }
    catch ( Throwable e )
    {
        backgrounding.checkError(e, watching);
    }
}
 
開發者ID:apache,項目名稱:curator,代碼行數:32,代碼來源:ExistsBuilderImpl.java

示例2: exists

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

示例3: setData

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

示例4: setACL

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

示例5: exists

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

示例6: setData

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

示例7: setACL

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


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