opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedAccessLogPublisherConfiguration.xml
@@ -74,27 +74,13 @@ The maximum number of log records that can be stored in the asynchronous queue. </adm:synopsis> <adm:description> Setting the queue size to zero activates parallel log writer implementation which has no queue size limit and as such the parallel log writer should only be used on a very well tuned server configuration to avoid potential out of memory errors. </adm:description> <adm:requires-admin-action> <adm:other> <adm:synopsis> The <adm:user-friendly-name /> must be restarted if this property is changed and the asynchronous property is set to true. </adm:synopsis> </adm:other> </adm:requires-admin-action> <adm:default-behavior> <adm:defined> <adm:value>5000</adm:value> </adm:defined> </adm:default-behavior> <adm:syntax> <adm:integer lower-limit="0" /> <adm:integer lower-limit="1" /> </adm:syntax> <adm:profile name="ldap"> <ldap:attribute> opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedAuditLogPublisherConfiguration.xml
@@ -73,27 +73,13 @@ The maximum number of log records that can be stored in the asynchronous queue. </adm:synopsis> <adm:description> Setting the queue size to zero activates parallel log writer implementation which has no queue size limit and as such the parallel log writer should only be used on a very well tuned server configuration to avoid potential out of memory errors. </adm:description> <adm:requires-admin-action> <adm:other> <adm:synopsis> The <adm:user-friendly-name /> must be restarted if this property is changed and the asynchronous property is set to true. </adm:synopsis> </adm:other> </adm:requires-admin-action> <adm:default-behavior> <adm:defined> <adm:value>5000</adm:value> </adm:defined> </adm:default-behavior> <adm:syntax> <adm:integer lower-limit="0" /> <adm:integer lower-limit="1" /> </adm:syntax> <adm:profile name="ldap"> <ldap:attribute> opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/FileBasedHTTPAccessLogPublisherConfiguration.xml
@@ -73,27 +73,13 @@ The maximum number of log records that can be stored in the asynchronous queue. </adm:synopsis> <adm:description> Setting the queue size to zero activates parallel log writer implementation which has no queue size limit and as such the parallel log writer should only be used on a very well tuned server configuration to avoid potential out of memory errors. </adm:description> <adm:requires-admin-action> <adm:other> <adm:synopsis> The <adm:user-friendly-name /> must be restarted if this property is changed and the asynchronous property is set to true. </adm:synopsis> </adm:other> </adm:requires-admin-action> <adm:default-behavior> <adm:defined> <adm:value>5000</adm:value> </adm:defined> </adm:default-behavior> <adm:syntax> <adm:integer lower-limit="0" /> <adm:integer lower-limit="1" /> </adm:syntax> <adm:profile name="ldap"> <ldap:attribute> opendj-server-legacy/src/main/java/org/opends/server/loggers/ParallelTextWriter.java
File was deleted opendj-server-legacy/src/main/java/org/opends/server/loggers/TextAccessLogPublisher.java
@@ -102,10 +102,6 @@ { currentWriter = ((AsynchronousTextWriter) writer).getWrappedWriter(); } else if (writer instanceof ParallelTextWriter) { currentWriter = ((ParallelTextWriter) writer).getWrappedWriter(); } else { currentWriter = writer; @@ -118,8 +114,6 @@ if (config.isAsynchronous()) { if (useAsyncWriter(config)) { if (writer instanceof AsynchronousTextWriter) { if (hasAsyncConfigChanged(config)) @@ -130,13 +124,6 @@ previousWriter.shutdown(false); } } else if (writer instanceof ParallelTextWriter) { // convert parallel to async final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = newAsyncWriter(mfWriter, config); previousWriter.shutdown(false); } else { // turn async text writer on @@ -147,39 +134,6 @@ { if (writer instanceof AsynchronousTextWriter) { // convert async to parallel final AsynchronousTextWriter previousWriter = (AsynchronousTextWriter) writer; writer = newParallelWriter(mfWriter, config); previousWriter.shutdown(false); } else if (writer instanceof ParallelTextWriter) { if (hasParallelConfigChanged(config)) { // reinstantiate final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = newParallelWriter(mfWriter, config); previousWriter.shutdown(false); } } else { // turn parallel text writer on writer = newParallelWriter(mfWriter, config); } } } else { if (writer instanceof ParallelTextWriter) { // asynchronous is being turned off, remove parallel text writers. final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = mfWriter; previousWriter.shutdown(false); } else if (writer instanceof AsynchronousTextWriter) { // asynchronous is being turned off, remove async text writers. final AsynchronousTextWriter previousWriter = (AsynchronousTextWriter) writer; writer = mfWriter; @@ -276,17 +230,10 @@ if (cfg.isAsynchronous()) { if (useAsyncWriter(cfg)) { this.writer = newAsyncWriter(theWriter, cfg); } else { this.writer = newParallelWriter(theWriter, cfg); } } else { this.writer = theWriter; } } @@ -311,11 +258,6 @@ cfg.addFileBasedAccessChangeListener(this); } private boolean useAsyncWriter(FileBasedAccessLogPublisherCfg config) { return config.getQueueSize() > 0; } private boolean hasAsyncConfigChanged(FileBasedAccessLogPublisherCfg newConfig) { return hasParallelConfigChanged(newConfig) && cfg.getQueueSize() != newConfig.getQueueSize(); @@ -332,12 +274,6 @@ return new AsynchronousTextWriter(name, config.getQueueSize(), config.isAutoFlush(), mfWriter); } private ParallelTextWriter newParallelWriter(MultifileTextWriter mfWriter, FileBasedAccessLogPublisherCfg config) { String name = "Parallel Text Writer for " + config.dn(); return new ParallelTextWriter(name, config.isAutoFlush(), mfWriter); } @Override public boolean isConfigurationAcceptable( final FileBasedAccessLogPublisherCfg configuration, opendj-server-legacy/src/main/java/org/opends/server/loggers/TextHTTPAccessLogPublisher.java
@@ -124,10 +124,6 @@ { currentWriter = ((AsynchronousTextWriter) writer).getWrappedWriter(); } else if (writer instanceof ParallelTextWriter) { currentWriter = ((ParallelTextWriter) writer).getWrappedWriter(); } else { currentWriter = writer; @@ -140,8 +136,6 @@ if (config.isAsynchronous()) { if (useAsyncWriter(config)) { if (writer instanceof AsynchronousTextWriter) { if (hasAsyncConfigChanged(config)) @@ -152,13 +146,6 @@ previousWriter.shutdown(false); } } else if (writer instanceof ParallelTextWriter) { // convert parallel to async final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = newAsyncWriter(mfWriter, config); previousWriter.shutdown(false); } else { // turn async text writer on @@ -169,39 +156,6 @@ { if (writer instanceof AsynchronousTextWriter) { // convert async to parallel final AsynchronousTextWriter previousWriter = (AsynchronousTextWriter) writer; writer = newParallelWriter(mfWriter, config); previousWriter.shutdown(false); } else if (writer instanceof ParallelTextWriter) { if (hasParallelConfigChanged(config)) { // reinstantiate final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = newParallelWriter(mfWriter, config); previousWriter.shutdown(false); } } else { // turn parallel text writer on writer = newParallelWriter(mfWriter, config); } } } else { if (writer instanceof ParallelTextWriter) { // asynchronous is being turned off, remove parallel text writers. final ParallelTextWriter previousWriter = (ParallelTextWriter) writer; writer = mfWriter; previousWriter.shutdown(false); } else if (writer instanceof AsynchronousTextWriter) { // asynchronous is being turned off, remove async text writers. final AsynchronousTextWriter previousWriter = (AsynchronousTextWriter) writer; writer = mfWriter; @@ -275,11 +229,6 @@ return getFileForPath(config.getLogFile()); } private boolean useAsyncWriter(FileBasedHTTPAccessLogPublisherCfg config) { return config.getQueueSize() > 0; } private boolean hasAsyncConfigChanged(FileBasedHTTPAccessLogPublisherCfg newConfig) { return hasParallelConfigChanged(newConfig) && cfg.getQueueSize() != newConfig.getQueueSize(); @@ -296,12 +245,6 @@ return new AsynchronousTextWriter(name, config.getQueueSize(), config.isAutoFlush(), mfWriter); } private ParallelTextWriter newParallelWriter(MultifileTextWriter mfWriter, FileBasedHTTPAccessLogPublisherCfg config) { String name = "Parallel Text Writer for " + config.dn(); return new ParallelTextWriter(name, config.isAutoFlush(), mfWriter); } private List<String> extractFieldsOrder(String logFormat) { // there will always be at least one field value due to the regexp @@ -386,17 +329,10 @@ if (cfg.isAsynchronous()) { if (useAsyncWriter(cfg)) { this.writer = newAsyncWriter(theWriter, cfg); } else { this.writer = newParallelWriter(theWriter, cfg); } } else { this.writer = theWriter; } }