Set wifi connection as metered in Android 5.0
There isn't much difference to the default proceedure for metering wi-fi networks in android.

Here is the proceedure in Samsung J5 Android 5 (which I believe is similar o your device):

Go to Settings → Data Usage → More → Restrict networks


  This will show a list of all the Wi-Fi networks the device has ever
  connected to. Use the switches to enable restrictions on any given
  network. Once activated, this will prevent apps from using background
  data on that network, and you’ll also get a warning before any large
  downloads.