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
019 package org.apache.hadoop.yarn.api.records.timeline;
020
021 import javax.xml.bind.annotation.XmlAccessType;
022 import javax.xml.bind.annotation.XmlAccessorType;
023 import javax.xml.bind.annotation.XmlElement;
024 import javax.xml.bind.annotation.XmlRootElement;
025
026 import org.apache.hadoop.classification.InterfaceAudience.Public;
027 import org.apache.hadoop.classification.InterfaceStability.Unstable;
028
029 /**
030 * <p>
031 * This class contains the information about a timeline domain, which is used
032 * to a user to host a number of timeline entities, isolating them from others'.
033 * The user can also define the reader and writer users/groups for the the
034 * domain, which is used to control the access to its entities.
035 * </p>
036 *
037 * <p>
038 * The reader and writer users/groups pattern that the user can supply is the
039 * same as what <code>AccessControlList</code> takes.
040 * </p>
041 *
042 */
043 @XmlRootElement(name = "domain")
044 @XmlAccessorType(XmlAccessType.NONE)
045 @Public
046 @Unstable
047 public class TimelineDomain {
048
049 private String id;
050 private String description;
051 private String owner;
052 private String readers;
053 private String writers;
054 private Long createdTime;
055 private Long modifiedTime;
056
057 public TimelineDomain() {
058 }
059
060 /**
061 * Get the domain ID
062 *
063 * @return the domain ID
064 */
065 @XmlElement(name = "id")
066 public String getId() {
067 return id;
068 }
069
070 /**
071 * Set the domain ID
072 *
073 * @param id the domain ID
074 */
075 public void setId(String id) {
076 this.id = id;
077 }
078
079 /**
080 * Get the domain description
081 *
082 * @return the domain description
083 */
084 @XmlElement(name = "description")
085 public String getDescription() {
086 return description;
087 }
088
089 /**
090 * Set the domain description
091 *
092 * @param description the domain description
093 */
094 public void setDescription(String description) {
095 this.description = description;
096 }
097
098 /**
099 * Get the domain owner
100 *
101 * @return the domain owner
102 */
103 @XmlElement(name = "owner")
104 public String getOwner() {
105 return owner;
106 }
107
108 /**
109 * Set the domain owner. The user doesn't need to set it, which will
110 * automatically set to the user who puts the domain.
111 *
112 * @param owner the domain owner
113 */
114 public void setOwner(String owner) {
115 this.owner = owner;
116 }
117
118 /**
119 * Get the reader (and/or reader group) list string
120 *
121 * @return the reader (and/or reader group) list string
122 */
123 @XmlElement(name = "readers")
124 public String getReaders() {
125 return readers;
126 }
127
128 /**
129 * Set the reader (and/or reader group) list string
130 *
131 * @param readers the reader (and/or reader group) list string
132 */
133 public void setReaders(String readers) {
134 this.readers = readers;
135 }
136
137 /**
138 * Get the writer (and/or writer group) list string
139 *
140 * @return the writer (and/or writer group) list string
141 */
142 @XmlElement(name = "writers")
143 public String getWriters() {
144 return writers;
145 }
146
147 /**
148 * Set the writer (and/or writer group) list string
149 *
150 * @param writers the writer (and/or writer group) list string
151 */
152 public void setWriters(String writers) {
153 this.writers = writers;
154 }
155
156 /**
157 * Get the created time of the domain
158 *
159 * @return the created time of the domain
160 */
161 @XmlElement(name = "createdtime")
162 public Long getCreatedTime() {
163 return createdTime;
164 }
165
166 /**
167 * Set the created time of the domain
168 *
169 * @param createdTime the created time of the domain
170 */
171 public void setCreatedTime(Long createdTime) {
172 this.createdTime = createdTime;
173 }
174
175 /**
176 * Get the modified time of the domain
177 *
178 * @return the modified time of the domain
179 */
180 @XmlElement(name = "modifiedtime")
181 public Long getModifiedTime() {
182 return modifiedTime;
183 }
184
185 /**
186 * Set the modified time of the domain
187 *
188 * @param modifiedTime the modified time of the domain
189 */
190 public void setModifiedTime(Long modifiedTime) {
191 this.modifiedTime = modifiedTime;
192 }
193
194 }