001/**
002 * ConcurrencyStrategy.java
003 *
004 * Copyright (c) 2004-2012, Nicole C. Tedesco.  All rights reserved.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at:
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018
019package net.sf.jaccumulator;
020
021/**
022 * UML concurrency strategy
023 *
024 * @since JAccumulator 4.0
025 * @author Nicole Tedesco (<a
026 *         href="mailto:Nicole@NicoleTedesco.com">Nicole@NicoleTedesco.com</a>)
027 */
028public enum ConcurrencyStrategy
029{
030    // ----------
031    // * Enumerations
032    //
033
034    /**
035     * Active entities run their own thread of control
036     */
037    ACTIVE,
038
039    /**
040     * Multiple invocations of a behavioral feature may occur simultaneously to
041     * one instance and all of them may proceed concurrently.
042     */
043    CONCURRENT,
044
045    /**
046     * Multiple invocations of a behavioral feature may occur simultaneously to
047     * one instance, but only one is allowed to commence. The others are blocked
048     * until the performance of the currently executing behavioral feature is
049     * complete. It is the responsibility of the system designer to ensure that
050     * deadlocks do not occur due to simultaneous blocks.
051     */
052    GUARDED,
053
054    /**
055     * No value, {@code null}, nothing, void, etc.
056     */
057    NULL,
058
059    /**
060     * No concurrency management mechanism is associated with the operation and,
061     * therefore, concurrency conflicts may occur. Instances that invoke a
062     * behavioral feature need to coordinate so that only one invocation to a
063     * target on any behavioral feature occurs at once.
064     */
065    SEQUENTIAL,
066
067    /**
068     * Not enough is known about the concurrency strategy for this entity
069     */
070    UNKNOWN,
071
072    ;
073}