rotatestrategy.java

来自「基于Jabber协议的即时消息服务器」· Java 代码 · 共 32 行

JAVA
32
字号
/* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE file. */package org.jivesoftware.util.log.output.io.rotate;import java.io.File;/** * Strategy that checks condition under which file rotation is needed. * * @author <a href="mailto:bh22351@i-one.at">Bernhard Huber</a> */public interface RotateStrategy {    /**     * reset cumulative rotation history data.     * Called after rotation.     */    void reset();    /**     * Check if a log rotation is neccessary at this time.     *     * @param data the serialized version of last message written to the log system     * @param file the File that we are writing to     * @return boolean return true if log rotation is neccessary, else false     */    boolean isRotationNeeded(String data, File file);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?