1 4 package com.tc.async.impl; 5 6 import com.tc.async.api.AddPredicate; 7 import com.tc.async.api.EventContext; 8 import com.tc.async.api.Sink; 9 import com.tc.exception.ImplementMe; 10 import com.tc.stats.Stats; 11 12 import java.util.ArrayList ; 13 import java.util.Collection ; 14 import java.util.List ; 15 16 19 public class MockSink implements Sink { 20 21 public List queue = new ArrayList (); 22 23 public boolean addLossy(EventContext context) { 24 queue.add(context); 25 return true; 26 } 27 28 public void addMany(Collection contexts) { 29 queue.addAll(contexts); 30 } 31 32 public void add(EventContext context) { 33 queue.add(context); 34 } 35 36 public void setAddPredicate(AddPredicate predicate) { 37 throw new ImplementMe(); 38 } 39 40 public AddPredicate getPredicate() { 41 throw new ImplementMe(); 42 } 43 44 public int size() { 45 return queue.size(); 46 } 47 48 public EventContext getContext(int index) { 49 return (EventContext) queue.get(index); 50 } 51 52 public void turnTracingOn() { 53 throw new ImplementMe(); 54 } 55 56 public void turnTracingOff() { 57 throw new ImplementMe(); 58 } 59 60 public void clear() { 61 throw new ImplementMe(); 62 63 } 64 65 public void pause(List pauseEvents) { 66 throw new ImplementMe(); 67 68 } 69 70 public void unpause() { 71 throw new ImplementMe(); 72 73 } 74 75 public void enableStatsCollection(boolean enable) { 76 throw new ImplementMe(); 77 } 78 79 public Stats getStats(long frequency) { 80 throw new ImplementMe(); 81 } 82 83 public Stats getStatsAndReset(long frequency) { 84 throw new ImplementMe(); 85 } 86 87 public boolean isStatsCollectionEnabled() { 88 throw new ImplementMe(); 89 } 90 91 public void resetStats() { 92 throw new ImplementMe(); 93 } 94 95 } | Popular Tags |