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