Skip to main content

Thread: Java destructor/shutdown hook


hey all

i'm building system in java makes use of database implementation works serializing data structures give program persistent storage. on system exit these objects serialized file, , on system initialization they're rebuilt. add crash protection implementation objects serialized file when program or jvm crashes. how can this? i've looked using destructors, they're called when gc run, , these objects never gc'd. haven't been able find enough information using runtime.addshutdownhook know if work in event of crash or not. solution, or there else haven't found yet?
thanks.

why not periodically serialize objects disk while running? not java expert, don't know if can rely on running code in response 'crash'.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Java destructor/shutdown hook


Ubuntu

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support