com.atlassian.util.concurrent.NotNull类的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(190)

本文整理了Java中com.atlassian.util.concurrent.NotNull类的一些代码示例,展示了NotNull类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NotNull类的具体详情如下:
包路径:com.atlassian.util.concurrent.NotNull
类名称:NotNull

NotNull介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Execute the supplied {@link Callable} under a lock determined by the
 * descriptor.
 * 
 * @param <R> the result type
 * @param callable the operation to perform under lock
 * @return whatever the supplied {@link Callable} returns
 * @throws Exception if the supplied {@link Callable} throws an exception
 */
<R> R withLock(final @NotNull Callable<R> callable) throws Exception;

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Execute the supplied {@link Runnable} under a lock determined by the
 * descriptor.
 * 
 * @param runnable the operation to perform under lock
 */
void withLock(final @NotNull Runnable runnable);

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * A {@link Supplier} of {@link ReentrantReadWriteLock read write locks}.
 * 
 * @return lock factory
 */
static @NotNull com.atlassian.util.concurrent.Supplier<ReadWriteLock> readWriteLockFactory() {
 return new com.atlassian.util.concurrent.Supplier<ReadWriteLock>() {
  public ReadWriteLock get() {
   return new ReentrantReadWriteLock();
  }
 };
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Execute the supplied {@link Supplier} under a lock determined by the
 * descriptor.
 * <p>
 * Unlike {@link #withLock(Callable)} this version returns a result and does
 * not declare a checked exception.
 * 
 * @param <R> the result type
 * @param supplier the operation to perform under lock
 * @return whatever the supplied {@link Callable} returns
 */
<R> R withLock(final @NotNull Supplier<R> supplier);

代码示例来源:origin: com.atlassian.ondemand.backupmanager/on-demand-backup-manager-longrunning

ManagedTask(@NotNull LongRunningTaskId id, @NotNull LongRunningTask task, @NotNull DefaultLongRunningTaskManager manager)
{
  this.id = id;
  this.task = task;
  this.manager = manager;
}

代码示例来源:origin: com.atlassian.confluence/confluence-studio-theme-plugin

private Predicate<SubscribedGadgetFeed> isJiraGadgetFeed(@NotNull final URI jiraGadgetFeed)
{
  return new Predicate<SubscribedGadgetFeed>()
  {
    @Override
    public boolean apply(@Nullable SubscribedGadgetFeed input)
    {
      return jiraGadgetFeed.equals(input.getUri());
    }
  };
}

代码示例来源:origin: com.atlassian.ondemand.backupmanager/on-demand-backup-manager-longrunning

private LongRunningTaskId(@NotNull String uuid)
{
  this.uuid = uuid;
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * A {@link Supplier} of {@link ReentrantLock locks}.
 * 
 * @return lock factory
 */
static @NotNull com.atlassian.util.concurrent.Supplier<Lock> lockFactory() {
 return new com.atlassian.util.concurrent.Supplier<Lock>() {
  public Lock get() {
   return new ReentrantLock();
  }
 };
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Get a {@link ManagedLock} that manages the supplied {@link Lock}.
 * 
 * @param lock the lock to use.
 * @return a managed lock
 */
public static @NotNull ManagedLock manage(final @NotNull Lock lock) {
 return new ManagedLockImpl(lock);
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Get a {@link ManagedLock.ReadWrite} that manages the supplied
 * {@link ReadWriteLock}.
 * 
 * @param lock the lock to use.
 * @return a managed read write lock
 */
public static @NotNull ManagedLock.ReadWrite manageReadWrite(final @NotNull ReadWriteLock lock) {
 return new ReadWriteManagedLock(lock);
}

代码示例来源:origin: org.randombits.supplier/supplier-core

@Override
public void init( @NotNull final Plugin plugin, @NotNull Element element ) throws PluginParseException {
  super.init( plugin, element );
  supplier = null;
}

代码示例来源:origin: org.randombits.supplier/supplier-core

@Override
public void init( @NotNull final Plugin plugin, @NotNull Element element ) throws PluginParseException {
  super.init( plugin, element );
  adaptor = null;
}

代码示例来源:origin: com.atlassian.plugins/base-hipchat-integration-plugin-api

@JsonCreator
public HipChatUserId(@NotNull @JsonProperty ("entityId") final String entityId,
           @NotNull @JsonProperty ("hipChatLinkId") HipChatLinkId hipChatLinkId) {
  this.entityId = entityId;
  this.hipChatLinkId = hipChatLinkId;
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Get a {@link ManagedLock} that manages a {@link ReentrantLock}.
 * 
 * @return a managed lock
 */
public static @NotNull ManagedLock newManagedLock() {
 return manage(new ReentrantLock());
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Creates a new SRSW BlockingReference.
 * 
 * @deprecated use {@link #newSRSW()} instead.
 */
@Deprecated public BlockingReference(@NotNull final V value) {
 this(new BooleanLatch(), value);
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Construct a new {@link WeakMemoizer} instance.
 * 
 * @param initialCapacity how large the internal map should be initially.
 * @param delegate for creating the initial values.
 * @throws IllegalArgumentException if the initial capacity of elements is
 * negative.
 */
WeakMemoizer(final @NotNull Function<K, V> delegate) {
 this.map = new ConcurrentHashMap<K, MappedReference<K, V>>();
 this.delegate = notNull("delegate", delegate);
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Create a Builder with the supplied Executor
 * 
 * @param executor
 */
public Builder(@NotNull final Executor executor) {
 this.executor = notNull("executor", executor);
}

代码示例来源:origin: com.atlassian.util.concurrent/atlassian-util-concurrent

/**
 * Get a function that uses the Supplier as a factory for all inputs.
 * 
 * @param <D> the key type, ignored
 * @param <R> the result type
 * @param supplier called for all inputs
 * @return the function
 */
public static <D, R> Function<D, R> fromSupplier(final @NotNull Supplier<R> supplier) {
 return new FromSupplier<D, R>(supplier);
}

代码示例来源:origin: com.atlassian.labs.hipchat/hipchat-for-jira-plugin

@Override
  public Collection<ProjectConfiguration> load(@NotNull Long projectId) {
    ProjectConfigurationAO[] projectConfigurationAOs = getAO().find(
        ProjectConfigurationAO.class, ProjectConfigurationAO.COLUMN_PROJECT_ID + " = ?", projectId);
    return Arrays.<ProjectConfiguration>asList(projectConfigurationAOs);
  }
}

代码示例来源:origin: com.atlassian.labs/jira4-compat

@Override
public void init(@NotNull Plugin plugin, @NotNull Element element) throws PluginParseException
{
  super.init(plugin, element);
  this.originalElement = element.createCopy();
}

相关文章

NotNull类方法