private static void runCompression(NativeIO nativeIO, Path oldFile, Compression compression) {
            switch (compression) {
                case ZSTD:
                    runCompressionZstd(nativeIO, oldFile);
                    break;
                case GZIP:
                    runCompressionGzip(nativeIO, oldFile);
                    break;
                case NONE:
                    runCompressionNone(nativeIO, oldFile);
                    break;
                default:
                    throw new IllegalArgumentException("Unknown compression " + compression);
            }
        }
Find next rotation after specified time.

@param now the specified time; if zero, current time is used.
@return the next rotation time
container-core/src/main/java/com/yahoo/container/logging/LogFileHandler.java