public class GcGrouperSyncJob extends Object implements GcSqlAssignPrimaryKey, GcDbVersionable
Constructor and Description |
---|
GcGrouperSyncJob() |
Modifier and Type | Method and Description |
---|---|
boolean |
assignHeartbeatAndCheckForPendingJobs(boolean isLargeJob)
assign heartbeat and see if other jobs are pending or running
|
void |
assignHeartbeatAndEndJob()
assign heartbeat and end job
|
GcGrouperSyncJob |
clone()
deep clone the fields in this object
|
void |
dbVersionDelete()
db version
|
boolean |
dbVersionDifferent()
if we need to update this object
|
void |
dbVersionReset()
take a snapshot of the data since this is what is in the db
|
boolean |
equalsDeep(Object obj) |
boolean |
gcSqlAssignNewPrimaryKeyForInsert()
assign a new primary key for insert.
|
String |
getConnectionName()
connection name or null for default
|
String |
getErrorMessage()
if the last sync had an error, this is the error message
|
Timestamp |
getErrorTimestamp()
this the last sync had an error, this was the error timestamp
|
GcGrouperSync |
getGrouperSync() |
String |
getGrouperSyncId()
uuid of the job in grouper_sync
|
Timestamp |
getHeartbeat()
heartbeat updated every minute
|
String |
getId()
uuid of this record in this table
|
GcGrouperSyncJobState |
getJobState() |
String |
getJobStateDb()
running, waitingForAnotherJobToFinish (if waiting for another job to finish), notRunning
|
Long |
getLastSyncIndex()
int of last record checked
|
Timestamp |
getLastSyncStart()
when last sync started
|
Timestamp |
getLastSyncTimestamp()
when last record processed if timestamp and not integer
|
Timestamp |
getLastTimeWorkWasDone()
last time a record was processed
|
Timestamp |
getLastUpdated()
when this record was last updated
|
Integer |
getPercentComplete()
0-100 percent complete of the job
|
String |
getQuartzJobName()
quartz job name if applicable
|
String |
getSyncType()
type of sync, e.g.
|
boolean |
isHeartBeatAlive()
if heartbeat is alive and well
|
static void |
main(String[] args) |
static void |
reset()
delete all data if table is here
|
void |
setConnectionName(String connectionName1)
connection name or null for default
|
void |
setErrorMessage(String errorMessage1)
if the last sync had an error, this is the error message
|
void |
setErrorTimestamp(Timestamp errorTimestamp1)
this the last sync had an error, this was the error timestamp
|
void |
setGrouperSync(GcGrouperSync gcGrouperSync) |
void |
setGrouperSyncId(String grouperSyncId1)
uuid of the job in grouper_sync
|
void |
setHeartbeat(Timestamp heartbeat1)
heatbeat updated every minute
|
void |
setId(String id1)
uuid of this record in this table
|
void |
setJobState(GcGrouperSyncJobState gcGrouperSyncJobState) |
void |
setJobStateDb(String jobState1)
running, waitingForAnotherJobToFinish (if waiting for another job to finish), notRunning
|
void |
setLastSyncIndex(Long lastSyncIndexOrMillis1)
int of last record checked
|
void |
setLastSyncStart(Timestamp lastSyncStart)
when last sync started
|
void |
setLastSyncTimestamp(Timestamp lastSyncTimestamp1)
when last record processed if timestamp and not integer
|
void |
setLastTimeWorkWasDone(Timestamp lastTimeWorkWasDone1)
last time a record was processed
|
void |
setLastUpdated(Timestamp lastUpdated1)
when this record was last updated
|
void |
setPercentComplete(Integer percentComplete1)
0-100 percent complete of the job
|
void |
setQuartzJobName(String quartzJobName1)
quartz job name if applicable
|
void |
setSyncType(String syncType)
type of sync, e.g.
|
void |
storePrepare()
run this before storing
|
String |
toString() |
void |
waitForRelatedJobsToFinishThenRun(boolean goToPendingFirstAkaLargeJob)
wait for related jobs to finish running, then run.
|
public void dbVersionReset()
dbVersionReset
in interface GcDbVersionable
public boolean dbVersionDifferent()
dbVersionDifferent
in interface GcDbVersionable
public void dbVersionDelete()
dbVersionDelete
in interface GcDbVersionable
public GcGrouperSyncJob clone()
public boolean equalsDeep(Object obj)
public boolean isHeartBeatAlive()
public Integer getPercentComplete()
public void setPercentComplete(Integer percentComplete1)
percentComplete1
- public String getQuartzJobName()
public void setQuartzJobName(String quartzJobName1)
quartzJobName1
- public static void reset()
public void storePrepare()
public String getErrorMessage()
public void setErrorMessage(String errorMessage1)
errorMessage1
- public Timestamp getErrorTimestamp()
public void setErrorTimestamp(Timestamp errorTimestamp1)
errorTimestamp1
- public GcGrouperSync getGrouperSync()
public void setGrouperSync(GcGrouperSync gcGrouperSync)
gcGrouperSync
- public String getConnectionName()
public void setConnectionName(String connectionName1)
connectionName1
- public static void main(String[] args)
args
- public Timestamp getHeartbeat()
public void setHeartbeat(Timestamp heartbeat1)
heartbeat1
- public String getId()
public void setId(String id1)
id1
- the id to setpublic String getSyncType()
public void setSyncType(String syncType)
syncType
- public String getGrouperSyncId()
public void setGrouperSyncId(String grouperSyncId1)
grouperSyncId1
- public String getJobStateDb()
public GcGrouperSyncJobState getJobState()
public void setJobState(GcGrouperSyncJobState gcGrouperSyncJobState)
gcGrouperSyncJobState
- public void setJobStateDb(String jobState1)
jobState1
- the jobState to setpublic Timestamp getLastSyncStart()
public void setLastSyncStart(Timestamp lastSyncStart)
lastSyncStart
- public Timestamp getLastSyncTimestamp()
public void setLastSyncTimestamp(Timestamp lastSyncTimestamp1)
lastSyncTimestamp1
- public Long getLastSyncIndex()
public void setLastSyncIndex(Long lastSyncIndexOrMillis1)
lastSyncIndexOrMillis1
- the lastSyncIndexOrMillis to setpublic Timestamp getLastTimeWorkWasDone()
public void setLastTimeWorkWasDone(Timestamp lastTimeWorkWasDone1)
lastTimeWorkWasDone1
- the lastTimeWorkWasDone to setpublic Timestamp getLastUpdated()
public void setLastUpdated(Timestamp lastUpdated1)
lastUpdated1
- the lastUpdated to setpublic boolean gcSqlAssignNewPrimaryKeyForInsert()
GcSqlAssignPrimaryKey
gcSqlAssignNewPrimaryKeyForInsert
in interface GcSqlAssignPrimaryKey
public boolean assignHeartbeatAndCheckForPendingJobs(boolean isLargeJob)
provisionerName
- isLargeJob
- is if this is a big job and has precendencepublic void assignHeartbeatAndEndJob()
public void waitForRelatedJobsToFinishThenRun(boolean goToPendingFirstAkaLargeJob)
provisionerName
- goToPendingFirstAkaLargeJob
- is if this is a big job and needs to register as pending first so
it knows it should run now. false if quick job and doesnt matterCopyright © 2016 Internet2. All rights reserved.