Home Help Center

Object Factory

enzoenzo Member Enzo LarsenOrganization: digitalspassProject: Forum
Hi

In the section 21.6.2 Implementing The file system server in C++.
An Object Factory is used on the documentation side's Ice1.1.1 page 595 and Ice1.3.0 page 618.
The explanation in the section 21.5.2 of Object Factories.
Documentation side´s Ice1.1.1 page 589 and Ice1.3.0 page 610 says, The Freeze evictor is are generic facility in that it manages instances of Object subclasses.

I want to produce an Instance of a class in the DB, can I use the Object Factory of this class?

Thx 4 help
enzo

Comments

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    Sorry, I'm not sure I understand your question. You can find examples of using the Freeze evictor and object factories in the demo/Freeze/library and demo/Freeze/phonebook.

    Take care,
    - Mark
  • enzoenzo Member Enzo LarsenOrganization: digitalspassProject: Forum
    // Create the root node if it doesn't exist
    //
    Ice.Identity rootId =
    Ice.Util.stringToIdentity("RootDir");
    if(!evictor.hasObject(rootId))
    {
    PersistentDirectory root = new DirectoryI(rootId);
    root.nodeName = "/";
    root.nodes = new java.util.HashMap();
    evictor.createObject(rootId, root);
    }



    PersistentDirectory root = new DirectoryI(rootId);

    can I do this by the Factory?
Sign In or Register to comment.