org.jumpmind.symmetric.service.impl
Class OutgoingBatchService

java.lang.Object
  extended by org.jumpmind.symmetric.service.impl.OutgoingBatchService
All Implemented Interfaces:
IOutgoingBatchService

public class OutgoingBatchService
extends java.lang.Object
implements IOutgoingBatchService


Field Summary
protected  org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
           
protected  IParameterService parameterService
           
 
Constructor Summary
OutgoingBatchService()
           
 
Method Summary
 void buildOutgoingBatches(java.lang.String nodeId, java.util.List<NodeChannel> channels)
          Deprecated. 
 void buildOutgoingBatches(java.lang.String nodeId, NodeChannel channel)
           
 java.util.List<OutgoingBatchHistory> findOutgoingBatchHistory(long batchId, java.lang.String nodeId)
           
 java.util.List<OutgoingBatch> getOutgoingBatcheErrors(int maxRows)
           
 java.util.List<OutgoingBatch> getOutgoingBatches(java.lang.String nodeId)
          Select batches to process.
 java.util.List<OutgoingBatch> getOutgoingBatchRange(java.lang.String startBatchId, java.lang.String endBatchId)
           
protected  org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()
           
 java.lang.String getSql(java.lang.String key)
           
 void insertOutgoingBatch(OutgoingBatch outgoingBatch)
           
 void insertOutgoingBatchHistory(OutgoingBatchHistory history)
           
 boolean isInitialLoadComplete(java.lang.String nodeId)
           
 void markOutgoingBatchSent(OutgoingBatch batch)
          Deprecated. 
 void setBatchStatus(long batchId, OutgoingBatch.Status status)
          Deprecated. 
 void setConfigurationService(IConfigurationService configurationService)
           
 void setDbDialect(IDbDialect dbDialect)
           
 void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)
           
 void setNodeService(INodeService nodeService)
           
 void setParameterService(IParameterService parameterService)
           
 void setSql(java.util.Map<java.lang.String,java.lang.String> sql)
           
 void setStatisticManager(IStatisticManager statisticManager)
           
protected  java.sql.SQLException unwrapSqlException(java.lang.Throwable e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameterService

protected IParameterService parameterService

jdbcTemplate

protected org.springframework.jdbc.core.JdbcTemplate jdbcTemplate
Constructor Detail

OutgoingBatchService

public OutgoingBatchService()
Method Detail

buildOutgoingBatches

@Transactional
@Deprecated
public void buildOutgoingBatches(java.lang.String nodeId,
                                                          java.util.List<NodeChannel> channels)
Deprecated. 

Create a batch and mark events as tied to that batch. We iterate through all the events so we can find a transaction boundary to stop on.

This method is currently non-transactional because of the fear of having to deal with large numbers of events as part of the same batch. This shouldn't be an issue in most cases other than possibly leaving a batch row w/out data every now and then or leaving a batch w/out the associated history row.

Specified by:
buildOutgoingBatches in interface IOutgoingBatchService

buildOutgoingBatches

@Transactional
public void buildOutgoingBatches(java.lang.String nodeId,
                                               NodeChannel channel)
Specified by:
buildOutgoingBatches in interface IOutgoingBatchService

insertOutgoingBatch

public void insertOutgoingBatch(OutgoingBatch outgoingBatch)
Specified by:
insertOutgoingBatch in interface IOutgoingBatchService

getOutgoingBatches

public java.util.List<OutgoingBatch> getOutgoingBatches(java.lang.String nodeId)
Select batches to process. Batches that are NOT in error will be returned first. They will be ordered by batch id as the batches will have already been created by #buildOutgoingBatches(String) in channel priority order.

Specified by:
getOutgoingBatches in interface IOutgoingBatchService

getOutgoingBatchRange

public java.util.List<OutgoingBatch> getOutgoingBatchRange(java.lang.String startBatchId,
                                                           java.lang.String endBatchId)
Specified by:
getOutgoingBatchRange in interface IOutgoingBatchService

getOutgoingBatcheErrors

public java.util.List<OutgoingBatch> getOutgoingBatcheErrors(int maxRows)
Specified by:
getOutgoingBatcheErrors in interface IOutgoingBatchService

markOutgoingBatchSent

@Deprecated
public void markOutgoingBatchSent(OutgoingBatch batch)
Deprecated. 

Specified by:
markOutgoingBatchSent in interface IOutgoingBatchService

setBatchStatus

@Deprecated
public void setBatchStatus(long batchId,
                                      OutgoingBatch.Status status)
Deprecated. 

Specified by:
setBatchStatus in interface IOutgoingBatchService

isInitialLoadComplete

public boolean isInitialLoadComplete(java.lang.String nodeId)
Specified by:
isInitialLoadComplete in interface IOutgoingBatchService

insertOutgoingBatchHistory

public void insertOutgoingBatchHistory(OutgoingBatchHistory history)
Specified by:
insertOutgoingBatchHistory in interface IOutgoingBatchService

findOutgoingBatchHistory

public java.util.List<OutgoingBatchHistory> findOutgoingBatchHistory(long batchId,
                                                                     java.lang.String nodeId)
Specified by:
findOutgoingBatchHistory in interface IOutgoingBatchService

setDbDialect

public void setDbDialect(IDbDialect dbDialect)

setNodeService

public void setNodeService(INodeService nodeService)

setStatisticManager

public void setStatisticManager(IStatisticManager statisticManager)

setConfigurationService

public void setConfigurationService(IConfigurationService configurationService)

setJdbcTemplate

public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbc)

getSimpleTemplate

protected org.springframework.jdbc.core.simple.SimpleJdbcTemplate getSimpleTemplate()

unwrapSqlException

protected java.sql.SQLException unwrapSqlException(java.lang.Throwable e)

setSql

public void setSql(java.util.Map<java.lang.String,java.lang.String> sql)

getSql

public java.lang.String getSql(java.lang.String key)

setParameterService

public void setParameterService(IParameterService parameterService)


Copyright © 2007-2008. All Rights Reserved.