当前位置: 首页>>代码示例>>Java>>正文


Java ServerConfigurationService.getInt方法代码示例

本文整理汇总了Java中org.sakaiproject.component.cover.ServerConfigurationService.getInt方法的典型用法代码示例。如果您正苦于以下问题:Java ServerConfigurationService.getInt方法的具体用法?Java ServerConfigurationService.getInt怎么用?Java ServerConfigurationService.getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.sakaiproject.component.cover.ServerConfigurationService的用法示例。


在下文中一共展示了ServerConfigurationService.getInt方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**********************************************************************************************************************************************************************************************************************************************************
 * Init and Destroy
 *********************************************************************************************************************************************************************************************************************************************************/

public void init()
{
	log.info("init()");
	m_addresses.clear();
	locks = new Object[nLocks];
	for (int i = 0; i < nLocks; i++)
	    locks[i] = new Object();
	
	m_checkEvery = ServerConfigurationService.getInt("courier.maintThreadChecks", 300);
	m_aggressiveCleanup = ServerConfigurationService.getBoolean("courier.aggressiveCleanup", false);
	
	// start the maintenance thread
	scheduler = Executors.newSingleThreadScheduledExecutor();
	scheduler.scheduleWithFixedDelay(
			this,
			0,
			m_checkEvery, // run every
			TimeUnit.SECONDS
	);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:25,代码来源:BasicCourierService.java

示例2: getCDNQuery

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**
 * Returns the CDN query string or empty string (i.e. never null)
 */
public static String getCDNQuery()
{
	long expire = ServerConfigurationService.getInt("portal.cdn.expire", 0);
	String version = ServerConfigurationService.getString("portal.cdn.version", ServerConfigurationService.getString("version.service", "0"));
	StringBuilder cdnQuery = new StringBuilder();
	cdnQuery.append("?version=").append(version);
	if ( expire > 0 ) {
		Instant instant = Instant.now();
		expire = instant.getEpochSecond() / expire;
		cdnQuery.append("&expire=").append(expire);
	}
	return cdnQuery.toString();
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:17,代码来源:PortalUtils.java

示例3: TimedAssessmentQueue

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
private TimedAssessmentQueue() { 
  queue = new ConcurrentHashMap();
  tasks = new HashMap();
  // Get any custom thread count, or default to 4
  int threads = ServerConfigurationService.getInt("samigo.timerThreadCount", 4);
  log.info( "SAMIGO_TIMED_ASSESSMENT:QUEUE:INIT: THREADS:" + threads + " (Set property 'samigo.timerThreadCount' to adjust.)");
  threadPool = new ScheduledThreadPoolExecutor(threads);
  // Set the default removal policy so we don't leak memory with finished tasks
  threadPool.setRemoveOnCancelPolicy(true);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:11,代码来源:TimedAssessmentQueue.java

示例4: getMaxZipExtractFiles

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
public static int getMaxZipExtractFiles() {
    if(MAX_ZIP_EXTRACT_FILES == null){
        MAX_ZIP_EXTRACT_FILES = ServerConfigurationService.getInt(org.sakaiproject.content.api.ContentHostingService.RESOURCES_ZIP_EXPAND_MAX,MAX_ZIP_EXTRACT_FILES_DEFAULT);
    }
    if (MAX_ZIP_EXTRACT_FILES <= 0) {
        MAX_ZIP_EXTRACT_FILES = MAX_ZIP_EXTRACT_FILES_DEFAULT; // any less than this is useless so probably a mistake
        log.warn("content.zip.expand.maxfiles is set to a value less than or equal to 0, defaulting to "+MAX_ZIP_EXTRACT_FILES_DEFAULT);
    }
    return MAX_ZIP_EXTRACT_FILES;
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:11,代码来源:ZipContentUtil.java

示例5: init

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**
 * Register this as an EntityProducer
 */
public void init()
{
	log.debug("init start"); //$NON-NLS-1$
	ComponentManager cm = org.sakaiproject.component.cover.ComponentManager
			.getInstance();
	entityManager = (EntityManager) load(cm, EntityManager.class.getName());
	notificationService = (NotificationService) load(cm,
			NotificationService.class.getName());
	sessionManager = (SessionManager) load(cm, SessionManager.class
			.getName());
	eventTrackingService = (EventTrackingService) load(cm,
			EventTrackingService.class.getName());
	siteService = (SiteService) load(cm, SiteService.class.getName());
	threadLocalManager = (ThreadLocalManager) load(cm,
			ThreadLocalManager.class.getName());
	timeService = (TimeService) load(cm, TimeService.class.getName());
	digestService = (DigestService) load(cm, DigestService.class.getName());
	securityService = (SecurityService) load(cm, SecurityService.class
			.getName());
	wikiSecurityService = (RWikiSecurityService) load(cm,
			RWikiSecurityService.class.getName());
	renderService = (RenderService) load(cm, RenderService.class.getName());
	preferenceService = (PreferenceService) load(cm,
			PreferenceService.class.getName());
	userDirectoryService = (UserDirectoryService) load(cm,UserDirectoryService.class.getName());
	entityManager.registerEntityProducer(this,
			RWikiObjectService.REFERENCE_ROOT);
	if (ServerConfigurationService.getBoolean("wiki.notification", true)) //$NON-NLS-1$
	{
		// Email notification
		// register a transient notification for resources
		NotificationEdit edit = notificationService
				.addTransientNotification();

		// set functions
		edit.setFunction(RWikiObjectService.EVENT_RESOURCE_ADD);
		edit.addFunction(RWikiObjectService.EVENT_RESOURCE_WRITE);
		edit.addFunction(RWikiObjectService.EVENT_RESOURCE_READ);

		// set the filter to any site related resource
		edit.setResourceFilter(RWikiObjectService.REFERENCE_ROOT);
		// %%% is this the best we can do? -ggolden

		// set the action
		edit.setAction(new SiteEmailNotificationRWiki(this,
				this.renderService, this.preferenceService,
				this.siteService, this.securityService, this.entityManager,
				this.threadLocalManager, this.timeService,
				this.digestService, this.userDirectoryService));
	}
	
	
	try
	{
		if (autoDdl)
		{
			SqlService.getInstance().ddl(this.getClass().getClassLoader(),
					"sakai_rwiki");
		}
	}
	catch (Exception ex)
	{
		log.error("Perform additional SQL setup", ex);
	}
	
	maxReferencesStringSize = ServerConfigurationService.getInt("wiki.maxReferences",4000);

	
	log.debug("init end"); //$NON-NLS-1$

}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:75,代码来源:RWikiObjectServiceImpl.java

示例6: getMessageThreshold

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
/**
 * get the Message Threshold - above which searching is disabled
 */
private int getMessageThreshold()
{
        return ServerConfigurationService.getInt("sakai.mailbox.search-threshold",
                        MESSAGE_THRESHOLD_DEFAULT);
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:9,代码来源:MailboxAction.java

示例7: getTemporaryTimeoutMilliseconds

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
private int getTemporaryTimeoutMilliseconds() {
    return ServerConfigurationService.getInt("pasystem.banner.temporary-timeout-ms", (24 * 60 * 60 * 1000));
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:BannerStorage.java

示例8: getTemporaryTimeoutMilliseconds

import org.sakaiproject.component.cover.ServerConfigurationService; //导入方法依赖的package包/类
private int getTemporaryTimeoutMilliseconds() {
    return ServerConfigurationService.getInt("pasystem.popup.temporary-timeout-ms", (24 * 60 * 60 * 1000));
}
 
开发者ID:sakaiproject,项目名称:sakai,代码行数:4,代码来源:PopupForUser.java


注:本文中的org.sakaiproject.component.cover.ServerConfigurationService.getInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。