Class Stop

  • All Implemented Interfaces:
    com.oracle.bedrock.runtime.MetaClass<com.oracle.bedrock.runtime.Application>

    public class Stop
    extends CommandWithArgumentList<Stop>
    A representation of the Docker stop command.

    Instances of Stop are immutable, methods that add options and configuration to this Stop command return a new instance of a Stop command with the modifications applied.

    Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
    Oracle is a registered trademark of Oracle Corporation and/or its affiliates.

    Author:
    Jonathan Knight
    • Method Detail

      • timeUntilKill

        public Stop timeUntilKill​(int time)
        Set the number of seconds for Docker to wait for the container to stop before killing the container process.

        Equates to the --time argument.

        Parameters:
        time - the number of seconds for Docker to wait for the container to stop before killing the container process
        Returns:
        a copy of this Stop command with the --time argument applied
      • withCommandArguments

        public Stop withCommandArguments​(List<com.oracle.bedrock.runtime.options.Argument> names,
                                         com.oracle.bedrock.runtime.options.Argument... args)
        Description copied from class: CommandWithArgumentList
        Obtain a copy of this CommandWithArgumentList with the addition of the specified command arguments Arguments.
        Specified by:
        withCommandArguments in class CommandWithArgumentList<Stop>
        Parameters:
        names - the List of Arguments that appear at the end of the command line
        args - the new command to add
        Returns:
        a copy of this CommandWithArgumentList with the addition of the specified command arguments Arguments
      • containers

        public static Stop containers​(Object... names)
        Create a Stop command to stop the containers with the specified names.
        Parameters:
        names - the values that will resolve to the names of the containers to stop
        Returns:
        a Stop command to stop the containers with the specified names
      • containers

        public static Stop containers​(List<?> names)
        Create a Stop command to stop the containers with the specified List names.
        Parameters:
        names - the List of values that will resolve to the names of the containers to stop
        Returns:
        a Stop command to stop the containers with the specified names