Search in sources :

Example 1 with Slf4jOperationLockTargetListener

use of com.b2international.snowowl.core.internal.locks.Slf4jOperationLockTargetListener in project snow-owl by b2ihealthcare.

the class DatastoreLockTests method setup.

@Before
public void setup() {
    final ObjectMapper mapper = JsonSupport.getDefaultObjectMapper();
    final Index index = Indexes.createIndex("locks", mapper, new Mappings(DatastoreLockIndexEntry.class));
    manager = new DefaultOperationLockManager(index);
    manager.addLockTargetListener(new Slf4jOperationLockTargetListener());
    manager.unlockAll();
}
Also used : Mappings(com.b2international.index.mapping.Mappings) Index(com.b2international.index.Index) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Slf4jOperationLockTargetListener(com.b2international.snowowl.core.internal.locks.Slf4jOperationLockTargetListener) Before(org.junit.Before)

Aggregations

Index (com.b2international.index.Index)1 Mappings (com.b2international.index.mapping.Mappings)1 Slf4jOperationLockTargetListener (com.b2international.snowowl.core.internal.locks.Slf4jOperationLockTargetListener)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 Before (org.junit.Before)1