Yes, it can be set to learn 2 MAC address and each entry will have a "aging time" to remember disconnected devices. If you connect a new device too soon, it will trigger a violation and cause the port to shutdown, restrict or Protect.
Shutdown - port changes to err-disable state, send SNMP/Syslog.
Protect - cannot send traffic in.
Restrict - cannot send traffic in and send SNMP/Syslogs.