| | |
| | | this.retentionPolicies.add(policy); |
| | | } |
| | | |
| | | /** |
| | | * Removes all the rotation policies currently enforced by this writer. |
| | | */ |
| | | /** Removes all the rotation policies currently enforced by this writer. */ |
| | | public void removeAllRotationPolicies() |
| | | { |
| | | for(RotationPolicy policy : rotationPolicies) |
| | |
| | | this.rotationPolicies.clear(); |
| | | } |
| | | |
| | | /** |
| | | * Removes all retention policies being enforced by this writer. |
| | | */ |
| | | /** Removes all retention policies being enforced by this writer. */ |
| | | public void removeAllRetentionPolicies() |
| | | { |
| | | this.retentionPolicies.clear(); |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isConfigurationChangeAcceptable( |
| | | SizeLimitLogRotationPolicyCfg config, List<LocalizableMessage> unacceptableReasons) |
| | |
| | | return true; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public ConfigChangeResult applyConfigurationChange( |
| | | SizeLimitLogRotationPolicyCfg config) |
| | |
| | | private class RotaterThread extends DirectoryThread |
| | | { |
| | | MultifileTextWriter writer; |
| | | /** |
| | | * Create a new rotater thread. |
| | | */ |
| | | /** Create a new rotater thread. */ |
| | | public RotaterThread(MultifileTextWriter writer) |
| | | { |
| | | super(name); |
| | |
| | | return stopRequested; |
| | | } |
| | | |
| | | /** |
| | | * Shutdown the text writer. |
| | | */ |
| | | /** Shutdown the text writer. */ |
| | | @Override |
| | | public void shutdown() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void flush() |
| | | { |
| | |
| | | this.actions = actions; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public long getBytesWritten() |
| | | { |
| | |
| | | return lastCleanCount; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Calendar getLastRotationTime() |
| | | { |