クラス SimpleTaskRepository

java.lang.ObjectSE
org.springframework.cloud.task.repository.support.SimpleTaskRepository
実装されたすべてのインターフェース:
TaskRepository

public class SimpleTaskRepository extends ObjectSE implements TaskRepository
タスク実行情報をログと提供された TaskExecutionDao に記録します。
作成者:
Glenn Renfro
  • フィールドの詳細

    • MAX_EXIT_MESSAGE_SIZE

      public static final int MAX_EXIT_MESSAGE_SIZE
      デフォルトの最大終了メッセージサイズ。
      関連事項:
    • MAX_TASK_NAME_SIZE

      public static final int MAX_TASK_NAME_SIZE
      タスク名のデフォルトの最大サイズ。
      関連事項:
    • MAX_ERROR_MESSAGE_SIZE

      public static final int MAX_ERROR_MESSAGE_SIZE
      デフォルトの最大エラーメッセージサイズ。
      関連事項:
  • コンストラクターの詳細

    • SimpleTaskRepository

      public SimpleTaskRepository(org.springframework.beans.factory.FactoryBean<TaskExecutionDao> taskExecutionDaoFactoryBean)
    • SimpleTaskRepository

      public SimpleTaskRepository(org.springframework.beans.factory.FactoryBean<TaskExecutionDao> taskExecutionDaoFactoryBean, IntegerSE maxExitMessageSize, IntegerSE maxTaskNameSize, IntegerSE maxErrorMessageSize)
  • メソッドの詳細

    • completeTaskExecution

      public TaskExecution completeTaskExecution(long executionId, IntegerSE exitCode, LocalDateTimeSE endTime, StringSE exitMessage)
      インターフェースからコピーされた説明: TaskRepository
      タスク実行が完了したことをリポジトリに通知します。
      次で指定:
      インターフェース TaskRepositorycompleteTaskExecution 
      パラメーター:
      executionId - タスク実行を更新します。
      exitCode - このタスク用に保存されます。
      endTime - タスクが完了したときに指定されます。
      exitMessage - タスク用に保存されます。
      戻り値:
      更新された TaskExecution
    • completeTaskExecution

      public TaskExecution completeTaskExecution(long executionId, IntegerSE exitCode, LocalDateTimeSE endTime, StringSE exitMessage, StringSE errorMessage)
      インターフェースからコピーされた説明: TaskRepository
      タスク実行が完了したことをリポジトリに通知します。
      次で指定:
      インターフェース TaskRepositorycompleteTaskExecution 
      パラメーター:
      executionId - タスク実行を更新します。
      exitCode - このタスク実行用に保存されます。
      endTime - タスクが完了したときに指定されます。
      exitMessage - タスク実行のために保存されます。
      errorMessage - タスク実行のために保存されます。
      戻り値:
      更新された TaskExecution
    • createTaskExecution

      public TaskExecution createTaskExecution(TaskExecution taskExecution)
      インターフェースからコピーされた説明: TaskRepository
      taskExecution を作成する必要があることをリポジトリに通知します。
      次で指定:
      インターフェース TaskRepositorycreateTaskExecution 
      パラメーター:
      taskExecution - リポジトリに保存される startTime、arguments、externalExecutionId を含む TaskExecution インスタンス。この TaskExecution には、上記に列挙された値のみが保存されます。
      戻り値:
      リポジトリに保存された TaskExecution。TaskExecution の taskExecutionId には、TaskExecution を保存するために使用された ID も含まれます。
    • createTaskExecution

      public TaskExecution createTaskExecution(StringSE name)
      インターフェースからコピーされた説明: TaskRepository
      ID と名前のみを指定して空の TaskExecution を作成します。これは、タスクの起動リクエストがタスクの実際の開始とは別であるシステム (基盤となるシステムで、起動前にタスクをデプロイする必要がある場合など) で使用することを目的としています。
      次で指定:
      インターフェース TaskRepositorycreateTaskExecution 
      パラメーター:
      name - タスク実行に関連付けるタスク名。
      戻り値:
      初期 TaskExecution
    • createTaskExecution

      public TaskExecution createTaskExecution()
      インターフェースからコピーされた説明: TaskRepository
      指定された ID のみを使用して空の TaskExecution を作成します。これは、タスクの起動リクエストがタスクの実際の開始とは別であるシステム (基盤となるシステムで、起動前にタスクをデプロイする必要がある場合など) で使用することを目的としています。
      次で指定:
      インターフェース TaskRepositorycreateTaskExecution 
      戻り値:
      初期 TaskExecution
    • startTaskExecution

      public TaskExecution startTaskExecution(long executionid, StringSE taskName, LocalDateTimeSE startTime, ListSE<StringSE> arguments, StringSE externalExecutionId)
      インターフェースからコピーされた説明: TaskRepository
      タスク実行が開始されたことをリポジトリに通知します。
      次で指定:
      インターフェース TaskRepositorystartTaskExecution 
      パラメーター:
      executionid - タスク実行を更新します。
      taskName - タスク実行に関連付けられた名前。
      startTime - 時間タスクが始まりました。
      arguments - タスクを構成するキー / 値のペアのリスト。
      externalExecutionId - プラットフォームによってタスクに割り当てられた ID。
      戻り値:
      パラメーターに基づいて作成された TaskExecution。
    • updateExternalExecutionId

      public void updateExternalExecutionId(long executionid, StringSE externalExecutionId)
      インターフェースからコピーされた説明: TaskRepository
      リポジトリにタスク実行の externalExecutionId を更新するように通知します。
      次で指定:
      インターフェース TaskRepositoryupdateExternalExecutionId 
      パラメーター:
      executionid - タスク実行を更新します。
      externalExecutionId - プラットフォームによってタスクに割り当てられた ID。
    • startTaskExecution

      public TaskExecution startTaskExecution(long executionid, StringSE taskName, LocalDateTimeSE startTime, ListSE<StringSE> arguments, StringSE externalExecutionId, LongSE parentExecutionId)
      インターフェースからコピーされた説明: TaskRepository
      タスク実行が開始されたことをリポジトリに通知します。
      次で指定:
      インターフェース TaskRepositorystartTaskExecution 
      パラメーター:
      executionid - タスク実行を更新します。
      taskName - タスク実行に関連付けられた名前。
      startTime - 時間タスクが始まりました。
      arguments - タスクを構成するキー / 値のペアのリスト。
      externalExecutionId - プラットフォームによってタスクに割り当てられた ID。
      parentExecutionId - 親タスク実行 ID。
      戻り値:
      TaskExecution の先頭で利用可能な情報を含む TaskExecution。
    • getTaskExecutionDao

      public TaskExecutionDao getTaskExecutionDao()
      このリポジトリに関連付けられている taskExecutionDao を取得します。
      戻り値:
      タスク実行 Dao
    • setMaxExitMessageSize

      public void setMaxExitMessageSize(int maxExitMessageSize)
    • setMaxTaskNameSize

      public void setMaxTaskNameSize(int maxTaskNameSize)
    • setMaxErrorMessageSize

      public void setMaxErrorMessageSize(int maxErrorMessageSize)