001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.keymeta;
019
020import org.apache.hadoop.conf.Configuration;
021import org.apache.hadoop.fs.FileSystem;
022import org.apache.yetus.audience.InterfaceAudience;
023
024/**
025 * STUB INTERFACE - Feature not yet complete. This interface will be fully implemented in
026 * HBASE-29368 feature PR.
027 */
028@InterfaceAudience.Private
029public interface KeyManagementService {
030
031  /**
032   * No-op implementation for precursor PR.
033   */
034  KeyManagementService NONE = new KeyManagementService() {
035  };
036
037  /**
038   * Creates a default key management service. Returns NONE for precursor PR.
039   */
040  static KeyManagementService createDefault(Configuration conf, FileSystem fs) {
041    return NONE;
042  }
043
044  /**
045   * Returns the managed key data cache.
046   * @return the managed key data cache, or null if not available
047   */
048  default ManagedKeyDataCache getManagedKeyDataCache() {
049    return null;
050  }
051
052  /**
053   * Returns the system key cache.
054   * @return the system key cache, or null if not available
055   */
056  default SystemKeyCache getSystemKeyCache() {
057    return null;
058  }
059
060  /**
061   * Returns the keymeta admin.
062   * @return the keymeta admin, or null if not available
063   */
064  default KeymetaAdmin getKeymetaAdmin() {
065    return null;
066  }
067}