Package jetbrains.buildServer.serverSide
Interface TeamCityNode
-
- All Known Implementing Classes:
OfflineTeamCityNode
,OnlineTeamCityNode
public interface TeamCityNode
Describes some TeamCity node.- Since:
- 2022.04
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
canAcceptHTTPRequests()
String
getDescription()
Some node description provided by node itselfSet<NodeResponsibility>
getEffectiveResponsibilities()
Set<NodeResponsibility>
getEnabledResponsibilities()
String
getId()
Date
getLastActivityTime()
Returns the node last activity time.String
getResponsibilityProperty(NodeResponsibility responsibility, String propertyName)
Returns value of a single property of a given responsibilityDate
getStartTime()
Set<NodeResponsibility>
getSupportedResponsibilities()
String
getUrl()
boolean
isCurrent()
boolean
isMainNode()
boolean
isOnline()
Returns true if the node is online, i.e.boolean
isSecondaryNode()
boolean
isStopping()
boolean
isUneditableConfiguration()
Returns true if the node responsibilities were passed via command line and should not be edited via UI Restart of this node will bring back the responsibilities if they were changed in runtimeboolean
requiresExclusiveLock()
boolean
responsibilityEnabled(NodeResponsibility responsibility)
-
-
-
Method Detail
-
getId
@NotNull String getId()
- Returns:
- this node id (unique among all other nodes)
-
getUrl
@NotNull String getUrl()
- Returns:
- url of the node
-
canAcceptHTTPRequests
boolean canAcceptHTTPRequests()
-
getDescription
@NotNull String getDescription()
Some node description provided by node itself- Returns:
-
getSupportedResponsibilities
@NotNull Set<NodeResponsibility> getSupportedResponsibilities()
- Returns:
- list of responsibilities supported by this node
-
getEnabledResponsibilities
@NotNull Set<NodeResponsibility> getEnabledResponsibilities()
- Returns:
- list of all responsibilities enabled for this node
-
getEffectiveResponsibilities
@NotNull Set<NodeResponsibility> getEffectiveResponsibilities()
- Returns:
- list of responsibilities which are effective on this node (for instance, responsibility may not be enabled, but there still can be some responsibility related tasks running, it means node has effective responsibility)
-
responsibilityEnabled
boolean responsibilityEnabled(@NotNull NodeResponsibility responsibility)
- Parameters:
responsibility
-- Returns:
- true if specified responsibility is both enabled on this node and is supported by it
-
isSecondaryNode
boolean isSecondaryNode()
- Returns:
- true if this node is a secondary one
-
isMainNode
boolean isMainNode()
- Returns:
- true if this node is a main one
-
getStartTime
@NotNull Date getStartTime() throws IllegalStateException
- Returns:
- node start time
- Throws:
IllegalStateException
- if node is not online
-
getLastActivityTime
@NotNull Date getLastActivityTime() throws IllegalStateException
Returns the node last activity time. For the current node the last activity time is always the current time. For another node, this is the last time when a corresponding record was updated in the Heartbeat table.- Throws:
IllegalStateException
- if node is not online
-
isOnline
boolean isOnline()
Returns true if the node is online, i.e. there is a corresponding record for it in the Heartbeat table. Note: given that the record in the Heartbeat can be obsolete we still can consider a node online for some time even if it is crashed. It is advised to check thegetLastActivityTime()
and if it stops updating for a long time, then chances are the node is crashed.
-
isCurrent
boolean isCurrent()
- Returns:
- true if this node corresponds to server where this code executes
-
requiresExclusiveLock
boolean requiresExclusiveLock()
- Returns:
- true if this node tries to obtain exclusive lock, for instance exclusive lock is required to perform upgrade
- Since:
- 2019.1
-
getResponsibilityProperty
@Nullable String getResponsibilityProperty(@NotNull NodeResponsibility responsibility, @NotNull String propertyName)
Returns value of a single property of a given responsibility- Parameters:
responsibility
- responsibilitypropertyName
- property name- Returns:
- vlaue of the property if it is set,
null
otherwise - Since:
- 2021.1
-
isStopping
boolean isStopping()
- Returns:
- true if the node is shutting down
-
isUneditableConfiguration
boolean isUneditableConfiguration()
Returns true if the node responsibilities were passed via command line and should not be edited via UI Restart of this node will bring back the responsibilities if they were changed in runtime- Returns:
- see above
- Since:
- 2023.07
-
-