Search in sources :

Example 1 with TopologyState

use of com.hortonworks.streamline.streams.catalog.topology.state.TopologyState in project streamline by hortonworks.

the class StreamCatalogService method removeTopologyState.

public TopologyState removeTopologyState(Long topologyId) {
    TopologyState state = new TopologyState();
    state.setTopologyId(topologyId);
    return dao.remove(new StorableKey(TOPOLOGY_STATE_NAMESPACE, state.getPrimaryKey()));
}
Also used : TopologyState(com.hortonworks.streamline.streams.catalog.topology.state.TopologyState) StorableKey(com.hortonworks.registries.storage.StorableKey)

Example 2 with TopologyState

use of com.hortonworks.streamline.streams.catalog.topology.state.TopologyState in project streamline by hortonworks.

the class StreamCatalogService method getTopologyState.

public Optional<TopologyState> getTopologyState(Long topologyId) {
    TopologyState state = new TopologyState();
    state.setTopologyId(topologyId);
    TopologyState result = this.dao.get(state.getStorableKey());
    return Optional.ofNullable(result);
}
Also used : TopologyState(com.hortonworks.streamline.streams.catalog.topology.state.TopologyState)

Aggregations

TopologyState (com.hortonworks.streamline.streams.catalog.topology.state.TopologyState)2 StorableKey (com.hortonworks.registries.storage.StorableKey)1