Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Licensed 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 com.facebook.presto.execution;
 
 
 import java.util.List;
 
 import static com.google.common.base.MoreObjects.toStringHelper;
 
 public final class SharedBufferInfo
 {
     private final BufferState state;
     private final boolean canAddBuffers;
     private final boolean canAddPages;
     private final long totalBufferedBytes;
     private final long totalBufferedPages;
     private final long totalQueuedPages;
     private final long totalPagesSent;
     private final List<BufferInfobuffers;
 
     @JsonCreator
     public SharedBufferInfo(
             @JsonProperty("state"BufferState state,
             @JsonProperty("canAddBuffers"boolean canAddBuffers,
             @JsonProperty("canAddPages"boolean canAddPages,
             @JsonProperty("totalBufferedBytes"long totalBufferedBytes,
             @JsonProperty("totalBufferedPages"long totalBufferedPages,
             @JsonProperty("totalQueuedPages"long totalQueuedPages,
             @JsonProperty("totalPagesSent"long totalPagesSent,
             @JsonProperty("buffers"List<BufferInfobuffers)
     {
         this. = state;
         this. = canAddBuffers;
         this. = canAddPages;
         this. = totalBufferedBytes;
         this. = totalBufferedPages;
         this. = totalQueuedPages;
         this. = totalPagesSent;
         this. = ImmutableList.copyOf(buffers);
     }
 
     @JsonProperty
     public BufferState getState()
     {
         return ;
     }
 
     @JsonProperty
     public List<BufferInfogetBuffers()
     {
         return ;
     }
 
     @JsonProperty
     public boolean isCanAddBuffers()
     {
         return ;
     }
 
     @JsonProperty
     public boolean isCanAddPages()
     {
         return ;
     }
 
     @JsonProperty
     public long getTotalBufferedBytes()
     {
         return ;
     }
 
     @JsonProperty
     public long getTotalBufferedPages()
     {
         return ;
     }
 
     @JsonProperty
     public long getTotalQueuedPages()
     {
         return ;
     }
 
    public long getTotalPagesSent()
    {
        return ;
    }
    @Override
    public boolean equals(Object o)
    {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SharedBufferInfo that = (SharedBufferInfoo;
        return Objects.equals(that.canAddBuffers) &&
                Objects.equals(that.canAddPages) &&
                Objects.equals(that.totalBufferedBytes) &&
                Objects.equals(that.totalBufferedPages) &&
                Objects.equals(that.totalQueuedPages) &&
                Objects.equals(that.totalPagesSent) &&
                Objects.equals(that.state) &&
                Objects.equals(that.buffers);
    }
    @Override
    public int hashCode()
    {
    }
    @Override
    public String toString()
    {
        return toStringHelper(this)
                .add("state")
                .add("canAddBuffers")
                .add("canAddPages")
                .add("totalBufferedBytes")
                .add("totalBufferedPages")
                .add("totalQueuedPages")
                .add("totalPagesSent")
                .add("buffers")
                .toString();
    }
New to GrepCode? Check out our FAQ X