Package org.wso2.carbon.bam.util

Examples of org.wso2.carbon.bam.util.BAMException


        try {
            summaryGenerationDSStub.addEndpointStatMonthlySummary(stat.getServerId(), stat.getTimeDimensionId(), stat.getName(),
                    stat.getDirection(), stat.getAvgProcessingTime(), stat.getMaxProcessingTime(),
                    stat.getMinProcessingTime(), stat.getCount(), stat.getFaultCount());
        } catch (Exception e) {
            throw new BAMException("addEndpointStatMonthlySummary failed", e);
        }

    }
View Full Code Here


        try {
            summaryGenerationDSStub.addEndpointStatQuarterlySummary(stat.getServerId(), stat.getTimeDimensionId(), stat.getName(),
                    stat.getDirection(), stat.getAvgProcessingTime(), stat.getMaxProcessingTime(),
                    stat.getMinProcessingTime(), stat.getCount(), stat.getFaultCount());
        } catch (Exception e) {
            throw new BAMException("addEndpointStatQuarterlySummary failed", e);
        }
    }
View Full Code Here

        try {
            summaryGenerationDSStub.addEndpointStatYearlySummary(stat.getServerId(), stat.getTimeDimensionId(), stat.getName(),
                    stat.getDirection(), stat.getAvgProcessingTime(), stat.getMaxProcessingTime(),
                    stat.getMinProcessingTime(), stat.getCount(), stat.getFaultCount());
        } catch (Exception e) {
            throw new BAMException("addEndpointStatYearlySummary failed", e);
        }


    }
View Full Code Here

        BAMServiceSummaryDSClient serviceSummaryDSClient = null;
    try {
            serviceSummaryDSClient = BAMUtil.getBAMServiceSummaryDSClient();
      return serviceSummaryDSClient.getOperationStatYearlySummary(opId, startTime, endTime);
    } catch (Exception e) {
      throw new BAMException("Could not retrieve yearly summary for operation: " + opId
          + " start time: " + startTime.getBAMTimestamp(), e);
    } finally {
      if (serviceSummaryDSClient != null) {
          serviceSummaryDSClient.cleanup();
      }
View Full Code Here

            case BAMCalendar.YEAR:
                time = summaryGenerationDSStub.getLatestEndpointStatYearlySummaryYearId(
                    endpoint.getServerId(), endpoint.getName(), endpoint.getDirection());
                break;
            default:
                throw new BAMException("Unexpected timeInterval");
            }

            cal = getTimeStampForId(summaryPeriod, time);

            if (cal == null) {
                //This is the first time we are running the summary. So, get the minimum time stamp
                //for this server from "server user data" table
                TimeStamp[] timeStamps = summaryGenerationDSStub.getServerUserDataMinimumPeriodId(endpoint.getServerId());
                if (timeStamps != null && timeStamps[0] != null) {
                    //we are sure that there will be only one record.
                    cal = BAMCalendar.getInstance(timeStamps[0].getTimeStamp());
                }else{
                    //We are running for the first time and there are no records in
                    //"server user data". So, we can start from now
                    cal = BAMCalendar.getInstance();
                }
                //Start with last period so that it will include our intended period
                cal.add(summaryPeriod, -2);
            }
           
        } catch (Exception e) {
            String msg = "Unable to get LatestSummaryTime for endpoint";
            log.error(msg);
            throw new BAMException(msg, e);
        }
        return cal;
    }
View Full Code Here

                if (mst != null) {
                    populateMedSummaryStatistic(mst, msst);
                }
            }
        } catch (Exception e) {
            throw new BAMException("getProxyStatDailySummary failed", e);
        }

        return msst;
    }
View Full Code Here

                if (mst != null) {
                    populateMedSummaryStatistic(mst, msst);
                }
            }
        } catch (Exception e) {
            throw new BAMException("getProxyStatMonthlySummary failed", e);
        }
        return msst;
    }
View Full Code Here

                if (mst != null) {
                    populateMedSummaryStatistic(mst, msst);
                }
            }
        } catch (Exception e) {
            throw new BAMException("getProxyStatQuarterlySummary failed", e);
        }
        return msst;
    }
View Full Code Here

                if (mst != null) {
                    populateMedSummaryStatistic(mst, msst);
                }
            }
        } catch (Exception e) {
            throw new BAMException("getProxyStatYearlySummary failed", e);
        }

        return msst;
    }
View Full Code Here

        BAMServiceSummaryDSClient serviceSummaryDSClient = null;
    try {
            serviceSummaryDSClient = BAMUtil.getBAMServiceSummaryDSClient();
      serviceSummaryDSClient.addOperationStatHourlySummary(stat);
    } catch (Exception e) {
      throw new BAMException("Adding hourly operation summary stat failed", e);
    } finally {
      if (serviceSummaryDSClient != null) {
          serviceSummaryDSClient.cleanup();
      }
    }
View Full Code Here

TOP

Related Classes of org.wso2.carbon.bam.util.BAMException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.