/*
 * Copyright 2006-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.openspaces.pu.container.support;

import org.openspaces.pu.container.CannotCloseContainerException;
import org.openspaces.pu.container.ProcessingUnitContainer;

/**
 * Compound processing unit container wraps several processing unit containers and
 * allows to close them.
 *
 * @author kimchy
 */
public class CompoundProcessingUnitContainer implements ProcessingUnitContainer {

    private ProcessingUnitContainer[] containers;

    public CompoundProcessingUnitContainer(ProcessingUnitContainer[] containers) {
        this.containers = containers;
    }

    public void close() throws CannotCloseContainerException {
        for (ProcessingUnitContainer container : containers) {
            container.close();
        }
    }
}

@@ -1020,16 +1020,22 @@
 private 
+final 
 Processi
@@ -1191,16 +1191,217 @@
 s;%0A    %7D
+%0A    %0A    /**%0A     * @return the underlying processing unit containers.%0A     * @since 8.0.3%0A     */%0A    public ProcessingUnitContainer%5B%5D getProcessingUnitContainers() %7B%0A        return containers;%0A    %7D
 %0A%0A    pu

Allow extracting Processing Unit Containers from a Compound Processing Unit Container