Examples of DurationMetric


Examples of org.oasisOpen.docs.wsdm.x2004.x04.muws05.schema.DurationMetric

            getProperties(  ).setBlockSize( m_backendDiskBean.getBlockSize(  ) );
         }
      }
      else if ( propQName.equals( PropertyQNames.ACTIVETIME ) )
      {
         DurationMetric activeTime = getProperties(  ).getActiveTime(  );

         if ( activeTime == null )
         {
            activeTime = DurationMetric.Factory.newInstance(  );
            activeTime.setChangeType( DurationMetric.ChangeType.COUNTER );
            activeTime.setTimeScope( DurationMetric.TimeScope.POINT_IN_TIME );
         }

         activeTime.setGDurationValue( m_backendDiskBean.getActiveTime(  ) );
         activeTime.setLastUpdated( Calendar.getInstance(  ) );
         getProperties(  ).setActiveTime( activeTime );
      }
      else if ( propQName.equals( PropertyQNames.CAPACITY ) )
      {
         IntegerMetric capacity = getProperties(  ).getCapacity(  );
View Full Code Here

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

            resourceProperty.add(numberOfFailedRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
            ServiceTimeDocument serviceTimeDocument = ServiceTimeDocument.Factory.newInstance();
            DurationMetric serviceTimeMetric = serviceTimeDocument.addNewServiceTime();
            GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 6, new BigDecimal("0.789"));
            serviceTimeMetric.setGDurationValue(builder.toGDuration());
            serviceTimeMetric.setDuration(builder.toGDuration());
            resourceProperty.add(serviceTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.MAXRESPONSETIME);
            MaxResponseTimeDocument maxResponseTimeDocument = MaxResponseTimeDocument.Factory.newInstance();
            DurationMetric maxRespDurationMetric = maxResponseTimeDocument.addNewMaxResponseTime();
            maxRespDurationMetric.setGDurationValue(builder.toGDuration());
            maxRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(maxResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTRESPONSETIME);
            LastResponseTimeDocument lastResponseTimeDocument = LastResponseTimeDocument.Factory.newInstance();
            DurationMetric lastRespDurationMetric = lastResponseTimeDocument.addNewLastResponseTime();
            lastRespDurationMetric.setGDurationValue(builder.toGDuration());
            lastRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(lastResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
        }
        catch (Exception e)
        {
View Full Code Here

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

        assertTrue( "ResetAt metadata attribute is not set", numSuccessfulRequestsMetric.isSetResetAt() );
        assertFalse( "Duration metadata attribute is set", numSuccessfulRequestsMetric.isSetDuration() );
        assertTrue( numRequests >= numFailedRequests + numSuccessfulRequests );
        XmlObject serviceTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_SERVICE_TIME );
        assertTrue( serviceTimePropElem instanceof DurationMetric );
        DurationMetric serviceTimeMetric = ((DurationMetric)serviceTimePropElem);
        assertTrue( "Duration metadata attribute is not set", serviceTimeMetric.isSetDuration() );
        XmlObject maxResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_MAX_RESPONSE_TIME );
        assertTrue( maxResponseTimePropElem instanceof DurationMetric );
        DurationMetric maxResponseTimeMetric = ((DurationMetric)maxResponseTimePropElem);
        assertTrue( "Duration metadata attribute is not set", maxResponseTimeMetric.isSetDuration() );
        XmlObject lastResponseTimePropElem = getSingleProperty( m_resource, MetricsCapability.PROP_NAME_LAST_RESPONSE_TIME );
        assertTrue( lastResponseTimePropElem instanceof DurationMetric );
    }
View Full Code Here

Examples of org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.DurationMetric

            resourceProperty.add(numberOfFailedRequestsDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.SERVICETIME);
            ServiceTimeDocument serviceTimeDocument = ServiceTimeDocument.Factory.newInstance();
            DurationMetric serviceTimeMetric = serviceTimeDocument.addNewServiceTime();
            GDurationBuilder builder = new GDurationBuilder(+1, 1, 2, 3, 4, 5, 6, new BigDecimal("0.789"));
            serviceTimeMetric.setGDurationValue(builder.toGDuration());
            serviceTimeMetric.setDuration(builder.toGDuration());
            resourceProperty.add(serviceTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.MAXRESPONSETIME);
            MaxResponseTimeDocument maxResponseTimeDocument = MaxResponseTimeDocument.Factory.newInstance();
            DurationMetric maxRespDurationMetric = maxResponseTimeDocument.addNewMaxResponseTime();
            maxRespDurationMetric.setGDurationValue(builder.toGDuration());
            maxRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(maxResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);

            resourceProperty = resourcePropertySet.get(WeatherstationPropertyQNames.LASTRESPONSETIME);
            LastResponseTimeDocument lastResponseTimeDocument = LastResponseTimeDocument.Factory.newInstance();
            DurationMetric lastRespDurationMetric = lastResponseTimeDocument.addNewLastResponseTime();
            lastRespDurationMetric.setGDurationValue(builder.toGDuration());
            lastRespDurationMetric.setDuration(builder.toGDuration());
            resourceProperty.add(lastResponseTimeDocument);
            resourceProperty.addChangeListener(mowsMetricsCapability);
        }
        catch (Exception e)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.