View Javadoc

1   package com.ning.metrics.goodwill.sink;
2   
3   import com.ning.metrics.goodwill.access.GoodwillSchema;
4   
5   public interface GoodwillSink
6   {
7       /**
8        * Add a new type to the sink
9        *
10       * @param schema GoodwillSchema to add
11       * @return true on success, false otherwise
12       * @throws Exception if an exception occurs talking to the sink
13       */
14      public boolean addType(GoodwillSchema schema) throws Exception;
15  
16      /**
17       * Update a type to the sink
18       *
19       * @param schema GoodwillSchema to update
20       * @return true is success, false otherwise
21       */
22      public boolean updateType(GoodwillSchema schema);
23  
24      /**
25       * Give human readable information on how to add a Type in the sink
26       * This is used in the UI
27       *
28       * @param schema GoodwillSchema to add
29       * @return info how to create a Type in the sink
30       */
31      public String addTypeInfo(GoodwillSchema schema);
32  }