adding a data holder to keep the runtime data
Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/ede7a1d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/ede7a1d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/ede7a1d8 Branch: refs/heads/master Commit: ede7a1d878160a7707441b1e7d2b0388b1362a16 Parents: cb2da8f Author: Nirmal Fernando <[email protected]> Authored: Mon Mar 10 15:05:39 2014 +0530 Committer: Nirmal Fernando <[email protected]> Committed: Mon Mar 10 15:05:39 2014 +0530 ---------------------------------------------------------------------- .../cartridge/agent/runtime/DataHolder.java | 55 ++++++++++++++++++++ 1 file changed, 55 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/ede7a1d8/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/runtime/DataHolder.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/runtime/DataHolder.java b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/runtime/DataHolder.java new file mode 100644 index 0000000..d05e2bb --- /dev/null +++ b/components/org.apache.stratos.cartridge.agent/src/main/java/org/apache/stratos/cartridge/agent/runtime/DataHolder.java @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.stratos.cartridge.agent.runtime; + +import java.util.List; + +import org.apache.stratos.cartridge.agent.phase.Phase; + +/** + * Holds data. + */ +public class DataHolder { + private boolean terminated; + private List<Phase> phases; + + private static class InstanceHolder { + private static final DataHolder INSTANCE = new DataHolder(); + } + + public static DataHolder getInstance() { + return InstanceHolder.INSTANCE; + } + + public boolean isTerminated() { + return terminated; + } + + public void setTerminated(boolean terminated) { + this.terminated = terminated; + } + + public List<Phase> getPhases() { + return phases; + } + + public void setPhases(List<Phase> phases) { + this.phases = phases; + } +}
