A local in-memory eXtreme Scale configuration can be created by using an ObjectGrid descriptor XML file or eXtreme Scale APIs.
A simple XML example follows: the companyGrid.xml file. The first few lines of the file include the required header for each ObjectGrid XML file. The file defines the CompanyGrid ObjectGrid with Customer, Item, OrderLine, and Order BackingMaps. A deployment policy XML file is passed to an eXtreme Scale container during startup.
companyGrid.xml file <?xml version="1.0" encoding="UTF-8"?> <objectGridConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://ibm.com/ws/objectgrid/config ../objectGrid.xsd" xmlns="http://ibm.com/ws/objectgrid/config"> <objectGrids> <objectGrid name="CompanyGrid"> <backingMap name="Customer" /> <backingMap name="Item" /> <backingMap name="OrderLine" /> <backingMap name="Order" /> </objectGrid> </objectGrids> </objectGridConfig>
ObjectGridManager objectGridManager = ObjectGridManagerFactory.getObjectGridManager(); ObjectGrid companyGrid = objectGridManager.createObjectGrid("CompanyGrid", new URL("file:etc/test/companyGrid.xml"), true, false);
ObjectGridManager objectGridManager = ObjectGridManagerFactory.getObjectGridManager(); ObjectGrid companyGrid = objectGridManager.createObjectGrid ("CompanyGrid", false); BackingMap customerMap= companyGrid.defineMap("Customer"); BackingMap itemMap= companyGrid.defineMap("Item"); BackingMap orderLineMap= companyGrid.defineMap("OrderLine"); BackingMap orderMap = companyGrid.defineMap("Order");eXtreme Scale has many customizable plug-ins and attributes. For a complete description of the ObjectGrid XML file, see the eXtreme Scale configuration reference.