org.springframework.cloud.dataflow.server.stream

## Class SkipperStreamDeployer

- java.lang.Object
- - org.springframework.cloud.dataflow.server.stream.SkipperStreamDeployer

- All Implemented Interfaces:
    StreamDeployer

      public class SkipperStreamDeployer
      extends Object
      implements StreamDeployer

  Delegates to Skipper to deploy the stream.
  Author:
    Mark Pollack, Ilayaperumal Gopinathan, Soby Chacko, Glenn Renfro, Christian Tzolov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SkipperStreamDeployer(org.springframework.cloud.skipper.client.SkipperClient skipperClient, StreamDefinitionRepository streamDefinitionRepository, AppRegistryService appRegistryService, ForkJoinPool forkJoinPool, StreamDefinitionService streamDefinitionService)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.cloud.skipper.domain.Release` | `deployStream(StreamDeploymentRequest streamDeploymentRequest)`
    `static List<org.springframework.cloud.deployer.spi.app.AppStatus>` | `deserializeAppStatus(String platformStatus)`
    `org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo` | `environmentInfo()`
    `org.springframework.cloud.deployer.spi.app.AppStatus` | `getAppStatus(String appDeploymentId)` Gets runtime application status
    `org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.app.AppStatus>` | `getAppStatuses(org.springframework.data.domain.Pageable pageable)` Returns application statuses of all deployed applications
    `org.springframework.cloud.skipper.domain.LogInfo` | `getLog(String streamName)` Returns the logs of all the applications of the stream identified by the stream name.
    `org.springframework.cloud.skipper.domain.LogInfo` | `getLog(String streamName, String appName)` Returns the logs of a specific application in the stream identified by the stream name.
    `StreamDeployment` | `getStreamInfo(String streamName)` Get stream information (including the deployment properties) for the given stream name.
    `List<String>` | `getStreams()` Returns the list of stream names that correspond to the currently available skipper releases.
    `List<org.springframework.cloud.deployer.spi.app.AppStatus>` | `getStreamStatuses(String streamName)` Returns the deployed application statuses part for the streamName stream.
    `Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>>` | `getStreamStatuses(String[] streamNames)` Returns the deployed application statuses part for the streamName streams.
    `Collection<org.springframework.cloud.skipper.domain.Release>` | `history(String releaseName)`
    `String` | `manifest(String name)`
    `String` | `manifest(String name, int version)`
    `Collection<org.springframework.cloud.skipper.domain.Deployer>` | `platformList()`
    `org.springframework.cloud.skipper.domain.Release` | `rollbackStream(String streamName, int releaseVersion)` Rollback the stream to a specific version
    `void` | `scale(String streamName, String appName, int count, Map<String,String> properties)` For a selected stream scales the number of appName instances to count.
    `Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState>` | `streamsStates(List<StreamDefinition> streamDefinitions)` Get the deployment states for a list of stream definitions
    `org.springframework.cloud.deployer.spi.app.DeploymentState` | `streamState(String streamName)` Get the deployment state of a stream.
    `void` | `undeployStream(String streamName)`
    `org.springframework.cloud.skipper.domain.Release` | `upgradeStream(String streamName, org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier, String configYml, boolean force, List<String> appNames)` Update the stream identified by the PackageIdentifier and runtime configuration values.
    `void` | `validateAppVersionIsRegistered(StreamDefinition streamDefinition, org.springframework.cloud.deployer.spi.core.AppDeploymentRequest appDeploymentRequest, String appVersion)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SkipperStreamDeployer

          public SkipperStreamDeployer(org.springframework.cloud.skipper.client.SkipperClient skipperClient,
                                       StreamDefinitionRepository streamDefinitionRepository,
                                       AppRegistryService appRegistryService,
                                       ForkJoinPool forkJoinPool,
                                       StreamDefinitionService streamDefinitionService)

  - ### Method Detail

    - #### deserializeAppStatus

          public static List<org.springframework.cloud.deployer.spi.app.AppStatus> deserializeAppStatus(String platformStatus)

    - #### streamState

          public org.springframework.cloud.deployer.spi.app.DeploymentState streamState(String streamName)

      Description copied from interface: `StreamDeployer`
      Get the deployment state of a stream. Stream state is computed from the deployment states of its apps.
      Specified by:
        `streamState` in interface `StreamDeployer`
      Parameters:
        `streamName` - stream name
      Returns:
        the deployment status

    - #### streamsStates

          public Map<StreamDefinition,org.springframework.cloud.deployer.spi.app.DeploymentState> streamsStates(List<StreamDefinition> streamDefinitions)

      Description copied from interface: `StreamDeployer`
      Get the deployment states for a list of stream definitions
      Specified by:
        `streamsStates` in interface `StreamDeployer`
      Parameters:
        `streamDefinitions` - list of stream definitions
      Returns:
        map of stream definition and its corresponding deployment state

    - #### scale

          public void scale(String streamName,
                            String appName,
                            int count,
                            Map<String,String> properties)

      Description copied from interface: `StreamDeployer`
      For a selected stream scales the number of appName instances to count.
      Specified by:
        `scale` in interface `StreamDeployer`
      Parameters:
        `streamName` - the stream name
        `appName` - the app name
        `count` - the count
        `properties` - the properties

    - #### deployStream

          public org.springframework.cloud.skipper.domain.Release deployStream(StreamDeploymentRequest streamDeploymentRequest)

    - #### validateAppVersionIsRegistered

          public void validateAppVersionIsRegistered(StreamDefinition streamDefinition,
                                                     org.springframework.cloud.deployer.spi.core.AppDeploymentRequest appDeploymentRequest,
                                                     String appVersion)

    - #### undeployStream

          public void undeployStream(String streamName)

    - #### getAppStatuses

          public org.springframework.data.domain.Page<org.springframework.cloud.deployer.spi.app.AppStatus> getAppStatuses(org.springframework.data.domain.Pageable pageable)

      Description copied from interface: `StreamDeployer`
      Returns application statuses of all deployed applications
      Specified by:
        `getAppStatuses` in interface `StreamDeployer`
      Parameters:
        `pageable` - Pagination information
      Returns:
        pagable list of all app statuses

    - #### getAppStatus

          public org.springframework.cloud.deployer.spi.app.AppStatus getAppStatus(String appDeploymentId)

      Description copied from interface: `StreamDeployer`
      Gets runtime application status
      Specified by:
        `getAppStatus` in interface `StreamDeployer`
      Parameters:
        `appDeploymentId` - the id of the application instance running in the target runtime environment
      Returns:
        app status

    - #### getStreamStatuses

          public List<org.springframework.cloud.deployer.spi.app.AppStatus> getStreamStatuses(String streamName)

      Description copied from interface: `StreamDeployer`
      Returns the deployed application statuses part for the streamName stream.
      Specified by:
        `getStreamStatuses` in interface `StreamDeployer`
      Parameters:
        `streamName` - Stream name to retrieve the runtime application statuses for
      Returns:
        List of runtime application statuses, part of the requested streamName.

    - #### getStreamStatuses

          public Map<String,List<org.springframework.cloud.deployer.spi.app.AppStatus>> getStreamStatuses(String[] streamNames)

      Description copied from interface: `StreamDeployer`
      Returns the deployed application statuses part for the streamName streams.
      Specified by:
        `getStreamStatuses` in interface `StreamDeployer`
      Parameters:
        `streamNames` - Stream names to retrieve the runtime application statuses for
      Returns:
        Map of runtime application statuses, part of the requested streamName.

    - #### getLog

          public org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName)

      Description copied from interface: `StreamDeployer`
      Returns the logs of all the applications of the stream identified by the stream name.
      Specified by:
        `getLog` in interface `StreamDeployer`
      Parameters:
        `streamName` - the stream name
      Returns:
        the logs content

    - #### getLog

          public org.springframework.cloud.skipper.domain.LogInfo getLog(String streamName,
                                                                         String appName)

      Description copied from interface: `StreamDeployer`
      Returns the logs of a specific application in the stream identified by the stream name.
      Specified by:
        `getLog` in interface `StreamDeployer`
      Parameters:
        `streamName` - the stream name
        `appName` - specific application name inside the stream
      Returns:
        the logs content

    - #### environmentInfo

          public org.springframework.cloud.deployer.spi.core.RuntimeEnvironmentInfo environmentInfo()

      Specified by:
        `environmentInfo` in interface `StreamDeployer`
      Returns:
        the runtime environment info for deploying streams.

    - #### getStreamInfo

          public StreamDeployment getStreamInfo(String streamName)

      Description copied from interface: `StreamDeployer`
      Get stream information (including the deployment properties) for the given stream name.
      Specified by:
        `getStreamInfo` in interface `StreamDeployer`
      Parameters:
        `streamName` - the name of the stream
      Returns:
        stream deployment information

    - #### getStreams

          public List<String> getStreams()

      Description copied from interface: `StreamDeployer`
      Returns the list of stream names that correspond to the currently available skipper releases.
      Specified by:
        `getStreams` in interface `StreamDeployer`
      Returns:

    - #### upgradeStream

          public org.springframework.cloud.skipper.domain.Release upgradeStream(String streamName,
                                                                                org.springframework.cloud.skipper.domain.PackageIdentifier packageIdentifier,
                                                                                String configYml,
                                                                                boolean force,
                                                                                List<String> appNames)

      Update the stream identified by the PackageIdentifier and runtime configuration values.
      Parameters:
        `streamName` - the name of the stream to upgrade
        `packageIdentifier` - the name of the package in skipper
        `configYml` - the YML formatted configuration values to use when upgrading
        `force` - the flag to indicate if the stream update is forced even if there are no differences from the existing stream
        `appNames` - the app names to update
      Returns:
        release the upgraded release

    - #### rollbackStream

          public org.springframework.cloud.skipper.domain.Release rollbackStream(String streamName,
                                                                                 int releaseVersion)

      Rollback the stream to a specific version
      Parameters:
        `streamName` - the name of the stream to rollback
        `releaseVersion` - the version of the stream to rollback to
      Returns:
        instance of `Release`

    - #### manifest

          public String manifest(String name,
                                 int version)

    - #### manifest

          public String manifest(String name)

    - #### history

          public Collection<org.springframework.cloud.skipper.domain.Release> history(String releaseName)

    - #### platformList

          public Collection<org.springframework.cloud.skipper.domain.Deployer> platformList()

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.