com.gisgraphy.domain.repository

## Class SolRSynchroniser

- java.lang.Object
- - com.gisgraphy.domain.repository.SolRSynchroniser

- All Implemented Interfaces:
    ISolRSynchroniser

      public class SolRSynchroniser
      extends Object
      implements ISolRSynchroniser

  Interface of data access object for `Language`
  Author:
    David Masclet
  See Also:
    `ISolRSynchroniser`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static org.slf4j.Logger` | `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SolRSynchroniser(IsolrClient solrClient)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `commit()` Send a commit to the full text search engine
    `void` | `deleteAll()` /!
    `void` | `deleteAllByPlaceType(Class<? extends GisFeature> placetype)`
    `void` | `handleEvent(IEvent event)` handle an event in order to synchronise Data (the event may be add, update, delete a GIS object)
    `void` | `handleEvent(PlaceTypeDeleteAllEvent placeTypeDeleteAllEvent)`
    `void` | `optimize()` Send a optimize command to the full text search engine

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### logger

          protected static final org.slf4j.Logger logger

  - ### Constructor Detail

    - #### SolRSynchroniser

          public SolRSynchroniser(IsolrClient solrClient)

  - ### Method Detail

    - #### deleteAll

          public void deleteAll()

      Description copied from interface: `ISolRSynchroniser`
      /!\USE IT WITH CARE/!\ : The Database and The full text search engine may be de-synchronised, because this method does not delete data in Database Delete all the data in the fulltext search engine AND COMMIT
      Specified by:
        `deleteAll` in interface `ISolRSynchroniser`

    - #### handleEvent

          public void handleEvent(PlaceTypeDeleteAllEvent placeTypeDeleteAllEvent)

    - #### deleteAllByPlaceType

          public void deleteAllByPlaceType(Class<? extends GisFeature> placetype)

    - #### handleEvent

          public void handleEvent(IEvent event)

      Description copied from interface: `ISolRSynchroniser`
      handle an event in order to synchronise Data (the event may be add, update, delete a GIS object)
      Specified by:
        `handleEvent` in interface `ISolRSynchroniser`
      Parameters:
        `event` - The event to handle

    - #### commit

          public boolean commit()

      Description copied from interface: `ISolRSynchroniser`
      Send a commit to the full text search engine
      Specified by:
        `commit` in interface `ISolRSynchroniser`
      Returns:
        true if success or false other case. it does not throw exception because the commit may not be required because of the auto commit functionnality in solr. it is up to the caller to deal with this

    - #### optimize

          public void optimize()

      Description copied from interface: `ISolRSynchroniser`
      Send a optimize command to the full text search engine
      Specified by:
        `optimize` in interface `ISolRSynchroniser`

Copyright © 2015. All rights reserved.