Class Events

java.lang.Object
com.couchbase.client.core.utils.Events

public class Events
extends Object
Utility methods for event handling.
Since:
1.2.0
Author:
Michael Nitschinger
  • Constructor Details

    • Events

      public Events()
  • Method Details

    • identityMap

      public static Map<String,​Object> identityMap​(CouchbaseEvent source)
      Takes a CouchbaseEvent and returns a map with event information.
      Parameters:
      source - the source event.
      Returns:
      a new map which contains name and type info in an event sub-map.
    • toJson

      public static String toJson​(CouchbaseEvent source, boolean pretty)
      Takes a CouchbaseEvent and generates a JSON string.
      Parameters:
      source - the source event.
      pretty - if pretty print should be used.
      Returns:
      the generated json string.