1 36 package org.columba.ristretto.config; 37 38 43 public class RistrettoConfig { 44 45 private static final int DEFAULT_TIMEOUT = 120000; 47 private int timeout = DEFAULT_TIMEOUT; 49 50 private boolean checkCommandLineLength = true; 52 53 54 private static RistrettoConfig myInstance; 56 57 private RistrettoConfig() { 58 } 59 60 65 public static RistrettoConfig getInstance() { 66 if( myInstance == null) { 67 myInstance = new RistrettoConfig(); 68 } 69 70 return myInstance; 71 } 72 73 74 79 public void setTimeout(int ms) { 80 timeout = ms; 81 } 82 83 88 public int getTimeout() { 89 return timeout; 90 } 91 92 93 98 public boolean isCheckCommandLineLength() { 99 return checkCommandLineLength; 100 } 101 106 public void setCheckCommandLineLength(boolean checkCommandLineLength) { 107 this.checkCommandLineLength = checkCommandLineLength; 108 } 109 } 110 | Popular Tags |