Search in sources :

Example 6 with SampleKey

use of org.apache.ignite.yardstick.cache.model.SampleKey in project ignite by apache.

the class IgniteJdbcStorePutGetBenchmark method test.

/**
 * {@inheritDoc}
 */
@Override
public boolean test(Map<Object, Object> ctx) throws Exception {
    int id = nextRandom(args.range());
    Object val = cache.get(new SampleKey(id));
    if (val != null)
        id = nextRandom(args.range());
    cache.put(new SampleKey(id), new SampleValue(id));
    return true;
}
Also used : SampleValue(org.apache.ignite.yardstick.cache.model.SampleValue) SampleKey(org.apache.ignite.yardstick.cache.model.SampleKey)

Aggregations

SampleKey (org.apache.ignite.yardstick.cache.model.SampleKey)6 SampleValue (org.apache.ignite.yardstick.cache.model.SampleValue)4