This page describes an older version of the product. The latest stable version is 16.4.

Archive Handler

The Archive Container can be configured to work against MongoDB (without writing any extra code). The ArchiveOperationHandler interface abstracts the Big-Data storage from the Archive Container. The MongoDB Archive Operation Handler implements this interface by serializing space objects into MongoDB.

Library dependencies

The MongoDB Archive Operation Handler uses the MongoDB driver for communicating with the MongoDB cluster. Include the following in your pom.xml

    <!-- currently the MongoDB library is not the central maven repository --> 

        <!-- mongodb java driver -->




    <bean id="mongoArchiveHandler" class="com.gigaspaces.persistency.archive.MongoArchiveOperationHandler">
        <property name="gigaSpace" ref="gigaSpace" />
        <property name="config" ref="config" />
        <property name="db" value="${mongodb.db}" />

    ArchiveOperationHandler mongoArchiveHandler =
        new MongoArchiveOperationHandlerConfigurer()

    // To free the resources used by the archive container make sure you close it properly.
    // A good life cycle event to place the destroy() call would be within the @PreDestroy or   DisposableBean#destroy() method.


MongoArchiveOperationHandler Properties

Property Description
gigaSpace GigaSpace reference used for type descriptors. see Archive Container
config MongoClientConfiguration reference used to handle the mongodb driver configuration. see MongoClient
db mongodb database name