本文整理匯總了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);
}