Package com.coyotegulch.jisp
Class DuplicateKey
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.coyotegulch.jisp.DatabaseException
com.coyotegulch.jisp.DuplicateKey
- All Implemented Interfaces:
Serializable
A
ObjectIndex
throws a DuplicateKey
when a key being added to the
index is identical to a key already stored there. Each concrete index class
determines the circumstances under which this exception is thrown. For example,
a BTreeIndex
will throw DuplicateKey
when a call to the insertKey
method finds an existing key that
matches the insertion key; however, the BTreeIndex.writeKey
method
does not throw an exception for a duplicate key, instead replacing the record
position associated with the extant key.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newDuplicateKey
with null as its error message string.DuplicateKey
(String message) Constructs a newDuplicateKey
withmessage
as its error message string. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DuplicateKey
public DuplicateKey()Constructs a newDuplicateKey
with null as its error message string. -
DuplicateKey
Constructs a newDuplicateKey
withmessage
as its error message string.- Parameters:
message
- Error message string.
-