public abstract class BatchPersister<T> extends Object implements Runnable, org.lsst.ccs.framework.ClearAlertHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.lsst.ccs.AlertService |
alertService |
| Constructor and Description |
|---|
BatchPersister(int nMax,
boolean flushAtCommit)
Constructor for a batch persister.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToQueue(T obj) |
org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode |
canClearAlert(org.lsst.ccs.bus.data.Alert alert) |
abstract void |
persist(T obj,
org.hibernate.Session sess)
Called from inside an open transaction.
|
void |
run() |
@LookupField(strategy=TREE) protected org.lsst.ccs.AlertService alertService
public BatchPersister(int nMax,
boolean flushAtCommit)
nMax - The maximum number of entities to persist in a single
transaction.flushAtCommit - true if the session that process the batch should be
set to FlushMode.COMMITpublic org.lsst.ccs.framework.ClearAlertHandler.ClearAlertCode canClearAlert(org.lsst.ccs.bus.data.Alert alert)
canClearAlert in interface org.lsst.ccs.framework.ClearAlertHandlerpublic void addToQueue(T obj)
public abstract void persist(T obj, org.hibernate.Session sess)
obj - sess - Copyright © 2018 LSST. All rights reserved.