Skip to content

Scan UuidGenerator implementations without starting them #2933

Open
@mpkorstanje

Description

@mpkorstanje

The ideal solution would be to have the UuidGenerator return a supplier instance that keeps the state internally.

public interface UuidGenerator {

    Supplier<UUID> supplier();
}

And then have the UuidGeneratorServiceLoader return that supplier only for the selected generator. Fortunately the UuidGenerator is experimental so I don't feel too bad about breaking the contract. But I'd rather avoid doing that on a patch version.

Originally posted by @mpkorstanje in #2931 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions