All Downloads are FREE. Search and download functionalities are using the official Maven repository.

water.api.RemoveHandler Maven / Gradle / Ivy

package water.api;

import water.DKV;
import water.Keyed;
import water.Lockable;

public class RemoveHandler extends Handler {
  @SuppressWarnings("unused") // called through reflection by RequestServer
  public RemoveV3 remove(int version, RemoveV3 u) {
    Keyed val = DKV.getGet(u.key.key());
    if (val != null) {
      if (val instanceof Lockable) ((Lockable) val).delete(); // Fails if object already locked
      else val.remove(); // Unconditional delete
    }
    return u;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy