org.xvsm.remote.freepastry
Class MyAspect

Package class diagram package MyAspect
java.lang.Object
  extended by org.xvsm.core.aspect.IAspect
      extended by org.xvsm.core.aspect.LocalAspect
          extended by org.xvsm.remote.freepastry.MyAspect
All Implemented Interfaces:
java.io.Serializable

public class MyAspect
extends LocalAspect

Aspect, which writes the values of a write operation into the replicas, before they are written into the container.

Author:
Hannu-Daniel Goiss
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.xvsm.core.aspect.IAspect
properties
 
Constructor Summary
MyAspect()
           
 
Method Summary
 void preDestroy(ContainerRef cref, Transaction tx, java.util.List<Selector> selectors, java.util.Properties contextProperties)
          Called before a delete operation is executed.
 void preShift(ContainerRef cref, Transaction tx, java.util.List<Entry> entries, java.util.Properties contextProperties)
          Called before a shift operation is executed.
 void preTake(ContainerRef cref, Transaction tx, java.util.List<Selector> selectors, java.util.Properties contextProperties)
          Called before a take operation is executed.
 void preWrite(ContainerRef cref, Transaction tx, java.util.List<Entry> entries, int retrycount, java.util.Properties contextProperties)
          Called before a write operation is executed.
 
Methods inherited from class org.xvsm.core.aspect.LocalAspect
execute, postAddAspect, postDestroy, postRead, postRemoveAspect, postShift, postTake, postWrite, preAddAspect, preRead, preRemoveAspect
 
Methods inherited from class org.xvsm.core.aspect.IAspect
getId, getProperties, setId, setProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyAspect

public MyAspect()
Method Detail

preDestroy

public void preDestroy(ContainerRef cref,
                       Transaction tx,
                       java.util.List<Selector> selectors,
                       java.util.Properties contextProperties)
                throws AspectNotOkException,
                       AspectRescheduleException,
                       AspectSkipException
Description copied from class: LocalAspect
Called before a delete operation is executed.

Overrides:
preDestroy in class LocalAspect
Parameters:
cref - the ContainerRef.
tx - the Transaction.
selectors - the Selectors.
contextProperties - the properties given by the client to give the aspect additional information.
Throws:
AspectNotOkException - if the aspect wants to abort the surrounding transaction.
AspectRescheduleException - if the aspect wants to reschedule just this operation.
AspectSkipException - if the aspect just want to skip to the next operation. Skip will also skip all following registered aspects on that container.

preShift

public void preShift(ContainerRef cref,
                     Transaction tx,
                     java.util.List<Entry> entries,
                     java.util.Properties contextProperties)
              throws AspectNotOkException,
                     AspectRescheduleException,
                     AspectSkipException
Description copied from class: LocalAspect
Called before a shift operation is executed.

Overrides:
preShift in class LocalAspect
Parameters:
cref - the ContainerRef.
tx - the Transaction.
entries - entries the entries to write.
contextProperties - the properties given by the client to give the aspect additional information.
Throws:
AspectNotOkException - if the aspect wants to abort the surrounding transaction.
AspectRescheduleException - if the aspect wants to reschedule just this operation.
AspectSkipException - if the aspect just want to skip to the next operation. Skip will also skip all following registered aspects on that container.

preTake

public void preTake(ContainerRef cref,
                    Transaction tx,
                    java.util.List<Selector> selectors,
                    java.util.Properties contextProperties)
             throws AspectNotOkException,
                    AspectRescheduleException,
                    AspectSkipException
Description copied from class: LocalAspect
Called before a take operation is executed.

Overrides:
preTake in class LocalAspect
Parameters:
cref - the ContainerRef.
tx - the Transaction.
selectors - the Selectors.
contextProperties - the properties given by the client to give the aspect additional information.
Throws:
AspectNotOkException - if the aspect wants to abort the surrounding transaction.
AspectRescheduleException - if the aspect wants to reschedule just this operation.
AspectSkipException - if the aspect just want to skip to the next operation. Skip will also skip all following registered aspects on that container.

preWrite

public void preWrite(ContainerRef cref,
                     Transaction tx,
                     java.util.List<Entry> entries,
                     int retrycount,
                     java.util.Properties contextProperties)
              throws AspectNotOkException,
                     AspectRescheduleException,
                     AspectSkipException
Description copied from class: LocalAspect
Called before a write operation is executed. This aspect is called whenever a blocking write tries to write.

Overrides:
preWrite in class LocalAspect
Parameters:
cref - the ContainerRef.
tx - the Transaction.
entries - the Entrys to write.
retrycount - indicates how often a read operation has been retried (0 on the first call).
contextProperties - the properties given by the client to give the aspect additional information.
Throws:
AspectNotOkException - if the aspect wants to abort the surrounding transaction.
AspectRescheduleException - if the aspect wants to reschedule just this operation.
AspectSkipException - if the aspect just want to skip to the next operation. Skip will also skip all following registered aspects on that container.


Copyright © 2009. All Rights Reserved.