target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void isValidDBKeyDelimiterIsNormalCharInDbKeyReturnsTrue() { Locator locator = new Locator(); assertTrue(locator.isValidDBKey("abc", "b")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void getPollerPeriodGetsPollerPeriod() { assertEquals(0, service.getPollerPeriod()); }
public synchronized long getPollerPeriod() { return pollerPeriod; }
RollupService implements Runnable, RollupServiceMBean { public synchronized long getPollerPeriod() { return pollerPeriod; } }
RollupService implements Runnable, RollupServiceMBean { public synchronized long getPollerPeriod() { return pollerPeriod; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPool...
RollupService implements Runnable, RollupServiceMBean { public synchronized long getPollerPeriod() { return pollerPeriod; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPool...
RollupService implements Runnable, RollupServiceMBean { public synchronized long getPollerPeriod() { return pollerPeriod; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPool...
@Test public void isValidDBKeyDbKeyContainsDelimiterReturnsTrue() { Locator locator = new Locator(); assertTrue(locator.isValidDBKey("a.b.c", ".")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void isValidDBKeyEmptyDbKeyReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.isValidDBKey("", ".")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void isValidDBKeyEmptyDelimiterReturnsTrue() { Locator locator = new Locator(); assertTrue(locator.isValidDBKey("a.b.c", "")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void isValidDBKeyMultiCharDelimiterReturnsTrue() { Locator locator = new Locator(); assertTrue(locator.isValidDBKey("a.b.c", ".b.")); }
protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
Locator implements Comparable<Locator> { protected boolean isValidDBKey(String dbKey, String delim) { return dbKey.contains(delim); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricNam...
@Test public void hashCodeNullReturnsZero() { Locator locator = new Locator(); assertEquals(0, locator.hashCode()); }
@Override public int hashCode() { return stringRep == null ? 0 : stringRep.hashCode(); }
Locator implements Comparable<Locator> { @Override public int hashCode() { return stringRep == null ? 0 : stringRep.hashCode(); } }
Locator implements Comparable<Locator> { @Override public int hashCode() { return stringRep == null ? 0 : stringRep.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { @Override public int hashCode() { return stringRep == null ? 0 : stringRep.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName();...
Locator implements Comparable<Locator> { @Override public int hashCode() { return stringRep == null ? 0 : stringRep.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); String getTenantId(); String getMetricName();...
@Test public void equalsNullReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.equals((Object)null)); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
@Test public void equalsNonLocatorReturnsFalse() { Locator locator = new Locator(); assertFalse(locator.equals(new Object())); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
@Test public void equalsBothUninitializedReturnsTrue() { Locator locator = new Locator(); Locator other = new Locator(); assertTrue(locator.equals((Object)other)); }
@Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); }
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
Locator implements Comparable<Locator> { @Override public boolean equals(Object obj) { return obj != null && obj instanceof Locator && obj.hashCode() == this.hashCode(); } Locator(); private Locator(String fullyQualifiedMetricName); @Override int hashCode(); @Override boolean equals(Object obj); String toString(); Str...
@Test(expected=IllegalStateException.class) public void getDataClassOnEmptyObjectThrowsException() { Points<SimpleNumber> points = new Points<SimpleNumber>(); Class actual = points.getDataClass(); }
public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); }
Points { public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); } }
Points { public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); } Points(); }
Points { public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); } Points(); void add(Point<T> point); Map<Long, Point<T>> getPoints(); boolean isEmpty(); Class getDataClass(); }
Points { public Class getDataClass() { if (points.size() == 0) throw new IllegalStateException(""); return points.values().iterator().next().data.getClass(); } Points(); void add(Point<T> point); Map<Long, Point<T>> getPoints(); boolean isEmpty(); Class getDataClass(); }
@Test public void newlyCreatedObjectIsNotFloatingPoint() { SimpleStat stat = new SimpleStat(); assertFalse(stat.isFloatingPoint()); }
public boolean isFloatingPoint() { return this.isFloatingPoint; }
AbstractRollupStat { public boolean isFloatingPoint() { return this.isFloatingPoint; } }
AbstractRollupStat { public boolean isFloatingPoint() { return this.isFloatingPoint; } AbstractRollupStat(); }
AbstractRollupStat { public boolean isFloatingPoint() { return this.isFloatingPoint; } AbstractRollupStat(); boolean isFloatingPoint(); double toDouble(); long toLong(); @Override boolean equals(Object otherObject); void setLongValue(long value); void setDoubleValue(double value); abstract byte getStatType(); String to...
AbstractRollupStat { public boolean isFloatingPoint() { return this.isFloatingPoint; } AbstractRollupStat(); boolean isFloatingPoint(); double toDouble(); long toLong(); @Override boolean equals(Object otherObject); void setLongValue(long value); void setDoubleValue(double value); abstract byte getStatType(); String to...
@Test public void getScheduledSlotCheckCountGetsCount() { int expected = 3; doReturn(expected).when(context).getScheduledCount(); int actual = service.getScheduledSlotCheckCount(); assertEquals(expected, actual); verify(context).getScheduledCount(); verifyNoMoreInteractions(context); }
public synchronized int getScheduledSlotCheckCount() { return context.getScheduledCount(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getScheduledSlotCheckCount() { return context.getScheduledCount(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getScheduledSlotCheckCount() { return context.getScheduledCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getScheduledSlotCheckCount() { return context.getScheduledCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getScheduledSlotCheckCount() { return context.getScheduledCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void statsAreEqualIfTheirLongNumericalValuesAreEqual() { SimpleStat a = new SimpleStat(123L); SimpleStat b = new SimpleStat(123L); assertTrue(a.equals(b)); assertTrue(b.equals(a)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void statsAreNotEqualIfTheirLongNumericalValuesAreNotEqual() { SimpleStat a = new SimpleStat(123L); SimpleStat b = new SimpleStat(124L); assertFalse(a.equals(b)); assertFalse(b.equals(a)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void statsAreEqualIfTheirDoubleNumericalValuesAreEqual() { SimpleStat a = new SimpleStat(123.45d); SimpleStat b = new SimpleStat(123.45d); assertTrue(a.equals(b)); assertTrue(b.equals(a)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void statsAreNotEqualIfTheirDoubleNumericalValuesAreNotEqual() { SimpleStat a = new SimpleStat(123.45d); SimpleStat b = new SimpleStat(123.7d); assertFalse(a.equals(b)); assertFalse(b.equals(a)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void floatingPointAndNonFloatingPointAreNotEqual() { SimpleStat a = new SimpleStat(123L); SimpleStat b = new SimpleStat(123.45d); assertFalse(a.equals(b)); assertFalse(b.equals(a)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void differentSubtypesAreEqualIfTheirLongNumericalValuesAreEqual() { MinValue min = new MinValue(123L); MaxValue max = new MaxValue(123L); assertTrue(min.equals(max)); assertTrue(max.equals(min)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void differentSubtypesAreNotEqualIfTheirLongNumericalValuesAreNotEqual() { MinValue min = new MinValue(123L); MaxValue max = new MaxValue(124L); assertFalse(min.equals(max)); assertFalse(max.equals(min)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void differentSubtypesAreEqualIfTheirDoubleNumericalValuesAreEqual() { MinValue min = new MinValue(123.45d); MaxValue max = new MaxValue(123.45d); assertTrue(min.equals(max)); assertTrue(max.equals(min)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void differentSubtypesAreNotEqualIfTheirDoubleNumericalValuesAreNotEqual() { MinValue min = new MinValue(123.45d); MaxValue max = new MaxValue(123.7d); assertFalse(min.equals(max)); assertFalse(max.equals(min)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void notEqualToOtherNonStatTypes() { SimpleStat stat = new SimpleStat(); String other = "something"; assertFalse(stat.equals(other)); assertFalse(other.equals(stat)); }
@Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDouble() == other.toDoubl...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
AbstractRollupStat { @Override public boolean equals(Object otherObject) { if (!(otherObject instanceof AbstractRollupStat)) { return false; } AbstractRollupStat other = (AbstractRollupStat)otherObject; if (this.isFloatingPoint != other.isFloatingPoint()) { return false; } if (this.isFloatingPoint) { return this.toDoub...
@Test public void testGetSlotCheckConcurrency() { int expected = 12; doReturn(expected).when(locatorFetchExecutors).getMaximumPoolSize(); int actual = service.getSlotCheckConcurrency(); assertEquals(expected, actual); verify(locatorFetchExecutors).getMaximumPoolSize(); verifyNoMoreInteractions(locatorFetchExecutors); }
public synchronized int getSlotCheckConcurrency() { return locatorFetchExecutors.getMaximumPoolSize(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getSlotCheckConcurrency() { return locatorFetchExecutors.getMaximumPoolSize(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getSlotCheckConcurrency() { return locatorFetchExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getSlotCheckConcurrency() { return locatorFetchExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getSlotCheckConcurrency() { return locatorFetchExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager...
@Test public void buildRollupFromRawSamples() throws IOException { BasicRollup rollup = createFromPoints( 5 ); assertEquals( "count is equal", 5, rollup.getCount() ); assertEquals( "average is equal", 30L, rollup.getAverage().toLong() ); assertEquals( "variance is equal", 200, rollup.getVariance().toDouble(), EPSILON )...
public static BasicRollup buildRollupFromRawSamples(Points<SimpleNumber> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromSimpleMetrics(input); return basicRollup; }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRawSamples(Points<SimpleNumber> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromSimpleMetrics(input); return basicRollup; } }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRawSamples(Points<SimpleNumber> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromSimpleMetrics(input); return basicRollup; } BasicRollup(); }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRawSamples(Points<SimpleNumber> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromSimpleMetrics(input); return basicRollup; } BasicRollup(); @Override boolean equals(Objec...
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRawSamples(Points<SimpleNumber> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromSimpleMetrics(input); return basicRollup; } BasicRollup(); @Override boolean equals(Objec...
@Test public void buildRollupFromRollups() throws IOException { Points<BasicRollup> rollups = new Points<BasicRollup>() {{ add( new Points.Point<BasicRollup>( 1, createFromPoints( 1 ) ) ); add( new Points.Point<BasicRollup>( 2, createFromPoints( 2 ) ) ); add( new Points.Point<BasicRollup>( 3, createFromPoints( 3 ) ) );...
public static BasicRollup buildRollupFromRollups(Points<BasicRollup> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromRollups(input); return basicRollup; }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRollups(Points<BasicRollup> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromRollups(input); return basicRollup; } }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRollups(Points<BasicRollup> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromRollups(input); return basicRollup; } BasicRollup(); }
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRollups(Points<BasicRollup> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromRollups(input); return basicRollup; } BasicRollup(); @Override boolean equals(Object other); ...
BasicRollup extends BaseRollup implements IBaseRollup { public static BasicRollup buildRollupFromRollups(Points<BasicRollup> input) throws IOException { final BasicRollup basicRollup = new BasicRollup(); basicRollup.computeFromRollups(input); return basicRollup; } BasicRollup(); @Override boolean equals(Object other); ...
@Test public void fullResInitialDoubleSetsValue() { min.handleFullResMetric(123.45d); assertTrue(min.isFloatingPoint()); assertEquals(123.45d, min.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongSetsValue() { min.handleFullResMetric(123L); assertFalse(min.isFloatingPoint()); assertEquals(123L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialIntegerSetsValue() { min.handleFullResMetric((int)123); assertFalse(min.isFloatingPoint()); assertEquals(123L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test(expected = RuntimeException.class) public void fullResInitialFloatThrowsException() { min.handleFullResMetric(123f); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenLesserDouble() { min.handleFullResMetric(123.45d); min.handleFullResMetric(122.45d); assertTrue(min.isFloatingPoint()); assertEquals(122.45d, min.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenGreaterDouble() { min.handleFullResMetric(123.45d); min.handleFullResMetric(124.45d); assertTrue(min.isFloatingPoint()); assertEquals(123.45d, min.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenLesserLong() { min.handleFullResMetric(123.45d); min.handleFullResMetric(122L); assertFalse(min.isFloatingPoint()); assertEquals(122L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenGreaterLong() { min.handleFullResMetric(123.45d); min.handleFullResMetric(124L); assertTrue(min.isFloatingPoint()); assertEquals(123.45d, min.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void testSetSlotCheckConcurrency() { service.setSlotCheckConcurrency(3); verify(locatorFetchExecutors).setCorePoolSize(anyInt()); verify(locatorFetchExecutors).setMaximumPoolSize(anyInt()); verifyNoMoreInteractions(locatorFetchExecutors); }
public synchronized void setSlotCheckConcurrency(int i) { locatorFetchExecutors.setCorePoolSize(i); locatorFetchExecutors.setMaximumPoolSize(i); }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setSlotCheckConcurrency(int i) { locatorFetchExecutors.setCorePoolSize(i); locatorFetchExecutors.setMaximumPoolSize(i); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setSlotCheckConcurrency(int i) { locatorFetchExecutors.setCorePoolSize(i); locatorFetchExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setSlotCheckConcurrency(int i) { locatorFetchExecutors.setCorePoolSize(i); locatorFetchExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setSlotCheckConcurrency(int i) { locatorFetchExecutors.setCorePoolSize(i); locatorFetchExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
@Test public void fullResInitialLongThenLesserDouble() { min.handleFullResMetric(123L); min.handleFullResMetric(122.45d); assertTrue(min.isFloatingPoint()); assertEquals(122.45d, min.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenGreaterDouble() { min.handleFullResMetric(123L); min.handleFullResMetric(124.45d); assertFalse(min.isFloatingPoint()); assertEquals(123L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenLesserLong() { min.handleFullResMetric(123L); min.handleFullResMetric(122L); assertFalse(min.isFloatingPoint()); assertEquals(122L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenGreaterLong() { min.handleFullResMetric(123L); min.handleFullResMetric(124L); assertFalse(min.isFloatingPoint()); assertEquals(123L, min.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.min(this....
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
MinValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() > (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void rollupInitialFloatingPointSetsValue() { double value = 123.45d; IBaseRollup rollup = mock(IBaseRollup.class); MinValue other = new MinValue(value); doReturn(other).when(rollup).getMinValue(); min.handleRollupMetric(rollup); assertTrue(min.isFloatingPoint()); assertEquals(value, min.toDouble(), 0.00001...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialNonFloatingPointSetsValue() { long value = 123L; IBaseRollup rollup = mock(IBaseRollup.class); MinValue other = new MinValue(value); doReturn(other).when(rollup).getMinValue(); min.handleRollupMetric(rollup); assertFalse(min.isFloatingPoint()); assertEquals(123L, min.toLong()); }
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialDoubleThenLesserDouble() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); double value2 = 122.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(val...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialDoubleThenGreaterDouble() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); double value2 = 124.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(va...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialDoubleThenLesserLong() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); long value2 = 122L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2)).w...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialDoubleThenGreaterLong() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); long value2 = 124L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2))....
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void testGetRollupConcurrency() { int expected = 12; doReturn(expected).when(rollupReadExecutors).getMaximumPoolSize(); int actual = service.getRollupConcurrency(); assertEquals(expected, actual); verify(rollupReadExecutors).getMaximumPoolSize(); verifyNoMoreInteractions(rollupReadExecutors); }
public synchronized int getRollupConcurrency() { return rollupReadExecutors.getMaximumPoolSize(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getRollupConcurrency() { return rollupReadExecutors.getMaximumPoolSize(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getRollupConcurrency() { return rollupReadExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getRollupConcurrency() { return rollupReadExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getRollupConcurrency() { return rollupReadExecutors.getMaximumPoolSize(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void rollupInitialLongThenLesserDouble() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); double value2 = 122.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2)).w...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialLongThenGreaterDouble() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); double value2 = 124.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2))....
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialLongThenLesserLong() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); long value2 = 122L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2)).when(rol...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void rollupInitialLongThenGreaterLong() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MinValue(value1)).when(rollup1).getMinValue(); min.handleRollupMetric(rollup1); long value2 = 124L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MinValue(value2)).when(ro...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; return; } if (this.isFloatingPoint() && !...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
MinValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMinValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } init = false; ret...
@Test public void returnsTheCorrectStatType() { assertEquals(Constants.MIN, min.getStatType()); }
@Override public byte getStatType() { return Constants.MIN; }
MinValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MIN; } }
MinValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MIN; } MinValue(); @SuppressWarnings("unused") // used by Jackson MinValue(long value); @SuppressWarnings("unused") // used by Jackson MinValue(double value); }
MinValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MIN; } MinValue(); @SuppressWarnings("unused") // used by Jackson MinValue(long value); @SuppressWarnings("unused") // used by Jackson MinValue(double value); @Override byte getStatType(); }
MinValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MIN; } MinValue(); @SuppressWarnings("unused") // used by Jackson MinValue(long value); @SuppressWarnings("unused") // used by Jackson MinValue(double value); @Override byte getStatType(); }
@Test public void fullResInitialDoubleSetsValue() { max.handleFullResMetric(123.45d); assertTrue(max.isFloatingPoint()); assertEquals(123.45d, max.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongSetsValue() { max.handleFullResMetric(123L); assertFalse(max.isFloatingPoint()); assertEquals(123L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialIntegerSetsValue() { max.handleFullResMetric((int)123); assertFalse(max.isFloatingPoint()); assertEquals(123L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test(expected = RuntimeException.class) public void fullResInitialFloatThrowsException() { max.handleFullResMetric(123f); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenLesserDouble() { max.handleFullResMetric(123.45d); max.handleFullResMetric(122.45d); assertTrue(max.isFloatingPoint()); assertEquals(123.45d, max.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void testSetRollupConcurrency() { service.setRollupConcurrency(3); verify(rollupReadExecutors).setCorePoolSize(anyInt()); verify(rollupReadExecutors).setMaximumPoolSize(anyInt()); verifyNoMoreInteractions(rollupReadExecutors); }
public synchronized void setRollupConcurrency(int i) { rollupReadExecutors.setCorePoolSize(i); rollupReadExecutors.setMaximumPoolSize(i); }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setRollupConcurrency(int i) { rollupReadExecutors.setCorePoolSize(i); rollupReadExecutors.setMaximumPoolSize(i); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized void setRollupConcurrency(int i) { rollupReadExecutors.setCorePoolSize(i); rollupReadExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setRollupConcurrency(int i) { rollupReadExecutors.setCorePoolSize(i); rollupReadExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized void setRollupConcurrency(int i) { rollupReadExecutors.setCorePoolSize(i); rollupReadExecutors.setMaximumPoolSize(i); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ...
@Test public void fullResInitialDoubleThenGreaterDouble() { max.handleFullResMetric(123.45d); max.handleFullResMetric(124.45d); assertTrue(max.isFloatingPoint()); assertEquals(124.45d, max.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenLesserLong() { max.handleFullResMetric(123.45d); max.handleFullResMetric(122L); assertTrue(max.isFloatingPoint()); assertEquals(123.45d, max.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialDoubleThenGreaterLong() { max.handleFullResMetric(123.45d); max.handleFullResMetric(124L); assertFalse(max.isFloatingPoint()); assertEquals(124L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenLesserDouble() { max.handleFullResMetric(123L); max.handleFullResMetric(122.45d); assertFalse(max.isFloatingPoint()); assertEquals(123L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenGreaterDouble() { max.handleFullResMetric(123L); max.handleFullResMetric(124.45d); assertTrue(max.isFloatingPoint()); assertEquals(124.45d, max.toDouble(), 0.00001d); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenLesserLong() { max.handleFullResMetric(123L); max.handleFullResMetric(122L); assertFalse(max.isFloatingPoint()); assertEquals(123L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void fullResInitialLongThenGreaterLong() { max.handleFullResMetric(123L); max.handleFullResMetric(124L); assertFalse(max.isFloatingPoint()); assertEquals(124L, max.toLong()); }
@Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } else { this.setDoubleValue(Math.max(this....
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
MaxValue extends AbstractRollupStat { @Override void handleFullResMetric(Object o) throws RuntimeException { if (o instanceof Double) { if (init) { this.setDoubleValue((Double)o); this.init = false; return; } if (!this.isFloatingPoint()) { if ((double)this.toLong() < (Double)o) { this.setDoubleValue((Double)o); } } els...
@Test public void rollupInitialFloatingPointSetsValue() { double value = 123.45d; IBaseRollup rollup = mock(IBaseRollup.class); MaxValue other = new MaxValue(value); doReturn(other).when(rollup).getMaxValue(); max.handleRollupMetric(rollup); assertTrue(max.isFloatingPoint()); assertEquals(value, max.toDouble(), 0.00001...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialNonFloatingPointSetsValue() { long value = 123L; IBaseRollup rollup = mock(IBaseRollup.class); MaxValue other = new MaxValue(value); doReturn(other).when(rollup).getMaxValue(); max.handleRollupMetric(rollup); assertFalse(max.isFloatingPoint()); assertEquals(123L, max.toLong()); }
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialDoubleThenLesserDouble() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); double value2 = 122.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(val...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void getQueuedRollupCountReturnsQueueSize() { BlockingQueue<Runnable> queue = mock(BlockingQueue.class); int expected1 = 123; int expected2 = 45; when(queue.size()).thenReturn(expected1).thenReturn(expected2); when(rollupReadExecutors.getQueue()).thenReturn(queue); int count = service.getQueuedRollupCount(...
public synchronized int getQueuedRollupCount() { return rollupReadExecutors.getQueue().size(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getQueuedRollupCount() { return rollupReadExecutors.getQueue().size(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getQueuedRollupCount() { return rollupReadExecutors.getQueue().size(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getQueuedRollupCount() { return rollupReadExecutors.getQueue().size(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getQueuedRollupCount() { return rollupReadExecutors.getQueue().size(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void rollupInitialDoubleThenGreaterDouble() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); double value2 = 124.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(va...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialDoubleThenLesserLong() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); long value2 = 122L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2)).w...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialDoubleThenGreaterLong() { double value1 = 123.45d; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); long value2 = 124L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2))....
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialLongThenLesserDouble() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); double value2 = 122.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2)).w...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialLongThenGreaterDouble() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); double value2 = 124.45d; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2))....
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialLongThenLesserLong() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); long value2 = 122L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2)).when(rol...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void rollupInitialLongThenGreaterLong() { long value1 = 123L; IBaseRollup rollup1 = mock(IBaseRollup.class); doReturn(new MaxValue(value1)).when(rollup1).getMaxValue(); max.handleRollupMetric(rollup1); long value2 = 124L; IBaseRollup rollup2 = mock(IBaseRollup.class); doReturn(new MaxValue(value2)).when(ro...
@Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false; return; } if (this.isFloatingPoint()...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
MaxValue extends AbstractRollupStat { @Override void handleRollupMetric(IBaseRollup baseRollup) throws RuntimeException { AbstractRollupStat other = baseRollup.getMaxValue(); if (init) { if (other.isFloatingPoint()) { this.setDoubleValue(other.toDouble()); } else { this.setLongValue(other.toLong()); } this.init = false...
@Test public void returnsTheCorrectStatType() { assertEquals(Constants.MAX, max.getStatType()); }
@Override public byte getStatType() { return Constants.MAX; }
MaxValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MAX; } }
MaxValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MAX; } MaxValue(); @SuppressWarnings("unused") // used by Jackson MaxValue(long value); @SuppressWarnings("unused") // used by Jackson MaxValue(double value); }
MaxValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MAX; } MaxValue(); @SuppressWarnings("unused") // used by Jackson MaxValue(long value); @SuppressWarnings("unused") // used by Jackson MaxValue(double value); @Override byte getStatType(); }
MaxValue extends AbstractRollupStat { @Override public byte getStatType() { return Constants.MAX; } MaxValue(); @SuppressWarnings("unused") // used by Jackson MaxValue(long value); @SuppressWarnings("unused") // used by Jackson MaxValue(double value); @Override byte getStatType(); }
@Test public void testGetTokensHappyCase() { String tenantID = "111111"; String metricName = "a.b.c.d"; Locator locator = Locator.createLocatorFromPathComponents(tenantID, metricName); String[] expectedTokens = new String[] {"a", "b", "c", "d"}; String[] expectedParents = new String[] { "", "a", "a.b", "a.b.c"}; String...
public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToObj(index...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
@Test public void testGetTokensForMetricWithOneToken() { String tenantID = "111111"; String metricName = "a"; Locator locator = Locator.createLocatorFromPathComponents(tenantID, metricName); String[] expectedTokens = new String[] {"a"}; String[] expectedParents = new String[] {""}; String[] expectedIds = new String[] {...
public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToObj(index...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
@Test public void testGetInFlightRollupCount() { int expected1 = 123; int expected2 = 45; when(rollupReadExecutors.getActiveCount()) .thenReturn(expected1) .thenReturn(expected2); int count = service.getInFlightRollupCount(); assertEquals(expected1, count); count = service.getInFlightRollupCount(); assertEquals(expecte...
public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } }
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
RollupService implements Runnable, RollupServiceMBean { public synchronized int getInFlightRollupCount() { return rollupReadExecutors.getActiveCount(); } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ...
@Test public void testShardFromSlotKey() { int expectedShard = 1; int shard = SlotKeySerDes.shardFromSlotKey(SlotKey.of(Granularity.MIN_5, 10, expectedShard).toString()); Assert.assertEquals(expectedShard, shard); }
protected static int shardFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[2]); }
SlotKeySerDes { protected static int shardFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[2]); } }
SlotKeySerDes { protected static int shardFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[2]); } }
SlotKeySerDes { protected static int shardFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[2]); } static SlotKey deserialize(String stateStr); String serialize(SlotKey slotKey); String serialize(Granularity gran, int slot, int shard); }
SlotKeySerDes { protected static int shardFromSlotKey(String s) { return Integer.parseInt(s.split(",", -1)[2]); } static SlotKey deserialize(String stateStr); String serialize(SlotKey slotKey); String serialize(Granularity gran, int slot, int shard); }
@Test public void testGetTokensWithEmptyTokenInBetween() { String tenantID = "111111"; String metricName = "ingest00.HeaderNormalization.header-normalization..*_GET.count"; Locator locator = Locator.createLocatorFromPathComponents(tenantID, metricName); String[] expectedTokens = new String[] {"ingest00", "HeaderNormali...
public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToObj(index...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
@Test public void testGetTokensForMetricNoTokens() { String tenantID = "111111"; String metricName = ""; Locator locator = Locator.createLocatorFromPathComponents(tenantID, metricName); List<Token> tokens = Token.getTokens(locator); assertEquals("Total number of tokens invalid", 0, tokens.size()); }
public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToObj(index...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
Token { public static List<Token> getTokens(Locator locator) { if (StringUtils.isEmpty(locator.getMetricName()) || StringUtils.isEmpty(locator.getTenantId())) return new ArrayList<>(); String[] tokens = locator.getMetricName().split(Locator.METRIC_TOKEN_SEPARATOR_REGEX); return IntStream.range(0, tokens.length) .mapToO...
@Test public void toStringWithIntegerPrintsIntegerString() { SimpleNumber sn = new SimpleNumber(123); assertEquals("123 (int)", sn.toString()); }
public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
@Test public void toStringWithLongPrintsLongString() { SimpleNumber sn = new SimpleNumber(123L); assertEquals("123 (long)", sn.toString()); }
public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
@Test public void toStringWithDoublePrintsDoubleString() { SimpleNumber sn = new SimpleNumber(123.45d); assertEquals("123.45 (double)", sn.toString()); }
public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } }
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
SimpleNumber implements Rollup { public String toString() { switch (type) { case INTEGER: return String.format("%d (int)", value.intValue()); case LONG: return String.format("%d (long)", value.longValue()); case DOUBLE: return String.format("%s (double)", value.toString()); default: return super.toString(); } } SimpleN...
@Test public void rollupTypeIsNotTypical() { SimpleNumber sn = new SimpleNumber(123.45d); assertEquals(RollupType.NOT_A_ROLLUP, sn.getRollupType()); }
@Override public RollupType getRollupType() { return RollupType.NOT_A_ROLLUP; }
SimpleNumber implements Rollup { @Override public RollupType getRollupType() { return RollupType.NOT_A_ROLLUP; } }
SimpleNumber implements Rollup { @Override public RollupType getRollupType() { return RollupType.NOT_A_ROLLUP; } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public RollupType getRollupType() { return RollupType.NOT_A_ROLLUP; } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Obj...
SimpleNumber implements Rollup { @Override public RollupType getRollupType() { return RollupType.NOT_A_ROLLUP; } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Obj...
@Test public void hashCodeIsValuesHashCode() { Double value = 123.45d; SimpleNumber sn = new SimpleNumber(value); assertEquals(value.hashCode(), sn.hashCode()); }
@Override public int hashCode() { return value.hashCode(); }
SimpleNumber implements Rollup { @Override public int hashCode() { return value.hashCode(); } }
SimpleNumber implements Rollup { @Override public int hashCode() { return value.hashCode(); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public int hashCode() { return value.hashCode(); } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Object obj); }
SimpleNumber implements Rollup { @Override public int hashCode() { return value.hashCode(); } SimpleNumber(Object value); @Override Boolean hasData(); Number getValue(); Type getDataType(); String toString(); @Override RollupType getRollupType(); @Override int hashCode(); @Override boolean equals(Object obj); }
@Test public void equalsWithNullReturnsFalse() { SimpleNumber sn = new SimpleNumber(123.45d); assertFalse(sn.equals(null)); }
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
@Test public void equalsWithOtherTypeReturnsFalse() { SimpleNumber sn = new SimpleNumber(123.45d); assertFalse(sn.equals(Double.valueOf(123.45d))); }
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
@Test public void equalsWithSimpleNumberOfOtherTypeReturnsFalse() { SimpleNumber sn = new SimpleNumber(123); SimpleNumber other = new SimpleNumber(123L); assertFalse(sn.equals(other)); }
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
@Test public void getActiveGetsActiveFlag() { assertEquals(true, service.getActive()); }
public synchronized boolean getActive() { return active; }
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getActive() { return active; } }
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getActive() { return active; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPoolExecutor ...
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getActive() { return active; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPoolExecutor ...
RollupService implements Runnable, RollupServiceMBean { public synchronized boolean getActive() { return active; } RollupService(ScheduleContext context); @VisibleForTesting RollupService(ScheduleContext context, ShardStateManager shardStateManager, ThreadPoolExecutor ...
@Test public void equalsWithSimpleNumberOfSameTypeReturnsTrue() { SimpleNumber sn = new SimpleNumber(123); SimpleNumber other = new SimpleNumber(123); assertTrue(sn.equals(other)); }
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
@Test public void equalsWithSimpleNumberOfSameBoxedValueReturnsTrue() { Integer value = 123; SimpleNumber sn = new SimpleNumber(value); SimpleNumber other = new SimpleNumber(value); assertTrue(sn.equals(other)); }
@Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); }
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
SimpleNumber implements Rollup { @Override public boolean equals(Object obj) { if (obj == null || !(obj instanceof SimpleNumber)) return false; SimpleNumber other = (SimpleNumber)obj; return other.value == this.value || other.value.equals(this.value); } SimpleNumber(Object value); @Override Boolean hasData(); Number ge...
@Test public void testRollupVariance() throws IOException { int size = TestData.DOUBLE_SRC.length; int GROUPS = 4; int windowSize = size/GROUPS; double[][] input = new double[GROUPS][windowSize]; int count = 0; int i = 0; int j = 0; for (double val : TestData.DOUBLE_SRC) { input[i][j] = val; j++; count++; if (count % w...
@Override public double toDouble() { if (needsCompute) compute(); return super.toDouble(); }
Variance extends AbstractRollupStat { @Override public double toDouble() { if (needsCompute) compute(); return super.toDouble(); } }
Variance extends AbstractRollupStat { @Override public double toDouble() { if (needsCompute) compute(); return super.toDouble(); } Variance(); @SuppressWarnings("unused") // used by Jackson Variance(double value); }
Variance extends AbstractRollupStat { @Override public double toDouble() { if (needsCompute) compute(); return super.toDouble(); } Variance(); @SuppressWarnings("unused") // used by Jackson Variance(double value); @Override boolean equals(Object otherObject); @Override boolean isFloatingPoint(); String toString(); @Ov...
Variance extends AbstractRollupStat { @Override public double toDouble() { if (needsCompute) compute(); return super.toDouble(); } Variance(); @SuppressWarnings("unused") // used by Jackson Variance(double value); @Override boolean equals(Object otherObject); @Override boolean isFloatingPoint(); String toString(); @Ov...
@Test public void testCountPerSecondCalculation() { Assert.assertEquals(7.5d, BluefloodTimerRollup.calculatePerSecond(150, 5d, 300, 10d)); }
public static double calculatePerSecond(long countA, double countPerSecA, long countB, double countPerSecB) { double totalCount = countA + countB; double totalTime = ((double)countA / countPerSecA) + ((double)countB / countPerSecB); return totalCount / totalTime; }
BluefloodTimerRollup implements Rollup, IBaseRollup { public static double calculatePerSecond(long countA, double countPerSecA, long countB, double countPerSecB) { double totalCount = countA + countB; double totalTime = ((double)countA / countPerSecA) + ((double)countB / countPerSecB); return totalCount / totalTime; } ...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static double calculatePerSecond(long countA, double countPerSecA, long countB, double countPerSecB) { double totalCount = countA + countB; double totalTime = ((double)countA / countPerSecA) + ((double)countB / countPerSecB); return totalCount / totalTime; } ...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static double calculatePerSecond(long countA, double countPerSecA, long countB, double countPerSecB) { double totalCount = countA + countB; double totalTime = ((double)countA / countPerSecA) + ((double)countB / countPerSecB); return totalCount / totalTime; } ...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static double calculatePerSecond(long countA, double countPerSecA, long countB, double countPerSecB) { double totalCount = countA + countB; double totalTime = ((double)countA / countPerSecA) + ((double)countB / countPerSecB); return totalCount / totalTime; } ...
@Test public void testNullVersusZero() throws IOException { final BluefloodTimerRollup timerWithData = new BluefloodTimerRollup() .withSampleCount(1); final BluefloodTimerRollup timerWithoutData = new BluefloodTimerRollup() .withSampleCount(0); Assert.assertNotSame(timerWithData, timerWithoutData); }
public BluefloodTimerRollup withSampleCount(int sampleCount) { this.sampleCount = sampleCount; return this; }
BluefloodTimerRollup implements Rollup, IBaseRollup { public BluefloodTimerRollup withSampleCount(int sampleCount) { this.sampleCount = sampleCount; return this; } }
BluefloodTimerRollup implements Rollup, IBaseRollup { public BluefloodTimerRollup withSampleCount(int sampleCount) { this.sampleCount = sampleCount; return this; } BluefloodTimerRollup(); }
BluefloodTimerRollup implements Rollup, IBaseRollup { public BluefloodTimerRollup withSampleCount(int sampleCount) { this.sampleCount = sampleCount; return this; } BluefloodTimerRollup(); BluefloodTimerRollup withSum(double sum); BluefloodTimerRollup withCount(long count); BluefloodTimerRollup withCountPS(double count_...
BluefloodTimerRollup implements Rollup, IBaseRollup { public BluefloodTimerRollup withSampleCount(int sampleCount) { this.sampleCount = sampleCount; return this; } BluefloodTimerRollup(); BluefloodTimerRollup withSum(double sum); BluefloodTimerRollup withCount(long count); BluefloodTimerRollup withCountPS(double count_...
@Test public void testSum() { Assert.assertEquals(6L, BluefloodTimerRollup.sum(longs)); Assert.assertEquals(6.0d, BluefloodTimerRollup.sum(doubles)); Assert.assertEquals(6.0d, BluefloodTimerRollup.sum(mixed)); Assert.assertEquals(6.0d, BluefloodTimerRollup.sum(alsoMixed)); }
public static Number sum(Collection<Number> numbers) { long longSum = 0; double doubleSum = 0d; boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { useDouble = true; doubleSum += longSum; } doubleSum += number.doubleValue()...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number sum(Collection<Number> numbers) { long longSum = 0; double doubleSum = 0d; boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { useDouble = true; dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number sum(Collection<Number> numbers) { long longSum = 0; double doubleSum = 0d; boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { useDouble = true; dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number sum(Collection<Number> numbers) { long longSum = 0; double doubleSum = 0d; boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { useDouble = true; dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number sum(Collection<Number> numbers) { long longSum = 0; double doubleSum = 0d; boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { useDouble = true; dou...
@Test public void testAverage() { Assert.assertEquals(2L, BluefloodTimerRollup.avg(longs)); Assert.assertEquals(2.0d, BluefloodTimerRollup.avg(doubles)); Assert.assertEquals(2.0d, BluefloodTimerRollup.avg(mixed)); Assert.assertEquals(2.0d, BluefloodTimerRollup.avg(alsoMixed)); }
public static Number avg(Collection<Number> numbers) { Number sum = BluefloodTimerRollup.sum(numbers); if (sum instanceof Long || sum instanceof Integer) return (Long)sum / numbers.size(); else return (Double)sum / (double)numbers.size(); }
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number avg(Collection<Number> numbers) { Number sum = BluefloodTimerRollup.sum(numbers); if (sum instanceof Long || sum instanceof Integer) return (Long)sum / numbers.size(); else return (Double)sum / (double)numbers.size(); } }
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number avg(Collection<Number> numbers) { Number sum = BluefloodTimerRollup.sum(numbers); if (sum instanceof Long || sum instanceof Integer) return (Long)sum / numbers.size(); else return (Double)sum / (double)numbers.size(); } BluefloodTimerRollup(); }
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number avg(Collection<Number> numbers) { Number sum = BluefloodTimerRollup.sum(numbers); if (sum instanceof Long || sum instanceof Integer) return (Long)sum / numbers.size(); else return (Double)sum / (double)numbers.size(); } BluefloodTimerRollup(); B...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number avg(Collection<Number> numbers) { Number sum = BluefloodTimerRollup.sum(numbers); if (sum instanceof Long || sum instanceof Integer) return (Long)sum / numbers.size(); else return (Double)sum / (double)numbers.size(); } BluefloodTimerRollup(); B...
@Test public void testMax() { Assert.assertEquals(3L, BluefloodTimerRollup.max(longs)); Assert.assertEquals(3.0d, BluefloodTimerRollup.max(doubles)); Assert.assertEquals(3.0d, BluefloodTimerRollup.max(mixed)); Assert.assertEquals(3.0d, BluefloodTimerRollup.max(alsoMixed)); }
public static Number max(Collection<Number> numbers) { long longMax = numbers.iterator().next().longValue(); double doubleMax = numbers.iterator().next().doubleValue(); boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Double || number instanceof Float) { if (!useDouble) { us...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number max(Collection<Number> numbers) { long longMax = numbers.iterator().next().longValue(); double doubleMax = numbers.iterator().next().doubleValue(); boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number max(Collection<Number> numbers) { long longMax = numbers.iterator().next().longValue(); double doubleMax = numbers.iterator().next().doubleValue(); boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number max(Collection<Number> numbers) { long longMax = numbers.iterator().next().longValue(); double doubleMax = numbers.iterator().next().doubleValue(); boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Dou...
BluefloodTimerRollup implements Rollup, IBaseRollup { public static Number max(Collection<Number> numbers) { long longMax = numbers.iterator().next().longValue(); double doubleMax = numbers.iterator().next().doubleValue(); boolean useDouble = false; for (Number number : numbers) { if (useDouble || number instanceof Dou...
@Test public void testLongAverage() { Average avg = new Average(); avg.add(2L); avg.add(4L); avg.add(4L); Assert.assertEquals(3L, avg.toLong()); }
public void add(Long input) { count++; final long longAvgUntilNow = toLong(); setLongValue(toLong() + ((input + longRemainder - longAvgUntilNow) / count)); longRemainder = (input + longRemainder - longAvgUntilNow) % count; }
Average extends AbstractRollupStat { public void add(Long input) { count++; final long longAvgUntilNow = toLong(); setLongValue(toLong() + ((input + longRemainder - longAvgUntilNow) / count)); longRemainder = (input + longRemainder - longAvgUntilNow) % count; } }
Average extends AbstractRollupStat { public void add(Long input) { count++; final long longAvgUntilNow = toLong(); setLongValue(toLong() + ((input + longRemainder - longAvgUntilNow) / count)); longRemainder = (input + longRemainder - longAvgUntilNow) % count; } Average(); @SuppressWarnings("unused") // used by Jackson ...
Average extends AbstractRollupStat { public void add(Long input) { count++; final long longAvgUntilNow = toLong(); setLongValue(toLong() + ((input + longRemainder - longAvgUntilNow) / count)); longRemainder = (input + longRemainder - longAvgUntilNow) % count; } Average(); @SuppressWarnings("unused") // used by Jackson ...
Average extends AbstractRollupStat { public void add(Long input) { count++; final long longAvgUntilNow = toLong(); setLongValue(toLong() + ((input + longRemainder - longAvgUntilNow) / count)); longRemainder = (input + longRemainder - longAvgUntilNow) % count; } Average(); @SuppressWarnings("unused") // used by Jackson ...