PageRenderTime 31ms CodeModel.GetById 18ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.1-rc2/hive/external/ql/src/java/org/apache/hadoop/hive/ql/lockmgr/zookeeper/ZooKeeperHiveLock.java

#
Java | 59 lines | 32 code | 10 blank | 17 comment | 0 complexity | f706b35231456b090ebd59047f5b0172 MD5 | raw file
 1/**
 2 * Licensed to the Apache Software Foundation (ASF) under one
 3 * or more contributor license agreements.  See the NOTICE file
 4 * distributed with this work for additional information
 5 * regarding copyright ownership.  The ASF licenses this file
 6 * to you under the Apache License, Version 2.0 (the
 7 * "License"); you may not use this file except in compliance
 8 * with the License.  You may obtain a copy of the License at
 9 *
10 *     http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19package org.apache.hadoop.hive.ql.lockmgr.zookeeper;
20
21import org.apache.hadoop.hive.ql.lockmgr.HiveLock;
22import org.apache.hadoop.hive.ql.lockmgr.HiveLockMode;
23import org.apache.hadoop.hive.ql.lockmgr.HiveLockObject;
24
25public class ZooKeeperHiveLock extends HiveLock {
26  private String         path;
27  private HiveLockObject obj;
28  private HiveLockMode   mode;
29
30  public ZooKeeperHiveLock(String path, HiveLockObject obj, HiveLockMode mode) {
31    this.path = path;
32    this.obj  = obj;
33    this.mode = mode;
34  }
35
36  public String getPath() {
37    return path;
38  }
39
40  public void setPath(String path) {
41    this.path = path;
42  }
43
44  public HiveLockObject getHiveLockObject() {
45    return obj;
46  }
47
48  public void setHiveLockObject(HiveLockObject obj) {
49    this.obj = obj;
50  }
51
52  public HiveLockMode getHiveLockMode() {
53    return mode;
54  }
55
56  public void setHiveLockMode(HiveLockMode mode) {
57    this.mode = mode;
58  }
59}