本文整理汇总了Java中org.wso2.carbon.databridge.commons.exception.StreamDefinitionException类的典型用法代码示例。如果您正苦于以下问题:Java StreamDefinitionException类的具体用法?Java StreamDefinitionException怎么用?Java StreamDefinitionException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StreamDefinitionException类属于org.wso2.carbon.databridge.commons.exception包,在下文中一共展示了StreamDefinitionException类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: publish
import org.wso2.carbon.databridge.commons.exception.StreamDefinitionException; //导入依赖的package包/类
public static void publish(String protocol, String host, String port, String username, String password,
String streamId,String dataFileName, String testCaseFolderName, StreamDefinition streamDefinition,
int events, int delay) throws MalformedStreamDefinitionException,
StreamDefinitionException, DifferentStreamDefinitionAlreadyDefinedException,
MalformedURLException, NoStreamDefinitionExistException, AuthenticationException,
TransportException, SocketException, DataEndpointAgentConfigurationException, DataEndpointException,
DataEndpointAuthenticationException, DataEndpointConfigurationException {
String relativeFilePath = getTestDataFileLocation(testCaseFolderName, dataFileName);
KeyStoreUtil.setTrustStoreParams();
//create data publisher
DataPublisher dataPublisher = new DataPublisher(protocol, "tcp://" + host + ":" + port, null, username,
password);
//Publish event for a valid stream
publishEvents(dataPublisher, streamDefinition, relativeFilePath, events, delay);
dataPublisher.shutdown();
}
示例2: deleteColumnFamily
import org.wso2.carbon.databridge.commons.exception.StreamDefinitionException; //导入依赖的package包/类
public void deleteColumnFamily(String columnFamily) throws SummarizerException, AgentException, MalformedURLException, AuthenticationException, TransportException, StreamDefinitionException, NoStreamDefinitionExistException {
log.info("Deleting CF " + columnFamily);
newConnection().dropColumnFamily(keyspaceName, columnFamily, true);
DateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd");
Date date = new Date();
String prevDate = dateFormat.format(date.getTime() - 1000 * 60 * 60 * 24);
if (log.isDebugEnabled()) {
log.debug("The column family dated " + prevDate + " was deleted successfully.");
}
}