本文整理汇总了Java中org.onosproject.store.service.AsyncDistributedSet类的典型用法代码示例。如果您正苦于以下问题:Java AsyncDistributedSet类的具体用法?Java AsyncDistributedSet怎么用?Java AsyncDistributedSet使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AsyncDistributedSet类属于org.onosproject.store.service包,在下文中一共展示了AsyncDistributedSet类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setBuilder
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
@Override
public <E> DistributedSetBuilder<E> setBuilder() {
DistributedSetBuilder<E> builder = new DistributedSetBuilder<E>() {
@Override
public AsyncDistributedSet<E> build() {
return new DistributedSetAdapter<E>() {
@Override
public DistributedSet<E> asDistributedSet() {
return new TestDistributedSet<>();
}
};
}
};
return builder;
}
示例2: DefaultDistributedSet
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
public DefaultDistributedSet(AsyncDistributedSet<E> asyncSet, long operationTimeoutMillis) {
super(asyncSet);
this.asyncSet = asyncSet;
this.operationTimeoutMillis = operationTimeoutMillis;
}
示例3: newAsyncDistributedSet
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
@Override
public <E> AsyncDistributedSet<E> newAsyncDistributedSet(String name, Serializer serializer) {
return DistributedPrimitives.newSetFromMap(newAsyncConsistentMap(name, serializer));
}
示例4: newAsyncDistributedSet
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
@Override
public <E> AsyncDistributedSet<E> newAsyncDistributedSet(String name, Serializer serializer) {
return DistributedPrimitives.newSetFromMap(this.<E, Boolean>newAsyncConsistentMap(name, serializer));
}
示例5: build
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
@Override
public AsyncDistributedSet<E> build() {
return new DefaultAsyncDistributedSet<E>(mapBuilder.buildAsyncMap(), name, metering);
}
示例6: build
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
@Override
public AsyncDistributedSet<E> build() {
return new TestDistributedSet(name());
}
示例7: newAsyncDistributedSet
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
/**
* Creates a new {@code AsyncDistributedSet}.
*
* @param name set name
* @param serializer serializer to use for serializing/deserializing set entries
* @param <E> set entry type
* @return set
*/
<E> AsyncDistributedSet<E> newAsyncDistributedSet(String name, Serializer serializer);
示例8: newSetFromMap
import org.onosproject.store.service.AsyncDistributedSet; //导入依赖的package包/类
/**
* Creates an instance of {@code AsyncDistributedSet} that is backed by a {@code AsyncConsistentMap}.
*
* @param map backing map
* @return set
* @param <E> set element type
*/
public static <E> AsyncDistributedSet<E> newSetFromMap(AsyncConsistentMap<E, Boolean> map) {
return new DefaultAsyncDistributedSet<>(map, map.name(), true);
}