2 * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.vpnservice.utils;
10 import org.opendaylight.yangtools.util.PropertyUtils;
12 public class SystemPropertyReader {
13 public static class Cluster {
14 // Sleep time to be used between successive EntityOwnershipState calls
15 // Returned time is in milliseconds
16 public static long getSleepTimeBetweenRetries() {
17 return Long.getLong("cluster.entity_owner.sleep_time_between_retries", 1000);
20 // Returns max. retries to be tried with EntityOwnershipState calls
21 public static int getMaxRetries() {
22 return Integer.getInteger("cluster.entity_owner.max_retries", 5);
26 // Returns max retries to be tried with DataStoreJobCoordinator calls
27 public static int getDataStoreJobCoordinatorMaxRetries() {
28 return Integer.getInteger("datastore.job_coordinator.max_retries", 5);