@Test public void maxTransactionScheduledParameterIsNotNull() { int expectedMaxTransactionToSchedule = 12876; params.set(CORE, ALFRESCO_CORE_NAME); params.set(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME, expectedMaxTransactionToSchedule); admin = new AlfrescoCoreAdminHandler(); assertEquals(expectedMaxTransactionToSchedule, admin.getMaxTransactionToSchedule(params)); }
int getMaxTransactionToSchedule(SolrParams params) { String requestedCoreName = coreName(params); return ofNullable(params.getInt(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME)) .orElseGet(() -> ofNullable(coreContainer) .map(container -> container.getCore(requestedCoreName)) .map(SolrCore::getResourceLoader) .map(SolrResourceLoader::getCoreProperties) .map(conf -> conf.getProperty(MAX_TRANSACTIONS_TO_SCHEDULE_CONF_PROPERTY_NAME)) .map(Integer::parseInt) .orElse(Integer.MAX_VALUE)); }
AlfrescoCoreAdminHandler extends CoreAdminHandler { int getMaxTransactionToSchedule(SolrParams params) { String requestedCoreName = coreName(params); return ofNullable(params.getInt(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME)) .orElseGet(() -> ofNullable(coreContainer) .map(container -> container.getCore(requestedCoreName)) .map(SolrCore::getResourceLoader) .map(SolrResourceLoader::getCoreProperties) .map(conf -> conf.getProperty(MAX_TRANSACTIONS_TO_SCHEDULE_CONF_PROPERTY_NAME)) .map(Integer::parseInt) .orElse(Integer.MAX_VALUE)); } }
AlfrescoCoreAdminHandler extends CoreAdminHandler { int getMaxTransactionToSchedule(SolrParams params) { String requestedCoreName = coreName(params); return ofNullable(params.getInt(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME)) .orElseGet(() -> ofNullable(coreContainer) .map(container -> container.getCore(requestedCoreName)) .map(SolrCore::getResourceLoader) .map(SolrResourceLoader::getCoreProperties) .map(conf -> conf.getProperty(MAX_TRANSACTIONS_TO_SCHEDULE_CONF_PROPERTY_NAME)) .map(Integer::parseInt) .orElse(Integer.MAX_VALUE)); } AlfrescoCoreAdminHandler();  AlfrescoCoreAdminHandler(CoreContainer coreContainer); }
AlfrescoCoreAdminHandler extends CoreAdminHandler { int getMaxTransactionToSchedule(SolrParams params) { String requestedCoreName = coreName(params); return ofNullable(params.getInt(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME)) .orElseGet(() -> ofNullable(coreContainer) .map(container -> container.getCore(requestedCoreName)) .map(SolrCore::getResourceLoader) .map(SolrResourceLoader::getCoreProperties) .map(conf -> conf.getProperty(MAX_TRANSACTIONS_TO_SCHEDULE_CONF_PROPERTY_NAME)) .map(Integer::parseInt) .orElse(Integer.MAX_VALUE)); } AlfrescoCoreAdminHandler();  AlfrescoCoreAdminHandler(CoreContainer coreContainer); @Override void shutdown(); ConcurrentHashMap<String, InformationServer> getInformationServers(); TrackerRegistry getTrackerRegistry(); SolrTrackerScheduler getScheduler(); }
AlfrescoCoreAdminHandler extends CoreAdminHandler { int getMaxTransactionToSchedule(SolrParams params) { String requestedCoreName = coreName(params); return ofNullable(params.getInt(MAX_TRANSACTIONS_TO_SCHEDULE_PARAMETER_NAME)) .orElseGet(() -> ofNullable(coreContainer) .map(container -> container.getCore(requestedCoreName)) .map(SolrCore::getResourceLoader) .map(SolrResourceLoader::getCoreProperties) .map(conf -> conf.getProperty(MAX_TRANSACTIONS_TO_SCHEDULE_CONF_PROPERTY_NAME)) .map(Integer::parseInt) .orElse(Integer.MAX_VALUE)); } AlfrescoCoreAdminHandler();  AlfrescoCoreAdminHandler(CoreContainer coreContainer); @Override void shutdown(); ConcurrentHashMap<String, InformationServer> getInformationServers(); TrackerRegistry getTrackerRegistry(); SolrTrackerScheduler getScheduler(); static final String ALFRESCO_DEFAULTS; }