com.devexperts.qd.logger
Class BufferedSubscriptionVisitor

java.lang.Object
  extended by com.devexperts.qd.logger.BufferedObject
      extended by com.devexperts.qd.logger.BufferedSubscriptionVisitor
All Implemented Interfaces:
SubscriptionVisitor

public class BufferedSubscriptionVisitor
extends BufferedObject
implements SubscriptionVisitor


Field Summary
 
Fields inherited from class com.devexperts.qd.logger.BufferedObject
sb
 
Constructor Summary
BufferedSubscriptionVisitor(SubscriptionVisitor delegate, DataScheme scheme)
           
 
Method Summary
 boolean hasCapacity()
          Returns whether visitor has capacity to efficiently visit next record.
 void visitRecord(DataRecord record, int cipher, java.lang.String symbol, long time)
          Visits next record.
 
Methods inherited from class com.devexperts.qd.logger.BufferedObject
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BufferedSubscriptionVisitor

public BufferedSubscriptionVisitor(SubscriptionVisitor delegate,
                                   DataScheme scheme)
Method Detail

hasCapacity

public boolean hasCapacity()
Description copied from interface: SubscriptionVisitor
Returns whether visitor has capacity to efficiently visit next record. This method may be used to advise subscription provider that it is desirable to stop current string of visiting and to keep remaining subscription. However, at present, subscription provider is not obliged to adhere to this method contract.

NOTE: subscription visitor must process all subscription that is passed to it via visitXXX calls no matter whether it has capacity to do it efficiently.

Specified by:
hasCapacity in interface SubscriptionVisitor

visitRecord

public void visitRecord(DataRecord record,
                        int cipher,
                        java.lang.String symbol,
                        long time)
Description copied from interface: SubscriptionVisitor
Visits next record.

Specified by:
visitRecord in interface SubscriptionVisitor