public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, byte[] metatronPolicy, ClientAuth clientAuth, File clientAuthTrustStoreFile, File clientAuthTrustStorePasswordFile, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = ciphers != null ? Arrays.asList(ciphers) : null; this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); this.decryptKeyUsingMetatronBundle = false; this.metatronPolicy = metatronPolicy; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = null; this.clientAuthTrustStorePasswordFile = clientAuthTrustStorePasswordFile; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, byte[] metatronPolicy, ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = Arrays.asList(ciphers); this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); this.decryptKeyUsingMetatronBundle = false; this.metatronPolicy = metatronPolicy; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; this.clientAuthTrustStorePasswordFile = null; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, boolean metatronBundle, ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = Arrays.asList(ciphers); this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronBundle = metatronBundle; this.decryptKeyUsingMetatronPolicy = false; this.metatronPolicy = null; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; this.clientAuthTrustStorePasswordFile = null; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
@Override public long getRetentionTimeInMSInDeltaQueue() { return configInstance.getLongProperty( namespace + "retentionTimeInMSInDeltaQueue", (3 * 60 * 1000)) .get(); }
@Override public long getMaxIdleThreadInMinutesAgeForStatusReplication() { return configInstance .getLongProperty( namespace + "maxIdleThreadAgeInMinutesForStatusReplication", 10).get(); }
@Override public long getEvictionIntervalTimerInMs() { return configInstance.getLongProperty( namespace + "evictionIntervalTimerInMs", (60 * 1000)).get(); }
@Override public long getDeltaRetentionTimerIntervalInMs() { return configInstance.getLongProperty( namespace + "deltaRetentionTimerIntervalInMs", (30 * 1000)) .get(); }
@Override public long getRoute53DomainTTL() { return configInstance.getLongProperty( namespace + "route53DomainTTL", 30l) .get(); }
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, byte[] metatronPolicy, ClientAuth clientAuth, File clientAuthTrustStoreFile, File clientAuthTrustStorePasswordFile, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = ciphers != null ? Arrays.asList(ciphers) : null; this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); this.decryptKeyUsingMetatronBundle = false; this.metatronPolicy = metatronPolicy; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = null; this.clientAuthTrustStorePasswordFile = clientAuthTrustStorePasswordFile; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, byte[] metatronPolicy, ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = Arrays.asList(ciphers); this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronPolicy = (metatronPolicy != null); this.decryptKeyUsingMetatronBundle = false; this.metatronPolicy = metatronPolicy; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; this.clientAuthTrustStorePasswordFile = null; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
public ServerSslConfig(String[] protocols, String[] ciphers, File certChainFile, File keyFile, boolean metatronBundle, ClientAuth clientAuth, File clientAuthTrustStoreFile, String clientAuthTrustStorePassword, boolean sessionTicketsEnabled) { this.protocols = protocols; this.ciphers = Arrays.asList(ciphers); this.certChainFile = certChainFile; this.keyFile = keyFile; this.decryptKeyUsingMetatronBundle = metatronBundle; this.decryptKeyUsingMetatronPolicy = false; this.metatronPolicy = null; this.clientAuth = clientAuth; this.clientAuthTrustStoreFile = clientAuthTrustStoreFile; this.clientAuthTrustStorePassword = clientAuthTrustStorePassword; this.clientAuthTrustStorePasswordFile = null; this.sessionTimeout = DEFAULT_SESSION_TIMEOUT.get(); this.sessionTicketsEnabled = sessionTicketsEnabled; }
@Override public void run() { synchronized ( isOpen ) { // Keep writing after closed until buffer is flushed (empty) while ( isOpen.get() || !buffer.isEmpty() ) { try { Result result = buffer.pollLast( waitTime.get(), TimeUnit.MILLISECONDS ); if ( result != null ) { resultCount.incrementAndGet(); jgen.writeObject( result ); } } catch ( InterruptedException e ) { LOG.error( "ResultLog thread interrupted.", e ); } catch ( JsonProcessingException e ) { LOG.error( "Failed to generate the JSON for a result.", e ); } catch ( IOException e ) { LOG.error( "Failed to write JSON to output stream for a result", e ); } } isOpen.notifyAll(); } } }
if (!latch.await(mutateOperationTimeout.get(), TimeUnit.MILLISECONDS)) { return rv.get();
public static long getRequestWaitInPoolTimeout() { return requestWaitInPoolTimeoutProperty.get(); } }
public static long getMaxConcurrentStreams() { return DynamicPropertyFactory.getInstance() .getLongProperty("servicecomb.rest.server.http2.concurrentStreams", HttpServerOptions.DEFAULT_INITIAL_SETTINGS_MAX_CONCURRENT_STREAMS) .get(); }
@Override public long getLongProperty(String propertyName, long defaultValue) { return propertyFactoryInstance().getLongProperty(propertyName, defaultValue).get(); }
/** * better to subscribe EventType.AFTER_REGISTRY by BootListener<br> * but in some simple scenes, just block and wait is enough. */ public void waitStatusUp() throws InterruptedException, TimeoutException { long msWait = DynamicPropertyFactory.getInstance().getLongProperty(CFG_KEY_WAIT_UP_TIMEOUT, DEFAULT_WAIT_UP_TIMEOUT) .get(); waitStatusUp(msWait); }
public MultipartConfigElement toMultipartConfigElement() { String location = DynamicPropertyFactory.getInstance().getStringProperty(RestConst.UPLOAD_DIR, null).get(); if (location == null) { LOGGER.info("{} is null, not support upload.", RestConst.UPLOAD_DIR); return null; } return new MultipartConfigElement( location, DynamicPropertyFactory.getInstance().getLongProperty(RestConst.UPLOAD_MAX_FILE_SIZE, -1L).get(), DynamicPropertyFactory.getInstance().getLongProperty(RestConst.UPLOAD_MAX_SIZE, -1L).get(), DynamicPropertyFactory.getInstance().getIntProperty(RestConst.UPLOAD_FILE_SIZE_THRESHOLD, 0).get()); } }
public UploadConfig() { location = DynamicPropertyFactory.getInstance().getStringProperty(RestConst.UPLOAD_DIR, null).get(); maxFileSize = DynamicPropertyFactory.getInstance().getLongProperty(RestConst.UPLOAD_MAX_FILE_SIZE, -1L).get(); maxSize = DynamicPropertyFactory.getInstance().getLongProperty(RestConst.UPLOAD_MAX_SIZE, -1L).get(); fileSizeThreshold = DynamicPropertyFactory.getInstance().getIntProperty(RestConst.UPLOAD_FILE_SIZE_THRESHOLD, 0) .get(); }