当前位置: 首页>>代码示例>>Java>>正文


Java KeyedValues类代码示例

本文整理汇总了Java中org.sdnplatform.sync.thrift.KeyedValues的典型用法代码示例。如果您正苦于以下问题:Java KeyedValues类的具体用法?Java KeyedValues怎么用?Java KeyedValues使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


KeyedValues类属于org.sdnplatform.sync.thrift包,在下文中一共展示了KeyedValues类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getChunk

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
private Iterator<KeyedValues> getChunk() {
    CursorRequestMessage crm = getCRM();
    crm.setCursorId(cursorId);
    SyncMessage bsm = new SyncMessage(MessageType.CURSOR_REQUEST);
    bsm.setCursorRequest(crm);

    SyncReply reply;
    try {
        reply = getReply(crm.getHeader().getTransactionId(), 
                                      bsm);
    } catch (SyncException e) {
        throw new SyncRuntimeException(e);
    }
    if (reply.getKeyedValues() == null || 
        reply.getKeyedValues().size() == 0) return null;

    return reply.getKeyedValues().iterator();
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:19,代码来源:RemoteStore.java

示例2: getChunk

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
private Iterator<KeyedValues> getChunk() {
    CursorRequestMessage crm = getCRM();
    crm.setCursorId(cursorId);
    SyncMessage bsm = new SyncMessage(MessageType.CURSOR_REQUEST);
    bsm.setCursorRequest(crm);

    SyncReply reply;
    try {
        reply = getReply(crm.getHeader().getTransactionId(),
                                      bsm);
    } catch (SyncException e) {
        throw new SyncRuntimeException(e);
    }
    if (reply.getKeyedValues() == null ||
        reply.getKeyedValues().size() == 0) return null;

    return reply.getKeyedValues().iterator();
}
 
开发者ID:zhenshengcai,项目名称:floodlight-hardware,代码行数:19,代码来源:RemoteStore.java

示例3: getTKeyedValues

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
/**
    * Construct a thrift {@link org.sdnplatform.sync.thrift.KeyedValues}
    * @param key the key
    * @param value the versioned values
    * @return the thrift object
    */
   @SafeVarargs
public static KeyedValues getTKeyedValues(ByteArray key, 
                                             Versioned<byte[]>... value) {
       KeyedValues kv = new KeyedValues();
       kv.setKey(key.get());
       for (Versioned<byte[]> v : value) {
           kv.addToValues(getTVersionedValue(v));
       }
       return kv;
   }
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:17,代码来源:TProtocolUtil.java

示例4: hasNext

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
@Override
public boolean hasNext() {
    if (currentChunk != null) {
        if (currentChunk.hasNext())
            return true;
    }
    Iterator<KeyedValues> nextChunk = getChunk();
    if (nextChunk != null) {
        currentChunk = nextChunk;
        return nextChunk.hasNext();
    }
    return false;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:14,代码来源:RemoteStore.java

示例5: next

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
@Override
public Entry<ByteArray, List<Versioned<byte[]>>> next() {
    if (!hasNext()) throw new NoSuchElementException();
    KeyedValues kv = currentChunk.next();
    
    ByteArray k = new ByteArray(kv.getKey());
    List<Versioned<byte[]>> v = 
            TProtocolUtil.getVersionedList(kv.getValues());
    return new Pair<ByteArray, List<Versioned<byte[]>>>(k, v);
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:RemoteStore.java

示例6: SyncReply

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
public SyncReply(List<Versioned<byte[]>> values,
                    List<KeyedValues> keyedValues,
                    boolean success, SyncException error, int intValue) {
    super();
    this.values = values;
    this.keyedValues = keyedValues;
    this.success = success;
    this.error = error;
    this.intValue = intValue;
}
 
开发者ID:xuraylei,项目名称:fresco_floodlight,代码行数:11,代码来源:SyncReply.java

示例7: getTKeyedValues

import org.sdnplatform.sync.thrift.KeyedValues; //导入依赖的package包/类
/**
 * Construct a thrift {@link org.sdnplatform.sync.thrift.KeyedValues}
 * @param key the key
 * @param value the versioned values
 * @return the thrift object
 */
public static KeyedValues getTKeyedValues(ByteArray key, 
                                          Versioned<byte[]>... value) {
    KeyedValues kv = new KeyedValues();
    kv.setKey(key.get());
    for (Versioned<byte[]> v : value) {
        kv.addToValues(getTVersionedValue(v));
    }
    return kv;
}
 
开发者ID:nsg-ethz,项目名称:iTAP-controller,代码行数:16,代码来源:TProtocolUtil.java


注:本文中的org.sdnplatform.sync.thrift.KeyedValues类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。