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