public SpaceLimitingException(String msg) { super(parseMessage(msg)); // Hack around ResponseConverter expecting to invoke a single-arg String constructor // on this class if (msg != null) { for (SpaceViolationPolicy definedPolicy : SpaceViolationPolicy.values()) { if (msg.indexOf(definedPolicy.name()) != -1) { policyName = definedPolicy.name(); return; } } } policyName = null; }
} catch (Exception e) { String msg = StringUtils.stringifyException(e); if (policyToViolate.equals(SpaceViolationPolicy.DISABLE)) { assertTrue(e instanceof TableNotEnabledException); } else { assertTrue("Expected exception message to contain the word '" + policyToViolate.name() + "', but was " + msg, msg.contains(policyToViolate.name()));
@Override public String getPolicyName() { return SpaceViolationPolicy.NO_WRITES_COMPACTIONS.name(); }
@Override public int hashCode() { return new HashCodeBuilder().append(policy == null ? 0 : policy.hashCode()) .append(inViolation).toHashCode(); }
} catch (Exception e) { String msg = StringUtils.stringifyException(e); if (policyToViolate.equals(SpaceViolationPolicy.DISABLE)) { assertTrue(e instanceof TableNotEnabledException); } else { assertTrue("Expected exception message to contain the word '" + policyToViolate.name() + "', but was " + msg, msg.contains(policyToViolate.name()));
@Override public String getPolicyName() { return SpaceViolationPolicy.NO_WRITES.name(); } }
@Override public int hashCode() { return new HashCodeBuilder().append(policy == null ? 0 : policy.hashCode()) .append(inViolation).toHashCode(); }
@Override public String getPolicyName() { return SpaceViolationPolicy.DISABLE.name(); } }
@Override public String getPolicyName() { return SpaceViolationPolicy.NO_INSERTS.name(); } }