org.springframework.data.hadoop.hbase
Class HbaseInterceptor
java.lang.Object
org.springframework.data.hadoop.hbase.HbaseAccessor
org.springframework.data.hadoop.hbase.HbaseInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor, org.springframework.beans.factory.InitializingBean
public class HbaseInterceptor
- extends HbaseAccessor
- 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
Method Summary |
void |
afterPropertiesSet()
|
java.lang.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. |
void |
setTableNames(java.lang.String[] tableNames)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HbaseInterceptor
public HbaseInterceptor()
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in class HbaseAccessor
invoke
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation)
throws java.lang.Throwable
- Specified by:
invoke
in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
java.lang.Throwable
setTableNames
public void setTableNames(java.lang.String[] tableNames)
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