mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
Use volatile to ensure concurrent threads use up to date property value
This commit is contained in:
parent
28b451a0b3
commit
5fdd5d16b1
|
@ -60,19 +60,19 @@ public class Compressor implements BLOB, Iterable<byte[]> {
|
|||
private TreeMap<byte[], byte[]> buffer;
|
||||
|
||||
/** Total size (in bytes) of uncompressed entries in buffer */
|
||||
private long bufferlength;
|
||||
private volatile long bufferlength;
|
||||
|
||||
/** Maximum {@link #bufferlength} value before compressing and flushing to the backend */
|
||||
private final long maxbufferlength;
|
||||
|
||||
/** Maximum time (in milliseconds) to acquire a synchronization lock on get() and insert() */
|
||||
private long lockTimeout;
|
||||
private volatile long lockTimeout;
|
||||
|
||||
/** Synchronization lock */
|
||||
private final ReentrantLock lock;
|
||||
|
||||
/** The compression level */
|
||||
private int compressionLevel;
|
||||
private volatile int compressionLevel;
|
||||
|
||||
/**
|
||||
* @param backend the backend storage
|
||||
|
|
Loading…
Reference in New Issue
Block a user