Package org.jobrunr.storage.sql.common
Class BackgroundJobServerTable
- java.lang.Object
-
- org.jobrunr.storage.sql.common.db.Sql<BackgroundJobServerStatus>
-
- org.jobrunr.storage.sql.common.BackgroundJobServerTable
-
public class BackgroundJobServerTable extends Sql<BackgroundJobServerStatus>
-
-
Constructor Summary
Constructors Constructor Description BackgroundJobServerTable(java.sql.Connection connection, Dialect dialect, java.lang.String tablePrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
announce(BackgroundJobServerStatus serverStatus)
java.util.List<BackgroundJobServerStatus>
getAll()
java.util.UUID
getLongestRunningBackgroundJobServerId()
int
removeAllWithLastHeartbeatOlderThan(java.time.Instant heartbeatOlderThan)
boolean
signalServerAlive(BackgroundJobServerStatus serverStatus)
void
signalServerStopped(BackgroundJobServerStatus serverStatus)
-
Methods inherited from class org.jobrunr.storage.sql.common.db.Sql
delete, execute, forType, insert, insert, insertAll, select, selectCount, selectExists, update, update, updateAll, using, with, with, with, withOrderLimitAndOffset, withVersion
-
-
-
-
Constructor Detail
-
BackgroundJobServerTable
public BackgroundJobServerTable(java.sql.Connection connection, Dialect dialect, java.lang.String tablePrefix)
-
-
Method Detail
-
announce
public void announce(BackgroundJobServerStatus serverStatus) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
signalServerAlive
public boolean signalServerAlive(BackgroundJobServerStatus serverStatus) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
signalServerStopped
public void signalServerStopped(BackgroundJobServerStatus serverStatus)
-
removeAllWithLastHeartbeatOlderThan
public int removeAllWithLastHeartbeatOlderThan(java.time.Instant heartbeatOlderThan) throws java.sql.SQLException
- Throws:
java.sql.SQLException
-
getAll
public java.util.List<BackgroundJobServerStatus> getAll()
-
getLongestRunningBackgroundJobServerId
public java.util.UUID getLongestRunningBackgroundJobServerId()
-
-