What literary device is used in the phrase "lockers slammed shut like a rhythmic beat"?

SImile
SImile

Metaphor
Metaphor

Personification
Personification

Hyperbole

Personification