Home / Function/ defaultMachineId() — netty Function Reference

defaultMachineId() — netty Function Reference

Architecture documentation for the defaultMachineId() function in MacAddressUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  ae9e0cc2_d1a5_209d_7506_53283cf656bf["defaultMachineId()"]
  a4685b43_b51c_914d_456a_1efa65aff7a6["MacAddressUtil"]
  ae9e0cc2_d1a5_209d_7506_53283cf656bf -->|defined in| a4685b43_b51c_914d_456a_1efa65aff7a6
  076ea31f_ecd7_dd77_e9b3_a6aaa2aded58["bestAvailableMac()"]
  ae9e0cc2_d1a5_209d_7506_53283cf656bf -->|calls| 076ea31f_ecd7_dd77_e9b3_a6aaa2aded58
  style ae9e0cc2_d1a5_209d_7506_53283cf656bf fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/MacAddressUtil.java lines 129–139

    public static byte[] defaultMachineId() {
        byte[] bestMacAddr = bestAvailableMac();
        if (bestMacAddr == null) {
            bestMacAddr = new byte[EUI64_MAC_ADDRESS_LENGTH];
            ThreadLocalRandom.current().nextBytes(bestMacAddr);
            logger.warn(
                    "Failed to find a usable hardware address from the network interfaces; using random bytes: {}",
                    formatAddress(bestMacAddr));
        }
        return bestMacAddr;
    }

Domain

Subdomains

Frequently Asked Questions

What does defaultMachineId() do?
defaultMachineId() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/MacAddressUtil.java.
Where is defaultMachineId() defined?
defaultMachineId() is defined in common/src/main/java/io/netty/util/internal/MacAddressUtil.java at line 129.
What does defaultMachineId() call?
defaultMachineId() calls 1 function(s): bestAvailableMac.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free