/** * Creates a new instance. * * @param bufferCapacity * The size of the buffer to use. */ public EntityBuffer(int bufferCapacity) { buffer = new DataPostbox<EntityContainer>(bufferCapacity); }
/** * Creates a new instance. * * @param bufferCapacity * The size of the buffer to use. */ public ChangeBuffer(int bufferCapacity) { buffer = new DataPostbox<ChangeContainer>(bufferCapacity); }
/** * Creates a new instance. * * @param bufferCapacity * The size of the buffer to use. */ public ChangeBuffer(int bufferCapacity) { buffer = new DataPostbox<ChangeContainer>(bufferCapacity); }
/** * Creates a new instance. * * @param bufferCapacity * The size of the buffer to use. */ public EntityBuffer(int bufferCapacity) { buffer = new DataPostbox<EntityContainer>(bufferCapacity); }
/** * Creates a new instance. * * @param sourceCount * The number of sources to be appended. * @param inputBufferCapacity * The capacity of the buffer to use for each source, in objects. */ public ChangeAppender(int sourceCount, int inputBufferCapacity) { sources = new ArrayList<DataPostbox<ChangeContainer>>(sourceCount); for (int i = 0; i < sourceCount; i++) { sources.add(new DataPostbox<ChangeContainer>(inputBufferCapacity)); } }
/** * Creates a new instance. * * @param sourceCount * The number of sources to be appended. * @param inputBufferCapacity * The capacity of the buffer to use for each source, in objects. */ public ChangeAppender(int sourceCount, int inputBufferCapacity) { sources = new ArrayList<DataPostbox<ChangeContainer>>(sourceCount); for (int i = 0; i < sourceCount; i++) { sources.add(new DataPostbox<ChangeContainer>(inputBufferCapacity)); } }
/** * Creates a new instance. * * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeDeriver(int inputBufferCapacity) { fromPostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); fromSink = new DataPostboxSink(fromPostbox); toPostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); toSink = new DataPostboxSink(toPostbox); }
/** * Creates a new instance. * * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeDeriver(int inputBufferCapacity) { fromPostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); fromSink = new DataPostboxSink(fromPostbox); toPostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); toSink = new DataPostboxSink(toPostbox); }
/** * Creates a new instance. * * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeApplier(int inputBufferCapacity) { basePostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator = new SortedEntityPipeValidator(); sortedEntityValidator.setSink(new DataPostboxSink(basePostbox)); changePostbox = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator = new SortedDeltaChangePipeValidator(); sortedChangeValidator.setChangeSink(new DataPostboxChangeSink(changePostbox)); }
/** * Creates a new instance. * * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeApplier(int inputBufferCapacity) { basePostbox = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator = new SortedEntityPipeValidator(); sortedEntityValidator.setSink(new DataPostboxSink(basePostbox)); changePostbox = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator = new SortedDeltaChangePipeValidator(); sortedChangeValidator.setChangeSink(new DataPostboxChangeSink(changePostbox)); }
/** * Creates a new instance. * * @param conflictResolutionMethod * The method to used to resolve conflict when two sources * contain the same entity. * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeMerger(ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity) { this.conflictResolutionMethod = conflictResolutionMethod; postbox0 = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator0 = new SortedHistoryChangePipeValidator(); sortedChangeValidator0.setChangeSink(new DataPostboxChangeSink(postbox0)); postbox1 = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator1 = new SortedHistoryChangePipeValidator(); sortedChangeValidator1.setChangeSink(new DataPostboxChangeSink(postbox1)); }
/** * Creates a new instance. * * @param conflictResolutionMethod * The method to used to resolve conflict when two sources * contain the same entity. * @param inputBufferCapacity * The size of the buffers to use for input sources. */ public ChangeMerger(ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity) { this.conflictResolutionMethod = conflictResolutionMethod; postbox0 = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator0 = new SortedHistoryChangePipeValidator(); sortedChangeValidator0.setChangeSink(new DataPostboxChangeSink(postbox0)); postbox1 = new DataPostbox<ChangeContainer>(inputBufferCapacity); sortedChangeValidator1 = new SortedHistoryChangePipeValidator(); sortedChangeValidator1.setChangeSink(new DataPostboxChangeSink(postbox1)); }
/** * Creates a new instance. * * @param conflictResolutionMethod * The method to used to resolve conflict when two sources * contain the same entity. * @param inputBufferCapacity * The size of the buffers to use for input sources. * @param boundRemovedAction * The action to take if the merge operation removes * a bound entity. */ public EntityMerger(ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity, BoundRemovedAction boundRemovedAction) { this.conflictResolutionMethod = conflictResolutionMethod; postbox0 = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator0 = new SortedEntityPipeValidator(); sortedEntityValidator0.setSink(new DataPostboxSink(postbox0)); postbox1 = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator1 = new SortedEntityPipeValidator(); sortedEntityValidator1.setSink(new DataPostboxSink(postbox1)); }
/** * Creates a new instance. * * @param conflictResolutionMethod * The method to used to resolve conflict when two sources * contain the same entity. * @param inputBufferCapacity * The size of the buffers to use for input sources. * @param boundRemovedAction * The action to take if the merge operation removes * a bound entity. */ public EntityMerger(ConflictResolutionMethod conflictResolutionMethod, int inputBufferCapacity, BoundRemovedAction boundRemovedAction) { this.conflictResolutionMethod = conflictResolutionMethod; postbox0 = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator0 = new SortedEntityPipeValidator(); sortedEntityValidator0.setSink(new DataPostboxSink(postbox0)); postbox1 = new DataPostbox<EntityContainer>(inputBufferCapacity); sortedEntityValidator1 = new SortedEntityPipeValidator(); sortedEntityValidator1.setSink(new DataPostboxSink(postbox1)); }