Schedules the action directly on one of the event loop workers
without the additional infrastructure and checking.
@param action the action to schedule
@return the subscription
322804
public Subscription scheduleDirect(Action0 action) {
        PoolWorker pw = pool.get().getEventLoop();
        return pw.scheduleActual(action, -1, TimeUnit.NANOSECONDS);
    }
138617
protected void fireAction(ActionListener action) {
        int      modifiers    = 0;
        AWTEvent currentEvent = EventQueue.getCurrentEvent();

        if (currentEvent instanceof InputEvent) {
            modifiers = ((InputEvent) currentEvent).getModifiers();
        } else if (currentEvent instanceof ActionEvent) {
            modifiers = ((ActionEvent) currentEvent).getModifiers();
        }

        ActionEvent e = new ActionEvent(getComponent(), ActionEvent.ACTION_PERFORMED, getComponent().getText(),
                                        EventQueue.getMostRecentEventTime(), modifiers);

        action.actionPerformed(e);
    }
185184
public void forEach(@NotNull DoubleConsumer action) {
        while (iterator.hasNext()) {
            action.accept(iterator.nextDouble());
        }
    }
349555
public EntityBuilder addAction(Action action) {
    	if(action == null) {
    		throw new IllegalArgumentException("action cannot be null.");
    	}
    	addStep("_addAction", new Object[] { action }, true);
        return this;
    }
51465
@MainThread
    private void scheduleSubscribersInvocation(Event event) {
        for (EventTarget target : targets) {
            for (EventMethod method : target.methods) {
                if (event.getKey().equals(method.eventKey)
                        && method.type == EventMethod.Type.SUBSCRIBE) {

                    Utils.log(event.getKey(), method, "Scheduling event execution");

                    ((EventBase) event).handlersCount++;

                    Task task = Task.create(this, target, method, event);
                    executionQueue.add(task);
                }
            }
        }
    }
511655
public void forEach(@NotNull IntConsumer action) {
        while(iterator.hasNext()) {
            action.accept(iterator.nextInt());
        }
    }
312475
private void createScheduledAction(final Collection<Target> targets, final DistributionSet distributionSet,
            final ActionType actionType, final Long forcedTime, final Rollout rollout,
            final RolloutGroup rolloutGroup) {
        // cancel all current scheduled actions for this target. E.g. an action
        // is already scheduled and a next action is created then cancel the
        // current scheduled action to cancel. E.g. a new scheduled action is
        // created.
        final List<Long> targetIds = targets.stream().map(Target::getId).collect(Collectors.toList());
        deploymentManagement.cancelInactiveScheduledActionsForTargets(targetIds);
        targets.forEach(target -> {

            assertActionsPerTargetQuota(target, 1);

            final JpaAction action = new JpaAction();
            action.setTarget(target);
            action.setActive(false);
            action.setDistributionSet(distributionSet);
            action.setActionType(actionType);
            action.setForcedTime(forcedTime);
            action.setStatus(Status.SCHEDULED);
            action.setRollout(rollout);
            action.setRolloutGroup(rolloutGroup);
            actionRepository.save(action);
        });
    }
336620
public StepReply<O> step(A action) {
        JSONObject body = new JSONObject().put("action", getActionSpace().encode(action)).put("render", render);

        JSONObject reply = ClientUtils.post(url + ENVS_ROOT + instanceId + STEP, body).getObject();

        O observation = observationSpace.getValue(reply, "observation");
        double reward = reply.getDouble("reward");
        boolean done = reply.getBoolean("done");
        JSONObject info = reply.getJSONObject("info");

        return new StepReply<O>(observation, reward, done, info);
    }
857271
public java.util.List<ScheduledUpdateGroupAction> getScheduledUpdateGroupActions() {
        if (scheduledUpdateGroupActions == null) {
            scheduledUpdateGroupActions = new com.amazonaws.internal.SdkInternalList<ScheduledUpdateGroupAction>();
        }
        return scheduledUpdateGroupActions;
    }
475655
public CmdLineAction onOption(BiConsumer<@NonNull String, @NonNull String> action) {
		OptionCmdLineAction optionAction = new OptionCmdLineAction(action);

		this.optionActions.add(optionAction);
		return optionAction;
	}
112669
public CmdLineAction onSwitch(Consumer<@NonNull String> action) {
		SwitchCmdLineAction switchAction = new SwitchCmdLineAction(action);

		this.switchActions.add(switchAction);
		return switchAction;
	}
863413
public <T> T doAs(PrivilegedAction<T> action) {
    return Subject.doAs(null, action);
  }
1209523
public final @CheckForNull QueueTaskFuture<RunT> scheduleBuild2(int quietPeriod, Action... actions) {
        Queue.Item i = scheduleBuild2(quietPeriod, Arrays.asList(actions));
        return i != null ? (QueueTaskFuture) i.getFuture() : null;
    }
1162270
static <T> ContinuableFuture<T> executeOnUiThread(final Callable<T> action, final long delay) {
        return execute(new FutureTask<>(action), _UI_EXECUTOR, delay);
    }
1327314
public static ProcessorActionHandler getHandler(ProcessorAction action) {
        ProcessorActionHandler ret = null;
        Class<? extends ProcessorActionHandler> cls = handlers.get(action.getClass());
        if (cls != null) {
            try {
                Constructor<? extends ProcessorActionHandler> con = cls.getConstructor(ProcessorAction.class);
                ret = con.newInstance(action);
            } catch (Exception e) {
                log.log(Level.SEVERE, "Failed to instantiate handler for action '" + action + "'", e);
            }
        }
        return ret;
    }
759549
public void forEach(BiConsumer<? super K, ? super T> action) {
        connections.forEach((key, sync) -> sync.doWithConnection(action));
    }
982526
public static <R> OnSubscribe<R> fromAction(Action0 action, R result) {
        return new InvokeAsync<R>(Actions.toFunc(action, result));
    }