You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/09 15:57:22 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #9982: make joinables closeable

clintropolis commented on a change in pull request #9982:
URL: https://github.com/apache/druid/pull/9982#discussion_r437125850



##########
File path: processing/src/main/java/org/apache/druid/segment/ReferenceCountedObject.java
##########
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.segment;
+
+import org.apache.druid.java.util.common.io.Closer;
+
+import java.io.Closeable;
+import java.util.Optional;
+
+/**
+ * Interface for an object that may have a reference acquired in the form of a {@link Closeable}. This is intended to be
+ * used with an implementation of {@link ReferenceCountingCloseableObject}, or anything else that wishes to provide
+ * a method to account for the acquire and release of a reference to the object.
+ */
+public interface ReferenceCountedObject
+{
+  /**
+   * This method is expected to increment a reference count and provide a {@link Closer} that decrements the reference

Review comment:
       Oops, thanks, was previously using `Closer` but changed and didn't fixup javadoc




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org