@Override public TimelineDao get() { final TimelineDao delegate = new DefaultTimelineDao(dbi); return new CachingTimelineDao(delegate); } }
@Override public Long insertTimelineChunk(final TimelineChunk timelineChunk, final InternalCallContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.insertTimelineChunk(timelineChunk, context); }
@Override public String getEventCategory(final Integer eventCategoryId, final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getCategory(eventCategoryId, context); }
@Override public BiMap<Integer, String> getSources(final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getSources(context); }
@Override public Long inTransaction(final TimelineSqlDao transactional, final TransactionStatus status) throws Exception { transactional.insertTimelineChunk(timelineChunk, context); final long timelineChunkId = transactional.getLastInsertedRecordId(context); return timelineChunkId; } });
@Override public Integer insertLastStartTimes(final StartTimes startTimes, final InternalCallContext context) { return delegate.insertLastStartTimes(startTimes, context); }
@Override public void test(final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { delegate.test(context); } }
@Override public void write(final int b) throws IOException { final byte data = (byte) b; write(new byte[]{data}, 0, 1); }
@Override public Integer getMetricId(final int eventCategoryId, final String metric, final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getMetricRecordId(eventCategoryId, metric, context); }
@Override public StartTimes getLastStartTimes(final InternalTenantContext context) { return delegate.getLastStartTimes(context); }
@Override public void test(final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { delegate.test(context); }
@Override public void bulkInsertTimelineChunks(final List<TimelineChunk> timelineChunkList, final InternalCallContext context) { delegate.bulkInsertTimelineChunks(timelineChunkList, context); }
public long getBytesOnDisk() { return out.getBytesOnDisk(); }
public long getBytesInMemory() { return out.getBytesInMemory(); }
@Override public Long insertTimelineChunk(final TimelineChunk timelineChunk, final InternalCallContext context) throws UnableToObtainConnectionException, CallbackFailedException { final Long result = delegate.inTransaction(new Transaction<Long, TimelineSqlDao>() { @Override public Long inTransaction(final TimelineSqlDao transactional, final TransactionStatus status) throws Exception { transactional.insertTimelineChunk(timelineChunk, context); final long timelineChunkId = transactional.getLastInsertedRecordId(context); return timelineChunkId; } }); return result; }
@Override public String getSource(final Integer sourceId, final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getSourceName(sourceId, context); }
@Override public Integer getEventCategoryId(final String eventCategory, final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getCategoryRecordId(eventCategory, context); }
@Override public CategoryRecordIdAndMetric getCategoryIdAndMetric(final Integer metricId, final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getCategoryRecordIdAndMetric(metricId, context); }
@Override public BiMap<Integer, String> getEventCategories(final InternalTenantContext context) throws UnableToObtainConnectionException, CallbackFailedException { return delegate.getEventCategories(context); }
@Override public void deleteLastStartTimes(final InternalCallContext context) { delegate.deleteLastStartTimes(context); }