Project

General

Profile

« Previous | Next » 

Revision d8a13c97

Added by Andreas Müller over 2 years ago

cleanup

View differences:

src/main/java/eu/etaxonomy/cdm/server/instance/StartupQueue.java
30 30

  
31 31
    private final Logger logger = Logger.getLogger(InstanceManager.class);
32 32

  
33
    Set<CdmInstance> instancesStartingUp = new HashSet<CdmInstance>();
33
    Set<CdmInstance> instancesStartingUp = new HashSet<>();
34 34

  
35 35
    private int parallelStartUps = 1;
36 36

  
37
    /**
38
     * @return the parallelStartUps
39
     */
40 37
    public int getParallelStartUps() {
41 38
        return parallelStartUps;
42 39
    }
43

  
44
    /**
45
     * @param parallelStartUps
46
     *            the parallelStartUps to set
47
     */
48 40
    public void setParallelStartUps(int parallelStartUps) {
49 41
        this.parallelStartUps = parallelStartUps;
50 42
    }
51 43

  
52
    /**
53
     * {@inheritDoc}
54
     */
55 44
    @Override
56 45
    public boolean add(CdmInstance e) {
57 46
        boolean result = super.add(e);
......
59 48
        return result;
60 49
    }
61 50

  
62
    /**
63
     * {@inheritDoc}
64
     */
65 51
    @Override
66 52
    public void addFirst(CdmInstance e) {
67 53
        super.addFirst(e);
68 54
        registerAt(e);
69 55
    }
70 56

  
71
    /**
72
     * {@inheritDoc}
73
     */
74 57
    @Override
75 58
    public void addLast(CdmInstance e) {
76 59
        super.addLast(e);
......
89 72
        startNextInstances();
90 73
    }
91 74

  
92
    /**
93
     *
94
     */
95 75
    private void startNextInstances() {
96 76
        logger.debug("startNextInstances()");
97 77
        while(instancesStartingUp.size() < parallelStartUps && !isEmpty()) {
......
103 83
        }
104 84
    }
105 85

  
106
    /**
107
     * @param e
108
     */
109 86
    @SuppressWarnings("unused")
110 87
    private void registerAt(CdmInstance e) {
111 88
        new InstanceListener(e);
......
122 99
            instance.getWebAppContext().addLifeCycleListener(this);
123 100
        }
124 101

  
125
        /**
126
         * {@inheritDoc}
127
         */
128 102
        @Override
129 103
        public void lifeCycleStarting(LifeCycle event) {
130 104
            // IGNORE
131 105
        }
132 106

  
133
        /**
134
         * {@inheritDoc}
135
         */
136 107
        @Override
137 108
        public void lifeCycleStarted(LifeCycle event) {
138 109
            notifyInstanceStartedUp(instance);
......
142 113
            instance = null;
143 114
        }
144 115

  
145
        /**
146
         * {@inheritDoc}
147
         */
148 116
        @Override
149 117
        public void lifeCycleFailure(LifeCycle event, Throwable cause) {
150 118
            notifyInstanceFailed(instance);
......
154 122
            instance = null;
155 123
        }
156 124

  
157
        /**
158
         * {@inheritDoc}
159
         */
160 125
        @Override
161 126
        public void lifeCycleStopping(LifeCycle event) {
162 127
            // IGNORE
163 128
        }
164 129

  
165
        /**
166
         * {@inheritDoc}
167
         */
168 130
        @Override
169 131
        public void lifeCycleStopped(LifeCycle event) {
170 132
            // IGNORE
171 133
        }
172

  
173 134
    }
174 135

  
175 136
    class StartupThread extends Thread{
......
213 174
            } finally {
214 175
                MDC.clear();
215 176
            }
216

  
217 177
        }
218

  
219 178
    }
220

  
221
}
179
}

Also available in: Unified diff