View Javadoc

1   /*
2    * SymmetricDS is an open source database synchronization solution.
3    *   
4    * Copyright (C) Chris Henson <chenson42@users.sourceforge.net>
5    *
6    * This library is free software; you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public
8    * License as published by the Free Software Foundation; either
9    * version 3 of the License, or (at your option) any later version.
10   *
11   * This library is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14   * Lesser General Public License for more details.
15   *
16   * You should have received a copy of the GNU Lesser General Public
17   * License along with this library; if not, see
18   * <http://www.gnu.org/licenses/>.
19   */
20  
21  package org.jumpmind.symmetric.model;
22  
23  /***
24   * Definition of a channel and it's priority. A channel is a group of tables
25   * that get synchronized together.
26   * 
27   * @author chenson
28   */
29  public class Channel {
30  
31      private static final long serialVersionUID = -8183376200537307264L;
32  
33      private String id;
34  
35      private int processingOrder;
36  
37      private int maxBatchSize;
38  
39      private int maxBatchToSend;
40  
41      private boolean enabled;
42  
43      public Channel() {
44      }
45  
46      public Channel(String id, int processingOrder) {
47          this.id = id;
48          this.processingOrder = processingOrder;
49      }
50  
51      public Channel(String id, int processingOrder, int maxBatchSize, int maxBatchToSend, boolean enabled) {
52          this(id, processingOrder);
53          this.maxBatchSize = maxBatchSize;
54          this.maxBatchToSend = maxBatchToSend;
55          this.enabled = enabled;
56      }
57  
58      public String getId() {
59          return id;
60      }
61  
62      public void setId(String id) {
63          this.id = id;
64      }
65  
66      public int getProcessingOrder() {
67          return processingOrder;
68      }
69  
70      public void setProcessingOrder(int priority) {
71          this.processingOrder = priority;
72      }
73  
74      public int getMaxBatchSize() {
75          return maxBatchSize;
76      }
77  
78      public void setMaxBatchSize(int maxNumberOfEvents) {
79          this.maxBatchSize = maxNumberOfEvents;
80      }
81  
82      public boolean isEnabled() {
83          return enabled;
84      }
85  
86      public void setEnabled(boolean enabled) {
87          this.enabled = enabled;
88      }
89  
90      public int getMaxBatchToSend() {
91          return maxBatchToSend;
92      }
93  
94      public void setMaxBatchToSend(int maxBatchToSend) {
95          this.maxBatchToSend = maxBatchToSend;
96      }
97  }