comparison src/org/tmatesoft/hg/internal/Filter.java @ 115:c0cc2535462c

Introduced channels to pipeline (and easily filter) data streams
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 03 Feb 2011 23:32:08 +0100
parents 46291ec605a0
children 7567f4a42fe5
comparison
equal deleted inserted replaced
114:46291ec605a0 115:c0cc2535462c
26 * @author Artem Tikhomirov 26 * @author Artem Tikhomirov
27 * @author TMate Software Ltd. 27 * @author TMate Software Ltd.
28 */ 28 */
29 public interface Filter { 29 public interface Filter {
30 30
31 // returns a buffer ready to be read. may return original buffer.
32 // original buffer may not be fully consumed, #compact() might be operation to perform
31 ByteBuffer filter(ByteBuffer src); 33 ByteBuffer filter(ByteBuffer src);
32 34
33 interface Factory { 35 interface Factory {
34 void initialize(HgRepository hgRepo, ConfigFile cfg); 36 void initialize(HgRepository hgRepo, ConfigFile cfg);
35 // may return null if for a given path and/or options this filter doesn't make any sense 37 // may return null if for a given path and/or options this filter doesn't make any sense