|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Constraint
Accumulo uses Constraint objects to determine if mutations will be applied to a table. This interface expects implementers to return violation codes. The reason codes are returned instead of arbitrary strings it to encourage conciseness. Conciseness is needed because violations are aggregated. If a user sends a batch of 10,000 mutations to accumulo, only aggregated counts about which violations occurred are returned. If the Constraint implementer was allowed to return arbitrary violation strings like the following : Value "abc" is not a number Value "vbg" is not a number Then this would not aggregate very well, because the same violation is represented with two different strings.
Nested Class Summary | |
---|---|
static interface |
Constraint.Environment
|
Method Summary | |
---|---|
List<Short> |
check(Constraint.Environment env,
Mutation mutation)
Checks a mutation for constrain violations. |
String |
getViolationDescription(short violationCode)
Implementers of this method should return a short one sentence description of what a given violation code means. |
Method Detail |
---|
String getViolationDescription(short violationCode)
List<Short> check(Constraint.Environment env, Mutation mutation)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |