Replace an object in the runtime store

  1. Invoke replace().
  2. Create a try/catch block to manage the ControlledAccessException that replace() throws if the runtime object with the specified ID does not exist.
    RuntimeStore store = RuntimeStore.getRuntimeStore();
    String newmsg = "Some new text";
    try {
    Object obj = store.replace( 0x60ac754bc0867248L, newmsg);
    } catch(ControlledAccessException e) {
    } not exist.

Was this information helpful? Send us your comments.