public class ChannelUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Future<Void> |
deployChannel(String channelIdOrName)
Deploy a channel.
|
static List<String> |
getChannelIds()
Get all channel Ids.
|
static String |
getChannelName(String channelId)
Get the name for a channel.
|
static List<String> |
getChannelNames()
Get all channels names.
|
static DeployedState |
getChannelState(String channelIdOrName)
Get the current state of a channel.
|
static DeployedState |
getConnectorState(String channelIdOrName,
Number metaDataId)
Get the current state of a connector.
|
static String |
getDeployedChannelId(String channelName)
Get the id for a deployed channel.
|
static List<String> |
getDeployedChannelIds()
Get all deployed channel Ids.
|
static String |
getDeployedChannelName(String channelId)
Get the name for a deployed channel.
|
static List<String> |
getDeployedChannelNames()
Get all deployed channels names.
|
static Long |
getErrorCount(String channelIdOrName)
Get the error count statistic for a specific channel.
|
static Long |
getErrorCount(String channelIdOrName,
Number metaDataId)
Get the error count statistic for a specific connector.
|
static Long |
getFilteredCount(String channelIdOrName)
Get the filtered count statistic for a specific channel.
|
static Long |
getFilteredCount(String channelIdOrName,
Number metaDataId)
Get the filtered count statistic for a specific connector.
|
static Long |
getQueuedCount(String channelIdOrName)
Get the queued count statistic for a specific channel.
|
static Long |
getQueuedCount(String channelIdOrName,
Number metaDataId)
Get the queued count statistic for a specific connector.
|
static Long |
getReceivedCount(String channelIdOrName)
Get the received count statistic for a specific channel.
|
static Long |
getReceivedCount(String channelIdOrName,
Number metaDataId)
Get the received count statistic for a specific connector.
|
static Long |
getSentCount(String channelIdOrName)
Get the sent count statistic for a specific channel.
|
static Long |
getSentCount(String channelIdOrName,
Number metaDataId)
Get the sent count statistic for a specific connector.
|
static Future<Void> |
haltChannel(String channelIdOrName)
Halt a deployed channel.
|
static boolean |
isChannelDeployed(String channelIdOrName)
Check if a channel is currently deployed.
|
static Future<Void> |
pauseChannel(String channelIdOrName)
Pause a deployed channel.
|
static Future<Void> |
resetStatistics(String channelIdOrName)
Reset all statistics for a specific channel.
|
static Future<Void> |
resetStatistics(String channelIdOrName,
Integer metaDataId)
Reset all statistics for the specified connector on the given channel.
|
static Future<Void> |
resetStatistics(String channelIdOrName,
Integer metaDataId,
Collection<Status> statuses)
Reset the specified statistics for the specified connector on the given channel.
|
static Future<Void> |
resumeChannel(String channelIdOrName)
Resume a deployed channel.
|
static Future<Void> |
startChannel(String channelIdOrName)
Start a deployed channel.
|
static Future<Void> |
startConnector(String channelIdOrName,
Integer metaDataId)
Start a connector on a given channel.
|
static Future<Void> |
stopChannel(String channelIdOrName)
Stop a deployed channel.
|
static Future<Void> |
stopConnector(String channelIdOrName,
Integer metaDataId)
Stop a connector on a given channel.
|
static Future<Void> |
undeployChannel(String channelIdOrName)
Undeploy a channel.
|
public static List<String> getChannelNames()
public static List<String> getChannelIds()
public static List<String> getDeployedChannelNames()
public static String getChannelName(String channelId)
channelId
- The channel id of the channel.public static List<String> getDeployedChannelIds()
public static String getDeployedChannelName(String channelId)
channelId
- The channel id of the deployed channel.public static String getDeployedChannelId(String channelName)
channelName
- The channel name of the deployed channel.public static Future<Void> startChannel(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> stopChannel(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> pauseChannel(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> resumeChannel(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> haltChannel(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static DeployedState getChannelState(String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.public static Future<Void> deployChannel(String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.public static Future<Void> undeployChannel(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.public static boolean isChannelDeployed(String channelIdOrName)
channelIdOrName
- The channel id or current name of the channel.public static Future<Void> startConnector(String channelIdOrName, Integer metaDataId) throws Exception
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> stopConnector(String channelIdOrName, Integer metaDataId) throws Exception
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static DeployedState getConnectorState(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Long getReceivedCount(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static Long getReceivedCount(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Long getFilteredCount(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static Long getFilteredCount(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Long getQueuedCount(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static Long getQueuedCount(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Long getSentCount(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static Long getSentCount(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Long getErrorCount(String channelIdOrName)
channelIdOrName
- The channel id or current name of the deployed channel.public static Long getErrorCount(String channelIdOrName, Number metaDataId)
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the connector. Note that the source connector has a metadata id
of 0.public static Future<Void> resetStatistics(String channelIdOrName) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> resetStatistics(String channelIdOrName, Integer metaDataId) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the deployed connector. Note that the source connector has a
metadata id of 0 and the aggregate of null.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.public static Future<Void> resetStatistics(String channelIdOrName, Integer metaDataId, Collection<Status> statuses) throws Exception
channelIdOrName
- The channel id or current name of the deployed channel.metaDataId
- The metadata id of the deployed connector. Note that the source connector has a
metadata id of 0 and the aggregate of null.statuses
- A collection of statuses to reset.Future
object representing the result of the asynchronous operation. You
can call get()
or get(timeoutInMillis)
to wait for the operation to finish.Exception
- If the task cannot be scheduled for execution.