@Transactional public abstract class AbstractStreamService extends Object implements StreamService
StreamDeploymentRequest.
The AbstractStreamService deployer is agnostic. For deploying streams on
Skipper use the DefaultSkipperStreamService and for the AppDeploy stream
deployment use the AppDeployerStreamService.
| Modifier and Type | Field and Description |
|---|---|
protected AuditRecordService |
auditRecordService |
protected AuditServiceUtils |
auditServiceUtils |
protected StreamDefinitionRepository |
streamDefinitionRepository
The repository this controller will use for stream CRUD operations.
|
protected StreamValidationService |
streamValidationService |
| Constructor and Description |
|---|
AbstractStreamService(StreamDefinitionRepository streamDefinitionRepository,
StreamValidationService streamValidationService,
AuditRecordService auditRecordService)
Constructor for implementations of the
StreamService. |
| Modifier and Type | Method and Description |
|---|---|
StreamDefinition |
createStream(String streamName,
String dsl,
boolean deploy)
Create a new stream.
|
StreamDefinition |
createStreamDefinition(String streamName,
String dsl) |
void |
deleteAll()
Delete all streams, including undeploying.
|
void |
deleteStream(String name)
Delete the stream, including undeloying.
|
void |
deployStream(String name,
Map<String,String> deploymentProperties)
Deploys the stream with the user provided deployment properties.
|
protected abstract org.springframework.cloud.deployer.spi.app.DeploymentState |
doCalculateStreamState(String name) |
protected abstract void |
doDeployStream(StreamDefinition streamDefinition,
Map<String,String> deploymentProperties) |
org.springframework.data.domain.Page<StreamDefinition> |
findDefinitionByNameLike(org.springframework.data.domain.Pageable pageable,
String search)
Find stream definitions where the findByNameLike parameter
|
StreamDefinition |
findOne(String streamDefinitionName)
Find a stream definition by name.
|
List<StreamDefinition> |
findRelatedStreams(String name,
boolean nested)
Find streams related to the given stream name.
|
ValidationStatus |
validateStream(String name)
Verifies that all apps in the stream are valid.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinfo, state, undeployStreamprotected final StreamDefinitionRepository streamDefinitionRepository
protected final AuditRecordService auditRecordService
protected final AuditServiceUtils auditServiceUtils
protected final StreamValidationService streamValidationService
public AbstractStreamService(StreamDefinitionRepository streamDefinitionRepository, StreamValidationService streamValidationService, AuditRecordService auditRecordService)
StreamService.streamDefinitionRepository - the stream definition repository to usestreamValidationService - the application validation service to useauditRecordService - the audit service to usepublic StreamDefinition createStream(String streamName, String dsl, boolean deploy)
StreamServicecreateStream in interface StreamServicestreamName - stream namedsl - DSL definition for streamdeploy - if true, the stream is deployed upon creation (default is
false)public StreamDefinition createStreamDefinition(String streamName, String dsl)
public void deployStream(String name, Map<String,String> deploymentProperties)
StreamServicedeployStream in interface StreamServicename - the name of the streamdeploymentProperties - deployment properties to use as passed in from the client.protected abstract void doDeployStream(StreamDefinition streamDefinition, Map<String,String> deploymentProperties)
protected abstract org.springframework.cloud.deployer.spi.app.DeploymentState doCalculateStreamState(String name)
public void deleteStream(String name)
StreamServicedeleteStream in interface StreamServicename - the name of the stream to deletepublic void deleteAll()
StreamServicedeleteAll in interface StreamServicepublic List<StreamDefinition> findRelatedStreams(String name, boolean nested)
StreamServicefindRelatedStreams in interface StreamServicename - name of the streamnested - if should recursively findByNameLike for related stream definitionspublic org.springframework.data.domain.Page<StreamDefinition> findDefinitionByNameLike(org.springframework.data.domain.Pageable pageable, String search)
StreamServicefindDefinitionByNameLike in interface StreamServicepageable - Pagination informationsearch - the findByNameLike parameter to usepublic StreamDefinition findOne(String streamDefinitionName)
StreamServicefindOne in interface StreamServicestreamDefinitionName - the name of the stream definitionpublic ValidationStatus validateStream(String name)
StreamServicevalidateStream in interface StreamServicename - the name of the definitionValidationStatus for a stream.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.