*/
public void save(SFSBBeanState[] beanStates, long startTime) throws IOException {
long eachStartTime = startTime;
long eachEndTime = 0L;
for(int i=0; i<beanStates.length; i++) {
SFSBBeanState sfsBean = beanStates[i];
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE,
"ReplicatedEjbStore aggregate save bean[" + i + "]=" + sfsBean);
}
BackingStore replicator = this.getBackingStoreForBean(sfsBean);
if(replicator == null) {
//this should not happen
if(_logger.isLoggable(Level.FINE)) {
_logger.log(Level.FINE,
"ReplicatedEjbStore aggregate save bean[" + i + "]=" + "unable to find replicator");
}
return;
}
save(sfsBean, replicator);
if(this.isMonitoringEnabled()) {
//increment storage duration for each bean
eachEndTime = System.currentTimeMillis();
long storeDuration = eachEndTime - eachStartTime;
sfsBean.setTxCheckpointDuration(sfsBean.getTxCheckpointDuration() + storeDuration);
eachStartTime = eachEndTime;
}
}
}