杀死和销毁WildFly服务器之间的区别

时间:2018-09-12 08:24:40

标签: wildfly


我可以看到您可以使用以下方法停止WildFly中的单个域服务器:

停止  杀  摧毁

虽然显然“停止”应该是正常关机,但是kill和destroy之间有什么区别? (特别是在强制会话停止方面?) 谢谢!

1 个答案:

答案 0 :(得分:1)

通过read-operation-description资源上的server-groups操作。

{
    "operation-name" => "destroy-servers",
    "description" => "Destroy the server processes in the server group. In case the server is not in the stopping state, it will attempt to stop the server first.",
    "request-properties" => {},
    "reply-properties" => {},
    "read-only" => false,
    "runtime-only" => true
}

{
    "operation-name" => "kill-servers",
    "description" => "Kill all server processes in the server group. In case the server is not in the stopping state, it will attempt to stop the server first. This operation may not work on all platforms an
d will try to destroy the process if not available.",
    "request-properties" => {},
    "reply-properties" => {},
    "read-only" => false,
    "runtime-only" => true
}

{
    "operation-name" => "stop-servers",
    "description" => "Stops all servers belonging to the server group currently running in the domain.",
    "request-properties" => {
        "blocking" => {
            "type" => BOOLEAN,
            "description" => "Wait until the servers are fully stopped before returning from the operation.",
            "expressions-allowed" => false,
            "required" => false,
            "nillable" => true,
            "default" => false
        },
        "timeout" => {
            "type" => INT,
            "description" => "The graceful shutdown timeout. If this is zero then a graceful shutdown will not be attempted, if this is -1 then the server will wait for a graceful shutdown indefinitely.",
            "expressions-allowed" => false,
            "required" => false,
            "nillable" => true,
            "default" => 0,
            "unit" => "SECONDS"
        }
    },
    "reply-properties" => {},
    "read-only" => false,
    "runtime-only" => true
}

对于单个服务器上的操作:

{
    "operation-name" => "destroy",
    "description" => "Destroy the server process. In case the server is not in the stopping state, it will attempt to stop the server first.",
    "request-properties" => {},
    "reply-properties" => {},
    "read-only" => false,
    "runtime-only" => true
}

{
    "operation-name" => "kill",
    "description" => "Kill the server process. In case the server is not in the stopping state, it will attempt to stop the server first. This operation may not work on all platforms and will try to destroy 
the process if not available.",
    "request-properties" => {},
    "reply-properties" => {},
    "read-only" => false,
    "runtime-only" => true
}

{
    "operation-name" => "stop",
    "description" => "Stop a currently running server.",
    "request-properties" => {
        "server" => {
            "type" => STRING,
            "description" => "The name of the server.",
            "expressions-allowed" => false,
            "required" => false,
            "nillable" => true,
            "min-length" => 1L,
            "max-length" => 2147483647L,
            "deprecated" => {
                "since" => "1.0.4",
                "reason" => "This parameter is ignored, instead the name comes from the value of the last address element"
            }
        },
        "blocking" => {
            "type" => BOOLEAN,
            "description" => "Whether the operation should block and wait until the server is stopped.",
            "expressions-allowed" => false,
            "required" => false,
            "nillable" => true
        },
        "timeout" => {
            "type" => INT,
            "description" => "If this timeout is set a graceful shutdown will be attempted. If this is zero (the default) then the server will shutdown immediately. A value larger than zero means the server 
will wait up to this many seconds for all active requests to finish. A value smaller than zero means that the server will wait indefinitely for all active requests to finish.",
            "expressions-allowed" => false,
            "required" => false,
            "nillable" => true,
            "default" => 0,
            "unit" => "SECONDS"
        }
    },
    "reply-properties" => {
        "type" => STRING,
        "description" => "The status of the server following execution of this operation."
    },
    "read-only" => false,
    "runtime-only" => true
}