Class InstanceOwnedPattern

java.lang.Object
desmoj.core.simulator.NamedObject
desmoj.core.simulator.ModelComponent
desmoj.core.simulator.Schedulable
desmoj.core.simulator.Entity
cambio.simulator.entities.NamedEntity
cambio.simulator.entities.patterns.InstanceOwnedPattern
All Implemented Interfaces:
IPatternLifeCycleHooks
Direct Known Subclasses:
CircuitBreaker, StrategicInstanceOwnedPattern

public abstract class InstanceOwnedPattern extends NamedEntity implements IPatternLifeCycleHooks
Represents a resilience pattern that is owned by a MicroserviceInstance.

Subclasses of this type will be automatically parsed from an architecture description and attached to their owning instance if their type name is set via the JsonTypeName annotation. For a successful parsing the subtype need to have a constructor with the following signature:

 constructor(Model, String, Boolean, MicroserviceInstance)
 

An Object of the following type...

     @JsonTypeName("retry", alternativeNames="Retry")
     public class Retry extends InstanceOwnedPattern {
     }
 

... will be attached to each MicroserviceInstance of a Microservice if its architecture description contains:

     patterns: [
         {
           type: "retry",
           config: {
               ...
           }
         },
     ]
 
Author:
Lion Wagner
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final MicroserviceInstance
     

    Fields inherited from class desmoj.core.simulator.Schedulable

    _schedule
  • Constructor Summary

    Constructors
    Constructor
    Description
    InstanceOwnedPattern(desmoj.core.simulator.Model model, String name, boolean showInTrace)
     
  • Method Summary

    Methods inherited from class cambio.simulator.entities.NamedEntity

    getPlainName, getQuotedName, getQuotedPlainName, rename

    Methods inherited from class desmoj.core.simulator.Entity

    clone, generateTraceForScheduling, getIdentNumber, getQueueingPriority, getQueues, getScheduledEvents, isEqual, isLarger, isLargerOrEqual, isNotEqual, isQueued, isSimProcess, isSmaller, isSmallerOrEqual, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, schedule, scheduleAfter, scheduleAfter, scheduleAfter, scheduleBefore, scheduleBefore, scheduleBefore, schedulePreempt, schedulePreempt, schedulePreempt, setQueueingPriority

    Methods inherited from class desmoj.core.simulator.Schedulable

    assignReporter, cancel, getCorrespondingReportable, isCurrent, isScheduled, reSchedule, reSchedule, reSchedulePreempt, scheduledNext, setCorrespondingReportable

    Methods inherited from class desmoj.core.simulator.ModelComponent

    current, currentEntity, currentEntityAll, currentEvent, currentlySendDebugNotes, currentlySendTraceNotes, currentModel, currentSimProcess, debugIsOn, debugOff, debugOn, getModel, isExperimentCompatible, isModelCompatible, presentTime, sendDebugNote, sendMessage, sendTraceNote, sendWarning, skipTraceNote, skipTraceNote, traceIsOn, traceOff, traceOn

    Methods inherited from class desmoj.core.simulator.NamedObject

    getName, toString

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface cambio.simulator.entities.patterns.IPatternLifeCycleHooks

    onInitializedCompleted, shutdown, start
  • Field Details

  • Constructor Details

    • InstanceOwnedPattern

      public InstanceOwnedPattern(desmoj.core.simulator.Model model, String name, boolean showInTrace)