public interface LogStorage
Interface of a log storage.
Persists log records, forms on demand a new log bucket for sending it to the Operation server, removes already sent log buckets, cleans up elder records in case if there is some limitation on a size of a log storage.
MemLogStorage
is used by default.
Modifier and Type | Method and Description |
---|---|
BucketInfo |
addLogRecord(LogRecord record)
Persists a log record.
|
void |
close()
Closes a log storage and releases all used resources (if any).
|
LogBucket |
getNextBucket()
Returns a new log bucket.
|
LogStorageStatus |
getStatus()
Returns a log storage status.
|
void |
removeBucket(int bucketId)
Tells a log storage to remove a log bucket.
|
void |
rollbackBucket(int bucketId)
Tells a log storage to consider a log bucket as unused, i.e.
|
BucketInfo addLogRecord(LogRecord record)
record
- The LogRecord
object.BucketInfo
object which contains information about a bucket the log record is added.LogRecord
,
BucketInfo
LogStorageStatus getStatus()
LogStorageStatus
object.LogStorageStatus
LogBucket getNextBucket()
void removeBucket(int bucketId)
bucketId
- The id of a log bucket.LogBucket
,
BucketInfo
void rollbackBucket(int bucketId)
getNextBucket()
.bucketId
- The id of a log bucket.LogBucket
,
BucketInfo
void close()
Copyright © 2016. All rights reserved.