Class FileLogServiceDescriptor

  • All Implemented Interfaces:
    com.jscape.util.db.IntVersioned, java.io.Serializable

    public class FileLogServiceDescriptor
    extends LogServiceDescriptor
    File log service descriptor. The service described by this descriptor takes responsibility for logging system events in file.
    Version:
    1.0
    Author:
    Alex
    See Also:
    Source code, Serialized Form
    • Field Detail

      • DAILY_STRATEGY

        public static final java.lang.String DAILY_STRATEGY
        Daily log rotation strategy.
        See Also:
        Constant Field Values
      • WEEKLY_STRATEGY

        public static final java.lang.String WEEKLY_STRATEGY
        Weekly log rotation strategy.
        See Also:
        Constant Field Values
      • MONTHLY_STRATEGY

        public static final java.lang.String MONTHLY_STRATEGY
        Monthly log rotation strategy.
        See Also:
        Constant Field Values
      • FILE_SIZE_STRATEGY

        public static final java.lang.String FILE_SIZE_STRATEGY
        File size related log rotation strategy.
        See Also:
        Constant Field Values
      • DEFAULT_STRATEGY

        public static final java.lang.String DEFAULT_STRATEGY
        See Also:
        Constant Field Values
      • ALL_STRATEGIES

        public static final java.lang.String[] ALL_STRATEGIES
    • Constructor Detail

      • FileLogServiceDescriptor

        public FileLogServiceDescriptor​(java.lang.String directory,
                                        java.lang.String strategyName,
                                        long fileSize)
        Creates a new descriptor instance.
        Parameters:
        directory - log directory
        strategyName - log rotation strategy
        fileSize - file size in bytes
      • FileLogServiceDescriptor

        public FileLogServiceDescriptor()
        This constructor is used by serialization sub-system and is not intended to use directly in client code.
    • Method Detail

      • getDirectory

        public java.lang.String getDirectory()
        Returns log directory.
        Returns:
        log directory
      • setDirectory

        public void setDirectory​(java.lang.String value)
        Sets log directory.
        Parameters:
        value - the log directory
      • getStrategyName

        public java.lang.String getStrategyName()
        Returns log rotation strategy name.
        Returns:
        log rotation strategy name
      • setStrategyName

        public void setStrategyName​(java.lang.String value)
        Sets log rotation strategy name. Allowed names include: "Daily", "Weekly", "Monthly" and "FileSize".
        Parameters:
        value - the log rotation strategy name
      • getFileSize

        public long getFileSize()
        Returns max file size for the "FileSize" log rotation strategy.
        Returns:
        max file size in bytes
      • setFileSize

        public void setFileSize​(long value)
        Sets max file size for the "FileSize" log rotation strategy.
        Parameters:
        value - the max file size in bytes
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object