3853N/A/*
3853N/A * CDDL HEADER START
3853N/A *
3853N/A * The contents of this file are subject to the terms of the
3853N/A * Common Development and Distribution License, Version 1.0 only
3853N/A * (the "License"). You may not use this file except in compliance
3853N/A * with the License.
3853N/A *
6983N/A * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
6983N/A * or http://forgerock.org/license/CDDLv1.0.html.
3853N/A * See the License for the specific language governing permissions
3853N/A * and limitations under the License.
3853N/A *
3853N/A * When distributing Covered Code, include this CDDL HEADER in each
6983N/A * file and include the License file at legal-notices/CDDLv1_0.txt.
6983N/A * If applicable, add the following below this CDDL HEADER, with the
6983N/A * fields enclosed by brackets "[]" replaced with your own identifying
6983N/A * information:
3853N/A * Portions Copyright [yyyy] [name of copyright owner]
3853N/A *
3853N/A * CDDL HEADER END
3853N/A *
3853N/A *
3853N/A * Copyright 2006-2008 Sun Microsystems, Inc.
6153N/A * Portions Copyright 2011-2013 ForgeRock AS
3853N/A */
3853N/Apackage org.opends.server.core;
3853N/A
3853N/Aimport org.opends.server.types.DirectoryException;
6153N/Aimport org.opends.server.types.Operation;
3853N/A
3853N/A/**
3853N/A *
3853N/A * This class implements the "synchronous" strategy, that is the operation
3853N/A * is directly handled, without going to the work queue.
3853N/A */
3853N/Apublic class SynchronousStrategy implements QueueingStrategy {
3853N/A
3853N/A /**
3853N/A * Run the request synchronously.
3853N/A *
3853N/A * @param operation Operation to run.
3853N/A * @throws org.opends.server.types.DirectoryException
3853N/A * If a problem occurs in the Directory Server.
3853N/A */
6153N/A @Override
6153N/A public void enqueueRequest(Operation operation) throws DirectoryException {
3853N/A operation.run();
5298N/A operation.operationCompleted();
3853N/A }
3853N/A}