com.northconcepts.datapipeline.throttle
Class ThrottledWriter
java.lang.Object
com.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataWriter
com.northconcepts.datapipeline.core.ProxyWriter
com.northconcepts.datapipeline.meter.MeteredWriter
com.northconcepts.datapipeline.throttle.ThrottledWriter
- All Implemented Interfaces:
- Metered, Throttled
public class ThrottledWriter
- extends MeteredWriter
- implements Throttled
A proxy that limits the rate (bytes/second) at which data is written.
| Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint |
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getDescription, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, setDescription, toString |
ThrottledWriter
public ThrottledWriter(DataWriter writer,
int bytesPerSecond)
getThrottle
public Throttle getThrottle()
- Specified by:
getThrottle in interface Throttled
interceptRecord
protected Record interceptRecord(Record record)
throws Throwable
- Overrides:
interceptRecord in class MeteredWriter
- Throws:
Throwable
addExceptionProperties
public DataException addExceptionProperties(DataException exception)
- Description copied from class:
DataEndpoint
- Adds this endpoint's current state to a
DataException. Since this method is called whenever an
exception is thrown, subclasses should override it to add their specific information.
- Overrides:
addExceptionProperties in class MeteredWriter
Copyright (c) 2007-2010 North Concepts Inc. All Rights Reserved.