Index

C D E F G H I M N R S T V 
All Classes and Interfaces|All Packages|Serialized Form

C

ClockMovedBackwardsException - Exception Class in com.fayupable.snowflake.exception
Thrown when the clock source reports a time earlier than the last generated id's timestamp.
ClockMovedBackwardsException(long, long) - Constructor for exception class com.fayupable.snowflake.exception.ClockMovedBackwardsException
 
ClockSource - Interface in com.fayupable.snowflake.port
Output port that abstracts the current time source.
com.fayupable.snowflake - package com.fayupable.snowflake
 
com.fayupable.snowflake.config - package com.fayupable.snowflake.config
 
com.fayupable.snowflake.exception - package com.fayupable.snowflake.exception
 
com.fayupable.snowflake.jpa - package com.fayupable.snowflake.jpa
 
com.fayupable.snowflake.jpaspring - package com.fayupable.snowflake.jpaspring
 
com.fayupable.snowflake.port - package com.fayupable.snowflake.port
 

D

defaultConfig(long, long) - Static method in record class com.fayupable.snowflake.config.SnowflakeConfig
 

E

epoch() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns the value of the epoch record component.
equals(Object) - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Indicates whether some other object is "equal to" this one.
equals(Object) - Method in record class com.fayupable.snowflake.SnowflakeId
Indicates whether some other object is "equal to" this one.

F

fromLong(long, SnowflakeConfig) - Static method in record class com.fayupable.snowflake.SnowflakeId
 

G

generate(SharedSessionContractImplementor, Object) - Method in class com.fayupable.snowflake.jpa.SnowflakeIdentifierGenerator
Produces the next id for an entity about to be inserted.
getEpoch() - Method in class com.fayupable.snowflake.jpaspring.SnowflakeProperties
 
getInstance() - Static method in class com.fayupable.snowflake.jpa.SnowflakeIdGeneratorHolder
Returns the currently registered IdGenerator.
getNodeId() - Method in class com.fayupable.snowflake.jpaspring.SnowflakeProperties
 

H

hashCode() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns a hash code value for this object.
hashCode() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns a hash code value for this object.

I

idGenerator(SnowflakeProperties, ObjectProvider<MeterRegistry>) - Method in class com.fayupable.snowflake.jpaspring.SnowflakeAutoConfiguration
Creates the singleton IdGenerator for this application instance and registers it with SnowflakeIdGeneratorHolder so that @SnowflakeGeneratedId-annotated entity fields can be populated by Hibernate.
IdGenerator - Interface in com.fayupable.snowflake.port
Input port for generating unique identifiers.
INSTANCE - Static variable in class com.fayupable.snowflake.NoOpSnowflakeMetrics
 

M

maxSequence() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
 
MicrometerSnowflakeMetrics - Class in com.fayupable.snowflake.jpaspring
Publishes generator activity as Micrometer counters, so it shows up in whatever backend the application already has configured (Prometheus, Grafana, or nothing at all if no registry is wired).
MicrometerSnowflakeMetrics(MeterRegistry) - Constructor for class com.fayupable.snowflake.jpaspring.MicrometerSnowflakeMetrics
 
millis() - Method in interface com.fayupable.snowflake.port.ClockSource
 
millis() - Method in class com.fayupable.snowflake.SystemClock
 

N

nextId() - Method in interface com.fayupable.snowflake.port.IdGenerator
 
nextId() - Method in class com.fayupable.snowflake.SnowflakeIdGenerator
 
nodeBits() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns the value of the nodeBits record component.
nodeId() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns the value of the nodeId record component.
nodeId() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns the value of the nodeId record component.
nodeShift() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
 
NoOpSnowflakeMetrics - Class in com.fayupable.snowflake
Default SnowflakeMetrics implementation that discards every event.

R

recordIdGenerated() - Method in class com.fayupable.snowflake.jpaspring.MicrometerSnowflakeMetrics
 
recordIdGenerated() - Method in class com.fayupable.snowflake.NoOpSnowflakeMetrics
 
recordIdGenerated() - Method in interface com.fayupable.snowflake.port.SnowflakeMetrics
Called every time nextId() successfully produces an id.
recordSpinWait() - Method in class com.fayupable.snowflake.jpaspring.MicrometerSnowflakeMetrics
 
recordSpinWait() - Method in class com.fayupable.snowflake.NoOpSnowflakeMetrics
 
recordSpinWait() - Method in interface com.fayupable.snowflake.port.SnowflakeMetrics
Called every time the generator spins waiting for the clock to advance because the current millisecond's sequence capacity is exhausted.
reset() - Static method in class com.fayupable.snowflake.jpa.SnowflakeIdGeneratorHolder
Clears the held instance so it does not leak across independent test contexts.

S

sequence() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns the value of the sequence record component.
sequenceBits() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns the value of the sequenceBits record component.
setEpoch(Instant) - Method in class com.fayupable.snowflake.jpaspring.SnowflakeProperties
 
setInstance(IdGenerator) - Static method in class com.fayupable.snowflake.jpa.SnowflakeIdGeneratorHolder
setNodeId(long) - Method in class com.fayupable.snowflake.jpaspring.SnowflakeProperties
 
SnowflakeAutoConfiguration - Class in com.fayupable.snowflake.jpaspring
Wires a Spring-managed IdGenerator from SnowflakeProperties and publishes it to SnowflakeIdGeneratorHolder, since Hibernate instantiates SnowflakeIdentifierGenerator via reflection and never asks the ApplicationContext for it.
SnowflakeAutoConfiguration() - Constructor for class com.fayupable.snowflake.jpaspring.SnowflakeAutoConfiguration
 
SnowflakeConfig - Record Class in com.fayupable.snowflake.config
Configuration for the Snowflake id layout.
SnowflakeConfig(long, long, int, int, int) - Constructor for record class com.fayupable.snowflake.config.SnowflakeConfig
Creates an instance of a SnowflakeConfig record class.
SnowflakeGeneratedId - Annotation Interface in com.fayupable.snowflake.jpa
Marks a JPA id field or property as generated by the Snowflake algorithm.
SnowflakeId - Record Class in com.fayupable.snowflake
Value object representing a generated Snowflake id decomposed into its parts.
SnowflakeId(long, long, long, long) - Constructor for record class com.fayupable.snowflake.SnowflakeId
Creates an instance of a SnowflakeId record class.
SnowflakeIdentifierGenerator - Class in com.fayupable.snowflake.jpa
Hibernate IdentifierGenerator that delegates id generation to whatever IdGenerator is registered in SnowflakeIdGeneratorHolder.
SnowflakeIdentifierGenerator() - Constructor for class com.fayupable.snowflake.jpa.SnowflakeIdentifierGenerator
 
SnowflakeIdGenerator - Class in com.fayupable.snowflake
Thread-safe Snowflake id generator.
SnowflakeIdGenerator(SnowflakeConfig, ClockSource) - Constructor for class com.fayupable.snowflake.SnowflakeIdGenerator
 
SnowflakeIdGenerator(SnowflakeConfig, ClockSource, SnowflakeMetrics) - Constructor for class com.fayupable.snowflake.SnowflakeIdGenerator
 
SnowflakeIdGeneratorHolder - Class in com.fayupable.snowflake.jpa
Static bridge between a Spring/DI-managed IdGenerator and Hibernate, which instantiates SnowflakeIdentifierGenerator via reflection and never consults the dependency injection container.
SnowflakeMetrics - Interface in com.fayupable.snowflake.port
Output port for observing generator activity.
SnowflakeProperties - Class in com.fayupable.snowflake.jpaspring
Binds to the snowflake prefix in application.yml / application.properties.
SnowflakeProperties() - Constructor for class com.fayupable.snowflake.jpaspring.SnowflakeProperties
 
SystemClock - Class in com.fayupable.snowflake
Production adapter for ClockSource, backed by the system clock.
SystemClock() - Constructor for class com.fayupable.snowflake.SystemClock
 

T

timestamp() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns the value of the timestamp record component.
timestampBits() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns the value of the timestampBits record component.
timestampShift() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
 
toString() - Method in record class com.fayupable.snowflake.config.SnowflakeConfig
Returns a string representation of this record class.
toString() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns a string representation of this record class.

V

value() - Method in record class com.fayupable.snowflake.SnowflakeId
Returns the value of the value record component.
C D E F G H I M N R S T V 
All Classes and Interfaces|All Packages|Serialized Form