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

Silme
Metaphor
personification
Hyperbole

personification