## org.firebirdsql.gds.impl.jni
Class GDSSynchronizationPolicy.AbstractSynchronizationPolicy

    java.lang.Object
      org.firebirdsql.gds.impl.jni.GDSSynchronizationPolicy.AbstractSynchronizationPolicy

All Implemented Interfaces:
  Serializable, InvocationHandler

Direct Known Subclasses:
  GDSSynchronizationPolicy.ClientLibrarySyncPolicy

Enclosing class:
  GDSSynchronizationPolicy

    public abstract static class GDSSynchronizationPolicy.AbstractSynchronizationPolicy

extends Object
implements InvocationHandler, Serializable

Abstract synchronization policy. This class should be used as invocation handler for dynamic proxy that will wrap corresponding `GDS` implementation.

See Also:
  Serialized Form

Constructor Summary
`protected` `GDSSynchronizationPolicy.AbstractSynchronizationPolicy(GDS gds)`

Method Summary
`protected GDS` `getGds()`
`protected abstract Object` `getSynchronizationObject()`
`Object` `invoke(Object proxy, Method method, Object[] args)` Invoke some method.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### GDSSynchronizationPolicy.AbstractSynchronizationPolicy

    protected GDSSynchronizationPolicy.AbstractSynchronizationPolicy(GDS gds)

Method Detail

### getGds

    protected GDS getGds()

### getSynchronizationObject

    protected abstract Object getSynchronizationObject()

### invoke

    public Object invoke(Object proxy,
                         Method method,
                         Object[] args)
                  throws Throwable

  Invoke some method. This method uses synchronization object returned by `getSynchronizationObject()` method to ensure appropriate synchronization policy when accessing the `GDS` implementation.

  Specified by:
    `invoke` in interface `InvocationHandler`
  Parameters:
    `proxy` - proxy object, ignored.
    `method` - method to invoke on wrapped object.
    `args` - arguments to pass.
  Returns:
    value returned by the wrapped object.
  Throws:
    `Throwable` - if exception is raised during execution.

Copyright © 2001-2010. All Rights Reserved.