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 */
018
019package org.apache.hadoop.yarn.api.protocolrecords;
020
021import org.apache.hadoop.classification.InterfaceAudience.Public;
022import org.apache.hadoop.classification.InterfaceStability.Unstable;
023import org.apache.hadoop.yarn.api.records.ApplicationId;
024
025/**
026 * <p>
027 * The request from clients to the <code>SharedCacheManager</code> that claims a
028 * resource in the shared cache.
029 * </p>
030 */
031@Public
032@Unstable
033public abstract class UseSharedCacheResourceRequest {
034
035  /**
036   * Get the <code>ApplicationId</code> of the resource to be used.
037   *
038   * @return <code>ApplicationId</code>
039   */
040  @Public
041  @Unstable
042  public abstract ApplicationId getAppId();
043
044  /**
045   * Set the <code>ApplicationId</code> of the resource to be used.
046   *
047   * @param id <code>ApplicationId</code>
048   */
049  @Public
050  @Unstable
051  public abstract void setAppId(ApplicationId id);
052
053  /**
054   * Get the <code>key</code> of the resource to be used.
055   *
056   * @return <code>key</code>
057   */
058  @Public
059  @Unstable
060  public abstract String getResourceKey();
061
062  /**
063   * Set the <code>key</code> of the resource to be used.
064   *
065   * @param key unique identifier for the resource
066   */
067  @Public
068  @Unstable
069  public abstract void setResourceKey(String key);
070}