L2 Gw create changes related to ITM Tunnels creation in neutronvpn module
[vpnservice.git] / mdsalutil / mdsalutil-api / src / main / java / org / opendaylight / vpnservice / utils / SystemPropertyReader.java
1 /*
2  * Copyright (c) 2016 Ericsson India Global Services Pvt Ltd. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.vpnservice.utils;
9
10 import org.opendaylight.yangtools.util.PropertyUtils;
11
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);
18         }
19
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);
23         }
24     }
25
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);
29     }
30 }