本文整理匯總了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.");
}
}