Examples of KeyState


Examples of com.persistit.KeyState

                    break;
                } catch (KeyTooLongException | StorageKeySizeExceededException e) {
                    key.setMaximumSize(key.getMaximumSize() * 2);
                }
            }
            states[i] = new KeyState(key);
        }
        return states;
    }
View Full Code Here

Examples of com.persistit.KeyState

                }
            }
            final int saveSize = storeData.persistitKey.getEncodedSize();
            final boolean exact = dir == EQ || dir == GTEQ || dir == LTEQ;
            final boolean reverse = (dir == LT) || (dir == LTEQ);
            KeyState saveState = null;
           
            assert storeData.nudgeDir == null;
            if(!KeyShim.isSpecial(storeData.persistitKey)) {
                if(exact) {
                    if(reverse && !deep) {
                        // exact, reverse, logical: want to see current key or a child
                        // Note: child won't be returned, but current key will be synthesized by advanceLogical()
                        saveState = new KeyState(storeData.persistitKey);
                        // nudgeRight changes the content of the key
                        KeyShim.nudgeRight(storeData.persistitKey);
                        storeData.nudgeDir = FDBStoreData.NudgeDir.RIGHT;
                    }
                } else {
                    if(reverse) {
                        // Non-exact, reverse: do not want to see current key
                        KeyShim.nudgeLeft(storeData.persistitKey);
                        storeData.nudgeDir = FDBStoreData.NudgeDir.LEFT;
                    } else {
                        if(deep) {
                            // Non-exact, forward, deep: do not want to see current key
                            KeyShim.nudgeDeeper(storeData.persistitKey);
                            storeData.nudgeDir = FDBStoreData.NudgeDir.DEEPER;
                        } else {
                            // Non-exact, forward, logical: do not want to see current key or any children
                            saveState = new KeyState(storeData.persistitKey);
                            // nudgeRight changes the content of the key
                            KeyShim.nudgeRight(storeData.persistitKey);
                            storeData.nudgeDir = FDBStoreData.NudgeDir.RIGHT;
                        }
                    }
                }
            }

            adapter.getUnderlyingStore().indexIterator(adapter.getSession(), storeData,
                                                       exact, reverse);
            storeData.nudgeDir = null;
            if (saveState != null) {
                saveState.copyTo(storeData.persistitKey);
            }
            storeData.persistitKey.setEncodedSize(saveSize);
            lastKeyGen = storeData.persistitKey.getGeneration();
            itDir = dir;
        }
View Full Code Here

Examples of com.persistit.KeyState

            key.append(null);
        }
        else {
            key.setDepth(depth);
        }
        return new KeyState(key);           
    }
View Full Code Here

Examples of com.persistit.KeyState

        public DeferredReferencingCheck(Index index, Exchange exchange,
                                        RowData row, ForeignKey foreignKey,
                                        String operation) {
            this.index = index;
            this.key = new KeyState(exchange.getKey());
            this.row = row;
            this.foreignKey = foreignKey;
            this.operation = operation;
        }
View Full Code Here

Examples of com.persistit.KeyState

            this.tableID = tableID;
        }

        private void advance() {
            byte[] bytes = iter.next();
            last = (bytes != null) ? new KeyState(bytes) : null;
        }
View Full Code Here

Examples of com.threed.jpct.util.KeyState

  /**
   * Checking if some keys were pressed or released
   */
  public void handleKeys(){
    KeyState state = null;
    while((state = keyMapper.poll()) != KeyState.NONE){
      int code = state.getKeyCode();
      if(code == KeyEvent.VK_DOWN){
        DOWN_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_UP){
        UP_PRESSED = state.getState();
     
      else if(code == KeyEvent.VK_LEFT){
        LEFT_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_RIGHT){
        RIGHT_PRESSED = state.getState();
     
      else if(code == KeyEvent.VK_PAGE_DOWN){
        PAGE_DOWN_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_PAGE_UP){
        PAGE_UP_PRESSED = state.getState();
      }   
    }   
  }
View Full Code Here

Examples of com.threed.jpct.util.KeyState

  public static boolean KEY_F1;
 
  private static KeyMapper keyMapper = new KeyMapper();
 
  public static void handleKeys(){
    KeyState state = null;
    while((state = keyMapper.poll()) != KeyState.NONE){
      int code = state.getKeyCode();
      if(code == KeyEvent.VK_1){
        KEY_1 = state.getState();
      }
      else if(code == KeyEvent.VK_2){
        KEY_2 = state.getState();
     
      else if(code == KeyEvent.VK_3){
        KEY_3 = state.getState();
      }
      else if(code == KeyEvent.VK_4){
        KEY_4 = state.getState();
     
      else if(code == KeyEvent.VK_5){
        KEY_5 = state.getState();
      }
      else if(code == KeyEvent.VK_6){
        KEY_6 = state.getState();
      }
      else if(code == KeyEvent.VK_7){
        KEY_7 = state.getState();
      }
      else if(code == KeyEvent.VK_8){
        KEY_8 = state.getState();
      }
      else if(code == KeyEvent.VK_9){
        KEY_9 = state.getState();
      }
      else if(code == KeyEvent.VK_0){
        KEY_0 = state.getState();
      }
      else if(code == KeyEvent.VK_DOWN){
        DOWN_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_UP){
        UP_PRESSED = state.getState();
     
      else if(code == KeyEvent.VK_LEFT){
        LEFT_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_RIGHT){
        RIGHT_PRESSED = state.getState();
     
      else if(code == KeyEvent.VK_PAGE_DOWN){
        PAGE_DOWN_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_PAGE_UP){
        PAGE_UP_PRESSED = state.getState();
      }
      else if(code == KeyEvent.VK_F1){
        KEY_F1 = state.getState();
      }
      else if(code == KeyEvent.VK_P){
        KEY_P = state.getState();
      }
      else if(code == KeyEvent.VK_ESCAPE){
        KEY_ESC = state.getState();
      }
    }   
  }
View Full Code Here

Examples of org.apache.tez.runtime.library.common.sort.impl.IFile.Reader.KeyState

      return value;
    }

    private void adjustPriorityQueue(Segment reader) throws IOException{
      long startPos = reader.getPosition();
      KeyState hasNext = reader.readRawKey();
      long endPos = reader.getPosition();
      totalBytesProcessed += endPos - startPos;
      mergeProgress.set(totalBytesProcessed * progPerByte);
      if (hasNext == KeyState.NEW_KEY) {
        adjustTop();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.