Package org.rhq.coregui.client.util.async

Examples of org.rhq.coregui.client.util.async.Command


            CoreGUI.getMessageCenter().notify(new Message(MSG.view_measureTable_startBeforeEnd()));
        } else {
            cachedBegin = prefs.begin = (long) startTime;
            cachedEnd = prefs.end = (long) endTime;
            cachedTimeRange = prefs.end - prefs.begin;
            Command callback = new Command() {
                public void execute() {
                    persisted = true;
                }
            };
            measurementUserPreferences.setMetricRangePreferences(prefs, allowPreferenceUpdateRefresh, callback);
View Full Code Here


                    int i = 0;
                    for (MeasurementSchedule measurementSchedule : measurementSchedules) {
                        scheduleIds[i++] = measurementSchedule.getId();
                    }

                    final CountDownLatch countDownLatch = CountDownLatch.create(2, new Command() {

                        @Override
                        public void execute() {
                            response.setData(buildRecords(metricDisplaySummaries));
                            processResponse(request.getRequestId(), response);
View Full Code Here

                        }

                        chartTitle = parentGroup.getName();
                        Log.info("group name: " + parentGroup.getName() + ", size: " + parentGroup.getExplicitResources().size());
                        // setting up a deferred Command to execute after all resource queries have completed (successfully or unsuccessfully)
                        final CountDownLatch countDownLatch = CountDownLatch.create(childResources.size(), new Command() {
                            @Override
                            /**
                             * Do this only after ALL of the metric queries for each resource
                             */
                            public void execute() {
View Full Code Here

    @Override
    protected void executeFetch(final DSRequest request, final DSResponse response, final Criteria unused) {

        // This latch is the last thing that gets executed after we have executed the
        // 1 query
        final CountDownLatch countDownLatch = CountDownLatch.create(1, new Command() {

            @Override
            public void execute() {

                // NOTE: this runs after the queryMetricDisplaySummaries is complete
View Full Code Here

    @Override
    protected void init(final boolean isReadOnly) {
        if (isNewRecord()) {

            final CountDownLatch latch = CountDownLatch.create(getOperationExampleId() == null ? 1 : 2, new Command() {
                @Override
                public void execute() {
                    GroupOperationScheduleDetailsView.super.init(isReadOnly);
                }
            });
View Full Code Here

            if (cnt == 0) {
                return;
            }

            CountDownLatch latch = CountDownLatch.create(cnt, new Command() {
                @Override
                public void execute() {
                    CoreGUI.showBusy(false);
                    markForRedraw();
View Full Code Here

    @Override
    protected void init(final boolean isReadOnly) {
        if (isNewRecord() && getOperationExampleId() != null) {

            final CountDownLatch latch = CountDownLatch.create(1, new Command() {
                @Override
                public void execute() {
                    ResourceOperationScheduleDetailsView.super.init(isReadOnly);
                }
            });
View Full Code Here

            measDefIdArray[i] = measurementDefinitions.get(i).getId();
        }

        // setting up a deferred Command to execute after all resource queries have completed (successfully or unsuccessfully)
        // we know there are exactly 2 resources
        final CountDownLatch countDownLatch = CountDownLatch.create(NUM_ASYNC_CALLS, new Command() {
            @Override
            /**
             * Satisfied only after ALL of the metric queries AND availability have completed
             */
            public void execute() {
View Full Code Here

            long start = adjustTimeToStartOfDay(startDate).getTime();
            long end = adjustTimeToEndOfDay(endDate).getTime();

            final List<Object> fullList = new ArrayList<Object>();

            final CountDownLatch latch = CountDownLatch.create(2, new Command() {
                @Override
                public void execute() {
                    processResults(request, response, fullList);
                }
            });
View Full Code Here

        //display container
        final VLayout column = new VLayout();
        column.setHeight(10);//pack

        final CountDownLatch latch = CountDownLatch.create(2, new Command() {
            @Override
            public void execute() {
                if (enabledSchedules.isEmpty() || !renderChart) {
                    DynamicForm row = getEmptyDataForm();
                    column.addMember(row);
View Full Code Here

TOP

Related Classes of org.rhq.coregui.client.util.async.Command

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.