Package org.a2aproject.sdk.server.tasks
Class TaskPersistenceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.a2aproject.sdk.spec.A2AException
org.a2aproject.sdk.spec.A2AServerException
org.a2aproject.sdk.server.tasks.TaskStoreException
org.a2aproject.sdk.server.tasks.TaskPersistenceException
- All Implemented Interfaces:
Serializable
Exception for database/storage system failures during task persistence operations.
Indicates failures in the underlying storage system (database, filesystem, etc.) rather than data format issues.
Common Scenarios
- Database connection timeout or network partition
- Transaction deadlock or lock wait timeout
- Connection pool exhausted
- Disk full / storage quota exceeded
- Database constraint violations (unique key, foreign key)
- Insufficient permissions or authentication failures
- Database schema incompatibilities
Usage Example
try {
em.merge(jpaTask);
} catch (PersistenceException e) {
throw new TaskPersistenceException(taskId, "Database save failed", e);
}
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TaskPersistenceException with no message or cause.TaskPersistenceException(@Nullable String taskId, String msg) Creates a new TaskPersistenceException with the specified task ID and message.TaskPersistenceException(@Nullable String taskId, String msg, Throwable cause) Creates a new TaskPersistenceException with the specified task ID, message, and cause.Creates a new TaskPersistenceException with the specified message.TaskPersistenceException(String msg, Throwable cause) Creates a new TaskPersistenceException with the specified message and cause.Creates a new TaskPersistenceException with the specified cause. -
Method Summary
Methods inherited from class org.a2aproject.sdk.server.tasks.TaskStoreException
getTaskIdMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
TaskPersistenceException
public TaskPersistenceException()Creates a new TaskPersistenceException with no message or cause. -
TaskPersistenceException
Creates a new TaskPersistenceException with the specified message.- Parameters:
msg- the exception message
-
TaskPersistenceException
Creates a new TaskPersistenceException with the specified cause.- Parameters:
cause- the underlying cause
-
TaskPersistenceException
Creates a new TaskPersistenceException with the specified message and cause.- Parameters:
msg- the exception messagecause- the underlying cause
-
TaskPersistenceException
Creates a new TaskPersistenceException with the specified task ID and message.- Parameters:
taskId- the task identifier (may be null for operations not tied to a specific task)msg- the exception message
-
TaskPersistenceException
Creates a new TaskPersistenceException with the specified task ID, message, and cause.- Parameters:
taskId- the task identifier (may be null for operations not tied to a specific task)msg- the exception messagecause- the underlying cause
-