use of com.hazelcast.simulator.tests.map.domain.DomainObjectFactory in project hazelcast-simulator by hazelcast.
the class SerializationStrategyTest method prepare.
@Prepare(global = true)
public void prepare() {
int uniqueStringsCount = itemCount / recordsPerUnique;
String[] strings = generateUniqueStrings(uniqueStringsCount);
Streamer<String, DomainObject> streamer = StreamerFactory.getInstance(map);
DomainObjectFactory objectFactory = DomainObjectFactory.newFactory(strategy);
for (int i = 0; i < itemCount; i++) {
String indexedField = strings[RandomUtils.nextInt(0, uniqueStringsCount)];
DomainObject o = createNewDomainObject(objectFactory, indexedField);
streamer.pushEntry(o.getKey(), o);
}
streamer.await();
}
Aggregations