本文整理汇总了Java中se.sics.kompics.p2p.experiment.dsl.adaptor.Operation类的典型用法代码示例。如果您正苦于以下问题:Java Operation类的具体用法?Java Operation怎么用?Java Operation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Operation类属于se.sics.kompics.p2p.experiment.dsl.adaptor包,在下文中一共展示了Operation类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: opChurn
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<Commands.ChurnEvent> opChurn() {
return new Operation<Commands.ChurnEvent>() {
private int i = -1;
@Override
public ChurnEvent generate() {
i++;
if (i % 2 == 0) {
return new Fail();
} else {
return new Join();
}
}
};
}
示例2: startCollectData
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
static Operation<StartCollectData> startCollectData() {
return new Operation<StartCollectData>() {
@Override
public StartCollectData generate() {
return new StartCollectData();
}
};
}
示例3: stopCollectData
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
static Operation<StopCollectData> stopCollectData() {
return new Operation<StopCollectData>() {
@Override
public StopCollectData generate() {
return new StopCollectData();
}
};
}
示例4: opBoot
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<BootCmd> opBoot(final int n) {
return new Operation<BootCmd>() {
@Override
public BootCmd generate() {
return new BootCmd(n);
}
};
}
示例5: opPut
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<PutCmd> opPut() {
return new Operation<PutCmd>() {
@Override
public PutCmd generate() {
return new PutCmd();
}
};
}
示例6: opGet
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<GetCmd> opGet() {
return new Operation<GetCmd>() {
@Override
public GetCmd generate() {
return new GetCmd();
}
};
}
示例7: opRQ
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<RandomRQCmd> opRQ() {
return new Operation<RandomRQCmd>() {
@Override
public RandomRQCmd generate() {
return new RandomRQCmd();
}
};
}
示例8: opFullSchemaRQ
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<CustomRQCmd> opFullSchemaRQ() {
return new Operation<CustomRQCmd>() {
@Override
public CustomRQCmd generate() {
return new CustomRQCmd(KeyRange.prefix(SimulationHelper.schemaPrefix));
}
};
}
示例9: opTerminate
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<TerminateCmd> opTerminate() {
return new Operation<TerminateCmd>() {
@Override
public TerminateCmd generate() {
return TerminateCmd.event;
}
};
}
示例10: opValidate
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<ValidateCmd> opValidate() {
return new Operation<ValidateCmd>() {
@Override
public ValidateCmd generate() {
return new ValidateCmd();
}
};
}
示例11: raise
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
/**
* Raise.
*
* @param count
* the count
* @param op
* the op
*/
protected final <E extends KompicsEvent> void raise(int count, Operation<E> op) {
if (count <= 0) {
throw new RuntimeException(
"Number of raised events must be strictly positive");
}
OperationGenerator generator = new OperationGenerator(
new ConcreteOperation<E, Number, Number, Number, Number, Number>(
op), count);
generators.add(generator);
}
示例12: opStart
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<Commands.Start> opStart(final int n) {
return new Operation<Commands.Start>() {
@Override
public Commands.Start generate() {
return new Commands.Start(n);
}
};
}
示例13: opVerify
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<Commands.Verify> opVerify() {
return new Operation<Commands.Verify>() {
@Override
public Commands.Verify generate() {
return new Commands.Verify();
}
};
}
示例14: opOp
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<Commands.Operation> opOp() {
return new Operation<Commands.Operation>() {
@Override
public Commands.Operation generate() {
return new Commands.Operation();
}
};
}
示例15: opJoin
import se.sics.kompics.p2p.experiment.dsl.adaptor.Operation; //导入依赖的package包/类
public static Operation<Commands.Join> opJoin() {
return new Operation<Commands.Join>() {
@Override
public Join generate() {
return new Commands.Join();
}
};
}