Class NoDeleteConstraint
- java.lang.Object
-
- org.apache.accumulo.core.data.constraints.NoDeleteConstraint
-
- All Implemented Interfaces:
Constraint
public class NoDeleteConstraint extends Object implements Constraint
This constraint ensures mutations do not have deletes.- Since:
- 2.1.0 moved from org.apache.accumulo.core.constraints package
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.data.constraints.Constraint
Constraint.Environment
-
-
Constructor Summary
Constructors Constructor Description NoDeleteConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Short>
check(Constraint.Environment env, Mutation mutation)
Checks a mutation for constraint violations.String
getViolationDescription(short violationCode)
Gets a short, one-sentence description of what a given violation code means.
-
-
-
Method Detail
-
getViolationDescription
public String getViolationDescription(short violationCode)
Description copied from interface:Constraint
Gets a short, one-sentence description of what a given violation code means.- Specified by:
getViolationDescription
in interfaceConstraint
- Parameters:
violationCode
- numeric violation code- Returns:
- matching violation description
-
check
public List<Short> check(Constraint.Environment env, Mutation mutation)
Description copied from interface:Constraint
Checks a mutation for constraint violations. If the mutation contains no violations, returns null. Otherwise, returns a list of violation codes. Violation codes must be non-negative. Negative violation codes are reserved for system use.- Specified by:
check
in interfaceConstraint
- Parameters:
env
- constraint environmentmutation
- mutation to check- Returns:
- list of violation codes, or null if none
-
-