public interface CopycatError
Copycat errors are passed on the wire in lieu of exceptions to reduce the overhead of serialization. Each error is identifiable by an error ID which is used to serialize and deserialize errors.
| Modifier and Type | Interface and Description |
|---|---|
static class |
CopycatError.Type
Raft error types.
|
| Modifier and Type | Method and Description |
|---|---|
CopycatException |
createException()
Creates a new exception for the error.
|
static CopycatError |
forId(int id)
Returns the Raft error for the given identifier.
|
byte |
id()
Returns the unique error identifier.
|
static CopycatError forId(int id)
id - The Raft error identifier.IllegalArgumentException - If the given identifier is not a valid Raft error identifier.byte id()
CopycatException createException()
Copyright © 2013–2017. All rights reserved.