001/* -*- mode: Java; c-basic-offset: 2; indent-tabs-mode: nil; coding: utf-8-unix -*-
002 *
003 * Copyright © 2024 microBean™.
004 *
005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
006 * the License. You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
011 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
012 * specific language governing permissions and limitations under the License.
013 */
014package org.microbean.construct;
015
016import java.util.concurrent.locks.ReentrantLock;
017
018/**
019 * A class holding a {@link ReentrantLock} that should be used to serialize <dfn>symbol completion</dfn> and <dfn>name
020 * expansion</dfn>.
021 *
022 * @author <a href="https://about.me/lairdnelson" target="_top">Laird Nelson</a>
023 *
024 * @see #INSTANCE
025 *
026 * @see Domain#lock()
027 *
028 * @see Domain#toString(CharSequence)
029 */
030public final class SymbolCompletionLock {
031
032  /**
033   * A non-{@code null} {@link ReentrantLock} that should be used to serialize symbol completion and name expansion.
034   *
035   * @see Domain#lock()
036   */
037  public static final ReentrantLock INSTANCE = new ReentrantLock();
038
039  private SymbolCompletionLock() {
040    super();
041  }
042
043}