本文整理汇总了Java中org.sdnplatform.sync.thrift.VersionedValue类的典型用法代码示例。如果您正苦于以下问题:Java VersionedValue类的具体用法?Java VersionedValue怎么用?Java VersionedValue使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VersionedValue类属于org.sdnplatform.sync.thrift包,在下文中一共展示了VersionedValue类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: iterator
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
@Override
public Iterator<Versioned<byte[]>> iterator() {
final Iterator<VersionedValue> vs = tvvi.iterator();
return new Iterator<Versioned<byte[]>>() {
@Override
public boolean hasNext() {
return vs.hasNext();
}
@Override
public Versioned<byte[]> next() {
return TProtocolUtil.getVersionedValued(vs.next());
}
@Override
public void remove() {
vs.remove();
}
};
}
示例2: getTVersionedValue
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Allocate a thrift {@link org.sdnplatform.sync.thrift.VersionedValue}
* object wrapping a {@link Versioned} object
* @param value the value to wrap
* @return the thrift object
*/
public static org.sdnplatform.sync.thrift.VersionedValue
getTVersionedValue(Versioned<byte[]> value) {
org.sdnplatform.sync.thrift.VersionedValue tvv =
new org.sdnplatform.sync.thrift.VersionedValue();
org.sdnplatform.sync.thrift.VectorClock tvc =
getTVectorClock((VectorClock)value.getVersion());
tvv.setVersion(tvc);
tvv.setValue(value.getValue());
return tvv;
}
示例3: getVersionedValued
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Convert a thrift {@link VersionedValue} into a {@link Versioned}.
* @param tvv the {@link VersionedValue}
* @return the {@link Versioned}
*/
public static Versioned<byte[]>
getVersionedValued(VersionedValue tvv) {
Versioned<byte[]> vv =
new Versioned<byte[]>(tvv.getValue(),
getVersion(tvv.getVersion()));
return vv;
}
示例4: getVersionedList
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Convert from a list of {@link VersionedValue} to a list
* of {@link Versioned<byte[]>}
* @param tvv the list of versioned values
* @return the list of versioned
*/
public static List<Versioned<byte[]>> getVersionedList(List<VersionedValue> tvv) {
ArrayList<Versioned<byte[]>> values =
new ArrayList<Versioned<byte[]>>();
if (tvv != null) {
for (VersionedValue v : tvv) {
values.add(TProtocolUtil.getVersionedValued(v));
}
}
return values;
}
示例5: getTVersionedValue
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Allocate a thrift {@link org.sdnplatform.sync.thrift.VersionedValue}
* object wrapping a {@link Versioned} object
* @param value the value to wrap
* @return the thrift object
*/
public static org.sdnplatform.sync.thrift.VersionedValue
getTVersionedValue(Versioned<byte[]> value) {
org.sdnplatform.sync.thrift.VersionedValue tvv =
new org.sdnplatform.sync.thrift.VersionedValue();
org.sdnplatform.sync.thrift.VectorClock tvc =
getTVectorClock((VectorClock)value.getVersion());
tvv.setVersion(tvc);
tvv.setValue(value.getValue());
return tvv;
}
示例6: getVersionedValued
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Convert a thrift {@link VersionedValue} into a {@link Versioned}.
* @param tvv the {@link VersionedValue}
* @return the {@link Versioned}
*/
public static Versioned<byte[]>
getVersionedValued(VersionedValue tvv) {
Versioned<byte[]> vv =
new Versioned<byte[]>(tvv.getValue(),
getVersion(tvv.getVersion()));
return vv;
}
示例7: getVersionedList
import org.sdnplatform.sync.thrift.VersionedValue; //导入依赖的package包/类
/**
* Convert from a list of {@link VersionedValue} to a list
* of {@link Versioned<byte[]>}
* @param tvv the list of versioned values
* @return the list of versioned
*/
public static List<Versioned<byte[]>> getVersionedList(List<VersionedValue> tvv) {
ArrayList<Versioned<byte[]>> values =
new ArrayList<Versioned<byte[]>>();
if (tvv != null) {
for (VersionedValue v : tvv) {
values.add(TProtocolUtil.getVersionedValued(v));
}
}
return values;
}