org.springframework.data.hadoop.hbase
Class HbaseInterceptor

java.lang.Object
  extended by org.springframework.data.hadoop.hbase.HbaseInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class HbaseInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor

AOP interceptor that binds a new Hbase table to the thread before a method call, closing and removing it afterwards in case of any method outcome. If there is already a pre-bound table (from a previous call or transaction), the interceptor simply participates in it. Typically used alongside HbaseSynchronizationManager.

Author:
Costin Leau

Constructor Summary
HbaseInterceptor()
           
 
Method Summary
 Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
           
 void setExceptionConversionEnabled(boolean exceptionConversionEnabled)
          Sets whether to convert any IOException raised to a Spring DataAccessException, compatible with the org.springframework.dao exception hierarchy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HbaseInterceptor

public HbaseInterceptor()
Method Detail

setExceptionConversionEnabled

public void setExceptionConversionEnabled(boolean exceptionConversionEnabled)
Sets whether to convert any IOException raised to a Spring DataAccessException, compatible with the org.springframework.dao exception hierarchy.

Default is "true". Turn this flag off to let the caller receive raw exceptions as-is, without any wrapping.

See Also:
DataAccessException

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
              throws Throwable
Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
Throwable