Package org.agrona.agent
Class BufferAlignmentException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.agrona.agent.BufferAlignmentException
-
- All Implemented Interfaces:
java.io.Serializable
public class BufferAlignmentException extends java.lang.RuntimeException
Runtime Exception thrown byBufferAlignmentAgent
when an unaligned memory access is detected.Package-protected to discourage catching since this as agent should be used only for testing and debugging.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private long
addressOffset
private int
index
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description BufferAlignmentException(java.lang.String prefix, int index, long addressOffset)
Create exception with details about the unaligned access.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
addressOffset()
Returns an address offset into the start of the underlying buffer.int
index()
Returns an index at which unaligned access occurred.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
index
private final int index
-
addressOffset
private final long addressOffset
-
-
Constructor Detail
-
BufferAlignmentException
public BufferAlignmentException(java.lang.String prefix, int index, long addressOffset)
Create exception with details about the unaligned access.- Parameters:
prefix
- for the error message.index
- at which the unaligned access occurred.addressOffset
- pointing to the beginning of the underlying buffer.
-
-