public final class RefreshChannelCommand extends ArchiveConfigurationCommand
Command for refreshing a channel. Refreshing a channel results in the channel being shutdown temporarily and being restarted with its configuration reloaded from the database. If a channel has been newly added, it results in the channel being started for the first time. If a channel has been removed, it results in the channel being removed from the active server configuration. If a pending operation has been registered for the channel, the channel is temporarily put into an error state until the pending operation is removed and the channel is refreshed again.
In contrast to most other archive configuration commands, this command is not forwarded to the server that currently owns the channel. Instead, it is always executed by the server specified in the command.
This command object contains all data that is needed for the move operation.
Typically, it is passed to the ArchiveConfigurationService
, but it
might also be sent over the network before actually being processed.
ArchiveConfigurationCommand.Type
Constructor and Description |
---|
RefreshChannelCommand(String channelName,
UUID serverId)
Creates a "refresh channel" command.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getChannelName()
Returns the name of the channel that shall be refreshed.
|
ArchiveConfigurationCommand.Type |
getCommandType()
Returns the type of the actual command type.
|
UUID |
getServerId()
Returns the ID of the server on which the channel shall be refreshed.
|
int |
hashCode() |
String |
toString() |
public RefreshChannelCommand(String channelName, UUID serverId)
channelName
- name of the channel to be refreshed.serverId
- ID of the server on which the channel shall be refreshed. This
does not have to be the ID of the server that currently owns
the channel. For example, after moving a channel, it should
also be refreshed on the old server so that it gets removed
from that server's configuration.IllegalArgumentException
- if channelName
is empty.NullPointerException
- if channelName
or serverId
is
null
.public ArchiveConfigurationCommand.Type getCommandType()
ArchiveConfigurationCommand
ArchiveConfigurationCommand
class or the ArchiveConfigurationCommand.Type
enum
for a list of types. The return value is never null
.getCommandType
in class ArchiveConfigurationCommand
public String getChannelName()
null
or the empty string.public UUID getServerId()
null
.Copyright © 2011–2017 aquenos GmbH. All rights reserved.