public class AtomFeeder
extends java.lang.Object
Feeds atoms to RAM based AtomQueue
Constructor and Description |
---|
AtomFeeder()
Create an Atom Feeder with a default batch size of 10000 atoms
|
Modifier and Type | Method and Description |
---|---|
void |
feedQueue(JDCConnection oConn,
AtomQueue oQueue)
Feed RAM queue with pending Atoms from k_job_atoms table
|
int |
getMaxBatchSize() |
DBSubset |
loadAtoms(JDCConnection oConn,
int iWorkerThreads)
Load an Atom batch into k_job_atoms table
Atoms will be taken by looking up pending Jobs by its execution date and extracting Atoms
for nearest Jobs in time.
|
DBSubset |
loadAtoms(JDCConnection oConn,
java.lang.String sJobId)
Load Atoms with PENDING status for a given Job into k_job_atoms table
On each loadAtoms() no more than iWorkerThreads Jobs will be loaded at a time.
|
DBSubset |
loadAtoms(JDCConnection oConn,
java.lang.String sJobId,
short iInitialStatus)
Load Atoms for a given Job into k_job_atoms table
On each loadAtoms() no more than iWorkerThreads Jobs will be loaded at a time.
|
void |
setMaxBatchSize(int iMaxBatch) |
public AtomFeeder()
public void setMaxBatchSize(int iMaxBatch)
public int getMaxBatchSize()
public DBSubset loadAtoms(JDCConnection oConn, int iWorkerThreads) throws java.sql.SQLException
Load an Atom batch into k_job_atoms table
Atoms will be taken by looking up pending Jobs by its execution date and extracting Atoms
for nearest Jobs in time.
On each loadAtoms() no more than iWorkerThreads Jobs will be loaded at a time.
oConn
- Database ConnectioniWorkerThreads
- Number of worker thread. This parameter will limit the number of loaded Jobs
as the program will try to use a one to one ratio between Jobs and WorkerThreads.java.sql.SQLException
public DBSubset loadAtoms(JDCConnection oConn, java.lang.String sJobId, short iInitialStatus) throws java.sql.SQLException
Load Atoms for a given Job into k_job_atoms table
On each loadAtoms() no more than iWorkerThreads Jobs will be loaded at a time.oConn
- Database ConnectionsJodId
- GUID of Job for witch atoms are to be loaded.iInitialStatus
- Initial status for new Atomsjava.sql.SQLException
public DBSubset loadAtoms(JDCConnection oConn, java.lang.String sJobId) throws java.sql.SQLException
Load Atoms with PENDING status for a given Job into k_job_atoms table
On each loadAtoms() no more than iWorkerThreads Jobs will be loaded at a time.oConn
- Database ConnectionsJodId
- GUID of Job for witch atoms are to be loaded.java.sql.SQLException
public void feedQueue(JDCConnection oConn, AtomQueue oQueue) throws java.sql.SQLException
Feed RAM queue with pending Atoms from k_job_atoms table
oConn
- Database ConnectionoQueue
- AtomQueuejava.sql.SQLException