Class GraphLimitExceededException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.graph.exception.GraphException
cloud.opencode.base.graph.exception.GraphLimitExceededException
- All Implemented Interfaces:
Serializable
Graph Limit Exceeded Exception
图限制超出异常
Exception thrown when graph operation exceeds configured limits.
当图操作超出配置限制时抛出的异常。
Features | 主要功能:
- Carries configured limit and actual value - 携带配置限制和实际值
- Extends
GraphExceptionwithGraphErrorCode.LIMIT_EXCEEDED- 使用LIMIT_EXCEEDED错误码扩展GraphException
Usage Examples | 使用示例:
try {
SafeGraphOperations.safeAddVertex(graph, vertex);
} catch (GraphLimitExceededException e) {
long limit = e.getLimit();
long actual = e.getActual();
}
Security | 安全性:
- Thread-safe: Yes (immutable after construction) - 线程安全: 是(构造后不可变)
- Null-safe: Yes - 空值安全: 是
- Since:
- JDK 25, opencode-base-graph V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGraphLimitExceededException(String message) Create graph limit exceeded exception 创建图限制超出异常GraphLimitExceededException(String message, long limit, long actual) Create graph limit exceeded exception with details 使用详情创建图限制超出异常 -
Method Summary
Methods inherited from class GraphException
getErrorCodeMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GraphLimitExceededException
Create graph limit exceeded exception 创建图限制超出异常- Parameters:
message- the error message | 错误消息
-
GraphLimitExceededException
Create graph limit exceeded exception with details 使用详情创建图限制超出异常- Parameters:
message- the error message | 错误消息limit- the configured limit | 配置的限制actual- the actual value | 实际值
-
-
Method Details
-
getLimit
public long getLimit()Get the configured limit 获取配置的限制- Returns:
- the limit | 限制
-
getActual
public long getActual()Get the actual value 获取实际值- Returns:
- the actual value | 实际值
-