org.eclipse.emf.cdo.server

## Interface IRepository.WriteAccessHandler

- All Superinterfaces:
    IRepository.Handler
  All Known Implementing Classes:
    ObjectWriteAccessHandler
  Enclosing interface:
    IRepository

      public static interface IRepository.WriteAccessHandler
      extends IRepository.Handler

  Provides a way to handle commits that are received from a client.
  Since:
    2.0
  Author:
    Eike Stepper

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `IRepository.WriteAccessHandler.TransactionValidationException` An exception that a `IRepository.WriteAccessHandler` may throw to indicate that a transaction commit was rejected because one or more semantic validation checks reported errors.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handleTransactionAfterCommitted(ITransaction transaction, IStoreAccessor.CommitContext commitContext, OMMonitor monitor)` Provides a way to handle transactions after they have been committed to the backend store.
    `void` | `handleTransactionBeforeCommitting(ITransaction transaction, IStoreAccessor.CommitContext commitContext, OMMonitor monitor)` Provides a way to handle transactions that are to be committed to the backend store.

- - ### Method Detail

    - #### handleTransactionBeforeCommitting

          void handleTransactionBeforeCommitting(ITransaction transaction,
                                                 IStoreAccessor.CommitContext commitContext,
                                                 OMMonitor monitor)
                                          throws RuntimeException

      Provides a way to handle transactions that are to be committed to the backend store.
      Parameters:
        `transaction` - The transaction that is going to be committed.
        `commitContext` - The context of the commit operation that is to be executed against the backend store. The context can be used to introspect all aspects of the current commit operation. Note that you must not alter the internal state of the commit context in any way!
        `monitor` - A monitor that should be used by the implementor to avoid timeouts.
      Throws:
        `IRepository.WriteAccessHandler.TransactionValidationException` - to indicate that the commit operation must not be executed against the backend store because some semantic validation checks failed. The message should describe the validation failure and will be passed through to the client
        `RuntimeException` - to indicate that the commit operation must not be executed against the backend store. This exception will be visible at the client side!

    - #### handleTransactionAfterCommitted

          void handleTransactionAfterCommitted(ITransaction transaction,
                                               IStoreAccessor.CommitContext commitContext,
                                               OMMonitor monitor)

      Provides a way to handle transactions after they have been committed to the backend store.
      Parameters:
        `transaction` - The transaction that has been committed.
        `commitContext` - The context of the commit operation that was executed against the backend store. The context can be used to introspect all aspects of the current commit operation. Note that you must not alter the internal state of the commit context in any way!
        `monitor` - A monitor that should be used by the implementor to avoid timeouts.
      Since:
        3.0

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html