亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? editcache.jsp

?? Jive論壇2.5版本的源程序
?? JSP
字號:
<%
/**
 *	$RCSfile: editCache.jsp,v $
 *	$Revision: 1.1.1.1 $
 *	$Date: 2002/09/09 13:50:25 $
 */
%>

<%@ page import="java.util.*,
				 java.text.*,
				 com.jivesoftware.util.*,
                 com.jivesoftware.forum.*,
				 com.jivesoftware.forum.database.*,
				 com.jivesoftware.forum.util.*"
%>

<%!	// global variables
	
	// decimal formatter for cache values
	static final DecimalFormat kFormat = new DecimalFormat("#");
	static final DecimalFormat mbFormat = new DecimalFormat("#0.00");
	static final DecimalFormat percentFormat = new DecimalFormat("#0.0");
    
	// cache identifiers, names
	static final int[] CACHE_TYPES = {
		DatabaseCacheManager.FORUM_CACHE,
		DatabaseCacheManager.THREAD_CACHE,
		DatabaseCacheManager.MESSAGE_CACHE,
		DatabaseCacheManager.USER_CACHE,
		DatabaseCacheManager.USER_PERMS_CACHE,
		DatabaseCacheManager.GROUP_CACHE
	};
	static final String[] CACHE_NAMES = {
		"Forum",
		"Thread",
		"Message",
		"User",
		"User Permissions",
		"Group"
	};
    
    static final int CACHE_PRESET_SMALL = 0;
    static final int CACHE_PRESET_MEDIUM = 1;
    static final int CACHE_PRESET_LARGE = 2;
    static final int CACHE_PRESET_CUSTOM = 3;
    
	static final String[] CACHE_PRESET_NAMES = {
		"Small",
		"Medium",
		"Large",
		"Custom"
	};
    
    // Preset mem sizes (in bytes)
    static final int[][] CACHE_PRESET_SIZES = {
        {  512*1024, 1024*1024,  5120*1024 },
        {  512*1024, 3072*1024, 10240*1024 },
        { 1152*1024, 8192*1024, 32768*1024 },
        {  512*1024, 1024*1024,  6144*1024 },
        {  256*1024,  768*1024,  4608*1024 },
        {  128*1024,  256*1024,   512*1024 }
    };
    
	static final String[] CACHE_PRESET_DESCRIPTIONS = {
		"Suitable for workgroups or small to medium communities. (3 MB total cache)",
		"Suitable for medium to large communities. (14 MB total cache)",
		"Suitable for very large communities on servers with a lot of memory. (60 MB total cache)",
		"Use this option to be able to edit each of the cache sizes below."
	};
    
    private int getCurrentPreset(DatabaseCacheManager dbCacheManager) {
        // Custom by default (we loop through the 3 presets, if none match,
        // the current set of presets must be custom).
        int currentPreset = CACHE_PRESET_CUSTOM;
        // The array of presets to check
        int[] presetChecks = {
            CACHE_PRESET_SMALL, CACHE_PRESET_MEDIUM, CACHE_PRESET_LARGE
        };
        int preset;
        for (preset=0; preset<presetChecks.length; preset++) {
            boolean matches = true;
            for (int i=0; i<CACHE_PRESET_SIZES.length; i++) {
                if (dbCacheManager.getMaxSize(CACHE_TYPES[i]) != CACHE_PRESET_SIZES[i][preset]) {
                    matches = false;
                }
            }
            if (matches) {
                currentPreset = preset;
                break;
            }
        }
        return currentPreset;
    }
%>
 
<%@ include file="include/global.jsp" %>
 
<%	// Load up the DbCacheManager first. Starty by getting the underlying
    // DbForumFactory
	DbForumFactory dbForumFactory = null;
	try {
		dbForumFactory = (DbForumFactory)(((DbForumFactoryProxy)forumFactory).getProxiedForumFactory());
	} catch (Exception e) { }
	
	// Get the cache manager
	DatabaseCacheManager cacheManager = dbForumFactory.getCacheManager();
    
    // get parameters
	boolean setCacheSize = ParamUtils.getBooleanParameter(request,"setCacheSize");
    boolean custom = ParamUtils.getBooleanParameter(request,"custom");
    int cachePreset = ParamUtils.getIntParameter(request,"cachePreset",getCurrentPreset(cacheManager));
    // set the cache size if requested
    if (setCacheSize) {
        if (cachePreset == CACHE_PRESET_CUSTOM) {
            custom = true;
            session.setAttribute("cache.customMode","true");
        }
        else {
            session.removeAttribute("cache.customMode");
            for (int i=0; i<CACHE_TYPES.length; i++) {
                cacheManager.setMaxSize(CACHE_TYPES[i], CACHE_PRESET_SIZES[i][cachePreset]);
            }
            response.sendRedirect("editCache.jsp?cachePreset=" + cachePreset);
            return;
        }
    }
    if ("true".equals((String)session.getAttribute("cache.customMode"))) {
        cachePreset = CACHE_PRESET_CUSTOM;
    }
    if (cachePreset == CACHE_PRESET_CUSTOM) {
        custom = true;
    }
    boolean setCustom = ParamUtils.getBooleanParameter(request,"setCustom");
    // custom cache values (in K)
    int customForumSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.FORUM_CACHE+"K",-1);
    int customThreadSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.THREAD_CACHE+"K",-1);
    int customMessageSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.MESSAGE_CACHE+"K",-1);
    int customUserSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.USER_CACHE+"K",-1);
    int customUserPermSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.USER_PERMS_CACHE+"K",-1);
    int customGroupSize = ParamUtils.getIntParameter(request,"custom"+DatabaseCacheManager.GROUP_CACHE+"K",-1);
    
    // Check for the "cutom" value in the session
    
    // set the custom sizes
    if (custom && setCustom) {
        if (customForumSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.FORUM_CACHE, customForumSize*1024);
        }
        if (customThreadSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.THREAD_CACHE, customThreadSize*1024);
        }
        if (customMessageSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.MESSAGE_CACHE, customMessageSize*1024);
        }
        if (customUserSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.USER_CACHE, customUserSize*1024);
        }
        if (customUserPermSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.USER_PERMS_CACHE, customUserPermSize*1024);
        }
        if (customGroupSize > -1) {
            cacheManager.setMaxSize(DatabaseCacheManager.GROUP_CACHE, customGroupSize*1024);
        }
        response.sendRedirect("editCache.jsp");
        return;
    }
%>

<%@ include file="include/header.jsp" %>

<p>

<%  // Title of this page and breadcrumbs
    String title = "Edit Cache Settings";
    String[][] breadcrumbs = {
        {"Main", "main.jsp"},
        {"Cache Settings", "cache.jsp"},
        {"Edit Cache Settings", "editCache.jsp"}
        
    };
%>
<%@ include file="include/title.jsp" %>

<font size="-1">
Customize your cache settings using the forms below.
You should never set your cache sizes to total more than half of your
total JVM memory. By default, most JVMs are configured to use 64 MB of memory,
although the default may vary or have been changed on your system.
<p>
Setting the caches too large will not result in increased performance. Instead,
tune your cache larger only as long as it results in greater effectivness over 
time (as measured on the <a href="cache.jsp">main cache</a> page).
</font>

<p>

<font size="-1"><b>Cache Presets</b></font>
<form action="editCache.jsp">
<input type="hidden" name="setCacheSize" value="true">
<ul>
<%  for (int i=0; i<CACHE_PRESET_NAMES.length; i++) {
        String checked = "";
        if (cachePreset == i) {
            checked = " checked";
        }
%>
<input type="radio" name="cachePreset" value="<%= i %>" id="rb0<%= i %>"<%= checked %>>
<font size="-1"><label for="rb0<%= i %>"><b><%= CACHE_PRESET_NAMES[i] %></b> -- <%= CACHE_PRESET_DESCRIPTIONS[i] %></label></font>
<p>
<%  } %>
<input type="submit" value="Save Settings">
</ul>
</form>

<p>

<font size="-1"><b>Cache Sizes</b></font>
<form action="editCache.jsp" name="cacheForm">
<input type="hidden" name="custom" value="<%= custom %>">
<input type="hidden" name="setCustom" value="true">
<ul>
<table bgcolor="<%= tableBorderColor %>" cellpadding="0" cellspacing="0" border="0" width="300">
<tr><td>
<table bgcolor="<%= tableBorderColor %>" cellpadding="3" cellspacing="1" border="0" width="100%">
<tr bgcolor="#eeeeee">
    <td align="center" width="50%"><font face="verdana" size="-2"><b>CACHE NAME</b></font></td>
    <td align="center" width="50%" colspan="2"><font face="verdana" size="-2"><b>SIZE</b></font></td>
</tr>
<%  for (int i=0; i<CACHE_TYPES.length; i++) {
        int type = CACHE_TYPES[i];
        double sizeMB = (double)cacheManager.getMaxSize(type)/(1024*1024);
        double sizeK = (double)cacheManager.getMaxSize(type)/(1024);
%>
<tr bgcolor="#ffffff">
    <td width="50%">
    <font size="-1"><b><%= CACHE_NAMES[i] %></b></font>
    </td>
    <td width="25%">
    <%  if (custom) { %>
    <input type="text" name="custom<%= CACHE_TYPES[i] %>K" size="6" value="<%= kFormat.format(sizeK) %>" maxlength="6"><font size="-1">K</font>
    <%  } else { %>
    <font size="-1"><%= kFormat.format(sizeK) %> K</font>
    <%  } %>
    </td>
    <td width="25%">
    <font size="-1">(<%= mbFormat.format(sizeMB) %> MB)</font>
    </td>
</tr>
<%  } %>
</table>
</td></tr>
</table>
<%  if (custom) { %>
    <p>
    <input type="submit" value="Save Custom Settings">
<%  } %>
<p>
<font size="-1"><i>Note: 1 MB = 1024 K</i></font>
</ul>
</form>

<p>

<center>
<form action="cache.jsp">
<input type="submit" value="Return to Cache Page">
</form>
</center>

<p>

<%@ include file="include/footer.jsp" %>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色丁香婷婷综合| 亚洲免费伊人电影| 亚洲日本在线观看| 天天综合天天做天天综合| 卡一卡二国产精品| 成人福利视频在线看| 欧美少妇xxx| 精品不卡在线视频| 亚洲卡通欧美制服中文| 毛片不卡一区二区| av午夜精品一区二区三区| 7878成人国产在线观看| 亚洲国产精品高清| 视频精品一区二区| 成人av免费在线播放| 91麻豆精品国产91久久久久久 | 亚洲一级二级三级在线免费观看| 午夜精品久久久久久久蜜桃app| 国产一区二区调教| 欧美午夜精品理论片a级按摩| 26uuu精品一区二区| 亚洲一区二区三区四区中文字幕| 国产制服丝袜一区| 欧美日本一道本| 欧美极品aⅴ影院| 美腿丝袜亚洲三区| 91免费看视频| 国产欧美一区二区精品性色超碰| 亚洲va国产va欧美va观看| 懂色av一区二区三区免费看| 在线播放亚洲一区| 亚洲欧洲韩国日本视频| 精品亚洲免费视频| 欧美日韩美女一区二区| 国产精品卡一卡二| 老司机免费视频一区二区| 欧美午夜精品理论片a级按摩| 国产精品色哟哟| 精品一区二区三区在线观看| 欧美日韩免费视频| 综合久久国产九一剧情麻豆| 国产精品一区二区三区四区| 欧美肥大bbwbbw高潮| 亚洲精品国久久99热| 成人免费福利片| 久久天天做天天爱综合色| 石原莉奈一区二区三区在线观看| 91色视频在线| 中文字幕不卡在线| 国产一区免费电影| 日韩亚洲欧美中文三级| 婷婷综合另类小说色区| 欧美三级视频在线播放| 国产精品久久久久久一区二区三区| 国产一区免费电影| 欧美精品一区二区三区在线| 琪琪一区二区三区| 制服丝袜亚洲播放| 日本系列欧美系列| 欧美高清视频一二三区| 婷婷开心久久网| 欧美精品久久99| 偷拍一区二区三区四区| 欧美巨大另类极品videosbest| 亚洲成人精品一区二区| 欧美日韩中文精品| 亚洲3atv精品一区二区三区| 欧美三级电影网| 亚洲资源中文字幕| 欧美巨大另类极品videosbest| 午夜电影一区二区| 911国产精品| 久久精品久久久精品美女| 欧美sm极限捆绑bd| 狠狠色丁香久久婷婷综合_中| 久久综合资源网| 国产精品伊人色| 国产欧美综合在线| 成人福利视频在线看| 亚洲乱码精品一二三四区日韩在线| 色婷婷亚洲精品| 亚洲成av人片一区二区| 欧美日本一区二区三区| 美国欧美日韩国产在线播放| 精品美女被调教视频大全网站| 国产曰批免费观看久久久| 国产嫩草影院久久久久| 91在线云播放| 午夜精品视频在线观看| 欧美成人精精品一区二区频| 国产精品1区2区3区| 亚洲欧洲日韩在线| 欧美亚洲综合另类| 麻豆一区二区99久久久久| 久久综合网色—综合色88| 成+人+亚洲+综合天堂| 亚洲蜜臀av乱码久久精品蜜桃| 欧美日韩视频一区二区| 久久99精品久久久久久动态图| 久久久高清一区二区三区| 91在线视频观看| 午夜视频在线观看一区二区| 26uuu国产一区二区三区| av激情成人网| 日韩国产精品久久久| 国产午夜亚洲精品不卡| 91免费视频观看| 日本欧美一区二区三区| 久久蜜桃一区二区| 91福利在线看| 精品制服美女久久| 日韩一区日韩二区| 日韩一区二区影院| 波多野结衣精品在线| 午夜精品在线视频一区| 国产婷婷色一区二区三区四区| 色欧美88888久久久久久影院| 麻豆传媒一区二区三区| 亚洲视频一区二区在线观看| 欧美一区二区三区婷婷月色| 成人午夜私人影院| 日韩av在线免费观看不卡| 国产欧美精品一区二区三区四区| 色狠狠综合天天综合综合| 欧美日韩黄色影视| 国产在线播放一区| 亚洲成年人影院| 国产精品久久毛片av大全日韩| 欧美久久久久免费| 成人美女视频在线观看| 日韩1区2区3区| 亚洲色图欧美在线| 久久亚洲免费视频| 欧美日韩精品一区二区| 成人av网站在线| 九色综合狠狠综合久久| 一区二区三区四区在线播放| 久久久影院官网| 欧美老人xxxx18| 一本一道久久a久久精品综合蜜臀| 九九精品视频在线看| 亚洲综合另类小说| 中文字幕一区二区三区蜜月| 精品福利一二区| 777亚洲妇女| 欧美在线视频你懂得| 成人免费毛片嘿嘿连载视频| 美女尤物国产一区| 午夜视频一区在线观看| 亚洲免费观看高清完整| 中文字幕精品综合| 久久蜜臀中文字幕| 日韩一区二区免费电影| 欧美亚洲国产一区在线观看网站| 成人丝袜18视频在线观看| 九色综合狠狠综合久久| 日本在线不卡视频一二三区| 尤物av一区二区| 亚洲视频狠狠干| 中日韩av电影| 久久久久久久电影| 精品99久久久久久| 欧美成人综合网站| 日韩欧美专区在线| 在线成人午夜影院| 欧美日韩在线三区| 一本久久综合亚洲鲁鲁五月天| 国产伦精品一区二区三区免费| 久久99精品久久只有精品| 日本亚洲免费观看| 日本视频一区二区| 欧美aaa在线| 青青青爽久久午夜综合久久午夜| 亚洲成人动漫在线免费观看| 亚洲黄一区二区三区| 玉足女爽爽91| 亚洲国产日韩一级| 亚洲国产欧美在线| 亚洲成a天堂v人片| 天堂成人免费av电影一区| 亚洲国产中文字幕| 亚洲大型综合色站| 午夜视频在线观看一区二区| 亚洲成av人片| 日日夜夜一区二区| 美女视频一区二区| 国产一区在线看| 国产宾馆实践打屁股91| 成人午夜激情片| 91美女在线视频| 日本韩国欧美在线| 精品视频1区2区3区| 777午夜精品视频在线播放| 日韩视频一区二区在线观看| 欧美va亚洲va在线观看蝴蝶网| 久久免费看少妇高潮| 国产精品久久久久一区二区三区| 一区精品在线播放| 亚洲国产日韩一区二区| 麻豆精品视频在线观看免费|