1classdef InfiniteServer < ServiceSection
2 % A service section to delay jobs without contention
4 % Copyright (c) 2012-2026, Imperial College London
9 function self = InfiniteServer(customerClasses)
10 % SELF = INFINITESERVER(CUSTOMERCLASSES)
12 self@ServiceSection(
'InfiniteServer');
13 self.numberOfServers = Inf;
14 self.serviceProcess = {};
15 initServers(self, customerClasses);
19 methods (Access =
'private')
20 function initServers(self, customerClasses)
21 % INITSERVERS(CUSTOMERCLASSES)
22 for i = 1 : length(customerClasses)
23 self.serviceProcess{1, i} = {customerClasses{i}.name, ServiceStrategy.LI, Exp(0.0)};
28 methods(Access =
protected)
29 % Override copyElement method:
30 function clone = copyElement(self)
31 % CLONE = COPYELEMENT()
33 % Make a shallow copy of all properties
34 clone = copyElement@Copyable(self);
35 % Make a deep copy of each
object
36 for i=1:length(self.serviceProcess)
37 if ishandle(self.serviceProcess{i}{3})
38 clone.serviceProcess{i}{3} = self.serviceProcess{i}{3}.copy;