Code example for LinkedBlockingQueue

0
package net.md_5.bungee.log; 
 
import java.util.concurrent.BlockingQueue; 
import java.util.concurrent.LinkedBlockingQueue; 
import java.util.logging.LogRecord; 
 
public class LogDispatcher extends Thread
{ 
 
    private final BungeeLogger logger;
    private final BlockingQueue<LogRecord> queue = new LinkedBlockingQueue<>();
 
    public LogDispatcher(BungeeLogger logger)
    { 
        super( "BungeeCord Logger Thread" ); 
        this.logger = logger;
    } 
 
    @Override 
    public void run() 
    { 
        while ( !isInterrupted() )
        { 
            LogRecord record;
            try 
            {