refactor: Move lock stuff in its own folder

This commit is contained in:
smessie 2020-11-17 14:58:00 +01:00 committed by Joachim Van Herwegen
parent ee312910d7
commit dacfb74a6a
13 changed files with 16 additions and 16 deletions

View File

@ -5,10 +5,10 @@ import type { RepresentationPreferences } from '../ldp/representation/Representa
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier'; import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier';
import { getLoggerFor } from '../logging/LogUtil'; import { getLoggerFor } from '../logging/LogUtil';
import type { Guarded } from '../util/GuardedStream'; import type { Guarded } from '../util/GuardedStream';
import type { ExpiringLock } from '../util/locking/ExpiringLock';
import type { ExpiringResourceLocker } from '../util/locking/ExpiringResourceLocker';
import type { AtomicResourceStore } from './AtomicResourceStore'; import type { AtomicResourceStore } from './AtomicResourceStore';
import type { Conditions } from './Conditions'; import type { Conditions } from './Conditions';
import type { ExpiringLock } from './ExpiringLock';
import type { ExpiringResourceLocker } from './ExpiringResourceLocker';
import type { ResourceStore } from './ResourceStore'; import type { ResourceStore } from './ResourceStore';
/** /**

View File

@ -12,8 +12,8 @@ import { getLoggerFor } from '../../logging/LogUtil';
import { INTERNAL_QUADS } from '../../util/ContentTypes'; import { INTERNAL_QUADS } from '../../util/ContentTypes';
import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError'; import { UnsupportedHttpError } from '../../util/errors/UnsupportedHttpError';
import { guardStream } from '../../util/GuardedStream'; import { guardStream } from '../../util/GuardedStream';
import type { ResourceLocker } from '../../util/locking/ResourceLocker';
import { CONTENT_TYPE } from '../../util/UriConstants'; import { CONTENT_TYPE } from '../../util/UriConstants';
import type { ResourceLocker } from '../ResourceLocker';
import type { ResourceStore } from '../ResourceStore'; import type { ResourceStore } from '../ResourceStore';
import { PatchHandler } from './PatchHandler'; import { PatchHandler } from './PatchHandler';

View File

@ -1,4 +1,4 @@
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier'; import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
import type { Lock } from './Lock'; import type { Lock } from './Lock';
/** /**

View File

@ -1,6 +1,6 @@
import AsyncLock from 'async-lock'; import AsyncLock from 'async-lock';
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier'; import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
import { getLoggerFor } from '../logging/LogUtil'; import { getLoggerFor } from '../../logging/LogUtil';
import type { Lock } from './Lock'; import type { Lock } from './Lock';
import type { ResourceLocker } from './ResourceLocker'; import type { ResourceLocker } from './ResourceLocker';

View File

@ -1,5 +1,5 @@
import { EventEmitter } from 'events'; import { EventEmitter } from 'events';
import { getLoggerFor } from '../logging/LogUtil'; import { getLoggerFor } from '../../logging/LogUtil';
import type { ExpiringLock } from './ExpiringLock'; import type { ExpiringLock } from './ExpiringLock';
import type { Lock } from './Lock'; import type { Lock } from './Lock';

View File

@ -1,5 +1,5 @@
import type { ResourceIdentifier } from '../ldp/representation/ResourceIdentifier'; import type { ResourceIdentifier } from '../../ldp/representation/ResourceIdentifier';
import { getLoggerFor } from '../logging/LogUtil'; import { getLoggerFor } from '../../logging/LogUtil';
import type { ExpiringLock } from './ExpiringLock'; import type { ExpiringLock } from './ExpiringLock';
import type { ExpiringResourceLocker } from './ExpiringResourceLocker'; import type { ExpiringResourceLocker } from './ExpiringResourceLocker';
import type { ResourceLocker } from './ResourceLocker'; import type { ResourceLocker } from './ResourceLocker';

View File

@ -2,11 +2,11 @@ import type { EventEmitter } from 'events';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import type { Patch } from '../../../src/ldp/http/Patch'; import type { Patch } from '../../../src/ldp/http/Patch';
import type { Representation } from '../../../src/ldp/representation/Representation'; import type { Representation } from '../../../src/ldp/representation/Representation';
import type { ExpiringLock } from '../../../src/storage/ExpiringLock';
import type { ExpiringResourceLocker } from '../../../src/storage/ExpiringResourceLocker';
import { LockingResourceStore } from '../../../src/storage/LockingResourceStore'; import { LockingResourceStore } from '../../../src/storage/LockingResourceStore';
import type { ResourceStore } from '../../../src/storage/ResourceStore'; import type { ResourceStore } from '../../../src/storage/ResourceStore';
import { WrappedExpiringResourceLocker } from '../../../src/storage/WrappedExpiringResourceLocker'; import type { ExpiringLock } from '../../../src/util/locking/ExpiringLock';
import type { ExpiringResourceLocker } from '../../../src/util/locking/ExpiringResourceLocker';
import { WrappedExpiringResourceLocker } from '../../../src/util/locking/WrappedExpiringResourceLocker';
describe('A LockingResourceStore', (): void => { describe('A LockingResourceStore', (): void => {
let store: LockingResourceStore; let store: LockingResourceStore;

View File

@ -5,12 +5,12 @@ import { translate } from 'sparqlalgebrajs';
import streamifyArray from 'streamify-array'; import streamifyArray from 'streamify-array';
import type { SparqlUpdatePatch } from '../../../../src/ldp/http/SparqlUpdatePatch'; import type { SparqlUpdatePatch } from '../../../../src/ldp/http/SparqlUpdatePatch';
import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata'; import { RepresentationMetadata } from '../../../../src/ldp/representation/RepresentationMetadata';
import type { Lock } from '../../../../src/storage/Lock';
import { SparqlUpdatePatchHandler } from '../../../../src/storage/patch/SparqlUpdatePatchHandler'; import { SparqlUpdatePatchHandler } from '../../../../src/storage/patch/SparqlUpdatePatchHandler';
import type { ResourceLocker } from '../../../../src/storage/ResourceLocker';
import type { ResourceStore } from '../../../../src/storage/ResourceStore'; import type { ResourceStore } from '../../../../src/storage/ResourceStore';
import { INTERNAL_QUADS } from '../../../../src/util/ContentTypes'; import { INTERNAL_QUADS } from '../../../../src/util/ContentTypes';
import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError'; import { UnsupportedHttpError } from '../../../../src/util/errors/UnsupportedHttpError';
import type { Lock } from '../../../../src/util/locking/Lock';
import type { ResourceLocker } from '../../../../src/util/locking/ResourceLocker';
describe('A SparqlUpdatePatchHandler', (): void => { describe('A SparqlUpdatePatchHandler', (): void => {
let handler: SparqlUpdatePatchHandler; let handler: SparqlUpdatePatchHandler;

View File

@ -1,4 +1,4 @@
import { SingleThreadedResourceLocker } from '../../../src/storage/SingleThreadedResourceLocker'; import { SingleThreadedResourceLocker } from '../../../../src/util/locking/SingleThreadedResourceLocker';
describe('A SingleThreadedResourceLocker', (): void => { describe('A SingleThreadedResourceLocker', (): void => {
let locker: SingleThreadedResourceLocker; let locker: SingleThreadedResourceLocker;

View File

@ -1,4 +1,4 @@
import { WrappedExpiringResourceLocker } from '../../../src/storage/WrappedExpiringResourceLocker'; import { WrappedExpiringResourceLocker } from '../../../../src/util/locking/WrappedExpiringResourceLocker';
describe('A WrappedExpiringResourceLocker', (): void => { describe('A WrappedExpiringResourceLocker', (): void => {
it('emits an error event when releasing the lock errors.', async(): Promise<void> => { it('emits an error event when releasing the lock errors.', async(): Promise<void> => {