FileDocCategorySizeDatePackage
Voyager4A.javaAPI DocExample1094Sat Sep 12 03:01:00 BST 1998None

Voyager4A

public class Voyager4A extends Object
Persist a container.
version
3.0.0
author
ObjectSpace, Inc.

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)
This example only works with ObjectSpace Voyager(tm). Visit the Voyager homepage for more information.

    try
      {
      // create and fill a remote map
      VHashMap map = new VHashMap( "localhost:8000/JGL4" );
      map.add( "Spider-Man", "Peter Parker" );
      map.add( "Wolverine", "Logan" );
      map.add( "Batman", "Bruce Wayne" );
      map.add( "Oracle", "Barbara Gordon" );
      map.liveForever(); // do not garbage collect
      map.saveNow(); // save copy to database of server 8000
      System.out.println( "saved " + map );
      }
    catch ( VoyagerException ex )
      {
      System.err.println( "caught: " + ex );
      }

    Voyager.shutdown();