Package com.yahoo.vespa.model
Class PortsMeta
java.lang.Object
com.yahoo.vespa.model.PortsMeta
- All Implemented Interfaces:
Serializable
Track meta information about the ports of a service.
- Author:
- Vidar Larsen
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Check if the port at a specific offset contains a particular meta attribute.Get the offset to the http port used for admin.Get the offset to the http port used for status.int
Get the number of ports with registered meta.Get the offset to the rpc port used for admin.Get the offset to the rpc port used for status.getTagsAt
(int offset) Get an iterator of the Strings registered at the specific point.on
(int offset) Set up the port to tag, for chained usage.Tag a previously setup port (using 'on') with the specified tag.
-
Constructor Details
-
PortsMeta
public PortsMeta()Create a new PortsMeta object.
-
-
Method Details
-
on
Set up the port to tag, for chained usage.- Parameters:
offset
- the relative port to tag- Returns:
- this portsmeta, to allow .tag calls
-
tag
Tag a previously setup port (using 'on') with the specified tag.- Parameters:
meta
- the tag to apply to the current port- Returns:
- this portsmeta, to allow further .tag calls
-
contains
Check if the port at a specific offset contains a particular meta attribute.- Parameters:
offset
- the relative port offsetmeta
- the meta info we want to check for- Returns:
- boolean true if the specific port has registered the meta
-
getNumPorts
public int getNumPorts()Get the number of ports with registered meta.- Returns:
- the number of ports that have been registered
-
getTagsAt
Get an iterator of the Strings registered at the specific point.- Parameters:
offset
- the relative offset to inquire about tags- Returns:
- List of tags.
-
getRpcAdminOffset
Get the offset to the rpc port used for admin.- Returns:
- the offset, or null if none set
-
getRpcStatusOffset
Get the offset to the rpc port used for status.- Returns:
- Integer the offset, or null if none set.
-
getHttpAdminOffset
Get the offset to the http port used for admin.- Returns:
- Integer the offset, or null if none set.
-
getHttpStatusOffset
Get the offset to the http port used for status.- Returns:
- Integer the offset, or null if none set.
-