Skip to content

Commit

Permalink
Merge pull request #541 from logstash/remove_threadNamePrefix
Browse files Browse the repository at this point in the history
Remove deprecated AsyncDisruptorAppender.threadNamePrefix
  • Loading branch information
philsttr authored Jun 26, 2021
2 parents 7e16e02 + b99eee0 commit b0d9047
Showing 1 changed file with 0 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,34 +531,6 @@ protected void setThreadPoolCoreSize(int threadPoolCoreSize) {
this.threadPoolCoreSize = threadPoolCoreSize;
}

/**
* @deprecated use {@link #getThreadNameFormat()}
*/
@Deprecated
public String getThreadNamePrefix() {
if (this.threadNameFormat != null && this.threadNameFormat.endsWith(THREAD_INDEX_FORMAT)) {
/*
* Try to return the old-style threadNamePrefix
*/
return this.threadNameFormat.substring(0, this.threadNameFormat.length() - THREAD_INDEX_FORMAT.length());
}
/*
* Otherwise, just default to return the regular format
*/
return threadNameFormat;
}

/**
* This is the old way to customize thread names.
*
* @param threadNamePrefix
* @deprecated use {@link #setThreadNameFormat(String)} instead.
*/
@Deprecated
public void setThreadNamePrefix(String threadNamePrefix) {
setThreadNameFormat(threadNamePrefix + THREAD_INDEX_FORMAT);
}

public String getThreadNameFormat() {
return threadNameFormat;
}
Expand Down

0 comments on commit b0d9047

Please sign in to comment.