Back to home page

OSCL-LXR

 
 

    


0001 /**
0002  * Licensed to the Apache Software Foundation (ASF) under one
0003  * or more contributor license agreements.  See the NOTICE file
0004  * distributed with this work for additional information
0005  * regarding copyright ownership.  The ASF licenses this file
0006  * to you under the Apache License, Version 2.0 (the
0007  * "License"); you may not use this file except in compliance
0008  * with the License.  You may obtain a copy of the License at
0009  *
0010  *     http://www.apache.org/licenses/LICENSE-2.0
0011  *
0012  * Unless required by applicable law or agreed to in writing, software
0013  * distributed under the License is distributed on an "AS IS" BASIS,
0014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0015  * See the License for the specific language governing permissions and
0016  * limitations under the License.
0017  */
0018 
0019 package org.apache.hive.service;
0020 
0021 import org.apache.hadoop.hive.conf.HiveConf;
0022 
0023 /**
0024  * FilterService.
0025  *
0026  */
0027 public class FilterService implements Service {
0028 
0029 
0030   private final Service service;
0031   private final long startTime = System.currentTimeMillis();
0032 
0033   public FilterService(Service service) {
0034     this.service = service;
0035   }
0036 
0037   @Override
0038   public void init(HiveConf config) {
0039     service.init(config);
0040   }
0041 
0042   @Override
0043   public void start() {
0044     service.start();
0045   }
0046 
0047   @Override
0048   public void stop() {
0049     service.stop();
0050   }
0051 
0052 
0053   @Override
0054   public void register(ServiceStateChangeListener listener) {
0055     service.register(listener);
0056   }
0057 
0058   @Override
0059   public void unregister(ServiceStateChangeListener listener) {
0060     service.unregister(listener);
0061   }
0062 
0063   @Override
0064   public String getName() {
0065     return service.getName();
0066   }
0067 
0068   @Override
0069   public HiveConf getHiveConf() {
0070     return service.getHiveConf();
0071   }
0072 
0073   @Override
0074   public Service.STATE getServiceState() {
0075     return service.getServiceState();
0076   }
0077 
0078   @Override
0079   public long getStartTime() {
0080     return startTime;
0081   }
0082 
0083 }