protected void init() { // Create link to backing-store: { BackingStore<String, DSLAMProviderRequest, C> backingStore = new DSLAMProviderContextBackingStore(); setBackingStore(backingStore); } // Set renew-time and cache-time: { int renewTime = TIME_RENEW_DEFAULT; int cacheTime = TIME_CACHE_DEFAULT; { try { ConfigFactory f = DefaultConfigFactory.getInstance(); Config c = f.getConfig(); if (c != null) { renewTime = c.getPropertyAsInt("provider.allocator.context-cache.time.renew", renewTime); cacheTime = c.getPropertyAsInt("provider.allocator.context-cache.time.cache", cacheTime); } } catch (IOException ex) { // Ignore! } } setRenewTime(renewTime); setCacheTime(cacheTime); } }
@Override public Integer getThreadPoolSizeMinimum() throws IOException { Integer res = null; { final Integer defaultValue = THREAD_POOL_SIZE_MINIMUM_DEFAULT; res = config.getPropertyAsInt("thread-pool.size-minimum", defaultValue); if (res == null) { res = super.getThreadPoolSizeMinimum(); } if (res == null) { res = defaultValue; } } return res; }
@Override public Integer getQueueCapacity() throws IOException { Integer res = null; { final Integer defaultValue = THREAD_QUEUE_CAPACITY_DEFAULT; res = config.getPropertyAsInt("thread-pool.queue-capacity", defaultValue); if (res == null) { res = super.getQueueCapacity(); } if (res == null) { res = defaultValue; } } return res; }