Add an object to the runtime store
- Invoke RuntimeStore.put(long, String) and provide as parameters a unique long ID and the runtime object to store.
- Create a try/catch block to manage the IllegalArgumentException that put() throws if a runtime object with the same ID exists.
RuntimeStore store = RuntimeStore.getRuntimeStore();
String msg = "Some shared text";
long ID = 0x60ac754bc0867248L;
try {
store.put( ID, msg );
} catch(IllegalArgumentException e) {
}
Was this information helpful? Send us your comments.