|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MapInterceptor
MapInterceptor is used to intercept changes to the map, allowing access to the values before and after adding it to the map MapInterceptors are chained when added to the map, which means that when an interceptor is added on node initialization it could be added twice. To prevent this make sure to implement the hashCode method to return the same value for every instance of the class.
Method Summary | |
---|---|
void |
afterGet(Object value)
Called after get(..) operation is completed. |
void |
afterPut(Object value)
Called after put(..) operation is completed. |
void |
afterRemove(Object value)
Called after remove(..) operation is completed. |
Object |
interceptGet(Object value)
Intercept get operation before returning value. |
Object |
interceptPut(Object oldValue,
Object newValue)
Intercept put operation before modifying map data. |
Object |
interceptRemove(Object removedValue)
Intercept remove operation before removing the data. |
Method Detail |
---|
Object interceptGet(Object value)
value
- the original value to be returned as the result of get(..) operation
void afterGet(Object value)
value
- the value returned as the result of get(..) operationObject interceptPut(Object oldValue, Object newValue)
oldValue
- the value currently in mapnewValue
- the new value to be put
void afterPut(Object value)
value
- the value returned as the result of put(..) operationObject interceptRemove(Object removedValue)
removedValue
- the existing value to be removed
void afterRemove(Object value)
value
- the value returned as the result of remove(..) operation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |