michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: package org.mozilla.gecko.sync.synchronizer; michael@0: michael@0: import java.util.concurrent.ConcurrentLinkedQueue; michael@0: michael@0: import org.mozilla.gecko.sync.repositories.domain.Record; michael@0: michael@0: interface RecordsConsumerDelegate { michael@0: public abstract ConcurrentLinkedQueue getQueue(); michael@0: michael@0: /** michael@0: * Called when no more items will be processed. michael@0: * If forced is true, the consumer is terminating because it was told to halt; michael@0: * not all items will necessarily have been processed. michael@0: * If forced is false, the consumer has invoked store and received an onStoreCompleted callback. michael@0: * @param forced michael@0: */ michael@0: public abstract void consumerIsDone(boolean forced); michael@0: public abstract void store(Record record); michael@0: }