An implementation of an event listener interface defines callbacks that will be invoked at various points within the import or export operation.

Interface OperationEventListener

Callbacks are invoked during import or export operations, so defining one or more will impact performance. Each of these methods will be applied for either an import or an export operation.

  • void onBeforeType(TypeOperationEvent event) Invoked before VMware Tanzu Greenplum SQL types are resolved into VMware Tanzu GemFire region fields.

  • void onAfterType(TypeOperationEvent event) Invoked after Greenplum Database SQL types are resolved into GemFire region fields.

  • void onBeforeExternalTable(ExternalTableOperationEvent event) Invoked before an External Greenplum Database table is created.

  • void onAfterExternalTable(ExternalTableOperationEvent event) Invoked after an External Greenplum Database table is created.

  • void onBeforeCommit(CommitOperationEvent event) Invoked after the import or export of data, but before any Greenplum Database commit.

  • void onAfterCommit(CommitOperationEvent event) Invoked after the import or export of data and after any Greenplum Database commit.

Code Fragment Examples

//CustomOperationEventListener class
public class CustomOperationEventListener
       extends AbstractOperationEventListener{

    public void onAfterExternalTable(ExternalTableOperationEvent event) {
      // Do something against an external table after it gets created

// Example - import operation with an event listener
ImportConfiguration importConfig = ImportConfiguration.builder(region)
    .addOperationEventListener(new CustomOperationEventListener())

// UPSERT export operation with the same event listener
ExportConfiguration exportConfig = ExportConfiguration.builder(region)
    .addOperationEventListener(new CustomOperationEventListener())
check-circle-line exclamation-circle-line close-line
Scroll to top icon