// Path: src/main/java/kafka/utils/SystemTime.java
// public class SystemTime implements Time {
//     public static final SystemTime instance = new SystemTime();
// 
//     @Override
//     public long milliseconds() {
//         return System.currentTimeMillis();
//     }
// 
//     @Override
//     public long nanoseconds() {
//         return System.nanoTime();
//     }
// 
//     @Override
//     public void sleep(long ms) {
//         try {
//             Thread.sleep(ms);
//         } catch (InterruptedException e) {
// 
//         }
//     }
// }


import kafka.utils.SystemTime;
import kafka.utils.Time;
import kafka.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
                        int numProcessorThreads,
                        int maxQueuedRequests,
                        int sendBufferSize,
                        int recvBufferSize) {
        this(brokerId, host, port, numProcessorThreads, maxQueuedRequests, sendBufferSize, recvBufferSize, Integer.MAX_VALUE);
    }

    public SocketServer(int brokerId,
                        String host,
                        int port,
                        int numProcessorThreads,
                        int maxQueuedRequests,
                        int sendBufferSize,
                        int recvBufferSize,
                        int maxRequestSize) {
        this.brokerId = brokerId;
        this.host = host;
        this.port = port;
        this.numProcessorThreads = numProcessorThreads;
        this.maxQueuedRequests = maxQueuedRequests;
        this.sendBufferSize = sendBufferSize;
        this.recvBufferSize = recvBufferSize;
        this.maxRequestSize = maxRequestSize;

        logger = LoggerFactory.getLogger(SocketServer.class + "[on Broker " + brokerId + "]");
        processors = new Processor[numProcessorThreads];
        requestChannel = new RequestChannel(numProcessorThreads, maxQueuedRequests);
    }

    Logger logger;
// Path: src/main/java/kafka/utils/SystemTime.java
// public class SystemTime implements Time {
//     public static final SystemTime instance = new SystemTime();
// 
//     @Override
//     public long milliseconds() {
//         return System.currentTimeMillis();
//     }
// 
//     @Override
//     public long nanoseconds() {
//         return System.nanoTime();
//     }
// 
//     @Override
//     public void sleep(long ms) {
//         try {
//             Thread.sleep(ms);
//         } catch (InterruptedException e) {
// 
//         }
//     }
// }


// Path: src/main/java/kafka/network/SocketServer.java
import kafka.utils.SystemTime;
import kafka.utils.Time;
import kafka.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

                        int numProcessorThreads,
                        int maxQueuedRequests,
                        int sendBufferSize,
                        int recvBufferSize) {
        this(brokerId, host, port, numProcessorThreads, maxQueuedRequests, sendBufferSize, recvBufferSize, Integer.MAX_VALUE);
    }

    public SocketServer(int brokerId,
                        String host,
                        int port,
                        int numProcessorThreads,
                        int maxQueuedRequests,
                        int sendBufferSize,
                        int recvBufferSize,
                        int maxRequestSize) {
        this.brokerId = brokerId;
        this.host = host;
        this.port = port;
        this.numProcessorThreads = numProcessorThreads;
        this.maxQueuedRequests = maxQueuedRequests;
        this.sendBufferSize = sendBufferSize;
        this.recvBufferSize = recvBufferSize;
        this.maxRequestSize = maxRequestSize;

        logger = LoggerFactory.getLogger(SocketServer.class + "[on Broker " + brokerId + "]");
        processors = new Processor[numProcessorThreads];
        requestChannel = new RequestChannel(numProcessorThreads, maxQueuedRequests);
    }

    Logger logger;
    private Time time = SystemTime.instance;