use of com.srotya.sidewinder.core.storage.DataPoint in project sidewinder by srotya.
the class ByzantineWriter method write.
@Override
public void write(List<DataPoint> dps) throws IOException {
write.lock();
try {
for (Iterator<DataPoint> itr = dps.iterator(); itr.hasNext(); ) {
DataPoint dp = itr.next();
writeDataPoint(dp.getTimestamp(), dp.getLongValue());
}
} finally {
write.unlock();
}
}
use of com.srotya.sidewinder.core.storage.DataPoint in project sidewinder by srotya.
the class TestMiscUtils method testBuildDataPoint.
@Test
public void testBuildDataPoint() {
DataPoint dp = MiscUtils.buildDataPoint(10L, 10.1);
assertEquals(10L, dp.getTimestamp(), 0);
assertEquals(10.1, dp.getValue(), 0);
dp = MiscUtils.buildDataPoint(10L, 10L);
assertEquals(10L, dp.getTimestamp(), 0);
assertEquals(10, dp.getLongValue(), 0);
}
Aggregations