1 /*
2 * Licensed to The Apereo Foundation under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work for additional
4 * information regarding copyright ownership.
5 *
6 *
7 * The Apereo Foundation licenses this file to you under the Educational
8 * Community License, Version 2.0 (the "License"); you may not use this file
9 * except in compliance with the License. You may obtain a copy of the License
10 * at:
11 *
12 * http://opensource.org/licenses/ecl2.txt
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 * License for the specific language governing permissions and limitations under
18 * the License.
19 *
20 */
21
22 package org.opencastproject.serviceregistry.api;
23
24 /**
25 * Interface representing a host.
26 */
27 public interface HostRegistration {
28
29 /**
30 * Returns an identifier for this host.
31 *
32 * @return Host identifier
33 */
34 Long getId();
35
36 /**
37 * @return the baseUrl for this host
38 */
39 String getBaseUrl();
40
41 /**
42 * @param baseUrl
43 * the baseUrl to set
44 */
45 void setBaseUrl(String baseUrl);
46
47 /**
48 * @return the IP address for this host
49 */
50 String getIpAddress();
51
52 /**
53 * @param address
54 * the IP address to set
55 */
56 void setIpAddress(String address);
57
58 /**
59 * @return the allocated memory of this host
60 */
61 long getMemory();
62
63 /**
64 * @param memory
65 * the memory to set
66 */
67 void setMemory(long memory);
68
69 /**
70 * @return the available cores of this host
71 */
72 int getCores();
73
74 /**
75 * @param cores
76 * the cores to set
77 */
78 void setCores(int cores);
79
80 /**
81 * @return the maxLoad
82 */
83 float getMaxLoad();
84
85 /**
86 * @param maxLoad
87 * the maxLoad to set
88 */
89 void setMaxLoad(float maxLoad);
90
91 /**
92 * @return whether this host is active
93 */
94 boolean isActive();
95
96 /**
97 * @param active
98 * the active status to set
99 */
100 void setActive(boolean active);
101
102 /**
103 * @return whether this host is online
104 */
105 boolean isOnline();
106
107 /**
108 * @param online
109 * the online status to set
110 */
111 void setOnline(boolean online);
112
113 /**
114 * @return the maintenanceMode
115 */
116 boolean isMaintenanceMode();
117
118 /**
119 * @param maintenanceMode
120 * the maintenanceMode to set
121 */
122 void setMaintenanceMode(boolean maintenanceMode);
123
124 /**
125 * @return the node name for this host or null, if not set
126 */
127 String getNodeName();
128
129 /**
130 * @param nodeName
131 * the node name to set
132 */
133 void setNodeName(String nodeName);
134 }