query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
gets the row key for the given row by resolving the _rowKeyProperty
protected Object getRowKey(Object row) { assert (_rowKeyProperty != null); return __resolveProperty(row, _rowKeyProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Object _getRowKey()\n {\n Object data = getRowData();\n \n assert (_rowKeyProperty != null);\n return __resolveProperty(data, _rowKeyProperty);\n }", "public Comparable getRowKey(int row) { return this.underlying.getRowKey(row); }", "public void setRowKeyProperty(String rowKeyProperty)\n {\n _rowKeyProperty = rowKeyProperty;\n }", "public String getRowKeyProperty()\n {\n return _rowKeyProperty;\n }", "public Object getRowKey()\n {\n if (isRowAvailable())\n {\n Object rowKey = _getRowKey();\n return rowKey;\n }\n else\n {\n return null;\n }\n }", "public Long getRowKey() {\n return (Long) getAttributeInternal(ROWKEY);\n }", "public String getIdForRow(int row);", "private int getRowKey(int combo, int row) {\n int key = (combo >> ((rowSize - row - 1) * 6)) & 0x003F;\n return key;\n }", "public int getRowIndex(Comparable key) { return this.underlying.getRowIndex(key); }", "Key getPrimaryKey();", "@Override\n\tpublic Object getRowKey(InvitoDTO arg0) {\n\t\treturn arg0.getId();\n\t}", "private int computeKey(int row, int column) {\n return row * columnDimension + column;\n }", "org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey();", "String get_row_id()\n {\n return row_id;\n }", "public Integer getRowId() {\n return rowId;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "byte[] getActualRowKey(ConsumerConfig consumerConfig, byte[] originalRowKey);", "TemplateModel getKey();", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "protected int getRow( Property property )\n {\n if(treeTable == null)\n {\n return -1;\n }\n JTree tree = treeTable.getTree();\n int n = tree.getRowCount();\n String name = property.getCompleteName();\n\n TreePath path;\n Property p;\n for(int i=1; i<n; i++)\n {\n path = tree.getPathForRow(i);\n p = (Property)path.getLastPathComponent();\n if( p.getCompleteName().startsWith(name) )\n return i;\n }\n\n return -1;\n }", "public String getColumnKey(int col){\n return keys.get(col);\n }", "public String getUniqueId(int row);", "public static Result getRow(HTable table, String rowKey) throws Exception {\n\t\tGet get = new Get(Bytes.toBytes(rowKey));\n\t\tResult result = table.get(get);\n\t\tSystem.out.println(\"Get: \" + result);\n\t\treturn result;\n\t}", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "public List getRowKeys() { return this.underlying.getRowKeys(); }", "Resolvable<String> getKey(int index);", "public byte getValueInRowKey() {\n return valueInRowKey;\n }", "PrimaryKey getPrimaryKey();", "protected static Object getColumnKey(XmlElement xmlColumn)\n {\n XmlValue xmlTemp = xmlColumn.getAttribute(\"id\");\n if (xmlTemp == null)\n {\n return xmlColumn;\n }\n return xmlTemp.getString();\n }", "private Object getEntry( Object[] row, String rrName ) {\n Integer icol = colMap_.get( rrName );\n return icol == null ? null : row[ icol.intValue() ];\n }", "public Comparable getColumnKey(int column) { return this.underlying.getColumnKey(column + this.firstCategoryIndex); }", "DataFrameRow<R,C> row(R rowKey);", "public int mappedRowNumber(int rowNumber) {\n if (isSorted()) {\n return sortOrder[rowNumber];\n } else if (hasSelection()) {\n return selection.get(rowNumber);\n }\n return rowNumber;\n }", "public int getRowid() {\n\t\treturn rowid;\n\t}", "public TableKey getKey() {\n \treturn key;\n }", "String getKey(int index);", "public int getRow() { return _row; }", "public long getRowID()\n\t{ return m_nRowID ; }", "public int getRow( String name )\n {\n Property p = null;\n if ( componentModel != null )\n {\n p = componentModel.findProperty( name );\n }\n\n if ( p != null )\n {\n return ( getRow( p ) );\n }\n\n return -1;\n }", "public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "public String fetchPrimaryKey(){\n\t\treturn primaryKey;\n\t}", "private int getRow() {\n return binaryPartition(row);\n }", "public int getRow() {\r\n return this.row;\r\n }", "PrimaryKey getPrimarykey();", "public int getRow() {\n return this.row;\n }", "public int getRow() {\n return this.row;\n }", "private EntityKey getKeyFromResultSet(\n \t final int i,\n \t final Loadable persister,\n \t final Serializable id,\n \t final ResultSet rs,\n \t final SessionImplementor session) throws HibernateException, SQLException {\n \n \t\tSerializable resultId;\n \n \t\t// if we know there is exactly 1 row, we can skip.\n \t\t// it would be great if we could _always_ skip this;\n \t\t// it is a problem for <key-many-to-one>\n \n \t\tif ( isSingleRowLoader() && id != null ) {\n \t\t\tresultId = id;\n \t\t}\n \t\telse {\n \n \t\t\tType idType = persister.getIdentifierType();\n \t\t\tresultId = (Serializable) idType.nullSafeGet(\n \t\t\t\t\trs,\n \t\t\t\t\tgetEntityAliases()[i].getSuffixedKeyAliases(),\n \t\t\t\t\tsession,\n \t\t\t\t\tnull //problematic for <key-many-to-one>!\n \t\t\t\t);\n \n \t\t\tfinal boolean idIsResultId = id != null &&\n \t\t\t\t\tresultId != null &&\n \t\t\t\t\tidType.isEqual( id, resultId, factory );\n \n \t\t\tif ( idIsResultId ) resultId = id; //use the id passed in\n \t\t}\n \n \t\treturn resultId == null ? null : session.generateEntityKey( resultId, persister );\n \t}", "public PrimaryKey getPrimaryKey();", "public int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow()\r\n {\r\n return row;\r\n }", "private int rowCombo2Key(int[] combo) {\n int key = 0;\n for (int i : combo) {\n key = (key << 3) | i;\n }\n return key;\n }", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "public String getKey() {\n if (model == null)\n return strKey;\n return model.getKey();\n }", "private Map.Entry<Integer, Column<?>> getColumnEntry(final int row) {\n Preconditions.checkElementIndex(row, numTuples);\n readOnly = true;\n return columnIds.floorEntry(row);\n }", "public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }", "public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }", "public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public Number getValue(Comparable rowKey, Comparable columnKey) {\n/* 260 */ int r = getRowIndex(rowKey);\n/* 261 */ int c = getColumnIndex(columnKey);\n/* 262 */ if (c != -1) {\n/* 263 */ return this.underlying.getValue(r, c + this.firstCategoryIndex);\n/* */ }\n/* */ \n/* 266 */ throw new UnknownKeyException(\"Unknown columnKey: \" + columnKey);\n/* */ }", "public int getRow() {\r\n return row;\r\n }", "public Comparable\n getCellKey() \n {\n return pCellKey;\n }", "public final HashMap<Integer, Integer> getRowKeys() {\n return rowKeys;\n }", "String getKey(Object entity);", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "@Override\n\tpublic long getResourcePrimKey() {\n\t\treturn _changesetEntry.getResourcePrimKey();\n\t}", "public int getRowNumber()\r\n\t{\r\n\t\treturn this.rowNumber;\r\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n protected K createKey(ResultSet rs) throws SQLException {\n return (columnName == null) ?\n (K) rs.getObject(columnIndex) :\n (K) rs.getObject(columnName);\n }", "public int getRowNum(){ return this.rowNum; }", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow(){\r\n // return statement\r\n return row;\r\n }", "public Relatorio get(int row){\n\t\t\t\t\n\t\t\t\treturn valores.get(row);\n\t\t\t}", "public int getRow()\n {\n return row;\n }", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "public ResultRow getRow(int rowIdx) {\r\n return rows.get(rowIdx);\r\n }", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "private String getRowIdColumn(ConnectorTableMetadata meta)\n {\n String rowIdColumn = AccumuloTableProperties.getRowId(meta.getProperties());\n if (rowIdColumn == null) {\n rowIdColumn = meta.getColumns().get(0).getName();\n }\n return rowIdColumn.toLowerCase();\n }", "public Integer getRowNo() {\n return rowNo;\n }", "public int getRow() {\n return mRow;\n }", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public Clientedim getRowData(String rowKey) {\n \r\n List<Clientedim> clienti = (List<Clientedim>) getWrappedData();\r\n \r\n for(Clientedim cli : clienti) {\r\n if(cli.getGestore().getCod_gestore().equals(rowKey))\r\n return cli;\r\n }\r\n \r\n return null;\r\n }", "public int getRow() {\n\t\treturn row; \n\t}" ]
[ "0.8519124", "0.80416995", "0.7914624", "0.77302116", "0.741905", "0.70715755", "0.67819977", "0.67665267", "0.65020716", "0.6378219", "0.63095033", "0.62984765", "0.6279977", "0.6269", "0.61327726", "0.60925436", "0.60925436", "0.60925436", "0.60925436", "0.60925436", "0.60502225", "0.60199744", "0.6010283", "0.6010283", "0.6010283", "0.6010283", "0.6010283", "0.60046935", "0.60018045", "0.5984417", "0.5968187", "0.59517455", "0.59517455", "0.59517455", "0.59517455", "0.59517455", "0.5888403", "0.58728516", "0.58704513", "0.58607537", "0.58556527", "0.5818357", "0.5815943", "0.5814208", "0.5800986", "0.5765057", "0.57592773", "0.5754619", "0.57526505", "0.5750793", "0.5749331", "0.5748271", "0.5745791", "0.5745603", "0.5738441", "0.5732115", "0.57118374", "0.5711743", "0.5711743", "0.57085747", "0.5700163", "0.5694056", "0.5682461", "0.5681794", "0.5680402", "0.56682765", "0.5666973", "0.5665356", "0.5665356", "0.5661737", "0.56602025", "0.56506675", "0.56506413", "0.56492", "0.563523", "0.5634537", "0.5634537", "0.5634537", "0.5634537", "0.5634537", "0.5634537", "0.5627747", "0.56265855", "0.5621412", "0.5606969", "0.55917287", "0.55917287", "0.55883574", "0.55843496", "0.55833435", "0.5581846", "0.5577797", "0.5574415", "0.5574415", "0.55726", "0.55615693", "0.5555564", "0.5555099", "0.55533624", "0.55501145" ]
0.8778059
0
gets the row key for current row by resolving the _rowKeyProperty
private Object _getRowKey() { Object data = getRowData(); assert (_rowKeyProperty != null); return __resolveProperty(data, _rowKeyProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Object getRowKey(Object row)\n {\n assert (_rowKeyProperty != null);\n return __resolveProperty(row, _rowKeyProperty);\n }", "public String getRowKeyProperty()\n {\n return _rowKeyProperty;\n }", "public void setRowKeyProperty(String rowKeyProperty)\n {\n _rowKeyProperty = rowKeyProperty;\n }", "public Object getRowKey()\n {\n if (isRowAvailable())\n {\n Object rowKey = _getRowKey();\n return rowKey;\n }\n else\n {\n return null;\n }\n }", "public Comparable getRowKey(int row) { return this.underlying.getRowKey(row); }", "public Long getRowKey() {\n return (Long) getAttributeInternal(ROWKEY);\n }", "public int getRowIndex(Comparable key) { return this.underlying.getRowIndex(key); }", "String get_row_id()\n {\n return row_id;\n }", "Key getPrimaryKey();", "public TableKey getKey() {\n \treturn key;\n }", "public Integer getRowId() {\n return rowId;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public String getIdForRow(int row);", "@Override\n\tpublic Object getRowKey(InvitoDTO arg0) {\n\t\treturn arg0.getId();\n\t}", "private int getRowKey(int combo, int row) {\n int key = (combo >> ((rowSize - row - 1) * 6)) & 0x003F;\n return key;\n }", "public List getRowKeys() { return this.underlying.getRowKeys(); }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "public int getRowId() {\n return rowId_;\n }", "org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey();", "public int getRow() { return _row; }", "protected int getRow( Property property )\n {\n if(treeTable == null)\n {\n return -1;\n }\n JTree tree = treeTable.getTree();\n int n = tree.getRowCount();\n String name = property.getCompleteName();\n\n TreePath path;\n Property p;\n for(int i=1; i<n; i++)\n {\n path = tree.getPathForRow(i);\n p = (Property)path.getLastPathComponent();\n if( p.getCompleteName().startsWith(name) )\n return i;\n }\n\n return -1;\n }", "public int getRow() {\r\n return this.row;\r\n }", "public int getRow(){\r\n\t\treturn this.row;\r\n\t}", "public byte getValueInRowKey() {\n return valueInRowKey;\n }", "public int getRow() {\n return this.row;\n }", "public int getRow() {\n return this.row;\n }", "public int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow()\r\n\t{\r\n\t\treturn this.row;\r\n\t}", "public int getRowNumber()\r\n\t{\r\n\t\treturn this.rowNumber;\r\n\t}", "public int getRowid() {\n\t\treturn rowid;\n\t}", "public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }", "public String getKey() {\n if (model == null)\n return strKey;\n return model.getKey();\n }", "TemplateModel getKey();", "public Comparable\n getCellKey() \n {\n return pCellKey;\n }", "protected int getRow() {\r\n\t\treturn this.row;\r\n\t}", "public int getRow() {\n\t\t\treturn rowNumber;\n\t\t}", "@Override\n\tpublic long getResourcePrimKey() {\n\t\treturn _changesetEntry.getResourcePrimKey();\n\t}", "public int getRow() {\r\n return row;\r\n }", "public int getRow()\r\n {\r\n return row;\r\n }", "public long getRowID()\n\t{ return m_nRowID ; }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public int getRow() {\n return row;\n }", "public String fetchPrimaryKey(){\n\t\treturn primaryKey;\n\t}", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "int getRowId();", "public String getColumnKey(int col){\n return keys.get(col);\n }", "public int getRow() {\n return mRow;\n }", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRow() {\r\n\t\treturn row;\r\n\t}", "public int getRowNum(){ return this.rowNum; }", "public int getRowIndex() {\r\n\t\treturn rowIndex;\r\n\t}", "public int getRow() {\n // YOUR CODE HERE\n return this.row;\n }", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRow() {\n\t\treturn row;\n\t}", "public int getRowNo() {\n return rowIndex+1;\n }", "private long getSelectedIndex() {\r\n if (selection != null && selection.getKeys().hasNext()) {\r\n return new Long((Integer) selection.getKeys().next());\r\n } else {\r\n return selectedRowId;\r\n }\r\n }", "public final HashMap<Integer, Integer> getRowKeys() {\n return rowKeys;\n }", "public int getRow() {\n\t\treturn row; \n\t}", "public int getRow()\n {\n return row;\n }", "@Override\n public int getKey() {\n return this.key;\n }", "public Integer getRowNo() {\n return rowNo;\n }", "private int computeKey(int row, int column) {\n return row * columnDimension + column;\n }", "public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }", "public RowID getRowID() {\n return (RowID)getAttributeInternal(ROWID);\n }", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public int getRow() {\n\t\t\treturn row;\n\t\t}", "public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "public int getRow()\n\t{\n\t\treturn row;\n\t}", "PrimaryKey getPrimaryKey();", "public int getRowNumber() {\n\t\treturn rowNumber;\n\t}", "@Override\r\n public int getRow() {\r\n return this.row;\r\n }", "public int getRow()\n\t\t{\n\t\t\treturn m_row;\n\t\t}", "public SelectionKey getKey() {\n return this._key;\n }", "public PrimaryKey getPrimaryKey();", "byte[] getActualRowKey(ConsumerConfig consumerConfig, byte[] originalRowKey);", "public int getKey() {\n return this.key;\n }", "public int getRow()\n {\n return row;\n }", "public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}", "public int getRow( String name )\n {\n Property p = null;\n if ( componentModel != null )\n {\n p = componentModel.findProperty( name );\n }\n\n if ( p != null )\n {\n return ( getRow( p ) );\n }\n\n return -1;\n }", "public Integer getRowNumber() {\n\t\tif (isRowNumber) {\n\t\t\treturn (int) lineId;\n\t\t}\n\t\treturn null;\n\t}", "public Object getSelectedKey()\n\t{\n\t\tif ( m_results.size() == 0)\n\t\t\treturn null;\n\t\treturn m_results.get(0);\n\t}", "ExecRow getIndexTemplateRow()\n {\n return indexTemplateRow;\n }", "protected static Object getColumnKey(XmlElement xmlColumn)\n {\n XmlValue xmlTemp = xmlColumn.getAttribute(\"id\");\n if (xmlTemp == null)\n {\n return xmlColumn;\n }\n return xmlTemp.getString();\n }", "@Override\n public int getKey() {\n return key_;\n }" ]
[ "0.8310447", "0.8098504", "0.79836977", "0.77966213", "0.76770985", "0.7355059", "0.6956958", "0.6511941", "0.65050614", "0.6400114", "0.6397841", "0.6388648", "0.6388648", "0.6388648", "0.6388648", "0.6388648", "0.63661784", "0.635298", "0.62969065", "0.6292382", "0.6286179", "0.6286179", "0.6286179", "0.6286179", "0.6286179", "0.6252015", "0.61883855", "0.618104", "0.61794776", "0.6171697", "0.61658347", "0.6155119", "0.6155119", "0.6152481", "0.61340326", "0.6123333", "0.6112712", "0.61093885", "0.6107983", "0.61027735", "0.6101794", "0.6101289", "0.609276", "0.6071901", "0.60656285", "0.6063072", "0.6050326", "0.6040489", "0.6040489", "0.6040489", "0.6040489", "0.6040489", "0.6040489", "0.6035191", "0.60312575", "0.60312575", "0.60312575", "0.60312575", "0.60312575", "0.60238683", "0.6019678", "0.6016705", "0.6016705", "0.6014215", "0.60067475", "0.60009205", "0.5998742", "0.5998742", "0.59941256", "0.59866035", "0.5974328", "0.597304", "0.59726727", "0.59715617", "0.5963396", "0.5960837", "0.59588844", "0.59588844", "0.5957955", "0.5957955", "0.5933048", "0.5929561", "0.5929561", "0.5929561", "0.592878", "0.59201986", "0.59179586", "0.5911051", "0.5905935", "0.5882502", "0.58747447", "0.58735776", "0.58686066", "0.5864189", "0.5856277", "0.58557653", "0.5848788", "0.5848117", "0.583312", "0.58312124" ]
0.87031096
0
/ V2 V3 migration
@Override public void postKey(SQLiteDatabase database) { if (!isMigratedV3(mContext, database)) { database.rawExecSQL("PRAGMA cipher_migrate;"); setMigratedV3(mContext, database, true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void upgradeFrom_1_to_2(SQLiteDatabase db) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"*** Upgrade database from version [%s] to version [%s]\", VERSION_1, CURRENT_VERSION);\r\n\r\n //1- do migrations\r\n db.execSQL(Parameters.QUERY_CREATE);\r\n db.execSQL(Versions.QUERY_CREATE);\r\n //2- update application version value\r\n Versions.update(db, Names.GHOST_SMS, VERSION_1, VERSION_2);\r\n }", "@Override\n public void migrate(DynamicRealm realm, long oldVersion, long newVersion) {\n RealmSchema schema = realm.getSchema();\n\n // Migrate to version 1\n if (oldVersion == 0) {\n schema.create(\"LocationCache\")\n .addField(\"lat\", double.class)\n .addField(\"lng\", double.class)\n .addField(\"time\", long.class)\n .addField(\"accuracy\", float.class);\n\n schema.create(\"RecentedSearchUserCache\")\n .addField(\"userId\", String.class)\n .addPrimaryKey(\"userId\")\n .addField(\"email\", String.class)\n .addField(\"username\", String.class)\n .addField(\"displayName\", String.class)\n .addField(\"time\", long.class);\n\n schema.create(\"RecentedSearchPlaceCache\")\n .addField(\"placeId\", String.class)\n .addPrimaryKey(\"placeId\")\n .addField(\"mainText\", String.class)\n .addField(\"secondaryText\", String.class)\n .addField(\"createdTime\", long.class);\n oldVersion++;\n }\n\n //Migrate to version 2\n if (oldVersion == 1) {\n schema.create(\"PlaceSaved\")\n .addField(\"placeId\", String.class)\n .addPrimaryKey(\"placeId\")\n .addField(\"jsonPlace\", String.class);\n oldVersion++;\n }\n\n //Migrate to version 3\n if (oldVersion == 2) {\n schema.get(\"PlaceSaved\")\n .addField(\"createdTime\", long.class)\n .addField(\"isSynchronize\", boolean.class);\n oldVersion++;\n }\n }", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "@Override\n public void onUpgrade(DbManager db, int oldVersion, int newVersion) {\n }", "boolean doMigration();", "private void updateDbFrom2to3(SQLiteDatabase db) {\n db.execSQL(\"alter table \" + ConverterEntry.TABLE_NAME + \" add column \" +\n ConverterEntry.COLUMN_NAME_LAST_UPDATE + \" integer default null\");\n\n // add column char code in to unit table\n db.execSQL(\"alter table \" + UnitEntry.TABLE_NAME + \" add column \" +\n UnitEntry.COLUMN_NAME_CHAR_CODE + \" text default null\");\n\n // insert currency converter\n insertNewConverter(db, \"Currency\", \"Валюта\", CURRENCY_CONVERTER_TYPE);\n }", "@Override\n public void onUpgrade(DbManager db, int oldVersion, int newVersion) {\n }", "@Override\n\t\t\t\t\tpublic void onUpgrade(DbManager db, int oldVersion, int newVersion) {\n\t\t\t\t\t}", "public abstract void upgrade();", "public abstract boolean migrate(int userId, String uuid, String tarHost, String content, String conid);", "Collection<Migration> handle(ResourceContext ctx);", "@Override\n public void onUpgrade(DbManager db, int oldVersion, int newVersion) {\n }", "private void doUpgrade() {\n // implement the database upgrade here.\n }", "protected void migrate() {\r\n java.util.Date dateNow = new java.util.Date();\r\n SQLiteBuilder builder = createBuilder();\r\n for (AbstractTable<?, ?, ?> table : tables) {\r\n if (table.migrated() < table.migrations()) {\r\n //FIXME this doesn't yet implement table updates.\r\n builder.createMigration(table).up(this);\r\n VersionRecord<DBT> v = _versions.create();\r\n v.table.set(table.helper.getTable().getRecordSource().tableName);\r\n v.version.set(1);\r\n v.updated.set(dateNow);\r\n v.insert();\r\n }\r\n }\r\n }", "@Override\n\t\t\tpublic void onUpgrade(DbUtils arg0, int arg1, int arg2) {\n\t\t\t\ttry {\n\t\t\t\t\targ0.createTableIfNotExist(Active.class);\n\t\t\t\t\targ0.execNonQuery(\"alter table Active add picUrl LONGTEXT \");\n\t\t\t\t} catch (DbException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "@Test\n void migrate() {\n }", "@Override\r\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVer, int newVer) {\n\r\n\t}", "@Override\n \tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n \n \t}", "public void testMigrationIsNeededOnData() {\n Version firstVsmLoadedVersion = checkVsmFileMigrationStatus(URI.createPlatformPluginURI(VSM_PATH, true), true);\n Version secondVsmLoadedVersion = checkVsmFileMigrationStatus(URI.createPlatformPluginURI(VSM_WITH_REF_TO_MIGRATED_VSM_PATH, true), true);\n Version firstRepresentationsFileloadedVersion = checkRepresentationFileMigrationStatus(URI.createPlatformPluginURI(AIRD_PATH, true), true);\n Version secondRepresentationsFileloadedVersion = checkRepresentationFileMigrationStatus(URI.createPlatformPluginURI(AIRD_WITH_REF_TO_MIGRATED_VSM_PATH, true), true);\n\n // Check that the migration is needed.\n Version firstVsmMigrationVersion = new OptionalLayersVSMMigrationParticipant().getMigrationVersion();\n assertTrue(\"Data corrupted: The first VSM should require a migration corresponding to the optional layers.\",\n firstVsmLoadedVersion == null || firstVsmMigrationVersion.compareTo(firstVsmLoadedVersion) > 0);\n\n Version secondVsmMigrationVersion = new OptionalLayersVSMMigrationParticipant().getMigrationVersion();\n assertTrue(\"Data corrupted: The first VSM should require a migration corresponding to the optional layers.\",\n secondVsmLoadedVersion == null || secondVsmMigrationVersion.compareTo(secondVsmLoadedVersion) > 0);\n\n Version firstRepresentationsFileMigrationVersion = DiagramRepresentationsFileMigrationParticipantV690.MIGRATION_VERSION;\n assertTrue(\"Data corrupted: The representations file should require a migration corresponding to the optional layers.\", firstRepresentationsFileloadedVersion == null\n || firstRepresentationsFileMigrationVersion.compareTo(firstRepresentationsFileloadedVersion) > 0);\n\n Version secondRepresentationsFileMigrationVersion = DiagramRepresentationsFileMigrationParticipantV690.MIGRATION_VERSION;\n assertTrue(\"Data corrupted: The representations file should require a migration corresponding to the optional layers.\", secondRepresentationsFileloadedVersion == null\n || secondRepresentationsFileMigrationVersion.compareTo(secondRepresentationsFileloadedVersion) > 0);\n }", "@Override\n\tpublic boolean upgrade() {\n\t\treturn true;\n\t}", "public void migrateToMultiTransport();", "protected void migrateData(CiDb db, UpdateUI ui) throws OrmException, SQLException {\n }", "public void testV1ToV2Update() throws Exception {\n Properties props = new Properties();\n props.setProperty(LockssRepositoryImpl.PARAM_CACHE_LOCATION, tempDirPath);\n props\n\t.setProperty(ConfigManager.PARAM_PLATFORM_DISK_SPACE_LIST, tempDirPath);\n ConfigurationUtil.setCurrentConfigFromProps(props);\n\n sqlDbManager = new SqlDbManager();\n theDaemon.setDbManager(sqlDbManager);\n sqlDbManager.initService(theDaemon);\n assertTrue(sqlDbManager.setUpDatabase(1));\n sqlDbManager.setTargetDatabaseVersion(2);\n sqlDbManager.startService();\n assertTrue(sqlDbManager.isReady());\n\n Connection conn = sqlDbManager.getConnection();\n assertNotNull(conn);\n assertFalse(sqlDbManager.tableExists(conn, SqlDbManager.OBSOLETE_METADATA_TABLE));\n assertTrue(sqlDbManager.tableExists(conn, SqlDbManager.VERSION_TABLE));\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n \n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int VersionAnterior, int VersionNueva) {\n\t\t\n\t}", "@Override\n public void migrate(@NonNull SupportSQLiteDatabase database) {\n }", "public void startMigrating();", "public abstract void doUpgrade();", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {\n\t\t\n\t}", "protected abstract boolean isMigrationNecessary();", "public void upgradeToVersion3(OpProjectSession session) {\r\n OpBroker broker = session.newBroker();\r\n try {\r\n OpQuery query = broker.newQuery(\"select user from OpUser as user\");\r\n Iterator result = broker.iterate(query);\r\n OpTransaction transaction = broker.newTransaction();\r\n while (result.hasNext()) {\r\n OpUser user = (OpUser) result.next();\r\n user.doSetLevel(OpUser.MANAGER_USER_LEVEL);\r\n broker.updateObject(user);\r\n }\r\n transaction.commit();\r\n }\r\n finally {\r\n broker.closeAndEvict(); \r\n }\r\n }", "@Override\n public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {\n\n }", "private static void doUpgrade(SQLiteDatabase db, Integer oldVersion) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"****** last version [%s]: %s\", Names.GHOST_SMS, oldVersion);\r\n if (CURRENT_VERSION.equals(oldVersion)) {\r\n return;\r\n } else if (VERSION_1.equals(oldVersion)) {\r\n upgradeFrom_1_to_2(db);\r\n }\r\n }", "@Override\r\n public void onUpgrade( SQLiteDatabase db, int oldVersion, int newVersion ) {\r\n\r\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n \n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int oldVersion, int newVersion) {\n\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n }", "void migrate(AggregateManager source, Settings settings);", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t\t\n\t}", "public T caseMigration(Migration object) {\n\t\treturn null;\n\t}", "@Override\n public void onUpgrade( SQLiteDatabase db, int oldVersion, int newVersion )\n {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { }", "protected abstract void finalizeMigration();", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\n\t}", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)\n\t{\n\t\t\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)\n\t{\n\t\t\n\t}", "@Override\r\n public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\r\n\r\n }", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}", "@Override\n\tpublic void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {\n\t}" ]
[ "0.6122366", "0.606635", "0.60576063", "0.6002787", "0.59615433", "0.5955336", "0.5861025", "0.58400965", "0.58139104", "0.57996005", "0.57329655", "0.57248944", "0.57170844", "0.5664765", "0.56155145", "0.5528723", "0.55279005", "0.551898", "0.550059", "0.5497239", "0.54745114", "0.5469875", "0.54646385", "0.545135", "0.54471153", "0.5434437", "0.5413728", "0.53995967", "0.5397389", "0.5395297", "0.5376313", "0.53597444", "0.53566605", "0.5351258", "0.53351134", "0.53341967", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.5331618", "0.53192437", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53132623", "0.53089935", "0.5307955", "0.5306686", "0.53029335", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.5300133", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.528839", "0.52868664", "0.52868664", "0.5285801", "0.52826023", "0.52826023", "0.52826023", "0.52826023", "0.52826023", "0.52826023" ]
0.0
-1
private static Session mySession = null;
public static void start() { try { SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date dtnow = new Date(); //Verify email queue Iterator<Mailtogo> it = new MailtogoDAO().getQueue().iterator(); while(it.hasNext()) { Mailtogo mtg = (Mailtogo)it.next(); mtg.setMtg_status("P"); mtg.save(); dtnow = new Date(); System.out.println(format.format(dtnow) + " -> Sending message " + mtg.getMtg_id()); send(mtg); } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Session getSession();", "Session getSession();", "private Session() {\n }", "private Session() {\n }", "private static Session getInstance() {\n return SingletonHolder.INSTANCE;\n }", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "public Session getSession() { return session; }", "public static Session getSession() {\n return session;\n }", "public Session getSession() {\n return session;\n }", "Session getCurrentSession();", "Session getCurrentSession();", "protected Session getSession() { return session; }", "public void setSession(Session session) { this.session = session; }", "public Session getSession()\n {\n return session;\n }", "public Session getSession();", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public synchronized static Session getInstance(){\n if (_instance == null) {\n _instance = new Session();\n }\n return _instance;\n }", "private Session() {\n userId = -1;\n onUserDeletion = null;\n }", "DatabaseSession openSession();", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "@Override\r\n public PhoenixSession getSession()\r\n {\n return null;\r\n }", "public Session session() {\n return session;\n }", "@Override\n\t\tpublic HttpSession getSession() {\n\t\t\treturn null;\n\t\t}", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public Session getSession() {\n return session;\n }", "public LocalSession session() { return session; }", "SessionManagerImpl() {\n }", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "Session begin();", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public AbstractSession getSession() {\n return session;\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public String getSession() {\n return this.session;\n }", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "private SessionFactoryUtil() {\r\n\t}", "public SessionDao() {\n super(Session.SESSION, com.scratch.database.mysql.jv.tables.pojos.Session.class);\n }", "public SessionController() {\n }", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public User getSession(){\n\t\treturn this.session;\n\t}", "public HelloControllerSession() {\n }", "public void setSession(Session session) {\r\n this.session = session;\r\n }", "public interface SessionManager {\n void getSession(String request);\n}", "public Session createEmptySession();", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public void setSession(Session value);", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public SessionManager ()\r\n\t{\r\n\t\tactiveSessions = new ArrayList<Session>();\r\n\t}", "public static void loadSession(Session session){\n currentSession = session;\n }", "@Override\n\tpublic MemberVO getSession() {\n\t\treturn null;\n\t}", "public String getSession() {\n return session;\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public NationalityDAO() {\n //sessionFactory = HibernateUtil.getSessionFactory();\n session=HibernateUtil.openSession();\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "final protected RobotSessionGlobals getSession() {\n return mSession;\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public SessionService session() {\n return service;\n }", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "com.weizhu.proto.WeizhuProtos.Session getSession();", "@Test\r\n void checkSession() {\n }", "@Override\n\tpublic HttpSessionContext getSessionContext() {\n\t\treturn null;\n\t}", "protected abstract SESSION getThisAsSession();", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "Object getNativeSession();", "private SessionFactoryUtils() {\n super();\n }", "public MainSessionBean() {\r\n init();\r\n }", "public abstract void initialize(ISession session);", "public AuthStorageSession() { \n }", "public void setSession(Session session)\n\t{\n\t\tm_Session = session;\n\t}", "DefaultSession getSession(String id);", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public void setSession(Session session) {\n\t\tthis.session = session;\n\t}", "public SessionResource() {\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public UserSession(User user) {\n\n }", "public interface DAOInterface {\r\n\tpublic Session getSession();\r\n}", "public interface SessionAccess\n{\n /**\n * Returns the current session identifier.\n */\n String getSessionId();\n\n /**\n * Retrieves named attribute from the session\n *\n * @param name an attribute name\n * @return an attribute value stored in the session\n */\n Object getAttribute(String name);\n\n /**\n * Stores named attribute into the session\n *\n * @param name an attribute name\n * @param value an attribute value\n */\n void setAttribute(String name, Object value);\n}", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "@Before\n public void getTestSession() {\n if (sessionId == null) {\n sessionId = Util.getSessionID();\n }\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public McqOfficialSession(){\n\t\tsuper(); \n\t}", "public static HttpSession getSession(Boolean session) {\r\n\t\treturn (HttpSession) FacesContext.getCurrentInstance()\r\n\t\t\t\t.getExternalContext().getSession(false);\r\n\t}", "@Override\r\n\tpublic void setSession(Map<String, Object> session) \r\n\t{\n\t\tthis.session = session;\r\n\t}", "@Override\r\n\tpublic Blog getSession(HttpSession session) {\n\t\treturn (Blog)session.getAttribute(\"blog\");\r\n\t}", "@Override\r\npublic void sessionCreated(HttpSessionEvent arg0) {\n\t\r\n}", "public PSUserSession getSession();", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "private HTTPSession ()\n\t{\n\t\tthis (null, false, null);\n\t}" ]
[ "0.76936793", "0.76936793", "0.768511", "0.768511", "0.74718046", "0.74641097", "0.7364051", "0.73289615", "0.730103", "0.7292592", "0.7292592", "0.72757953", "0.71944875", "0.7193475", "0.7181632", "0.7077153", "0.70584846", "0.70401186", "0.702136", "0.70036304", "0.69772166", "0.6963509", "0.69349635", "0.6912665", "0.6863711", "0.6852006", "0.6844571", "0.68385065", "0.680363", "0.68024254", "0.6768146", "0.6764407", "0.67592525", "0.67502683", "0.6718895", "0.66853064", "0.66614544", "0.66614544", "0.66614544", "0.66193074", "0.6604427", "0.65990686", "0.65581924", "0.65512526", "0.6545498", "0.65189373", "0.6516381", "0.650678", "0.6502613", "0.6497959", "0.6474876", "0.64553034", "0.64417416", "0.6430864", "0.64181924", "0.64133435", "0.6398985", "0.6397439", "0.6387422", "0.6385408", "0.6385045", "0.6376665", "0.63449717", "0.6339229", "0.63308024", "0.63191926", "0.63133293", "0.6310504", "0.63092947", "0.63049597", "0.62933654", "0.62862164", "0.6280941", "0.6249772", "0.6242633", "0.6238851", "0.6221641", "0.6220653", "0.62174994", "0.6214415", "0.62112314", "0.6210022", "0.62046003", "0.62026757", "0.6201804", "0.6189454", "0.61701965", "0.61406815", "0.6136526", "0.6123785", "0.61208606", "0.60949177", "0.60898596", "0.60816544", "0.60706145", "0.60640687", "0.60639274", "0.6063523", "0.6056976", "0.6056049", "0.60541415" ]
0.0
-1
Creates a new instance of Class
private LabelDbmsDao() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Class createClass();", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "Instance createInstance();", "public T newInstance();", "Reproducible newInstance();", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static NewExpression new_(Class type) { throw Extensions.todo(); }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "private Instantiation(){}", "NewClass1 createNewClass1();", "public org.python.types.Type __new__(org.python.types.Type cls);", "ClassInstanceCreationExpression getClass_();", "public static Object newInstance(String classname) {\n return newInstance(classname, Object.class);\n }", "public CMObject newInstance();", "NamedClass createNamedClass();", "public Object newInstance( Class<?> clazz )\n {\n return newInstance( Thread.currentThread().getContextClassLoader(),\n clazz );\n \n }", "public static <T> T createObject(Class<T> clas) throws InstantiationException {\n return createObject(clas, null); //If there's no arguments then it should be null.\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "T create();", "T create();", "public static Object createObject(String className) throws Exception {\n return createObject(Class.forName(className));\n }", "public static Object createObject(String className) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }", "public ClassTemplate() {\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public static JavaType createForClass(Class<?> clazz) {\n return new JavaType(clazz);\n }", "public static synchronized <T> T instantiate(Class<T> clazz) {\n try {\n return clazz.getDeclaredConstructor().newInstance();\n } catch (Exception e) {\n throw new FlywayException(\"Unable to instantiate class \" + clazz.getName() + \" : \" + e.getMessage(), e);\n }\n }", "public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}", "public static Bot newInstance(final String className) throws ClassNotFoundException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t NoSuchMethodException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InstantiationException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalAccessException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t IllegalArgumentException, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t InvocationTargetException{\n\t return (Bot) Class.forName(className).getConstructor().newInstance();\n\t}", "T newInstance(Object... args);", "private ClassUtil() {}", "public static Object createObject(Class objClass) throws Exception {\n return objClass.newInstance();\n }", "public static Object createInstance(String className, Class<?>[] argumentTypes, Object[] arguments) \n {\n if(className == null) \n {\n throw new IllegalArgumentException(\"ClassName must be specified\");\n }\n if(argumentTypes == null) \n {\n throw new IllegalAnnotationException(\"ArgumentTypes must be specified. Use empty array if no arguments\");\n }\n if(arguments == null) \n {\n throw new IllegalAnnotationException(\"Arguments must be specified. Use empty array if no arguments\");\n }\n try \n {\n Class<?> implClass = loadClass(className); \n Constructor<?> constructor = findConstructor(implClass, argumentTypes);\n return constructor.newInstance(arguments);\n }\n catch (Exception e) \n {\n throw new RuntimeException(\n \"Could not create new instance of \" + className + \", missing package from classpath?\", e);\n } \n }", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public ParameterizedInstantiateFactory(Class<? extends T> classToInstantiate) {\r\n super();\r\n this.classToInstantiate = classToInstantiate;\r\n }", "public static ClassScope make(Class<?> paramClass)\n/* */ {\n/* 81 */ return new ClassScope(paramClass);\n/* */ }", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "public Classe() {\r\n }", "public PertFactory() {\n for (Object[] o : classTagArray) {\n addStorableClass((String) o[1], (Class) o[0]);\n }\n }", "OBJECT createOBJECT();", "public ObjectInstantiator newInstantiator(Class cls) {\n return this.strategy.newInstantiatorOf(cls);\n }", "private Pokemon createPokemonFromClass(Class<?extends Pokemon> cl, Coord position) {\n\t\tConstructor<? extends Pokemon> con = null;\n\t\ttry {\n\t\t\tcon = cl.getConstructor(Environment.class, Coord.class, Movement.class);\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tPokemon evolution = null;\n\t\ttry {\n\t\t\tevolution = con.newInstance(this, position, Movement.Down);\n\t\t} catch (InstantiationException\n\t\t\t\t| IllegalAccessException\n\t\t\t\t| IllegalArgumentException\n\t\t\t\t| InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn evolution;\n\t}", "public <T> T createInstance(final Class<T> type, final String moduleName, final String className,\n\t\t\tfinal Object... args) {\n\n\t\tfinal PyObject importer = getImporter();\n\t\tsetClasspath(importer);\n\n\t\tfinal PyObject instance = createObject(getPythonClass(importer, moduleName, className), args);\n\n\t\t// coerce into java type\n\t\treturn (T) instance.__tojava__(type);\n\t}", "static <T> T instantiate(Class<T> type) {\n\n\n try {\n final Constructor<T> constructor = type.getDeclaredConstructor();\n return constructor.newInstance();\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "@SuppressWarnings({\"unchecked\"})\n // Must be synchronized for the Maven Parallel Junit runner to work\n public static synchronized <T> T instantiate(String className, ClassLoader classLoader) {\n try {\n return (T) Class.forName(className, true, classLoader).getDeclaredConstructor().newInstance();\n } catch (Exception e) {\n throw new FlywayException(\"Unable to instantiate class \" + className + \" : \" + e.getMessage(), e);\n }\n }", "DsmlClass createDsmlClass();", "public static Object createObject( String className )\n throws WfControllerException\n {\n Object object = null;\n try\n {\n Class classDefinition = Class.forName( className );\n object = classDefinition.newInstance();\n }\n catch ( InstantiationException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( IllegalAccessException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n catch ( ClassNotFoundException e )\n {\n WfControllerException controlException = new WfControllerException( e.getMessage() );\n throw controlException;\n }\n return object;\n }", "public void createClass(String className)\r\n\t{\r\n\t\tString longName;\r\n\t\tif(className.contains(\"#\"))\r\n\t\t\tlongName = className;\r\n\t\tif(className.contains(\":\"))\r\n\t\t\tlongName= ONT_MODEL.expandPrefix(className);\r\n\t\telse\r\n\t\t\tlongName = BASE_NS + className;\r\n\t\t\r\n\t\tONT_MODEL.createClass(longName);\r\n\t}", "public T getNewInstance() {\n T value = null;\n Class<T> tClass = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass()).getActualTypeArguments()[0];\n try {\n value = tClass.newInstance();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n return value;\n }", "DescribedClass createDescribedClass();", "public static <T> Codec<T> create(Class<T> cls) {\n if (cls == null) {\n throw new NullPointerException(\"Parameter cls is null\");\n }\n List<Field> fields = findMatchedFields(cls);\n if (fields.isEmpty()) {\n throw new IllegalArgumentException(\"Invalid class [\"\n + cls.getName() + \"] no field use annotation @\"\n + Protobuf.class.getName());\n }\n\n CodeGenerator cg = new CodeGenerator(fields, cls);\n\n String code = cg.getCode();\n\n Compiler compiler = new JdkCompiler();\n Class<?> newClass = compiler.compile(code, cg.getClass()\n .getClassLoader());\n\n try {\n Codec<T> newInstance = (Codec<T>) newClass.newInstance();\n return newInstance;\n } catch (InstantiationException e) {\n throw new RuntimeException(e.getMessage(), e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(e.getMessage(), e);\n }\n }", "JDefinedClass objectFactory();", "DynamicInstance createDynamicInstance();", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "Constructor<T> newConstructor();", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public void create(){}", "public static ModelLearnable newInstancebyClassName(Class modelClassName) {\r\n try {\r\n return (ModelLearnable) modelClassName.newInstance();\r\n } catch (InstantiationException e) {\r\n e.printStackTrace();\r\n } catch (IllegalAccessException e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "public Instance() {\n }", "Clase createClase();", "public static <T> T newInstance(Class<T> clazz) throws ReflectionException {\n\t\treturn newInstance(clazz, new Class[]{}, new Object[]{});\n\t}", "public ClassCreator(){\n\n\n\t\tScanner fin = null;\n\n\t\ttry {\n\t\t\tString[] nameHandler = fileName.split(\"\\\\.\");\n\n\t\t\tString className = nameHandler[0].replaceAll(\" |_|\\\\s$|0|1|2|3|4|5|6|7|8|9\", \"\");\n\n\n\t\t\t//Setting Up Scanners/PrintWriter\n\t\t\tfin = new Scanner(new File(fileName));\n\n\n\t\t\tPrintWriter pw = new PrintWriter(className + \".java\");\n\n\n\t\t\tString[] prop = fin.nextLine().split(\"\\t\");\n\t\t\tString[] data = fin.nextLine().split(\"\\t\");\n\n\t\t\tfor(int i = 0; i<prop.length; i++) {\n\t\t\t\tpropertyList.add(new Properties(prop[i].replaceAll(\"\\\\s\", \"\"), getDataType(data[i])));\n\t\t\t}\n\n\t\t\t//Imports\n\t\t\tpw.println(\"import java.util.Scanner;\\n\\n\");\n\t\t\t\n\t\t\t//Class Line\n\t\t\tpw.println(\"\\npublic class \" + className + \" {\");\n\n\t\t\t//Properties\n\t\t\tpw.println(\"\\n\\t//======================================================= Properties\\n\");\n\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateProperty());\n\t\t\t}\n\n\t\t\t//Constructors\n\t\t\tpw.println(\"\\n\\t//======================================================= Constructors\\n\");\n\n\t\t\t//================= Workhorse Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getDataType() + \" \" + propertyList.get(i).getFieldName() + \", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getDataType() + \" \" \n\t\t\t\t\t+ propertyList.get(propertyList.size()-1).getFieldName() + \"){\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetCall(p));\n\t\t\t}\n\t\t\tpw.println(\"\\t}\\n\");\n\n\t\t\t//================= Scanner Constructor\n\t\t\tpw.print(\"\\tpublic \" + className + \"(Scanner fin) throws Exception {\\n\");\n\t\t\tpw.println(\"\\t\\tString[] parts = fin.nextLine().split(\\\"\\\\t\\\");\");\n\t\t\tint arrayCount = 0;\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tif(p.getDataType().equals(\"int\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Integer.parseInt(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"double\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Double.parseDouble(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"long\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Long.parseLong(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse if(p.getDataType().equals(\"boolean\")) {\n\t\t\t\t\tpw.println(p.generateSetCall(\"Boolean.parseBoolean(parts[\" + arrayCount + \"])\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tpw.println(p.generateSetCall(\"parts[\" + arrayCount + \"]\"));\n\t\t\t\t\tarrayCount++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tpw.println(\"\\n\\t}\");\n\n\t\t\t//Methods\n\t\t\tpw.println(\"\\n\\t//======================================================= Methods\\n\");\n\n\t\t\t\t//Equals\n\t\t\tpw.println(\"\\tpublic boolean equals(Object obj) {\");\n\t\t\tpw.println(\"\\t\\tif(!(obj instanceof \" + className + \")) return false;\");\n\t\t\tpw.println(\"\\t\\t\" + className + \" \" + className.substring(0,1).toLowerCase() + \" = (\" + className + \")obj;\");\n\t\t\tpw.println(\"\\t\\treturn getEqualsString().equals(\" + className.substring(0,1).toLowerCase() + \".getEqualsString());\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//EqualsHelper\n\t\t\tpw.println(\"\\n\\tprivate String getEqualsString() {\");\n\t\t\tpw.print(\"\\t\\treturn \");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).getFieldName() + \" + \\\"~\\\" + \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\t//toString\n\t\t\tpw.println(\"\\n\\tpublic String toString() {\");\n\t\t\tpw.print(\"\\t\\treturn \\\"\");\n\t\t\tfor(int i=0; i<propertyList.size()-1; i++) {\n\t\t\t\tpw.print(propertyList.get(i).generateUpperCase() + \": \\\" + \" + propertyList.get(i).getFieldName() + \" + \\\", \");\n\t\t\t}\n\t\t\tpw.print(propertyList.get(propertyList.size()-1).generateUpperCase() + \": \\\" + \" + propertyList.get(propertyList.size()-1).getFieldName() + \";\\n\");\n\t\t\tpw.println(\"\\t}\");\n\t\t\t\n\t\t\t\n\t\t\t//Getters/Setters\n\t\t\tpw.println(\"\\n\\t//======================================================= Getters/Setters\\n\");\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateGetter());\n\t\t\t}\n\t\t\tpw.println();\n\t\t\tfor(Properties p: propertyList) {\n\t\t\t\tpw.println(p.generateSetter());\n\t\t\t}\n\n\t\t\t//End of the file code\n\t\t\tpw.print(\"\\n\\n}\");\n\t\t\tfin.close();\n\t\t\tpw.close();\n\n\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t} finally { //Checked Last after try\n\t\t\ttry {fin.close();} catch (Exception e) {} //Just Double Checking\n\n\t\t}\n\n\n\n\n\t}", "Klassenstufe createKlassenstufe();", "VehicleClass() {}", "private static Object createObject(String className, String namespace) {\n try {\n // get constructor\n Constructor<?> constructor = Class.forName(className).getConstructor(new Class[] {String.class});\n // create object\n return constructor.newInstance(new Object[] {namespace});\n } catch (ClassNotFoundException cnfe) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", cnfe);\n } catch (NoSuchMethodException nsme) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", nsme);\n } catch (InstantiationException ie) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ie);\n } catch (IllegalAccessException iae) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", iae);\n } catch (InvocationTargetException ite) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ite);\n }\n }", "private Object createObject(final Class<? extends AModule> clazz)\n\t{\n\t\ttry\n\t\t{\n\t\t\tConstructor<? extends AModule> constructor = clazz.getDeclaredConstructor();\n\t\t\tconstructor.setAccessible(true);\n\t\t\treturn constructor.newInstance();\n\t\t} catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException\n\t\t\t\t| IllegalArgumentException e)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"Error constructing module\", e);\n\t\t}\n\t}", "public static Object create(String className, Class<?>[] argTypes, Object[] argValues)\r\n\t\t\tthrows CreateObjectException {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass<?> clz = Class.forName(className);\r\n\t\t\tif (argTypes == null) {\r\n\t\t\t\treturn clz.newInstance();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tConstructor<?> c = clz.getConstructor(argTypes);\r\n\t\t\t\treturn c.newInstance(argValues);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CreateObjectException(e);\r\n\t\t}\r\n\t}", "public TargetClass() {\n super();\n }", "public Component createComponent(String ComponentClass, String id) throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\t\n\t\tComponent c = (Component)Class.forName(ComponentClass).newInstance();\n\t\tc.setId(id);\n\t\t\n\t\treturn c;\n\t}", "public static Object newInstance(String className, Object... args) {\n try {\n Class<?> clazz = Class.forName(className);\n Constructor<?>[] constructors = clazz.getDeclaredConstructors();\n for (Constructor<?> constructor : constructors) {\n Class<?>[] types = constructor.getParameterTypes();\n if (types.length == args.length) {\n int matched = 0;\n for (; matched<types.length; matched++) {\n if (!types[matched].isAssignableFrom(args[matched].getClass())) {\n break;\n }\n }\n if (matched == args.length) {\n constructor.setAccessible(true);\n return constructor.newInstance(args);\n }\n }\n }\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"newInstance \" + className + \" \" + e.toString());\n }\n return null;\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public static Object createObject(Class<?> clazz) {\n Class[] parameterTypes = new Class[]{};\n Object[] initargs = new Object[]{};\n return createObject(clazz, parameterTypes, initargs);\n }", "public static CommandType createClass(String name) {\n\t\t\n\t\tif(counter < MAX) {\n\t\t\tcounter ++;\n\t\t\treturn new CommandType(name);\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Es können keine CommandType Objekte mehr erstellt werden!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t}", "static public InstanceGenerator create(String className, String datasetFileName)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(String.class).newInstance(datasetFileName);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "public static DummyBuilder newInstance(Class<?> clazz) {\n return new DummyBuilder(clazz);\n }", "protected static <T extends Base> T createInstance(Class<? extends Base> clazz) {\n try {\n Constructor<?> constructor = clazz.getConstructor();\n T item = (T)constructor.newInstance();\n return item;\n } catch(NoSuchMethodException ex) {\n throw new MongomanException(clazz.getName() + \" All subclasses of Base Class must implement a constructor that takes no arguments\");\n } catch(IllegalAccessException | IllegalArgumentException | InstantiationException | InvocationTargetException ex) {\n throw new MongomanException(ex);\n }\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public Class() {\n\t\tarrayMethods = new ArrayList<Method>();\n\t\tcode_Smells = new HashMap<String, Boolean>();\n\n\t}", "CsticModel createInstanceOfCsticModel();", "Type createType();", "Type createType();", "Type createType();", "<T> T newInstance(URI description) throws EnvironmentException;", "private ClassProxy() {\n }", "protected Object createBeanMatchingType(MappingContext mappingContext) {\n // clazz is never null given the only path that leads to this method already performs that check\n final Class<?> clazz = mappingContext.getTypeInformation().getSafeToWriteClass();\n try {\n return clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException e) {\n throw new ConfigMeMapperException(mappingContext, \"Could not create object of type '\"\n + clazz.getName() + \"'. It is required to have a default constructor\", e);\n }\n }", "public Class<? extends T> getClassToInstantiate() {\r\n return classToInstantiate;\r\n }", "H create(Method method);", "public static <T> T construct(String classname, String readable) throws ConfigurationException\n {\n Class<T> cls = FBUtilities.classForName(classname, readable);\n return construct(cls, classname, readable);\n }", "public SaveObject createFromClass(SaveObjectKind kind, String className) throws IllegalAccessException, InstantiationException {\n Class<?> clazz = getClazzByAnnotation(className);\n if (clazz == null) {\n if (!missingTypes.contains(className)) {\n missingTypes.add(className);\n }\n LOGGER.log(Level.INFO, \"Unknown className \" + className);\n //TODO throw new NotImplementedException($\"Unknown className \" + className);\n throw new NotImplementedException();\n } else {\n switch (kind) {\n case Actor:\n return (SaveActor) clazz.newInstance();\n case Component:\n return (SaveComponent) clazz.newInstance();\n default:\n//TODO throw new NotImplementedException($\"Unknown SaveObject kind {kind}\");\n throw new NotImplementedException();\n }\n }\n }", "protected ParserAbstract createRegisterInstance(\n\t\t\tClass<? extends ParserAbstract> className)\n\t\t\tthrows InstantiationException, IllegalAccessException {\n\t\tClass<? extends ParserAbstract> parserClass = ParserList\n\t\t\t\t.findParserClass(className.getSimpleName().toLowerCase());\n\t\tassert (parserClass != null);\n\t\treturn parserClass.newInstance();\n\t}", "public static <RN extends GenRn, E extends Entity> RN newInstance(Class<E> entity) {\n final StringBuilder classPath = new StringBuilder(\"br.com.rn.\");\r\n classPath.append(entity.getSimpleName());\r\n classPath.append(\"Rn\");\r\n\r\n try {\r\n\r\n // Carrega a classe da Rn especifia da classe passada\r\n final Class rnClass = GenDao.class.getClassLoader().loadClass(classPath.toString());\r\n\r\n // Cria uma instância da Rn\r\n return (RN) rnClass.newInstance();\r\n\r\n } catch (ClassNotFoundException | IllegalAccessException | \r\n IllegalArgumentException | InstantiationException | SecurityException ignore) {\r\n \r\n // Como não foi encontrada uma Rn específica retorna uma genérica\r\n return (RN) new GenRn();\r\n \r\n }\r\n\r\n }", "@Override\n\tpublic <T> T construct(Class<T> type) {\n\t\treturn injector.getInstance(type);\n\t}", "public abstract boolean create(T newInstance);", "static public InstanceGenerator create(String className, Instances training, Instances testing)\n {\n if(className == null || className.isEmpty() || className.equals(\"null\"))\n {\n log.warn(\"No instance generator set, using default\");\n className = \"autoweka.instancegenerators.Default\";\n }\n\n //Get one of these classifiers\n Class<?> cls;\n try\n {\n className = className.trim();\n cls = Class.forName(className);\n return (InstanceGenerator)cls.getDeclaredConstructor(Instances.class, Instances.class).newInstance(training, testing);\n }\n catch(ClassNotFoundException e)\n {\n throw new RuntimeException(\"Could not find class '\" + className + \"': \" + e, e);\n }\n catch(Exception e)\n {\n throw new RuntimeException(\"Failed to instantiate '\" + className + \"': \" + e, e);\n }\n }", "void create(T instance) throws IOException;", "public ClassInfo() {\n }", "protected abstract void construct();", "public org.objenesis.instantiator.ObjectInstantiator newInstantiatorOf(final java.lang.Class r4) {\n /*\n r3 = this;\n boolean r0 = com.esotericsoftware.kryo.util.Util.IS_ANDROID\n r1 = 1\n if (r0 != 0) goto L_0x002a\n java.lang.Class r0 = r4.getEnclosingClass()\n if (r0 == 0) goto L_0x001d\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x001d\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 != 0) goto L_0x001d\n r0 = 1\n goto L_0x001e\n L_0x001d:\n r0 = 0\n L_0x001e:\n if (r0 != 0) goto L_0x002a\n com.esotericsoftware.reflectasm.ConstructorAccess r0 = com.esotericsoftware.reflectasm.ConstructorAccess.get(r4) // Catch:{ Exception -> 0x002a }\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 r2 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$1 // Catch:{ Exception -> 0x002a }\n r2.<init>(r0, r4) // Catch:{ Exception -> 0x002a }\n return r2\n L_0x002a:\n r0 = 0\n r2 = r0\n java.lang.Class[] r2 = (java.lang.Class[]) r2 // Catch:{ Exception -> 0x0033 }\n java.lang.reflect.Constructor r0 = r4.getConstructor(r2) // Catch:{ Exception -> 0x0033 }\n goto L_0x003c\n L_0x0033:\n java.lang.Class[] r0 = (java.lang.Class[]) r0 // Catch:{ Exception -> 0x0042 }\n java.lang.reflect.Constructor r0 = r4.getDeclaredConstructor(r0) // Catch:{ Exception -> 0x0042 }\n r0.setAccessible(r1) // Catch:{ Exception -> 0x0042 }\n L_0x003c:\n com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 r1 = new com.esotericsoftware.kryo.Kryo$DefaultInstantiatorStrategy$2 // Catch:{ Exception -> 0x0042 }\n r1.<init>(r0, r4) // Catch:{ Exception -> 0x0042 }\n return r1\n L_0x0042:\n org.objenesis.strategy.InstantiatorStrategy r0 = r3.fallbackStrategy\n if (r0 != 0) goto L_0x00c1\n boolean r0 = r4.isMemberClass()\n if (r0 == 0) goto L_0x0073\n int r0 = r4.getModifiers()\n boolean r0 = java.lang.reflect.Modifier.isStatic(r0)\n if (r0 == 0) goto L_0x0058\n goto L_0x0073\n L_0x0058:\n com.esotericsoftware.kryo.KryoException r0 = new com.esotericsoftware.kryo.KryoException\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (non-static member class): \"\n r1.append(r2)\n java.lang.String r4 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r4)\n java.lang.String r4 = r1.toString()\n r0.<init>(r4)\n throw r0\n L_0x0073:\n java.lang.StringBuilder r0 = new java.lang.StringBuilder\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"Class cannot be created (missing no-arg constructor): \"\n r1.append(r2)\n java.lang.String r2 = com.esotericsoftware.kryo.util.Util.className(r4)\n r1.append(r2)\n java.lang.String r1 = r1.toString()\n r0.<init>(r1)\n java.lang.String r4 = r4.getSimpleName()\n java.lang.String r1 = \"\"\n boolean r4 = r4.equals(r1)\n if (r4 == 0) goto L_0x00b7\n java.lang.String r4 = \"\\n\\tThis is an anonymous class, which is not serializable by default in Kryo. Possible solutions: \"\n r0.append(r4)\n java.lang.String r4 = \"1. Remove uses of anonymous classes, including double brace initialization, from the containing \"\n r0.append(r4)\n java.lang.String r4 = \"class. This is the safest solution, as anonymous classes don't have predictable names for serialization.\"\n r0.append(r4)\n java.lang.String r4 = \"\\n\\t2. Register a FieldSerializer for the containing class and call \"\n r0.append(r4)\n java.lang.String r4 = \"FieldSerializer#setIgnoreSyntheticFields(false) on it. This is not safe but may be sufficient temporarily. \"\n r0.append(r4)\n java.lang.String r4 = \"Use at your own risk.\"\n r0.append(r4)\n L_0x00b7:\n com.esotericsoftware.kryo.KryoException r4 = new com.esotericsoftware.kryo.KryoException\n java.lang.String r0 = r0.toString()\n r4.<init>(r0)\n throw r4\n L_0x00c1:\n org.objenesis.instantiator.ObjectInstantiator r4 = r0.newInstantiatorOf(r4)\n return r4\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.kryo.Kryo.DefaultInstantiatorStrategy.newInstantiatorOf(java.lang.Class):org.objenesis.instantiator.ObjectInstantiator\");\n }" ]
[ "0.787032", "0.7736781", "0.7574847", "0.722431", "0.72172165", "0.7207975", "0.7040249", "0.7034974", "0.6982185", "0.6896507", "0.6830826", "0.6782374", "0.67510366", "0.6708271", "0.6675231", "0.66502637", "0.65975195", "0.65883476", "0.6528021", "0.6528021", "0.6518639", "0.65085846", "0.64813554", "0.6397192", "0.6394881", "0.639122", "0.63487417", "0.63259846", "0.630509", "0.6282911", "0.6256647", "0.62422055", "0.6234889", "0.62346405", "0.62218523", "0.6204491", "0.6195742", "0.6190078", "0.6184949", "0.61812377", "0.6171541", "0.6143401", "0.61432546", "0.61407065", "0.61305773", "0.6104322", "0.61038816", "0.6096125", "0.60704774", "0.60465425", "0.6029755", "0.60296345", "0.6029081", "0.6022226", "0.6020153", "0.6016647", "0.60017914", "0.59879774", "0.5982424", "0.5976892", "0.5973067", "0.5970651", "0.5965615", "0.59646136", "0.5958089", "0.59544134", "0.59494597", "0.5935731", "0.592995", "0.5928701", "0.59279805", "0.59279764", "0.5918997", "0.5915758", "0.5915385", "0.59140766", "0.5911446", "0.59093547", "0.59093547", "0.59093547", "0.59086794", "0.59052503", "0.59017944", "0.59017944", "0.59017944", "0.58881545", "0.58840394", "0.5881162", "0.5878843", "0.5863262", "0.5860382", "0.5832653", "0.5830028", "0.58267164", "0.5825428", "0.5822886", "0.5822171", "0.5820324", "0.5807512", "0.5795777", "0.5783523" ]
0.0
-1
Builds an empty selection query. It has to be configured incrementally using the setter methods.
public QueryBuilder() { label = null; queryCondition = null; selectionLimiter = null; selectionSorter = null; variablesMap = new HashMap<String, Expression>(); selectionLabelsReferencedByStats = new HashSet<String>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Query empty() {\n return new Query();\n }", "public QueryOptions build() {\n return new QueryOptions(this.columns, this.excludeColumns, this.excludeAttributes, this.shards);\n }", "public Builder clearQuery() {\n bitField0_ = (bitField0_ & ~0x00000010);\n query_ = getDefaultInstance().getQuery();\n\n return this;\n }", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "public Builder clearSelect() {\n\n select_ = getDefaultInstance().getSelect();\n onChanged();\n return this;\n }", "public Builder clearQueries() {\n if (queriesBuilder_ == null) {\n queries_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000010);\n onChanged();\n } else {\n queriesBuilder_.clear();\n }\n return this;\n }", "public Builder clearQueryId() {\n if (queryIdBuilder_ == null) {\n queryId_ = null;\n onChanged();\n } else {\n queryIdBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder clearQueryId() {\n if (queryIdBuilder_ == null) {\n queryId_ = null;\n onChanged();\n } else {\n queryIdBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000001);\n return this;\n }", "public Builder clearQueryVisibility() {\n bitField0_ = (bitField0_ & ~0x00000020);\n queryVisibility_ = getDefaultInstance().getQueryVisibility();\n\n return this;\n }", "public Builder clearQueryName() {\n bitField0_ = (bitField0_ & ~0x00000004);\n queryName_ = getDefaultInstance().getQueryName();\n\n return this;\n }", "SelectQuery createSelectQuery();", "public static QueryResult build() {\n return new QueryResult(ImmutableList.of());\n }", "public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }", "public com.example.DNSLog.Builder clearQuery() {\n query = null;\n fieldSetFlags()[8] = false;\n return this;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n \tprivate CriteriaQueryImpl constructSelectQuery(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal CriteriaQueryImpl q = new CriteriaQueryImpl(this.metamodel);\n \n \t\tthis.constructFrom(cb, q, tree.getChild(1));\n \n \t\tfinal Tree select = tree.getChild(0);\n \t\tfinal List<Selection<?>> selections = this.constructSelect(cb, q, select.getChild(select.getChildCount() - 1));\n \n \t\tif (selections.size() == 1) {\n \t\t\tq.select(selections.get(0));\n \t\t}\n \t\telse {\n \t\t\tq.multiselect(selections);\n \t\t}\n \n \t\tif (select.getChild(0).getType() == JpqlParser.DISTINCT) {\n \t\t\tq.distinct(true);\n \t\t}\n \n \t\tint i = 2;\n \t\twhile (true) {\n \t\t\tfinal Tree child = tree.getChild(i);\n \n \t\t\t// end of query\n \t\t\tif (child.getType() == JpqlParser.EOF) {\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t\t// where fragment\n \t\t\tif (child.getType() == JpqlParser.WHERE) {\n \t\t\t\tq.where(this.constructJunction(cb, q, child.getChild(0)));\n \t\t\t}\n \n \t\t\t// group by fragment\n \t\t\tif (child.getType() == JpqlParser.LGROUP_BY) {\n \t\t\t\tq.groupBy(this.constructGroupBy(cb, q, child));\n \t\t\t}\n \n \t\t\t// having fragment\n \t\t\tif (child.getType() == JpqlParser.HAVING) {\n \t\t\t\tq.having(this.constructJunction(cb, q, child.getChild(0)));\n \t\t\t}\n \n \t\t\t// order by fragment\n \t\t\tif (child.getType() == JpqlParser.LORDER) {\n \t\t\t\tthis.constructOrder(cb, q, child);\n \t\t\t}\n \n \t\t\ti++;\n \t\t\tcontinue;\n \t\t}\n \n \t\treturn q;\n \t}", "protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}", "@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }", "public PseudoQuery() {\r\n\t}", "public Builder clearQueryPort() {\n bitField0_ = (bitField0_ & ~0x00000020);\n queryPort_ = 0;\n onChanged();\n return this;\n }", "public Query() {\r\n }", "public Builder clearQueryMessage() {\n bitField0_ = (bitField0_ & ~0x00000200);\n queryMessage_ = getDefaultInstance().getQueryMessage();\n onChanged();\n return this;\n }", "private String getSelectQuery() {\n String query = null;\n try {\n query = crudQueryComposer.composeReadQuery();\n } catch (MissingPropertyException e) {\n logger.error(e);\n }\n return query;\n }", "public Query(){\n this(new MongoQueryFilter.MongoQueryFilterBuilder());\n }", "public QueryBuilder buildQueryBuilder() {\n return dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(queryRestrictions)\n .debug(debug)\n .audit(isAuditQuery());\n }", "public Builder clearWhereClause() {\n\n whereClause_ = getDefaultInstance().getWhereClause();\n onChanged();\n return this;\n }", "public Builder clearQ() {\n \n q_ = getDefaultInstance().getQ();\n onChanged();\n return this;\n }", "public Builder clearQueryAddress() {\n bitField0_ = (bitField0_ & ~0x00000008);\n queryAddress_ = getDefaultInstance().getQueryAddress();\n onChanged();\n return this;\n }", "public SearchQuery build() {\n this._Web_search.set_maxDepth(_maxDepth);\n this._Web_search.set_maxResults(_maxResults);\n this._Web_search.set_threshold(_threshold);\n this._Web_search.set_beamWidth(_beamWidth);\n if (heuristicSearchType == null) {\n this._Web_search.setHeuristicSearchType(Enums.HeuristicSearchType.BEST_FIRST);\n } else {\n this._Web_search.setHeuristicSearchType(heuristicSearchType);\n }\n\n return new SearchQuery(this._query, this._Web_search);\n }", "@Override\n public SpanQuery toFragmentQuery () throws QueryException {\n\n // The query is null\n if (this.isNull)\n return (SpanQuery) null;\n\n if (this.isEmpty) {\n log.error(\"You can't queryize an empty query\");\n return (SpanQuery) null;\n };\n\n // The query is not a repetition query at all, but may be optional\n if (this.min == 1 && this.max == 1)\n return this.subquery.retrieveNode(this.retrieveNode)\n .toFragmentQuery();\n\n // That's a fine repetition query\n return new SpanRepetitionQuery(\n this.subquery.retrieveNode(this.retrieveNode).toFragmentQuery(),\n this.min, this.max, true);\n }", "@SuppressWarnings(\"WeakerAccess\")\n public static QueryOptions defaultOptions() {\n return new Builder().build();\n }", "CampusSearchQuery generateQuery();", "public Builder clearQueryZone() {\n bitField0_ = (bitField0_ & ~0x00000400);\n queryZone_ = getDefaultInstance().getQueryZone();\n onChanged();\n return this;\n }", "public java.lang.String getSelectClause() {\n if (selectClause.length() == 0) {\n buildQuery();\n }\n\n return selectClause;\n }", "private ASTQuery() {\r\n dataset = Dataset.create();\r\n }", "@Test\n public void constructorThrowsOnEmptySelection() {\n assertThrows(IllegalArgumentException.class, () -> {\n // arrange\n // act\n new QuerySpecificationBuilder(\"\", QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n });\n }", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "public Query() {\n initComponents();\n }", "public org.apache.drill.exec.proto.UserBitShared.QueryId.Builder getQueryIdBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getQueryIdFieldBuilder().getBuilder();\n }", "public org.apache.drill.exec.proto.UserBitShared.QueryId.Builder getQueryIdBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getQueryIdFieldBuilder().getBuilder();\n }", "public Builder clearQueryTimeSec() {\n bitField0_ = (bitField0_ & ~0x00000080);\n queryTimeSec_ = 0L;\n onChanged();\n return this;\n }", "public Builder clearQueryTimeNsec() {\n bitField0_ = (bitField0_ & ~0x00000100);\n queryTimeNsec_ = 0;\n onChanged();\n return this;\n }", "Select createSelect();", "public SQLQuery _buildQuery(E event) throws SQLException, ErrorResponseException {\n withoutIdField = true;\n return buildQuery(event);\n }", "private DbQuery() {}", "private DirectDbQuery() {\n this.query = null;\n this.database = null;\n this.queryLanguage = null;\n this.paramMap = null;\n }", "public Builder clearSelector() {\n copyOnWrite();\n instance.clearSelector();\n return this;\n }", "private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }", "static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }", "@Override\n\tprotected Resultable querySelectionsResult(QueryFactory queryFactory,\n\t\t\tint rows, int page, String[] selections, Order order) {\n\t\treturn null;\n\t}", "public final SelectImpl distinct() {\n selectDistinct = true;\n return this;\n }", "public SolrQuery() {\n super(null);\n store = null;\n }", "protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }", "public SelectStatement() {\n\t\tthis.columnSpecs = new ArrayList<>();\n\t}", "public Builder clearMissingResults() {\n \n missingResults_ = false;\n onChanged();\n return this;\n }", "SelectQueryBuilder selectAll();", "public Builder clearQueryParameters() {\n\t\t\turl.query.clear();\n\t\t\treturn this;\n\t\t}", "@Override\n public Object build() {\n return AggregationBuilders.filter(this.getName(),\n (org.opensearch.index.query.QueryBuilder)this.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build());\n }", "@Override\n\tpublic Query createQuery(String qlString) {\n\t\treturn null;\n\t}", "public static QueryInterface createQuery() {\n return new XmlQuery();\n }", "public Builder clearSqlState() {\n \n sqlState_ = getDefaultInstance().getSqlState();\n onChanged();\n return this;\n }", "public final SelectImpl all() {\n selectAll = true;\n return this;\n }", "@Test\n public void constructorStoreSucceed()\n {\n // arrange\n // act\n QuerySpecificationBuilder querySpecificationBuilder = new QuerySpecificationBuilder(\"*\", QuerySpecificationBuilder.FromType.ENROLLMENTS);\n\n // assert\n assertEquals(\"*\", Deencapsulation.getField(querySpecificationBuilder, \"selection\"));\n assertEquals(QuerySpecificationBuilder.FromType.ENROLLMENTS, Deencapsulation.getField(querySpecificationBuilder, \"fromType\"));\n }", "private Queries() {\n // prevent instantiation\n }", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "protected String getComposedQuery() {\n\n\t\tif (this.variableList.isEmpty()) {\n\t\t\tthrow new IllegalArgumentException(\"Can't compose a query with no \" +\n\t\t\t\"select variables! Add some variables using addSelectVariable()!\");\n\t\t}\n\t\t// variables that are used in the SPARQL query\n\t\tString variables = \"\";\n\t\t// SPARQL query\n\t\tString queryString = \"\";\n\n\t\t// append variables \n\t\tfor(String var : this.variableList ) {\n\t\t\tvariables+=\" \"+var;\n\t\t}\t\n\n\t\t//cheesy mechanism to allow UNION statements to parse correctly\n\t\tString startBracket = \" {\";\n\t\tString endBracket = \"} \";\n\t\tfor (String queryTriplet : queryTriplets) {\n\t\t\tif (queryTriplet.contains(\"UNION\")) {\n\t\t\t\tstartBracket = \" {{\";\n\t\t\t\tendBracket = \" }}\";\n\t\t\t}\n\t\t}\n\n\t\t//add prefixes into the query statement if they have been added.\n\t\tif (prefixMap.keySet().isEmpty() == false ) {\n\t\t\tfor (String prefix : prefixMap.keySet()) {\n\t\t\t\tqueryString += \"PREFIX \" + prefix + \": \" + \n\t\t\t\tprefixMap.get(prefix) + \" \";\n\t\t\t}\n\t\t}\n\n\t\t// make sure we have some variables\n\t\tif(variables != \"\")\n\t\t\tqueryString += \"select DISTINCT\" + variables + startBracket;\n\n\t\t// wrap up query string from queryTripletList\n\t\tfor (String queryTriplet : queryTriplets) {\n\t\t\tqueryString += queryTriplet;\t\n\t\t\tif (queryTriplet.contains(\"UNION\") == false && \n\t\t\t\t\tqueryTriplet.contains(\"FILTER\") == false)\n\t\t\t\tqueryString += \" . \";\n\n\t\t}\n\n\t\tqueryString += endBracket;\n\t\tif(this.neurolexData)\n\t\t\tqueryString +=\"ORDER BY $name \"+\"LIMIT \"+getCurrentLimit()+\" OFFSET \"+getCurrentOffset();\n\t\tif(this.comesFromBAMS)\n\t\t\tqueryString += \"LIMIT \"+getCurrentLimit()+\" OFFSET \"+getCurrentOffset();\n\n\t\tSystem.out.println(queryString);\n\t\treturn queryString;\n\t}", "public Builder clearSearch() {\n if (searchBuilder_ == null) {\n if (inputSourceCase_ == 10) {\n inputSourceCase_ = 0;\n inputSource_ = null;\n onChanged();\n }\n } else {\n if (inputSourceCase_ == 10) {\n inputSourceCase_ = 0;\n inputSource_ = null;\n }\n searchBuilder_.clear();\n }\n return this;\n }", "private AbstractSelection<?> constructSingleSelect(CriteriaBuilderImpl cb, CriteriaQueryImpl<?> q, Tree selectDef) {\n \t\t// constructor select\n \t\tif (selectDef.getType() == JpqlParser.NEW) {\n \t\t\tfinal String className = new Qualified(selectDef.getChild(0)).toString();\n \n \t\t\tfinal List<Selection<?>> childSelections = Lists.newArrayList();\n \t\t\tfinal Tree arguments = selectDef.getChild(1);\n \t\t\tfor (int i = 0; i < arguments.getChildCount(); i++) {\n \t\t\t\tfinal Tree argumentDef = arguments.getChild(i);\n \n \t\t\t\tchildSelections.add(this.getExpression(cb, q, argumentDef, null));\n \t\t\t}\n \n \t\t\ttry {\n \t\t\t\tfinal Class<?> clazz = this.metamodel.getEntityManagerFactory().getClassloader().loadClass(className);\n \t\t\t\treturn cb.construct(clazz, childSelections.toArray(new Selection[childSelections.size()]));\n \t\t\t}\n \t\t\tcatch (final ClassNotFoundException e) {\n \t\t\t\tthrow new PersistenceException(\"Cannot load class: \" + className + \", line \" + selectDef.getLine() + \":\" + selectDef.getCharPositionInLine());\n \t\t\t}\n \t\t}\n \n \t\t// object type\n \t\tif (selectDef.getType() == JpqlParser.OBJECT) {\n \t\t\tfinal String alias = selectDef.getChild(0).getText();\n \t\t\treturn this.getAliased(q, alias);\n \t\t}\n \n \t\treturn this.getExpression(cb, q, selectDef, null);\n \t}", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "public Builder clearMissingStatement() {\n \n missingStatement_ = false;\n onChanged();\n return this;\n }", "protected void generateSelect( SQLQueryModel query, LogicalModel model, DatabaseMeta databaseMeta,\n List<Selection> selections, boolean disableDistinct, int limit, boolean group, String locale,\n Map<LogicalTable, String> tableAliases, Map<String, String> columnsMap, Map<String, Object> parameters,\n boolean genAsPreparedStatement ) {\n query.setDistinct( !disableDistinct && !group );\n query.setLimit( limit );\n for ( int i = 0; i < selections.size(); i++ ) {\n // In some database implementations, the \"as\" name has a finite length;\n // for instance, oracle cannot handle a name longer than 30 characters.\n // So, we map a short name here to the longer id, and replace the id\n // later in the resultset metadata.\n String alias = null;\n if ( columnsMap != null ) {\n alias = databaseMeta.generateColumnAlias( i, selections.get( i ).getLogicalColumn().getId() );\n columnsMap.put( alias, selections.get( i ).getLogicalColumn().getId() );\n alias = databaseMeta.quoteField( alias );\n } else {\n alias = databaseMeta.quoteField( selections.get( i ).getLogicalColumn().getId() );\n }\n SqlAndTables sqlAndTables =\n getBusinessColumnSQL( model, selections.get( i ), tableAliases, parameters, genAsPreparedStatement,\n databaseMeta, locale );\n query.addSelection( sqlAndTables.getSql(), alias );\n }\n }", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "public Query buildSelectionQuery(SelectionResolver resolver) throws SelectionResolutionException\n {\n\tif(log.isDebugEnabled())\n\t log.debug(\"Resolving SOURCE selection [\" + this.sourceSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t// Resolving the source selection (where we are selecting from).\n\tSelection sourceSelection = resolver.resolveSelection(this.sourceSelectionLabel);\n\n\tif(sourceSelection == null)\n\t throw new NoSuchElementException(\"Impossible to resolve source selection [\" + this.sourceSelectionLabel\n\t\t\t\t\t + \"] for query: \" + this.label);\n\telse if(log.isDebugEnabled())\n\t log.debug(\"Source selection RESOLVED [\" + this.sourceSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t// Update the scopes with the resolved selection (if necessary).\n\tresolver.updateScopesWithResolvedSelection(sourceSelection);\n\n\t// Resolve any selection referenced by stats functions.\n\tIterator<String> referencedLabels = this.selectionLabelsReferencedByStats.iterator();\n\twhile(referencedLabels.hasNext())\n\t{\n\t String refSelectionLabel = referencedLabels.next();\n\n\t if(log.isDebugEnabled())\n\t\tlog.debug(\"Resolving REFERENCED selection [\" + refSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t if(resolver.resolveSelection(refSelectionLabel) == null)\n\t\tthrow new NoSuchElementException(\"Impossible to resolve referenced selection [\" + refSelectionLabel\n\t\t\t\t\t\t + \"] for query: \" + this.label);\n\t else if(log.isDebugEnabled())\n\t\tlog.debug(\"Referenced selection RESOLVED [\" + refSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t // Update the scopes with the resolved selection (if necessary).\n\t resolver.updateScopesWithResolvedSelection(sourceSelection);\n\t}\n\n\treturn new Query(label, queryCondition, sourceSelection, variablesMap, selectionSorter, selectionLimiter);\n }", "public Builder clearQueryAuthorizations() {\n bitField0_ = (bitField0_ & ~0x00000100);\n queryAuthorizations_ = getDefaultInstance().getQueryAuthorizations();\n\n return this;\n }", "public Builder clearNoId() {\n\n noId_ = 0L;\n onChanged();\n return this;\n }", "public static UserAggregate buildEmpty() {\n return new UserAggregate();\n }", "protected TableCommandRequestQueryCriteria() {\r\n\t\tthis(null, null);\r\n\t}", "public Query advancedQuery() \n {\n return null;\n }", "public String toQuery() {\n // determine ordering\n String ordering = \"\";\n if (ratingFirst) {\n ordering += \"ORDER BY rating\" + (ratingDescend ? \" DESC, \" : \", \") +\n (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\");\n } else {\n ordering += \"ORDER BY \" + (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\")\n + \", rating\" + (ratingDescend ? \" DESC\" : \"\");\n }\n\n // determine pagination offsets\n String pagination = \"\";\n if (pageNumber > 1) {\n pagination += \"\\nLIMIT 100\\nOFFSET \" + (convertToBase() - 1) * 100 + \";\";\n }\n\n return query + ordering + pagination;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "public Builder clearResults() {\n if (resultsBuilder_ == null) {\n results_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n resultsBuilder_.clear();\n }\n return this;\n }", "private String buildSelect() {\r\n\t\tString select = \"select all_source.line, ' '||replace(all_source.TEXT,chr(9),' ')|| ' ' line from all_source where 2=2 \";\r\n\t\tString ownerCondition = \"\";\r\n\t\tString ownerInnerCondition = \"\";\r\n\t\tString beginProcedureCondition = \"\";\r\n\r\n\t\tif (!oraJdbcDTO.dbSchema.equals(\"\")) {\r\n\t\t\townerCondition = \" and all_source.OWNER = ? \";\r\n\t\t\townerInnerCondition = \" and all_source1.OWNER = ? \";\r\n\t\t}\r\n\t\tif (!oraJdbcDTO.packageName.equals(\"\")) {\r\n\t\t\t// Procedure in package\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \"and all_source.line >=\\n\"\r\n\t\t\t\t\t+ \" (select min(all_source1.line)\\n\"\r\n\t\t\t\t\t+ \" from all_source all_source1 where 2=2 \"\r\n\t\t\t\t\t+ ownerInnerCondition\r\n\t\t\t\t\t+ \" and all_source1.name = ?\\n\"\r\n\t\t\t\t\t+ \" and all_source1.TYPE = 'PACKAGE'\\n\"\r\n\t\t\t\t\t+ \" and instr(upper(all_source1.TEXT), ?) > 0)\";\r\n\t\t\t;\r\n\t\t} else {\r\n\t\t\t// Single procedure or function\r\n\t\t\tbeginProcedureCondition = \"and all_source.name = ?\\n\"\r\n\t\t\t\t\t+ \"and all_source.TYPE in ('PROCEDURE','FUNCTION')\";\r\n\t\t}\r\n\t\tselect = select + beginProcedureCondition + \" and all_source.line >= ?\"\r\n\t\t\t\t+ ownerCondition + \" order by all_source.line\";\r\n\r\n\t\treturn select;\r\n\t}", "public Object clone() {\n SetQuery copy = new SetQuery(this.operation);\n\n this.copyMetadataState(copy);\n\n copy.leftQuery = (QueryCommand)this.leftQuery.clone();\n copy.rightQuery = (QueryCommand)this.rightQuery.clone();\n\n copy.setAll(this.all);\n\n if(this.getOrderBy() != null) {\n copy.setOrderBy(this.getOrderBy().clone());\n }\n\n if(this.getLimit() != null) {\n copy.setLimit( this.getLimit().clone() );\n }\n\n copy.setWith(LanguageObject.Util.deepClone(this.getWith(), WithQueryCommand.class));\n\n if (this.projectedTypes != null) {\n copy.setProjectedTypes(new ArrayList<Class<?>>(projectedTypes), this.metadata);\n }\n\n return copy;\n }", "public Builder setQuery(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000010;\n query_ = value;\n\n return this;\n }", "public Builder clearRequestedValues() {\n requestedValues_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000004);\n onChanged();\n return this;\n }", "public Qs() {\n this(\"qs\", null);\n }", "@Override\n public GeneralQueryFormat getQuery(boolean isSelected) {\n get_client_by_id_query clientByIdQuery = new get_client_by_id_query();\n Client currClient = (Client)super.myparent.getSelectedObject();\n clientByIdQuery.setPreparedStatement(new Object[]{currClient.getClientId()});\n return clientByIdQuery;\n }", "SELECT createSELECT();", "public Builder clearStatement() {\n if (statementBuilder_ == null) {\n statement_ = null;\n onChanged();\n } else {\n statement_ = null;\n statementBuilder_ = null;\n }\n\n return this;\n }", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "public Builder clearOwnStatement() {\n \n ownStatement_ = false;\n onChanged();\n return this;\n }", "public Builder setSelect(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n select_ = value;\n onChanged();\n return this;\n }", "protected SelectQuery getQuery(final String query) {\n\t\treturn queryFactory.parseQuery(query);\n\t}", "public static String buildSelectOneSql(Object object, FlyingModel flyingModel)\r\n\t\t\tthrows IllegalAccessException, InvocationTargetException, NoSuchMethodException {\r\n\t\tif (null == object) {\r\n\t\t\tthrow new BuildSqlException(BuildSqlExceptionEnum.nullObject);\r\n\t\t}\r\n\t\tString ignoreTag = flyingModel.getIgnoreTag();\r\n\t\tif (object instanceof Conditionable) {\r\n\t\t\t((Conditionable) object).setLimiter(null);\r\n\t\t}\r\n\t\tStringBuffer selectSql = new StringBuffer(SELECT_);\r\n\t\tStringBuffer fromSql = new StringBuffer(FROM);\r\n\t\tStringBuffer whereSql = new StringBuffer(WHERE_);\r\n\t\tAtomicInteger ai = new AtomicInteger(0);\r\n\t\tdealMapperAnnotationIterationForSelectAll(object, selectSql, fromSql, whereSql, null, null, null, ai, null,\r\n\t\t\t\tignoreTag);\r\n\r\n\t\tif (selectSql.indexOf(COMMA) > -1) {\r\n\t\t\tselectSql.delete(selectSql.lastIndexOf(COMMA), selectSql.lastIndexOf(COMMA) + 1);\r\n\t\t}\r\n\t\tif (WHERE_.equals(whereSql.toString())) {\r\n\t\t\twhereSql = new StringBuffer();\r\n\t\t} else if (whereSql.indexOf(AND) > -1) {\r\n\t\t\twhereSql.delete(whereSql.lastIndexOf(AND), whereSql.lastIndexOf(AND) + 3);\r\n\t\t}\r\n\t\treturn selectSql.append(fromSql).append(whereSql).append(_LIMIT_1).toString();\r\n\t}", "private UQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "@Override\n\tpublic <T> TypedQuery<T> createQuery(CriteriaQuery<T> criteriaQuery) {\n\t\treturn null;\n\t}", "public final ParametersBuilder clearSelectionOverrides() {\n if (selectionOverrides.size() == 0) {\n // Nothing to clear.\n return this;\n }\n selectionOverrides.clear();\n return this;\n }", "public FromClause createFromClause()\n {\n return null;\n }" ]
[ "0.7255448", "0.70475334", "0.69381547", "0.6501438", "0.644508", "0.64213455", "0.6212303", "0.6212303", "0.61093247", "0.6030588", "0.6021534", "0.5975914", "0.5938979", "0.5930984", "0.5926006", "0.5920883", "0.5919807", "0.5910119", "0.5909888", "0.5887399", "0.5874046", "0.5873734", "0.58236593", "0.5784112", "0.577593", "0.57314247", "0.57058585", "0.56938213", "0.56758153", "0.56728923", "0.5660526", "0.565547", "0.56510144", "0.56354207", "0.5596796", "0.5568665", "0.5568246", "0.5562469", "0.5562469", "0.5557602", "0.55504555", "0.55350834", "0.55288106", "0.5508242", "0.5496444", "0.5481225", "0.54735166", "0.5465771", "0.5465352", "0.54480356", "0.5442889", "0.5441012", "0.5431773", "0.5422532", "0.5413818", "0.53973514", "0.5396764", "0.53828937", "0.5370125", "0.53697413", "0.5365909", "0.5358711", "0.5345974", "0.53429586", "0.53286344", "0.53239477", "0.532026", "0.53015524", "0.53015524", "0.53015524", "0.53015524", "0.5297855", "0.5265322", "0.52614075", "0.52474463", "0.5243356", "0.52427447", "0.52348334", "0.5222365", "0.52202344", "0.5214429", "0.52101547", "0.52091783", "0.519806", "0.51906407", "0.51889914", "0.51717544", "0.51677054", "0.5163018", "0.5162686", "0.516057", "0.5159161", "0.515051", "0.5145066", "0.51184195", "0.5117494", "0.5110633", "0.51081884", "0.51078284", "0.5100099" ]
0.68075854
3
Sets the label of the source selection.
public void setSourceSelectionLabel(String sourceSelectionLabel) { this.sourceSelectionLabel = sourceSelectionLabel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLabel(String label);", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public final void setLabel(final String label) {\r\n this.label = label;\r\n }", "public void setLabel(final String label) {\n this.label = label;\n }", "void setLabel(Label label);", "public void setLabel(final String _label)\n {\n this.label = _label;\n }", "public void setLabel(String label) {\n addNewLabel().setText(label);\n }", "public void setLabel( String label ) {\r\n lbl = label;\r\n }", "public void setLabel(final String label) {\n this.label = label;\n }", "protected void setLabel(final String label) {\n\t\tmyLabel = label;\n\t}", "public void setLabel(String label) {\r\n this.label = label;\r\n }", "public void setLabel(String label) {\n this.label = label;\n }", "@Override\n\tpublic void setLabelText(String label) {\n\t}", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(final String label) {\n _section.setText(label);\n }", "public void setLabel(String label) {\n\t\t_label = label;\n\t}", "@Override\n public void setLabel(String arg0)\n {\n \n }", "public void setText(String source)\n {\n m_srcUtilIter_.setText(source);\n m_source_ = m_srcUtilIter_;\n updateInternalState();\n }", "public void setLabel(String label)\n\t{\n\t\tthis.label = label;\n\t}", "public void setLabel(String label) {\n\t\tthis.label = label;\n\t}", "public final native void setLabel(String label) /*-{\r\n\t\tthis.label = label;\r\n\t}-*/;", "public void setLabelText(String text);", "public void setLabel(int label) {\n\t\tthis.label = label;\n\t}", "public void setLabel(String s) {\n if (s == null && label == null) {\n return;\n }\n\n if (s == null || !s.equals(label)) {\n String oldLabel = label;\n label = s;\n listeners.firePropertyChange(PROPERTY_LABEL, oldLabel, label);\n }\n }", "public String getSourceSelectionLabel()\n {\n\treturn this.sourceSelectionLabel;\n }", "public void setLabel(Object v) \n {\n this.label = v;\n }", "public void setLabel(Object value) {\n this.setValue(LABEL_PROPERTY_KEY, value);\n }", "public void setLabel(String label) {\n this.label = label == null ? null : label.trim();\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "@objid (\"5c3d048f-2049-4d54-b5e2-eb8c3afe4b1d\")\r\n public void setText(final String label) {\r\n if (label != null)\r\n this.text.setText(label);\r\n }", "void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);", "public void setXLabel(String _label);", "public void setLabel(String label)\n {\n if (StringUtils.isBlank(label))\n throw new IllegalArgumentException(\"label cannot be null or empty\");\n \n this.label = label;\n }", "public void setLabel(gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Label label) {\r\n this.label = label;\r\n }", "public void setLabelToBeShown(String label);", "public final void setLabel1(@Nullable CharSequence label) {\n mLabel1 = label;\n }", "public void setLabel(double label) {\n\t\tthis.label = label;\n\t}", "public DrillBuilder setLabel(String label) {\n this.label = label;\n return this;\n }", "void setGraphLabel(String label);", "public static void setLabel(Label labelName) {\n emitf(\"%s:\\n\", labelName.toString());\n }", "public MyProgress setLabel(String label) {\n mLabel = label;\n return this;\n }", "public void setLabel(T2 eLabel) {\r\n\t\tthis.label = eLabel;\r\n\t\tcheckRep();\r\n\t}", "public void setLabelName(String labelName){\n m_labelName = labelName;\n }", "public Builder setLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n label_ = value;\n onChanged();\n return this;\n }", "public void setLabelText(String text) {\n label.setText(text);\n }", "public void setLabel(String rawLabel) { //sets the label\n\t\tthis.rawLabel = rawLabel; //save the raw label\n\n\t\t//Add spaces to each end of the rawLabel to make it\n\t\t// easier to center the label in the LWButton.\n\t\tthis.label = \" \" + rawLabel + \" \";\n\t\tthis.invalidate();\n\t\tthis.repaint();\n\t}", "public void setMenuLabel(java.lang.String value);", "public void setLabel(String v) {\n if (ICEvent_Type.featOkTst && ((ICEvent_Type)jcasType).casFeat_label == null)\n jcasType.jcas.throwFeatMissing(\"label\", \"org.oaqa.model.ICEvent\");\n jcasType.ll_cas.ll_setStringValue(addr, ((ICEvent_Type)jcasType).casFeatCode_label, v);}", "public void setNameLabel(String nameLabel) {\r\n this.nameLabelText = nameLabel;\r\n this.nameLabel.setText(this.nameLabelText);\r\n }", "public\t\tvoid\t\tsetLabel(String text)\n\t\t{\n\t\tif (label != null)\n\t\t\t{\n\t\t\tif (label instanceof MiWidget)\n\t\t\t\t((MiWidget )label).setValue(text);\n\t\t\telse if (label instanceof MiText)\n\t\t\t\t((MiText )label).setText(text);\n\t\t\telse\n\t\t\t\tlabel.replaceSelf(new MiText(text));\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tlabel = new MiText(text);\n\t\t\tappendPart(label);\n\t\t\t}\n\t\t}", "public void setSampleLabelText(String text) {\n\t\tvarTable.getHeader().setSampleName(text);\n\t}", "public void setSource (String source);", "public void setSource(String source);", "private void SetPictureLabel(String label) {\r\n fileInfoLabel.setText(label);\r\n }", "public void setSource(String value) {\n/* 304 */ setValue(\"source\", value);\n/* */ }", "@Override\n\tpublic void setComponentLabel(String label) {\n\t\t\n\t}", "public void switchToLabel() {\n if (deckPanel.getVisibleWidget() == LABEL_INDEX) {\n return;\n }\n // Fires the ValueChanged event.\n setValue(textArea.getText(), true);\n deckPanel.showWidget(LABEL_INDEX);\n }", "public void setLabel(int index, String label) {\n\t\tpoints.get(index).setLabel(label);\n\t}", "public void setSource(Source s)\n\t{\n\t\tsource = s;\n\t}", "public void setGraphLabel(String label) {\n label = DotGraphUtility.replaceQuotes(label);\n label = DotGraphUtility.replaceReturns(label);\n this.setGraphAttribute(\"label\", \"\\\"\" + label + \"\\\"\");\n }", "public ProductTypeChangeLabelActionBuilder label(final com.commercetools.api.models.common.LocalizedString label) {\n this.label = label;\n return this;\n }", "public void setLabel(JLabel label) {\n\t\tswitch (label.getName()) {\t\t\t// the three labels are named via label.setName(labelName)\n\t\tcase \"title\": \t\ttitleLabel = label; break;\n\t\tcase \"artist(s)\": \tartistLabel = label; break;\n\t\tcase \"album\": \t\talbumLabel = label; break;\n\t\t}\n\t}", "protected void setFilterLabel( String strFilterLabel )\n {\n _strFilterLabel = strFilterLabel;\n }", "private void updateLabel() {\n\t\tString translation = lp.getString(key);\n\t\tsetText(translation);\n\n\t}", "public void setText(UCharacterIterator source)\n {\n m_srcUtilIter_.setText(source.getText());\n m_source_ = m_srcUtilIter_;\n updateInternalState(); \n }", "public void resetLabel(){\r\n if(sc!= null && sc.getProperties().getAttribute(\"Label\") != null){\r\n sc.getProperties().getAttribute(\"Label\").changeValue(\"\");\r\n }\r\n }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);", "public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}", "@JsonSetter(\"label\")\r\n public void setLabel (String value) { \r\n this.label = value;\r\n }", "private void setViewsLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n viewsLabel_ = value;\n }", "public void updateSourceTarget(String source, String target) {\n\t\titem.setText(2, source);\n\t\titem.setText(3, target);\n\t}", "public Builder setSource(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n source_ = value;\n onChanged();\n return this;\n }", "public void setSource(String source) {\r\n this.source = source;\r\n }", "public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}", "@Override\n public String getLabel() {\n return label;\n }", "@FXML\n void onActionOutsourced(ActionEvent event){\n labelPartSource.setText(\"Company Name\");\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "public Builder setSource(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n source_ = value;\n onChanged();\n return this;\n }", "@Override\n\t\t\tpublic void dragSetData (DragSourceEvent event) {\n\t\t\t\tif (TextTransfer.getInstance().isSupportedType (event.dataType)) {\n\t\t\t\t\tevent.data = dragLabel.getText ();\n\t\t\t\t}\n\t\t\t}", "public void setQueryLabel(String labelIdentifier)\n {\n\tthis.label = labelIdentifier;\n }", "public void xlabel(String label){\n XY1DPlot plot = (XY1DPlot)this.chartPanel.getChart().getPlot();\n plot.getXAxis().setLabel(label);\n plot.getXAxis().setDrawLabel(true);\n this.chartPanel.paintGraphics();\n }", "private void setSourceName(String name) {\n srcFileName = name;\n }", "public void setSource(String source) {\n this.source = source;\n }", "public void setSource(String source) {\n this.source = source;\n }", "public void setSource(String source) {\n _source = source;\n }", "void\t\tsetCommandLabel(String command, String label);", "public void setSourceNode(String sourceNode) {\n this.sourceNode = sourceNode;\n }", "public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}", "public void setSource(String Source) {\r\n this.Source = Source;\r\n }", "public Builder setSrc(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n src_ = value;\n onChanged();\n return this;\n }", "public void setSourceName(java.lang.String param) {\r\n localSourceNameTracker = param != null;\r\n\r\n this.localSourceName = param;\r\n }", "public void setLabel()\r\n {\r\n int i = Converter(Input);\r\n \r\n if(j<i && label.getText().equals(\"Player 1\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n \r\n }else if(j<i && label.getText().equals(\"Player 2\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j<i && label.getText().equals(\"Player 3\"))\r\n {\r\n j++;\r\n label.setText(\"Player \"+j);\r\n }else if(j==i && label.getText().equals(\"Player \"+j))\r\n {\r\n j=1;\r\n label.setText(\"Player \"+j);\r\n }\r\n \r\n \r\n }", "public void setText(CharacterIterator source)\n {\n m_source_ = new CharacterIteratorWrapper(source);\n m_source_.setToStart();\n updateInternalState();\n }", "@Override\r\n public void visitLabel(final Label arg0) {\r\n lab = arg0;\r\n }", "public void setSource(Object o) {\n\t\tsource = o;\n\t}" ]
[ "0.7339407", "0.73227423", "0.7177641", "0.7133509", "0.71257085", "0.71248364", "0.7119403", "0.7110609", "0.71097696", "0.70709723", "0.7070878", "0.7068823", "0.70309895", "0.7030667", "0.6983925", "0.6983925", "0.6968705", "0.6939367", "0.691843", "0.69174784", "0.69065976", "0.69012904", "0.6854774", "0.6847018", "0.68035525", "0.6766444", "0.6757802", "0.6657788", "0.66432333", "0.661782", "0.6606562", "0.6565755", "0.6565755", "0.65529567", "0.6539353", "0.65192235", "0.65076625", "0.6490132", "0.6468396", "0.64605844", "0.64481235", "0.63907456", "0.6382726", "0.63741755", "0.63346434", "0.631998", "0.6305653", "0.628983", "0.62710595", "0.62462205", "0.6228253", "0.61791754", "0.6165883", "0.61440605", "0.6136744", "0.6106882", "0.6104772", "0.60994637", "0.609178", "0.60740006", "0.60729057", "0.60675454", "0.59962827", "0.5983785", "0.5932321", "0.59265256", "0.58934724", "0.5884831", "0.58381444", "0.58353025", "0.58079475", "0.5802272", "0.5799123", "0.5792812", "0.5791303", "0.57732785", "0.5773239", "0.5752055", "0.5722871", "0.57136035", "0.5706482", "0.5688978", "0.5688978", "0.56883764", "0.5686445", "0.5682287", "0.56730753", "0.56727785", "0.56727785", "0.56633484", "0.5652413", "0.5651732", "0.56437856", "0.5641823", "0.5641148", "0.56310546", "0.5627458", "0.5620747", "0.5612848", "0.5599783" ]
0.83335525
0
Gets the label of the source selection associated with the query.
public String getSourceSelectionLabel() { return this.sourceSelectionLabel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getQueryLabel()\n {\n\treturn label;\n }", "public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}", "public String getSource(){\r\n\t\treturn selectedSource;\r\n\t}", "public void setSourceSelectionLabel(String sourceSelectionLabel)\n {\n\tthis.sourceSelectionLabel = sourceSelectionLabel;\n }", "public String getLabel() {\n return _label == null ? name() : _label;\n }", "public java.lang.String getLabel();", "public String getLabel() {\n return label;\n }", "java.lang.String getLabel();", "public String getLabel()\n {\n return label;\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String label() {\n return this.label;\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel() {\n return name().toLowerCase().replace(\"_\", \"\");\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel()\n { \n return label;\n }", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel(){\n\t\treturn label;\n\t}", "public String getLabel() {\n\t\treturn label;\n\t}", "public String getLabel()\n {\n return label;\n }", "public String getLabel(){\n return label;\n }", "public String getLabel() { //gets the label\n\n\t\treturn rawLabel;\n\t}", "@VTID(27)\n java.lang.String getSourceName();", "public String getLabel()\n\t{\n\t\treturn label;\n\t}", "public String getLabel() {\n\t\treturn this._label;\n\t}", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public final String getLabel() {\n\t\treturn _label;\n\t}", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "DatasetLabel getLabel();", "public String getLabel()\n {\n return m_label;\n }", "public String getLabel() {\n return label == null ? StringUtils.EMPTY : label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }", "public L getLabel() {\n\t\tcheckRep();\n\t\treturn this.label;\n\t}", "String getLabel();", "String getLabel();", "public String getLabel() {\n\t\treturn myLabel;\n\t}", "public static String choicelabel() {\n\t\treturn null;\n\t}", "public Object getLabel() \n {\n return label;\n }", "String getLabel() {\n return label;\n }", "public String toString() {\n return label;\n }", "public String getLabel() {\n return TrackerRes.getString(\"ModelFunctionPanel.Label\"); //$NON-NLS-1$\n }", "public java.lang.String getLabel() {\n\t\treturn this.label;\n\t}", "public String getLabel() {\r\n return lbl;\r\n }", "public String toString()\n {\n return label;\n }", "public String getSource(){\n\t\treturn source.getEvaluatedValue();\n\t}", "String nameLabel();", "public String getLabel() {\r\n\t\tif (label != null)\r\n\t\t\treturn label;\r\n\t\tif (classSimpleName==null)\r\n\t\t\treturn null;\r\n\t\treturn classSimpleName.replace('.', '_');\r\n\t}", "@Override\n public String getLabel() {\n return label;\n }", "public String getLabelName() {\r\n if( this.jlblHolder != null )\r\n return this.jlblHolder.getText();\r\n else\r\n return label;\r\n }", "public Label\ngetStartLabel();", "public int getLabel() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn label;\n\t}", "Label getLabel();", "Label getLabel();", "Label getLabel();", "@Nullable\n public CharSequence getLabel() {\n return mPrimaryLabel;\n }", "private String getLabel() {\n return this.label;\n }", "public String getSQLName(){\n\t\tif(source==null){\n\t\t\t//no source predicate is associated with this pred\n\t\t\treturn name;\n\t\t}\n\t\treturn source.getSQLName();\n\t}", "@DISPID(74)\r\n\t// = 0x4a. The runtime will prefer the VTID if present\r\n\t@VTID(72)\r\n\tjava.lang.String label();", "@Override\r\n\tpublic String getLabel() {\n\t\treturn SummaryGraphUtil.getLocalName(uri);\r\n\t}", "public Label getLabel() {\n return this.label;\n }", "public String selection() {\n return inputter.selection();\n }", "@Override\n\tpublic String toString() {\n\t\treturn label;\n\t}", "@Override\n\tpublic String getShortLabel()\n\t{\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn this.label;\n\t}", "@Override\n public String getName() {\n return source.getName();\n }", "public String getLabelText();", "public String sourceField() {\n return this.sourceField;\n }", "public final Label getLabel() {\n return label;\n }", "public String getLabel() {\n\t String name = getLiteralValue(Foaf.NAME);\n\t \n\t if (name == null) {\n\t name = getLiteralValue(Foaf.GIVENNAME);\n\t }\n\t \n\t if (name == null) {\n\t name = getLiteralValue(RDFS.label);\n\t }\n\t \n\t if (name == null) {\n\t return getURI();\n\t }\n\t return name;\n }", "public Object getLabel() {\n if (this.label != null) {\n return this.label;\n }\n\n return this.getDefaultLabel();\n }", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Label getLabel() {\r\n return label;\r\n }", "public String getLabelName() {\n return m_labelName;\n }", "java.lang.String getViewsLabel();", "java.lang.String getAssociatedSource();", "public String getLabel() {\r\n return layout.label;\r\n }", "public String getSelected ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n return (node == null)\n ? null\n : node.getName();\n }", "public java.lang.String getSourceName() {\r\n return localSourceName;\r\n }", "@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }", "@DISPID(32)\r\n\t// = 0x20. The runtime will prefer the VTID if present\r\n\t@VTID(37)\r\n\tjava.lang.String label();", "public String getSource() {\n return this.source;\n }", "com.google.ads.googleads.v6.resources.CampaignLabel getCampaignLabel();" ]
[ "0.7106301", "0.6832337", "0.6423371", "0.63774246", "0.6247478", "0.62239844", "0.6192121", "0.61852545", "0.61752677", "0.6155654", "0.6155654", "0.6155654", "0.6144849", "0.6144849", "0.6144849", "0.6139718", "0.6131465", "0.6131465", "0.6121411", "0.61160636", "0.61122584", "0.6092386", "0.6092386", "0.6092386", "0.6092386", "0.6090112", "0.60864216", "0.6086159", "0.6074136", "0.60688645", "0.60048044", "0.6002727", "0.59991163", "0.59965336", "0.59938365", "0.5988413", "0.5988413", "0.5988413", "0.5988413", "0.59807837", "0.59772015", "0.59772015", "0.59772015", "0.59772015", "0.59739566", "0.5969694", "0.59617037", "0.59473854", "0.59353226", "0.59350365", "0.5915113", "0.5915113", "0.5903672", "0.5903376", "0.5890031", "0.5882902", "0.5870904", "0.5865361", "0.58609176", "0.58416355", "0.58386505", "0.5809752", "0.5793515", "0.578949", "0.5771052", "0.5740819", "0.5739902", "0.5738832", "0.5725212", "0.5725212", "0.57159764", "0.57159764", "0.57159764", "0.56920654", "0.5670845", "0.5669086", "0.5667525", "0.5662055", "0.5659136", "0.56480914", "0.5648032", "0.56378", "0.5621472", "0.5615275", "0.5613071", "0.5608442", "0.5597401", "0.5588656", "0.5585078", "0.5570343", "0.5567327", "0.55567724", "0.55406433", "0.5531887", "0.55223393", "0.5520032", "0.5510174", "0.5498079", "0.54938245", "0.5480161" ]
0.7932186
0
Registers the label of a selection that is being referenced by a stats function used by the query. Any referenced selection will be resolved using a SelectionResolver at building time (of the query).
public void addLabelOfSelectionReferencedByStats(String referencedSelectionLabel) { this.selectionLabelsReferencedByStats.add(referencedSelectionLabel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setQueryLabel(String labelIdentifier)\n {\n\tthis.label = labelIdentifier;\n }", "public void setSourceSelectionLabel(String sourceSelectionLabel)\n {\n\tthis.sourceSelectionLabel = sourceSelectionLabel;\n }", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "String addLabel(String label);", "public void selectionChanged(PSSelection selection)\n {\n if (selection == null)\n throw new IllegalArgumentException(\"selection may not be null.\");\n\n if (selection instanceof PSNavigationalSelection)\n {\n PSNavigationalSelection navSel = (PSNavigationalSelection) selection;\n m_pathLabelField.setText(navSel.getSelectionPath());\n m_navSelection = selection;\n }\n\n PSNode node = null;\n \n if (selection.getNodeListSize() == 1)\n {\n node = (PSNode) selection.getNodeList().next();\n }\n\n if (node != null && node.getSearchResultCount() >= 0)\n {\n m_resultsLabel.setVisible(true);\n \n String resultlabel =\n m_applet.getResourceString(\n getClass().getName() + \"@ResultCount\");\n \n MessageFormat fmt = new MessageFormat(resultlabel);\n Object args[] =\n new Object[] { new Integer(node.getSearchResultCount()),\n node.isTruncated() ? new Integer(1) : new Integer(0)};\n String label = fmt.format(args).toString();\n m_resultsLabel.setText(label);\n \n }\n }", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "public ListFeatureGate labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();", "public void setSelector(Selector<GenomeType> selector)\n {\n this.selector = selector;\n }", "Selector getSelector(final String selector, final String query) throws FittingException;", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "public Query buildSelectionQuery(SelectionResolver resolver) throws SelectionResolutionException\n {\n\tif(log.isDebugEnabled())\n\t log.debug(\"Resolving SOURCE selection [\" + this.sourceSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t// Resolving the source selection (where we are selecting from).\n\tSelection sourceSelection = resolver.resolveSelection(this.sourceSelectionLabel);\n\n\tif(sourceSelection == null)\n\t throw new NoSuchElementException(\"Impossible to resolve source selection [\" + this.sourceSelectionLabel\n\t\t\t\t\t + \"] for query: \" + this.label);\n\telse if(log.isDebugEnabled())\n\t log.debug(\"Source selection RESOLVED [\" + this.sourceSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t// Update the scopes with the resolved selection (if necessary).\n\tresolver.updateScopesWithResolvedSelection(sourceSelection);\n\n\t// Resolve any selection referenced by stats functions.\n\tIterator<String> referencedLabels = this.selectionLabelsReferencedByStats.iterator();\n\twhile(referencedLabels.hasNext())\n\t{\n\t String refSelectionLabel = referencedLabels.next();\n\n\t if(log.isDebugEnabled())\n\t\tlog.debug(\"Resolving REFERENCED selection [\" + refSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t if(resolver.resolveSelection(refSelectionLabel) == null)\n\t\tthrow new NoSuchElementException(\"Impossible to resolve referenced selection [\" + refSelectionLabel\n\t\t\t\t\t\t + \"] for query: \" + this.label);\n\t else if(log.isDebugEnabled())\n\t\tlog.debug(\"Referenced selection RESOLVED [\" + refSelectionLabel + \"] for [\" + this.label + \"]\");\n\n\t // Update the scopes with the resolved selection (if necessary).\n\t resolver.updateScopesWithResolvedSelection(sourceSelection);\n\t}\n\n\treturn new Query(label, queryCondition, sourceSelection, variablesMap, selectionSorter, selectionLimiter);\n }", "public abstract Code addLabel(String label);", "void setGraphLabel(String label);", "public void searchSelectionAction(QuantSearchSelection selection) {\n this.quantSearchSelection = selection;\n SelectionChanged(\"quant_searching\");\n\n }", "@Override\n public void setLabel(String arg0)\n {\n \n }", "public void addMySelectionListener(EventListener l);", "public ListInfrastructure labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "void setLabel(String label);", "void registerLabel(SNode inputNode, Iterable<SNode> outputNodes, String mappingLabel);", "public void addSelect(String selectSegment) {\r\n\t\taddSelect(true, selectSegment);\r\n\t}", "@Subscribe\r\n\tpublic void onSelectExperiement(ExpressionDataSelectedEvent event)\r\n\t{\r\n\t\tgetView().updateSelectionLabel(event.GetPayload().getName());\r\n\t}", "public void setLabel(Object v) \n {\n this.label = v;\n }", "void visit(final Select select);", "public void setSelectMethod(Selection s){\n selectType = s;\n }", "public void setScanSelection(@NotNull ScanSelection selection) {\n scanSelection.set(selection);\n }", "public void setLabel(String label) {\n this.label = label;\n }", "public void addSelectionHandler(SelectionHandler<Integer> statisticSelectionHandler) {\n tp.addSelectionHandler(statisticSelectionHandler);\n }", "public abstract void addLabel(String str);", "void defSelect(Variable var){\r\n \t//if (isSelectAll()){\r\n \t\taddSelect(var);\r\n \t//}\r\n }", "public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}", "public void assertSelectedLabel(final String selectLocator, final String labelPattern);", "public static synchronized <T> String getOrCreateAlias(Selection<T> selection) {\n\t// reset alias count\n\tif (aliasCount > 1000)\n\t aliasCount = 0;\n\n\tString alias = selection.getAlias();\n\tif (alias == null) {\n\t alias = \"JDAL_generatedAlias\" + aliasCount++;\n\t selection.alias(alias);\n\t}\n\treturn alias;\n\n }", "public void onSelectionChanged();", "public void updateSelection() {\n\t\t\n\t}", "public Field label(String label);", "void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);", "private static void addSelection(String type,\n JSONObject jsonSel,\n SenseiRequest req,\n final Map<String, String[]> facetInfoMap)\n throws Exception\n {\n\n BrowseSelection sel = null;\n if(RequestConverter2.SELECTIONS_TERM.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n String value = jsonParams.optString(RequestConverter2.SELECTIONS_TERM_VALUE, null);\n if(facet!= null && value != null)\n {\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = value;\n sel.setValues(formatValues(facet, vals, facetInfoMap));\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n req.addSelection(sel);\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_TERMS.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n JSONArray values = jsonParams.optJSONArray(RequestConverter2.SELECTIONS_TERMS_VALUES);\n JSONArray excludes = jsonParams.optJSONArray(RequestConverter2.SELECTIONS_TERMS_EXCLUDES);\n String operator = jsonParams.optString(RequestConverter2.SELECTIONS_TERMS_OPERATOR, RequestConverter2.SELECTIONS_TERMS_OPERATOR_OR);\n if(facet!= null && (values != null || excludes != null))\n {\n sel = new BrowseSelection(facet);\n ValueOperation op = ValueOperation.ValueOperationOr;\n if(RequestConverter2.SELECTIONS_TERMS_OPERATOR_AND.equals(operator))\n op = ValueOperation.ValueOperationAnd;\n\n if(values != null && values.length()>0){\n sel.setValues(formatValues(facet, getStrings(values), facetInfoMap));\n }\n\n if(excludes != null && excludes.length()>0){\n sel.setNotValues(formatValues(facet, getStrings(excludes), facetInfoMap));\n }\n\n sel.setSelectionOperation(op);\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_RANGE.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n\n String upper = jsonParams.optString(RequestConverter2.SELECTIONS_RANGE_TO, \"*\");\n String lower = jsonParams.optString(RequestConverter2.SELECTIONS_RANGE_FROM, \"*\");\n boolean includeUpper = jsonParams.optBoolean(RequestConverter2.SELECTIONS_RANGE_INCLUDE_UPPER, true);\n boolean includeLower = jsonParams.optBoolean(RequestConverter2.SELECTIONS_RANGE_INCLUDE_LOWER, true);\n String left = \"[\", right = \"]\";\n if(includeLower == false)\n left = \"(\";\n if(includeUpper == false)\n right = \")\";\n\n String range = left + lower + \" TO \" + upper + right;\n if(facet!= null )\n {\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = range;\n sel.setValues(vals);\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_PATH.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n\n String value = jsonParams.optString(RequestConverter2.SELECTIONS_PATH_VALUE, null);\n\n if(facet != null && value != null){\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = value;\n sel.setValues(vals);\n\n if(jsonParams.has(RequestConverter2.SELECTIONS_PATH_STRICT)){\n boolean strict = jsonParams.optBoolean(RequestConverter2.SELECTIONS_PATH_STRICT, false);\n sel.getSelectionProperties().setProperty(PathFacetHandler.SEL_PROP_NAME_STRICT, String.valueOf(strict));\n }\n\n if(jsonParams.has(RequestConverter2.SELECTIONS_PATH_DEPTH)){\n int depth = jsonParams.optInt(RequestConverter2.SELECTIONS_PATH_DEPTH, 1);\n sel.getSelectionProperties().setProperty(PathFacetHandler.SEL_PROP_NAME_DEPTH, String.valueOf(depth));\n }\n\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_CUSTOM.equals(type))\n {\n ;\n }\n else if(RequestConverter2.SELECTIONS_DEFAULT.equals(type))\n {\n ;\n }\n \n }", "public void selectionChanged(Selection selecton) {\r\n }", "void setLabel(Label label);", "public void onSelect(Hub<QueryInfo> hub) {\n }", "String usernameLabelSelected();", "public void addSelectionListener (SelectionListener listener) {\n\tcheckWidget ();\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\n\tTypedListener typedListener = new TypedListener (listener);\n\taddListener (SWT.Selection,typedListener);\n\taddListener (SWT.DefaultSelection,typedListener);\n}", "public ListOperatorHub labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void addSelectionListener( final SelectionListener listener ) {\n SelectionEvent.addListener( this, listener );\n }", "public void addSelectionListener( final SelectionListener listener ) {\n SelectionEvent.addListener( this, listener );\n }", "public ListNamespacedSubscription labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void addSelectionListener(SelectionListener listener) {\n\tcheckWidget();\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\n\tTypedListener typedListener = new TypedListener(listener);\n\taddListener(SWT.Selection,typedListener);\n\taddListener(SWT.DefaultSelection,typedListener);\n}", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener(listener);\r\n\taddListener(SWT.Selection,typedListener);\r\n\taddListener(SWT.DefaultSelection,typedListener);\r\n}", "void addSelection(String key, String message, T returnVal);", "void addSelection(String key, String message, T returnVal);", "@Subscribe\r\n\tpublic void onSelectBMDAnalysisResults(BMDAnalysisDataSelectedEvent event)\r\n\t{\r\n\t\tgetView().updateSelectionLabel(event.GetPayload().getName());\r\n\t}", "org.apache.xmlbeans.impl.xb.xsdschema.SelectorDocument.Selector addNewSelector();", "public void addSelectionListener(SelectionListener listener) {\r\n\tcheckWidget();\r\n\tif (listener == null) error (SWT.ERROR_NULL_ARGUMENT);\r\n\tTypedListener typedListener = new TypedListener (listener);\r\n\taddListener (SWT.Selection,typedListener);\r\n\taddListener (SWT.DefaultSelection,typedListener);\r\n}", "@JsonSetter(\"label\")\r\n public void setLabel (String value) { \r\n this.label = value;\r\n }", "public void setSelection(Pair selection);", "@Override\r\n public void visitLabel(final Label arg0) {\r\n lab = arg0;\r\n }", "Select(){\n }", "public void onSelect(Statement select, Connection cx, SimpleFeatureType featureType) throws SQLException {\r\n }", "public void addSelectionListener(SelectionListener listener) {\n \t\tfSelectionListeners.add(listener);\n \t}", "public void onSelect(QueryInfo queryInfo, Hub<QueryInfo> hub) {\n }", "public void addSelectionListener( SelectionListener listener ) {\n checkWidget();\n if ( listener == null )\n error( SWT.ERROR_NULL_ARGUMENT );\n // TypedListener typedListener = new TypedListener (listener);\n // addListener (SWT.Selection,typedListener);\n // addListener (SWT.DefaultSelection,typedListener);\n if ( selectionListeners == null ) {\n selectionListeners = new ArrayList();\n }\n selectionListeners.add( listener );\n \n }", "@Override\n\tpublic void visit(SubSelect arg0) {\n\t\t\n\t}", "@Override\r\n public void select(String name, String origin, String destination) {\n }", "public void setLabel(String label) {\r\n this.label = label;\r\n }", "public ListDNS labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void setSelection(FBitSet selection) {\r\n\t\tthis.selection = selection;\r\n\t}", "@Override\n\tpublic void visit(SubSelect arg0) {\n\n\t}", "void graphSelectionChanged(Mode mode);", "public DeleteCollectionFeatureGate labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public String selectDictLabel(@Param(\"dictType\") String dictType, @Param(\"dictValue\") String dictValue);", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "public DeleteCollectionInfrastructure labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void addSelectionListener(SelectionListener listener) {\n selectionListeners.add(listener);\n }", "private String getSubstitute(String label) {\n\n\t\tassert !compendium_.getIsInvivo();\n\t\tint index = grn_.getIndexOfNode(label);\n\t\t\n\t\t// If the gene is not part of the compendium or is not a TF, randomly choose a TF \n\t\tString substitute = label;\n\t\t\n\t\tif ((index == -1) || !grn_.getGene(index).getIsTf()) {\n\t\t\tLinkedHashMap<String, String> substitutionLookup = ((CompendiumInsilico) compendium_).getSubstitutions();\n\t\t\tsubstitute = substitutionLookup.get(label);\n\t\t\t\n\t\t\tif (substitute == null) {\n\t\t\t\tindex = grn_.getRandomTf();\n\t\t\t\tsubstitute = grn_.getGene(index).getLabel();\n\t\t\t\tsubstitutionLookup.put(label, substitute);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn substitute;\n\t}", "protected void sequence_GroupByQuerySelection_SELECT(ISerializationContext context, GroupByQuerySelection semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public void selectionChanged(String[][] selection);", "public void setLabel( String label ) {\r\n lbl = label;\r\n }", "public ListProxy labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void addSelect(Boolean enabled, String selectSegment) {\r\n\t\tif (enabled) {\r\n\t\t\tif (StringUtils.trimToNull(select)==null) {\r\n\t\t\t\tselect = selectSegment;\r\n\t\t\t} else {\r\n\t\t\t\tselect = select + \", \" + selectSegment;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void setSelector(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n selector_ = value;\n }", "public interface SelectionFunction\n{\n // this function chooses an individual given the group of individuals, \"pop\"\n /**\n * Chooses an individual given the group a population.\n * @parameter pop Population of <code>GAIndividual</code> objects to be used for selection.\n * @return <code>GAIndividual</code> object selected from the supplied population.\n * @see GAIndividual\n */\n public GAIndividual selectParent(Vector pop);\n}", "@DISPID(-2147412075)\n @PropPut\n void onselectstart(\n java.lang.Object rhs);", "public String getQueryLabel()\n {\n\treturn label;\n }", "public void setLabel(final String label) {\n this.label = label;\n }", "@Override\n\tpublic void selectionChanged(SelectionChangedEvent arg0) {\n\t\t\n\t}", "public void setXLabel(String _label);", "public ListBuild labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void setFieldSelection(String fieldSelection) {\n this.fieldSelection = fieldSelection;\n }", "void update(String selectedGene);", "public String getSourceSelectionLabel()\n {\n\treturn this.sourceSelectionLabel;\n }", "@Override\n public void onSelection(SelectionEvent<SuggestOracle.Suggestion> event) {\n String group = ((GroupSuggestOracle.GroupSuggestion) event.getSelectedItem()).getGroup();\n userDto.addGroups(group);\n getView().setUser(getView().getUserName().isEmpty() ? userDto.getName() : getView().getUserName(),\n JsArrays.toList(userDto.getGroupsArray()));\n }", "public void setSelection(GraphSelection newSel) {\r\n\t\tsel.setSelection(newSel);\r\n\t}", "public void addSelectionListener(SelectionListener listener) {\n checkWidget();\n if (listener == null)\n error(SWT.ERROR_NULL_ARGUMENT);\n TypedListener typedListener = new TypedListener(listener);\n addListener(SWT.Selection, typedListener);\n addListener(SWT.DefaultSelection, typedListener);\n }", "public void dynamicQuantityLabelSetUp(ListView<Ingredient> lv, Label label){\n lv.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Ingredient>() {\n //use the changeListener to determine when a new ingredient has been selected\n @Override\n public void changed(ObservableValue<? extends Ingredient> observableValue, Ingredient ingredient, Ingredient t1) {\n if (t1 != null){\n //if the new ingredient selected is not null then\n //get the Quantity name from the selected ingredient in the listView\n Ingredient selectedIngredient = lv.getSelectionModel().getSelectedItem();\n String quantityName = selectedIngredient.getQuantityName();\n label.setText(quantityName);\n }\n }\n });\n }", "public DrillBuilder setLabel(String label) {\n this.label = label;\n return this;\n }", "public ListOAuth labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void addSelectionListener(ISelectionChangedListener listener){\n\t\twrapedViewer.addSelectionChangedListener(listener);\n\t}" ]
[ "0.5502327", "0.5412616", "0.52651745", "0.52651745", "0.5258985", "0.5223724", "0.5194841", "0.5168394", "0.5161113", "0.5121793", "0.5097483", "0.50416124", "0.5010587", "0.49797425", "0.49541497", "0.49415538", "0.49018714", "0.48985165", "0.48895684", "0.4888726", "0.4873613", "0.48615333", "0.48463526", "0.48318496", "0.48079374", "0.48047748", "0.47959176", "0.47911882", "0.47894108", "0.47839075", "0.47719556", "0.4771738", "0.47600016", "0.47574764", "0.4756005", "0.4750328", "0.47489315", "0.47445422", "0.47430107", "0.4721202", "0.47179928", "0.4715111", "0.47041643", "0.46907213", "0.46903384", "0.4685074", "0.4672887", "0.4672887", "0.46617532", "0.4654564", "0.4632482", "0.46245137", "0.46245137", "0.46169493", "0.46122175", "0.46046862", "0.4599203", "0.45877898", "0.45842817", "0.45818105", "0.45771945", "0.4573366", "0.45679256", "0.45658848", "0.45613626", "0.45543432", "0.4552293", "0.45484936", "0.45476103", "0.45364752", "0.45324814", "0.4531401", "0.45307687", "0.45294735", "0.4528213", "0.45271102", "0.45168778", "0.45121488", "0.45113307", "0.45037794", "0.45007104", "0.45006782", "0.44935906", "0.44850677", "0.44740975", "0.44712362", "0.44668207", "0.44578683", "0.44558847", "0.4455882", "0.44491735", "0.44477302", "0.44445527", "0.44420448", "0.4441342", "0.4439981", "0.4438898", "0.44362515", "0.44337282", "0.44301248" ]
0.6904336
0
Sets the label that identifies the query.
public void setQueryLabel(String labelIdentifier) { this.label = labelIdentifier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setLabel(String label);", "public void setLabel(final String label) {\n this.label = label;\n }", "public void setLabel( String label ) {\r\n lbl = label;\r\n }", "public void setLabel(String label) {\n this.label = label;\n }", "public final void setLabel(final String label) {\r\n this.label = label;\r\n }", "public void setLabel(final String label) {\n this.label = label;\n }", "public void setLabel(String label) {\r\n this.label = label;\r\n }", "protected void setLabel(final String label) {\n\t\tmyLabel = label;\n\t}", "void setLabel(com.microsoft.schemas.xrm._2011.contracts.Label label);", "void setLabel(Label label);", "public void setLabel(final String _label)\n {\n this.label = _label;\n }", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Label label) {\r\n this.label = label;\r\n }", "public void setLabel(String label)\n\t{\n\t\tthis.label = label;\n\t}", "public void setLabel(String label) {\n\t\t_label = label;\n\t}", "public String getQueryLabel()\n {\n\treturn label;\n }", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}", "public void setLabel(String label) {\n\t\tthis.label = label;\n\t}", "public void setLabel(int label) {\n\t\tthis.label = label;\n\t}", "public void setSearchResultLabel(String resultLabel){ searchResultLabel.setText(resultLabel);}", "@Override\n public void setLabel(String arg0)\n {\n \n }", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public DrillBuilder setLabel(String label) {\n this.label = label;\n return this;\n }", "public void setLabel(String label) {\n addNewLabel().setText(label);\n }", "void setGraphLabel(String label);", "public void setLabel(String label)\n {\n if (StringUtils.isBlank(label))\n throw new IllegalArgumentException(\"label cannot be null or empty\");\n \n this.label = label;\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "public static void setLabel(Label labelName) {\n emitf(\"%s:\\n\", labelName.toString());\n }", "public void setLabel(String label) {\n this.label = label == null ? null : label.trim();\n }", "public void setLabel(final String labelValue) {\n this.label = labelValue;\n }", "public void setGraphLabel(String label) {\n label = DotGraphUtility.replaceQuotes(label);\n label = DotGraphUtility.replaceReturns(label);\n this.setGraphAttribute(\"label\", \"\\\"\" + label + \"\\\"\");\n }", "public Builder setLabel(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n label_ = value;\n onChanged();\n return this;\n }", "public void setLabel(Object value) {\n this.setValue(LABEL_PROPERTY_KEY, value);\n }", "void\t\tsetCommandLabel(String command, String label);", "@Override\n\tpublic void setLabelText(String label) {\n\t}", "public void setLabelName(String labelName){\n m_labelName = labelName;\n }", "public void setLabel(Object v) \n {\n this.label = v;\n }", "public void setLabel(JLabel label) {\n\t\tswitch (label.getName()) {\t\t\t// the three labels are named via label.setName(labelName)\n\t\tcase \"title\": \t\ttitleLabel = label; break;\n\t\tcase \"artist(s)\": \tartistLabel = label; break;\n\t\tcase \"album\": \t\talbumLabel = label; break;\n\t\t}\n\t}", "public void setRestrictionLabel( String label ) {\n if ( label != null ) {\n Flow.Restriction restriction = label.equals( NO_RESTRICTION )\n ? null\n : Flow.Restriction.valueOfLabel( label, isSend() );\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"restriction\", restriction ) );\n }\n }", "public Value label(String label) {\n this.label = label;\n return this;\n }", "public void setNameLabel(String nameLabel) {\r\n this.nameLabelText = nameLabel;\r\n this.nameLabel.setText(this.nameLabelText);\r\n }", "@JsonSetter(\"label\")\r\n public void setLabel (String value) { \r\n this.label = value;\r\n }", "public MyProgress setLabel(String label) {\n mLabel = label;\n return this;\n }", "protected void setFilterLabel( String strFilterLabel )\n {\n _strFilterLabel = strFilterLabel;\n }", "@JsonProperty(\"label\")\n public void setLabel(String label) {\n this.label = label;\n }", "public void setLabelToBeShown(String label);", "public void setIntentLabel( String label ) {\n if ( label != null ) {\n Flow.Intent intent = label.equals( NO_INTENT ) ? null : Flow.Intent.valueOfLabel( label );\n doCommand( new UpdateSegmentObject( getUser().getUsername(), getFlow(), \"intent\", intent ) );\n }\n }", "public void setLabel(double label) {\n\t\tthis.label = label;\n\t}", "public boolean setLabel(String labelIn)\r\n {\r\n if (labelIn == null)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n label = labelIn.trim();\r\n return true;\r\n }\r\n }", "public ProductTypeChangeLabelActionBuilder label(final com.commercetools.api.models.common.LocalizedString label) {\n this.label = label;\n return this;\n }", "public void updateAlarmLabel(String label) {\n DeviceAlarm deviceAlarm = getNextPendingAlarm();\n String setId = \"\";\n if(deviceAlarm != null) {\n setId = deviceAlarm.getSetId();\n if(setId == null) return;\n }\n\n SQLiteDatabase db = initDB();\n String updateQuery = \"UPDATE \" + AlarmTableEntry.TABLE_NAME + \" SET \" + AlarmTableEntry.COLUMN_LABEL + \" = '\" + label + \"' WHERE \" + AlarmTableEntry.COLUMN_SET_ID + \" LIKE \\\"%\" + setId + \"%\\\";\";\n\n db.execSQL(updateQuery);\n }", "public void setClassLabel(String key, String label);", "public void setLabelColumn(String labelColumn)\n {\n myLabelColumn = labelColumn;\n }", "public Field label(String label);", "public final native void setLabel(String label) /*-{\r\n\t\tthis.label = label;\r\n\t}-*/;", "public void setLabel(final String label) {\n _section.setText(label);\n }", "public void setLabel(String s) {\n if (s == null && label == null) {\n return;\n }\n\n if (s == null || !s.equals(label)) {\n String oldLabel = label;\n label = s;\n listeners.firePropertyChange(PROPERTY_LABEL, oldLabel, label);\n }\n }", "public void setLabel(T2 eLabel) {\r\n\t\tthis.label = eLabel;\r\n\t\tcheckRep();\r\n\t}", "private void setLabelForActivity(){\n String label;\n if(sortOrderOfResults.equals(AppUtilities.QUERY_PATH_POPULAR)){\n label = getString(R.string.label_all_movies_activity_most_popular_movies);\n } else {\n label = getString(R.string.label_all_movies_activity_top_rated_movies);\n }\n actionBar.setTitle(label);\n }", "@objid (\"5c3d048f-2049-4d54-b5e2-eb8c3afe4b1d\")\r\n public void setText(final String label) {\r\n if (label != null)\r\n this.text.setText(label);\r\n }", "public void setLabel(String rawLabel) { //sets the label\n\t\tthis.rawLabel = rawLabel; //save the raw label\n\n\t\t//Add spaces to each end of the rawLabel to make it\n\t\t// easier to center the label in the LWButton.\n\t\tthis.label = \" \" + rawLabel + \" \";\n\t\tthis.invalidate();\n\t\tthis.repaint();\n\t}", "public final void setLabel1(@Nullable CharSequence label) {\n mLabel1 = label;\n }", "public LocationMessageRequest label(final String label) {\n getMessage().setLabel(label);\n return this;\n }", "public void setLabelText(String text);", "public Builder setLabel(@Nullable String label) {\n mPrimaryLabel = label;\n return this;\n }", "public void setLogLabel(String newLabel)\n\t{\n\t\t_logLabel = newLabel;\n\t}", "public void setLabel(String v) {\n if (ICEvent_Type.featOkTst && ((ICEvent_Type)jcasType).casFeat_label == null)\n jcasType.jcas.throwFeatMissing(\"label\", \"org.oaqa.model.ICEvent\");\n jcasType.ll_cas.ll_setStringValue(addr, ((ICEvent_Type)jcasType).casFeatCode_label, v);}", "public void setQ1Label(java.lang.String q1Label) {\n this.q1Label = q1Label;\n }", "public Volume label(String label) {\n this.label = label;\n return this;\n }", "public void setXLabel(String _label);", "@Override\n public String getLabel() {\n return label;\n }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);", "public Builder setLabel(String key, String value) {\n data.add(key);\n data.add(value);\n return this;\n }", "public abstract Code addLabel(String label);", "void setNilLabel();", "public void setQ5Label(java.lang.String q5Label) {\n this.q5Label = q5Label;\n }", "public void setQuestionLbl(JLabel questionLbl) {\r\n\t\tthis.questionLbl = questionLbl;\r\n\t}", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "@Override\n public void setLabelToDisplay(java.lang.String labelToDisplay) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.LABEL_TO_DISPLAY_, labelToDisplay);\n }", "private void setResultLabelText(JLabel resultLabel) {\r\n if (result == Occupant.NONE) { // If the result was a tie\r\n resultLabel.setText(\"Tie! No winners!\");\r\n } else { \r\n resultLabel.setText(result.toString() + \" has won this round!\");\r\n }\r\n }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelPlural(String label);", "public void setTypeLabel(String typeLabel) {\r\n this.typeLabelText = typeLabel;\r\n this.typeLabel.setText(this.typeLabelText);\r\n }", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "public void setMenuLabel(java.lang.String value);", "@Override\r\n public void visitLabel(final Label arg0) {\r\n lab = arg0;\r\n }", "String updateLabel(String oldLabel, String newLabel);", "public void setQ2Label(java.lang.String q2Label) {\n this.q2Label = q2Label;\n }", "String addLabel(String label);", "public\t\tvoid\t\tsetLabel(String text)\n\t\t{\n\t\tif (label != null)\n\t\t\t{\n\t\t\tif (label instanceof MiWidget)\n\t\t\t\t((MiWidget )label).setValue(text);\n\t\t\telse if (label instanceof MiText)\n\t\t\t\t((MiText )label).setText(text);\n\t\t\telse\n\t\t\t\tlabel.replaceSelf(new MiText(text));\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tlabel = new MiText(text);\n\t\t\tappendPart(label);\n\t\t\t}\n\t\t}", "void setEdgeLabel(int edge, String label);", "public ListOAuth labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public void setParamValue(String label, Object value);", "void setDescribingLabel(ILabel describingLabel);", "public void setLabel(boolean isLabel) {\n\t\tthis.roomLabel = isLabel; \n\t}", "public ListOperatorHub labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }", "public ListProject labelSelector(String labelSelector) {\n put(\"labelSelector\", labelSelector);\n return this;\n }" ]
[ "0.74580723", "0.7359685", "0.7352431", "0.7315579", "0.7310854", "0.72784305", "0.72408134", "0.72078145", "0.7157059", "0.71554464", "0.7139146", "0.71086097", "0.7104131", "0.7104131", "0.70672053", "0.70573205", "0.7033314", "0.7016148", "0.70141375", "0.70121247", "0.693744", "0.68992513", "0.6891505", "0.688676", "0.68662363", "0.6853183", "0.68487567", "0.68341744", "0.6749489", "0.6749489", "0.6736635", "0.67351806", "0.66977715", "0.6571766", "0.6563593", "0.64953154", "0.6446194", "0.64218134", "0.63886607", "0.6387527", "0.63218904", "0.62431467", "0.6214022", "0.6198572", "0.6196723", "0.6193958", "0.617685", "0.6175846", "0.6175691", "0.6173864", "0.61550653", "0.61521196", "0.6139237", "0.61265904", "0.6113612", "0.6098463", "0.60967416", "0.60861784", "0.6057655", "0.6033517", "0.6032522", "0.60309327", "0.59432685", "0.5943015", "0.59155744", "0.591108", "0.5890874", "0.58593875", "0.5857548", "0.5854179", "0.5815474", "0.57820886", "0.57646173", "0.5692123", "0.56633306", "0.56092495", "0.5594023", "0.5579158", "0.5570352", "0.5559984", "0.5557142", "0.5557142", "0.55444026", "0.55392456", "0.55305403", "0.5507728", "0.55063546", "0.55062497", "0.5504796", "0.54909456", "0.54876894", "0.5485114", "0.5480719", "0.54758686", "0.54658705", "0.54632217", "0.54602623", "0.5456475", "0.5447704", "0.54390085" ]
0.8401783
0
Gets the query label.
public String getQueryLabel() { return label; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLabel() {\n return _label == null ? name() : _label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel()\n {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return label;\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel()\r\n {\r\n return label;\r\n }", "public String getLabel() {\r\n return label;\r\n }", "public String getLabel()\n { \n return label;\n }", "public String getLabel()\n {\n return label;\n }", "public String label() {\n return this.label;\n }", "public String getLabel() {\n return name().toLowerCase().replace(\"_\", \"\");\n }", "public final String getLabel() {\n\t\treturn _label;\n\t}", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel() {\n return this.label;\n }", "public java.lang.String getLabel();", "public L getLabel() {\n\t\tcheckRep();\n\t\treturn this.label;\n\t}", "public String getLabel() {\n return label;\n }", "public String getLabel() {\n\t\treturn label;\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\r\n\t\treturn label;\r\n\t}", "public String getLabel() {\n\t\treturn this._label;\n\t}", "public String getLabel() {\n return label == null ? StringUtils.EMPTY : label;\n }", "public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n queryName_ = s;\n }\n return s;\n }\n }", "public String getLabel() {\n return this.label;\n }", "public String getLabel(){\n\t\treturn label;\n\t}", "public String getLabel() {\n\t String name = getLiteralValue(Foaf.NAME);\n\t \n\t if (name == null) {\n\t name = getLiteralValue(Foaf.GIVENNAME);\n\t }\n\t \n\t if (name == null) {\n\t name = getLiteralValue(RDFS.label);\n\t }\n\t \n\t if (name == null) {\n\t return getURI();\n\t }\n\t return name;\n }", "public String getLabel() { //gets the label\n\n\t\treturn rawLabel;\n\t}", "public String getLabel()\n {\n return m_label;\n }", "public java.lang.String getLabel() {\n\t\treturn this.label;\n\t}", "public String getLabel() {\n\t\treturn myLabel;\n\t}", "public String getLabel()\n\t{\n\t\treturn label;\n\t}", "public String getLabel(){\n return label;\n }", "public int getLabel() {\n\t\treturn label;\n\t}", "public String getLabel() {\r\n return lbl;\r\n }", "java.lang.String getLabel();", "public java.lang.String getQueryName() {\n java.lang.Object ref = queryName_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n queryName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getLabels() {\n return queryMap.get(Types.FILTER_CRITERIA_LABELS);\n }", "String getLabel() {\n return label;\n }", "public Label getLabel() {\n return this.label;\n }", "public Object getLabel() \n {\n return label;\n }", "public Label getLabel() {\n\t\treturn label;\n\t}", "public Label getLabel() {\n\t\treturn label;\n\t}", "public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Label getLabel() {\r\n return label;\r\n }", "com.google.ads.googleads.v6.resources.Label getLabel();", "public String getLabel() {\n return getElement().getChildren()\n .filter(child -> child.getTag().equals(\"label\")).findFirst()\n .get().getText();\n }", "public Label getLabel() {\n\t\treturn this.label;\n\t}", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "java.lang.String getQueryName();", "public java.lang.String getLabel() {\n java.lang.Object ref = label_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n label_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final Label getLabel() {\n return label;\n }", "public Object getLabel() {\n if (this.label != null) {\n return this.label;\n }\n\n return this.getDefaultLabel();\n }", "String getLabel();", "String getLabel();", "Label getLabel();", "Label getLabel();", "Label getLabel();", "public String getLabel() {\r\n\t\tif (label != null)\r\n\t\t\treturn label;\r\n\t\tif (classSimpleName==null)\r\n\t\t\treturn null;\r\n\t\treturn classSimpleName.replace('.', '_');\r\n\t}", "private String getLabel() {\n return this.label;\n }", "public String getLabelName() {\n return m_labelName;\n }", "java.lang.String getQueryLogicName();", "DatasetLabel getLabel();", "public com.commercetools.api.models.common.LocalizedString getLabel() {\n return this.label;\n }", "public String getLabelName() {\r\n if( this.jlblHolder != null )\r\n return this.jlblHolder.getText();\r\n else\r\n return label;\r\n }", "private String getQueryHint() {\n return ApiProperties.getProperty(\n \"api.bigr.library.\" + ApiFunctions.shortClassName(getClass().getName()) + \".hint\");\n }", "@java.lang.Override\n public java.lang.String getLabel() {\n java.lang.Object ref = label_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n label_ = s;\n return s;\n }\n }", "String getQueryConstant()\n\t{\n\t\treturn QUERY_CONST[value];\n\t}", "String nameLabel();", "public java.lang.String getQ1Label() {\n return q1Label;\n }", "public JLabel getQuestionLbl() {\r\n\t\treturn questionLbl;\r\n\t}", "public String getLabel() {\n return TrackerRes.getString(\"ModelFunctionPanel.Label\"); //$NON-NLS-1$\n }", "@Override\n public String getLabel() {\n return label;\n }", "public String getLabel() {\r\n return layout.label;\r\n }", "public String label() {\n\t\treturn \"LABEL_\" + (labelCount++);\n\t}", "public void setQueryLabel(String labelIdentifier)\n {\n\tthis.label = labelIdentifier;\n }", "public String toString() {\n return label;\n }", "com.google.ads.googleads.v6.resources.AdGroupCriterionLabel getAdGroupCriterionLabel();", "@DISPID(74)\r\n\t// = 0x4a. The runtime will prefer the VTID if present\r\n\t@VTID(72)\r\n\tjava.lang.String label();", "@Override\r\n\tpublic String getLabel() {\n\t\treturn SummaryGraphUtil.getLocalName(uri);\r\n\t}", "public java.lang.String getQ5Label() {\n return q5Label;\n }", "public java.lang.String getQ2Label() {\n return q2Label;\n }", "com.google.ads.googleads.v6.resources.CampaignLabel getCampaignLabel();", "public String toString()\n {\n return label;\n }", "public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n query_ = s;\n }\n return s;\n }\n }", "public String getLabel() {\n return AsteriskUtlities.toContextIdentifier(username + \"-\" + company);\n }", "public double getLabel() {\n\t\treturn label;\n\t}", "public java.lang.String getQuery() {\n java.lang.Object ref = query_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();\n query_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getFormFieldLabel();" ]
[ "0.67972857", "0.65635204", "0.65325856", "0.6508362", "0.6508362", "0.6508362", "0.64981806", "0.64981806", "0.64981806", "0.6483083", "0.6483083", "0.64489836", "0.64372563", "0.64252", "0.6423413", "0.6422994", "0.6422972", "0.64175695", "0.64114493", "0.64114493", "0.64114493", "0.64114493", "0.6411215", "0.6409196", "0.640889", "0.6408177", "0.6407322", "0.6407322", "0.6407322", "0.6407322", "0.6390632", "0.63839304", "0.63829", "0.63755673", "0.6375283", "0.6372203", "0.6362609", "0.63428545", "0.6335401", "0.63299865", "0.63278526", "0.6296185", "0.62930596", "0.6284076", "0.62759167", "0.626981", "0.6269065", "0.62541354", "0.62430656", "0.62380743", "0.6229082", "0.6229082", "0.6227089", "0.62031823", "0.6202733", "0.617755", "0.61597043", "0.61597043", "0.61597043", "0.61597043", "0.6159041", "0.61476886", "0.61429036", "0.6137613", "0.61241657", "0.61241657", "0.61042184", "0.61042184", "0.61042184", "0.60865754", "0.6080834", "0.6077993", "0.60633117", "0.6028589", "0.60284185", "0.5988382", "0.5966169", "0.595387", "0.5927773", "0.5921182", "0.5903257", "0.5895627", "0.58909523", "0.58803064", "0.5878628", "0.5872649", "0.58716583", "0.58558685", "0.5844464", "0.58321786", "0.58252645", "0.58116204", "0.5807205", "0.57853407", "0.57841384", "0.5777194", "0.5772384", "0.5769971", "0.576621", "0.5761607" ]
0.8483033
0
Sets the condition of the query.
public void setQueryCondition(QueryCondition queryCondition) { this.queryCondition = queryCondition; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCondition(Expression condition)\n {\n this.condition = condition;\n }", "public void setCondition(ExpressionNode condition);", "public void set( final Condition condition )\n {\n m_condition = condition;\n }", "public void setWhereCondition(com.sforce.soap.partner.SoqlWhereCondition whereCondition) {\r\n this.whereCondition = whereCondition;\r\n }", "public void setCondition(String condition) {\n\tthis.condition = condition;\n}", "public void setCondition( String condition ) {\n Element conditionElement = controlElement.element( ActionSequenceDocument.CONDITION_NAME );\n if ( conditionElement == null ) {\n conditionElement = controlElement.addElement( ActionSequenceDocument.CONDITION_NAME );\n }\n conditionElement.clearContent();\n conditionElement.addCDATA( condition );\n ActionSequenceDocument.fireControlStatementChanged( this );\n }", "@Override\n\tpublic void setcond(String cond) {\n\t\n\t}", "public static void setCondition (String condition) {\n BValue cond = getCond (condition);\n synchronized (cond) {\n if (cond.v) {\n return;\n }\n cond.v = true;\n cond.notifyAll();\n }\n }", "public SearchQuery<?, ?> condition(SearchCondition condition) {\n initSearch();\n BeanInfo searchMetaData = Beans.getBeanInfo(searchRecordTypeDesc.getSearchBasicClass());\n String fieldName = Beans.toInitialLower(condition.getFieldName());\n PropertyInfo propertyInfo = searchMetaData.getProperty(fieldName);\n\n if (propertyInfo != null) {\n Object searchField = processConditionForSearchRecord(searchBasic, condition);\n Beans.setProperty(searchBasic, fieldName, searchField);\n } else {\n SearchFieldOperatorName operatorQName = new SearchFieldOperatorName(condition.getOperatorName());\n String dataType = operatorQName.getDataType();\n SearchFieldType searchFieldType;\n try {\n searchFieldType = SearchFieldOperatorType.getSearchFieldType(dataType);\n } catch (UnsupportedOperationException e) {\n throw new NetSuiteException(new NetSuiteErrorCode(NetSuiteErrorCode.OPERATION_NOT_SUPPORTED),\n i18n.invalidDataType(dataType));\n }\n\n Object searchField = processCondition(searchFieldType, condition);\n customFieldList.add(searchField);\n }\n\n return this;\n }", "@Override\n public PaymentP2007_03 where(Field<Boolean> condition) {\n return where(DSL.condition(condition));\n }", "public static void setCondition(Expression exp) {\n\t\tif (!running) return;\n\t\tstate.currentConditionNode = new RootNode(exp, state.currentConditionNode);\n\t}", "public Builder setWhereClause(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n whereClause_ = value;\n onChanged();\n return this;\n }", "public String getCondition() {\n return condition;\n }", "public DoSometime condition(Condition condition) {\n this.condition = condition;\n return this;\n }", "@Override\n @PlainSQL\n public PaymentP2007_03 where(SQL condition) {\n return where(DSL.condition(condition));\n }", "public void setWhere(String dbsel)\n {\n this._appendWhere(dbsel, WHERE_SET);\n }", "public Condition(ConditionManager condition)\r\n\t{\r\n\t\tthis.condition = condition;\r\n\t\tinit();\r\n\t}", "@Override\n @PlainSQL\n public PaymentP2007_03 where(@Stringly.SQL String condition) {\n return where(DSL.condition(condition));\n }", "public Expression getCondition()\n {\n return this.condition;\n }", "public String getCondition() {\n\t\treturn condition;\n\t}", "public WhereClause where(final AbstractCondition condition)\n\t{\n\t\treturn new WhereClause(this, condition);\n\t}", "public void setWhere(ZExpression whereExpression)\r\n\t{\r\n\t\twhere = whereExpression;\r\n\t}", "OverallCondition(String condition) {\n this.condition = condition;\n }", "public Condition(Map<String, String> whereClause ) {\n ArrayList<String> list = new ArrayList<>(); //whereArgs里面的内容存入的list\n StringBuilder stringBuffer = new StringBuilder();\n stringBuffer.append(\"1=1\");\n //取得所有成员变量的名字\n Set<String> keys = whereClause.keySet();\n for (String key : keys) {\n String value = whereClause.get(key);\n if (value != null) {\n stringBuffer.append(\" and \").append(key).append(\"=?\");\n list.add(value);\n }\n }\n\n this.whereClause = stringBuffer.toString();\n this.whereArgs = list.toArray(new String[list.size()]);\n }", "public String getCondition() {\n\treturn condition;\n}", "public boolean addCondition(String condition) {\r\n\t\t// if the condition is not already there...\r\n\t\tif (\r\n\t\t\t\tafterFrom.toString().indexOf( condition.trim() ) < 0 &&\r\n\t\t\t\tafterWhere.toString().indexOf( condition.trim() ) < 0\r\n\t\t) {\r\n\t\t\tif ( !condition.startsWith( \" and \" ) ) {\r\n\t\t\t\tafterWhere.append( \" and \" );\r\n\t\t\t}\r\n\t\t\tafterWhere.append( condition );\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic String getCondition(String[] sql) {\n\t\treturn sql[4];\r\n\t}", "public abstract Builder customCondition(RequestCondition<?> paramRequestCondition);", "public OperandCondition(Operand operand) {\n this.operand = operand;\n }", "public Condition getCondition(){\n\t\treturn this.cond;\n\t}", "@Override\n\tpublic void setCondition(VehicleCondition condition) {\n\t\tthis.condition = condition;\n\t}", "public DeleteBuilder where(String condition) {\n\t\t\n\t\tCondition cond = new Condition(condition);\n\t\tdelete.setWhere(cond);\n\t\treturn this;\n\t}", "public void select(Condition condition) {\n int i;\n boolean z = DEBUG;\n if (z) {\n String str = this.mTag;\n Log.d(str, \"select \" + condition);\n }\n int i2 = this.mSessionZen;\n if (i2 != -1 && i2 != 0) {\n final Uri realConditionId = getRealConditionId(condition);\n if (this.mController != null) {\n AsyncTask.execute(new Runnable() { // from class: com.android.systemui.volume.ZenModePanel.5\n @Override // java.lang.Runnable\n public void run() {\n ZenModePanel.this.mController.setZen(ZenModePanel.this.mSessionZen, realConditionId, \"ZenModePanel.selectCondition\");\n }\n });\n }\n setExitCondition(condition);\n if (realConditionId == null) {\n this.mPrefs.setMinuteIndex(-1);\n } else if ((isAlarm(condition) || isCountdown(condition)) && (i = this.mBucketIndex) != -1) {\n this.mPrefs.setMinuteIndex(i);\n }\n setSessionExitCondition(copy(condition));\n } else if (z) {\n Log.d(this.mTag, \"Ignoring condition selection outside of manual zen\");\n }\n }", "public Condition getCondition() {\n return condition;\n }", "public static void bgfx_encoder_set_condition(@NativeType(\"bgfx_encoder_t *\") long _this, @NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.encoder_set_condition;\n if (CHECKS) {\n check(_this);\n }\n invokePCV(_this, _handle, _visible, __functionAddress);\n }", "Condition(Column col1, String relation, Column col2) {\n // YOUR CODE HERE\n }", "public DeleteBuilder or(String condition) {\n\t\t\n\t\tdelete.add(condition, Operator.OR);\n\t\treturn this;\n\t}", "private void setConditionAndListener(ObjectProperty<ConditionViewModel> property) {\n setCondition(property.get());\n\n // Update for new values\n property.addListener((observable, oldValue, newValue) -> setCondition(newValue));\n }", "public StatementBuilder setWhere(SqlPart where) {\n this.where = where;\n return this;\n }", "public void setCondition(WeatherCondition condition) {\n this.condition = condition;\n }", "public com.sforce.soap.partner.SoqlWhereCondition getWhereCondition() {\r\n return whereCondition;\r\n }", "void setCondition(ICDICondition condition) throws CDIException;", "protected void setQueryFilter(CalendarFilter filter) {\n this.queryFilter = filter;\n }", "@Override\n @PlainSQL\n public PaymentP2007_03 where(@Stringly.SQL String condition, Object... binds) {\n return where(DSL.condition(condition, binds));\n }", "private QueryCondition buildConditionForQueryFromCondition(ParameterContext context, \r\n\t\t\tSet<String> includedTables, IConditionalQuery query, Condition condition, Object params[])\r\n\t{\r\n\t\tObject value = null;\r\n\t\t\t\t\r\n\t\t// fetch the value for current condition\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//for non-method level conditions fetch the value\r\n\t\t\tif(condition.index >= 0)\r\n\t\t\t{\r\n\t\t\t\tvalue = PropertyUtils.getProperty(context, condition.getConditionExpression());\r\n\t\t\t\t\r\n\t\t\t\tif(condition.fieldDetails != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = context.queryExecutionContext.getConversionService().convertToDBType(value, condition.fieldDetails);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//for method level conditions like null-checks and others use default value from condition\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tString strValue = condition.defaultValue;\r\n\t\t\t\t\r\n\t\t\t\t//if no repo context is specified assume empty object\r\n\t\t\t\tObject repoContext = context.queryExecutionContext.getRepositoryExecutionContext();\r\n\t\t\t\trepoContext = (repoContext != null) ? repoContext : Collections.emptyMap(); \r\n\t\t\t\t\r\n\t\t\t\t//if value is present check for expressions and replace them\r\n\t\t\t\tif(strValue != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tstrValue = CommonUtils.replaceExpressions(repoContext, condition.defaultValue, null);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tvalue = ConvertUtils.convert(strValue, condition.fieldDetails.getField().getType());\r\n\t\t\t}\r\n\t\t} catch(Exception ex)\r\n\t\t{\r\n\t\t\tthrow new IllegalStateException(\"An error occurred while fetching condition value for expression -\" + condition.getConditionExpression(), ex);\r\n\t\t}\r\n\t\t\r\n\t\tif(value instanceof Enum)\r\n\t\t{\r\n\t\t\tvalue = \"\" + value;\r\n\t\t}\r\n\t\t\r\n\t\tQueryCondition groupHead = null;\r\n\r\n\t\t// if value is not provided, ignore current condition\r\n\t\tif(value != null || (condition.operator.isNullable() && condition.nullable))\r\n\t\t{\r\n\t\t\t// add tables and conditions to specifies query\r\n\t\t\taddTables(query, condition.table.tableCode, includedTables);\r\n\t\t\t\r\n\t\t\tgroupHead = new QueryCondition(condition.table.tableCode, condition.fieldDetails.getDbColumnName(), condition.operator, value, condition.joinOperator, condition.ignoreCase);\r\n\t\t\tgroupHead.setDataType(condition.fieldDetails.getDbDataType());\r\n\t\t}\r\n\r\n\t\t//if no group conditions are present on this query\r\n\t\tif(condition.getGroupedConditions() == null)\r\n\t\t{\r\n\t\t\treturn groupHead;\r\n\t\t}\r\n\t\t\r\n\t\taddGroupConditions(groupHead, condition.getGroupedConditions(), context, includedTables, query, params);\r\n\t\treturn groupHead;\r\n\t}", "public ElementDefinitionDt setCondition(java.util.List<IdDt> theValue) {\n\t\tmyCondition = theValue;\n\t\treturn this;\n\t}", "Condition equal(QueryParameter parameter, Object value);", "public ExpressionNode getCondition();", "public DeleteBuilder and(String condition) {\n\t\t\n\t\tdelete.add(condition, Operator.AND);\n\t\treturn this;\n\t}", "@Override\n\tpublic String getCondition() {\n\t\treturn \"\";\n\t}", "OclExpression getCondition();", "public void onsetCondition(String condition, String state, long time) {\n if (!onsetConditions.containsKey(condition)) {\n onsetConditions.put(condition, new OnsetCondition(condition));\n }\n OnsetCondition onsetCondition = onsetConditions.get(condition);\n onsetCondition.addNewEntry(time);\n state2conditionMapping.put(state, condition);\n }", "public GroupByBuilder and(String condition) {\n\t\t\n\t\tadd(condition, Operator.AND);\n\t\treturn this;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Condition newCondition() {\n\t\treturn null;\n\t}", "cn.infinivision.dataforce.busybee.pb.meta.Expr getCondition();", "public final void addCondition(final Condition c) {\n m_body.add(c);\n }", "@Override\r\n\tpublic void visit(ConditionExpression conditionExpression) {\n\r\n\t}", "CollectIteratorEvaluator(BooleanValue condition) {\n this.condition = condition;\n }", "public static void bgfx_set_condition(@NativeType(\"bgfx_occlusion_query_handle_t\") short _handle, @NativeType(\"bool\") boolean _visible) {\n long __functionAddress = Functions.set_condition;\n invokeCV(_handle, _visible, __functionAddress);\n }", "cn.infinivision.dataforce.busybee.pb.meta.ExprOrBuilder getConditionOrBuilder();", "public void setConditionId(Long conditionId) {\n _conditionId = conditionId;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "public Criteria when(boolean condition, ICriteriaWhen then) {\n if (condition) {\n then.criteria(this);\n }\n return this;\n }", "@Override\n @PlainSQL\n public PaymentP2007_03 where(@Stringly.SQL String condition, QueryPart... parts) {\n return where(DSL.condition(condition, parts));\n }", "public void setJobCondition(String jobCondition) {\n this.jobCondition = jobCondition;\n }", "public Filter condition();", "public GroupByBuilder or(String condition) {\n\t\t\n\t\tadd(condition, Operator.OR);\n\t\treturn this;\n\t}", "@Override\n public PaymentP2007_03 where(Condition condition) {\n return new PaymentP2007_03(getQualifiedName(), aliased() ? this : null, condition);\n }", "java.lang.String getCondition();", "public ConditionalStatement(IExpression condition, IStatement s0, IStatement s1)\n {\n super(\"Conditional\", null);\n // TODO - anything else you need\n }", "public void addCondition(SetGenerator condition)\n\t{\n\t\tthis.triggerConditions.add(condition);\n\t}", "public void setConditions(Conditions conditions) {\n this.conditions = conditions;\n }", "public ConditionalSelectorImpl(SimpleSelector simpleSelector, Condition condition) {\n this.simpleSelector = simpleSelector;\n this.condition = condition;\n }", "public void setExpression(String expression) throws ConstructionException {\n _expression = expression;\n\n if (expression != null && !expression.trim().isEmpty()) {\n synchronized (this) {\n try {\n ValidatorServices.getInstance().parseExpression(\"condition\", _expression, _rawProperties, _potentialContextEntries, _usedLookupIds);\n }\n catch (CompilationFailedException e) {\n throw new ConstructionException(\"Unable to parse condition \" + getId(), e);\n }\n }\n }\n }", "public Builder setInitCond(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n initCond_ = value;\n onChanged();\n return this;\n }", "public OverallCondition getCondition() {\n return condition;\n }", "public void onConditionOnset(String module, String state, String condition, long time) {\n if (!sources.containsKey(module)) {\n sources.put(module, new ModuleConditions(module));\n }\n ModuleConditions moduleConditions = sources.get(module);\n moduleConditions.onsetCondition(condition, state, time);\n }", "public FileQueryOptions setRequestConditions(DataLakeRequestConditions requestConditions) {\n this.requestConditions = requestConditions;\n return this;\n }", "private void setParameterAtWhereString(Query qry, UserGroupAssignment parameter){\r\n\t\tif(parameter.getGroupId() != null){\r\n\t\t\tqry.setParameter(\"GROUP_ID\", parameter.getGroupId());\r\n\t\t}\r\n\t\tif(parameter.getId() != null){\t\t\t\r\n\t\t\tqry.setParameter(\"ID\", parameter.getId());\r\n\t\t}\r\n\t}", "public abstract Query<T> setQuery(String oql);", "Condition(double multiplier) {\r\n this.multiplier = multiplier;\r\n }", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "private void parseCondition() {\n Struct type1 = parseExpr().type;\n\n int op;\n if (RELATIONAL_OPERATORS.contains(nextToken.kind)) {\n scan();\n op = token.kind;\n } else {\n error(\"Relational operator expected\");\n op = Token.NONE;\n }\n\n int opcode;\n switch (token.kind) {\n case Token.GTR:\n opcode = Code.OP_JGT;\n break;\n case Token.GEQ:\n opcode = Code.OP_JGE;\n break;\n case Token.LESS:\n opcode = Code.OP_JLT;\n break;\n case Token.LEQ:\n opcode = Code.OP_JLE;\n break;\n case Token.EQL:\n opcode = Code.OP_JEQ;\n break;\n case Token.NEQ:\n opcode = Code.OP_JNE;\n break;\n default:\n opcode = Code.OP_TRAP;\n error(\"Illegal comparison operator\");\n break;\n }\n\n Struct type2 = parseExpr().type;\n\n if (!type1.compatibleWith(type2)) {\n error(\"Incompatible types in comparison\");\n }\n if (type1.isRefType() && type2.isRefType()) {\n if (op != Token.EQL && op != Token.NEQ) {\n error(\"Reference types can only be compared \"\n + \"for equality and inequality\");\n }\n }\n\n code.putFalseJump(opcode, 42); // Will be fixed later\n }", "public void setJoinCondition(org.cagrid.data.dcql.JoinCondition joinCondition) {\r\n this.joinCondition = joinCondition;\r\n }", "public CriteriaQueryTable(CriteriaQuery q) {\n myCriteriaQuery = q;\n myOriginalRestriction = q.getRestriction();\n \n if (myOriginalRestriction == null) {\n myOriginalRestriction = JPA.em().getCriteriaBuilder().conjunction();\n }\n }", "public StatementBuilder where(SqlPart where) {\n if (this.where == null) {\n setWhere(where);\n } else {\n setWhere(Where.and(this.where, where));\n }\n return this;\n }", "protected void sequence_Condition(ISerializationContext context, Condition semanticObject) {\r\n\t\tif (errorAcceptor != null) {\r\n\t\t\tif (transientValues.isValueTransient(semanticObject, GoPackage.Literals.CONDITION__EXP) == ValueTransient.YES)\r\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, GoPackage.Literals.CONDITION__EXP));\r\n\t\t}\r\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\r\n\t\tfeeder.accept(grammarAccess.getConditionAccess().getExpExpressionParserRuleCall_1_0(), semanticObject.getExp());\r\n\t\tfeeder.finish();\r\n\t}", "public void setQuery (Query q)\n\t throws IllegalStateException,\n\t QueryParseException\n {\n\n\tif (!q.parsed ())\n\t{\n\n\t throw new IllegalStateException (\"Query has not yet been parsed.\");\n\n\t}\n\n\tthis.q = q;\n\n\tthis.checkFrom ();\n\n\tthis.badQuery = false;\n\tthis.exp = null;\n\n }", "Condition(Column col1, String relation, Column col2) {\n this._col1 = col1;\n this._col2 = col2;\n this.compRep = 0;\n\n switch (relation) {\n case \"<=\":\n this.compRep |= EQ;\n this.compRep |= LT;\n break;\n case \"<\":\n this.compRep |= LT;\n break;\n case \">=\":\n this.compRep |= EQ;\n this.compRep |= GT;\n break;\n case \">\":\n this.compRep |= GT;\n break;\n case \"=\":\n this.compRep |= EQ;\n break;\n case \"!=\":\n this.compRep = (GT | LT) & ~EQ;\n break;\n default:\n throw new DBException(\"Error: invalid relation.\");\n }\n\n }", "protected void setTableCondtion(int pcond)\n\t\t{\n\t\t\tCondtion = pcond ;\n\t\t}", "public void setFilter(Filter.Statement filter) {\n this.setFilter(filter.toArray());\n }", "public SCondition(Node node) {\n super(node);\n }", "Condition(Column col1, String relation, String val2) {\n this(col1, relation, new Literal(val2));\n }", "Condition(Column col1, String relation, String val2) {\n this(col1, relation, new Literal(val2));\n }", "public Condition newCondition() {\r\n throw new java.lang.UnsupportedOperationException();\r\n }", "Condition createCondition();", "public static ParseQuery<?> setQuery( String key, Object value) {\n\t\tParseQuery<?> pushQuery = ParseInstallation.getQuery();\n\t\tpushQuery.whereEqualTo(key, value);\n\t\t// pushQuery.whereEqualTo(\"channels\", \"Giants\"); // Set the channel\n\t\treturn pushQuery;\n\t}" ]
[ "0.72914946", "0.72221315", "0.66329616", "0.6550275", "0.64546055", "0.6313714", "0.626654", "0.62456584", "0.6136721", "0.5972271", "0.59584385", "0.5946857", "0.59406185", "0.58876425", "0.58767533", "0.5870935", "0.5852869", "0.5818202", "0.5812638", "0.5799256", "0.57370216", "0.5704888", "0.5703578", "0.5644578", "0.5641132", "0.55964535", "0.55757123", "0.5569698", "0.5557932", "0.55377185", "0.5523163", "0.5501746", "0.5492564", "0.5482932", "0.54722446", "0.5458712", "0.5423421", "0.5422027", "0.5414521", "0.54043084", "0.54017156", "0.539605", "0.5392859", "0.53900576", "0.53761685", "0.537351", "0.53653014", "0.5356875", "0.5356482", "0.5344204", "0.5342348", "0.53283507", "0.53112596", "0.5310549", "0.5310549", "0.53104043", "0.53036666", "0.528162", "0.52753663", "0.5268531", "0.5234403", "0.5232668", "0.5230179", "0.5230179", "0.5230179", "0.5230179", "0.5218893", "0.5204412", "0.5198728", "0.5195165", "0.5191921", "0.5176619", "0.5154694", "0.51496947", "0.51201075", "0.5103938", "0.5055996", "0.5050822", "0.5048999", "0.5031219", "0.50251585", "0.502417", "0.50231624", "0.50089854", "0.4998938", "0.49870485", "0.49737614", "0.49646145", "0.49498525", "0.49405846", "0.49365672", "0.49359596", "0.49304828", "0.49287155", "0.4907025", "0.49021068", "0.49021068", "0.4900582", "0.48910195", "0.48776275" ]
0.7517716
0
Registers a new userdefined variable to be used in the query.
public void registerVariable(String variableName, Expression variableDefinition) { variablesMap.put(variableName, variableDefinition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public UserVariableDefinitionDto addUserVariableDefinition(UserVariableDefinitionDto definition) throws ServerCallFailedException;", "public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }", "public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }", "@Override\n protected void variableAddedDuringReplication(Aggregatable variable) {\n }", "public void addNewVariable() {\r\n \t ArrayList<Object> tempVar = new ArrayList<Object>();\r\n \t tempVar.add(\"Integer\");\r\n \t tempVar.add(\"NewVariable\");\r\n \t tempVar.add(Boolean.FALSE);\r\n \t tempVar.add(new Integer(1));\r\n \t this.variableData.add(tempVar);\r\n \t this.fireTableDataChanged();\r\n }", "public void addVariable(String varName)\n\t{\n\t\tget(VARSTRATEGY).addVariable(this, varName);\n\t}", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public void addVariable(VariableItem variableItem) {\n\t\t\n\t}", "public void addVariable(Variable newVariable) {\r\n\t\tthis.variables.add(newVariable);\r\n\t}", "Variable createVariable();", "Variable createVariable();", "Variable(String _var) {\n this._var = _var;\n }", "public void addViewVariable (String name, Object value)\n {\n _viewVariables.put (name, value);\n }", "DynamicVariable createDynamicVariable();", "public Variable addNewVar(String rootName, Type t, Use u) {\n\t\tNameSSA ssa = new NameSSA(rootName);\n\t\tname.put(rootName, ssa);\n\t\tVariable v = new Variable(ssa.current(), t, u);\n\t\tvar.put(ssa.current(), v);\n\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\tSystem.out.println(\"SymbolTable.addNewVar: \" + v.name());\n\t\t}\n\t\t// to add the old value of the variable (i.e. before function call)\n\t\tv.setOld(v);\n\t\treturn v;\n\t}", "public void addVariable(Variable var1, Variable var2){\r\n \tvar1.addVariable(var2);\r\n }", "public IExpressionValue getUserDefinedVariable(String key);", "public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;", "@Override\r\n\tpublic void add(ShaderVar var) {\n\t\t\r\n\t}", "public static void store(String varName) {\n emit(newVariable(varName).getStore());\n }", "public Variable addVar(String n) {\n\t\t//System.out.println(\"SymbolTable addVar \" + n);\n\t\tNameSSA ssa = name.get(n);\n\t\tif (ssa != null) {\n\t\t\tVariable lastRenaming = var.get(ssa.current());\n\t\t\tssa.next();\n\t\t\tVariable v;\n\t\t\tif (lastRenaming instanceof ArrayVariable)\n\t\t\t\tv= new ArrayVariable(ssa.current(), lastRenaming.type, ((ArrayVariable)lastRenaming).length(),lastRenaming.use);\n\t\t\telse\n\t\t\t\tv= new Variable(ssa.current(), lastRenaming.type, lastRenaming.use);\n\t\t\tv.setOld(lastRenaming.oldValue());\n\t\t\tvar.put(ssa.current(), v);\n\t\t\tif (VerboseLevel.DEBUG.mayPrint()) {\n\t\t\t\tSystem.out.println(\"SymbolTable.addVar: \" + v.name());\n\t\t\t}\n\t\t\treturn v;\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\t\t\n\t}", "@Override\n public CodeFragment visitVarDecStat(AlangParser.VarDecStatContext ctx) {\n String name = ctx.ID().getText();\n if (this.variableExists(name)) {\n this.addError(ctx, name, \"Variable already declared\");\n return new CodeFragment(\"\");\n }\n\n String alangvartype = ctx.var_type().getText();\n String llvmvartype = Types.getLLVMDefineVartype(alangvartype);\n\n String reg = this.generateNewRegister(true);\n Variable v = new Variable(reg, alangvartype, llvmvartype);\n\n int arity = ctx.index_to_global_array().size();\n v.setArity(arity);\n if (arity > 0) {\n v.setGlobalArray();\n }\n\n for (int i = 0; i < arity; i++) {\n v.addLevel(Integer.valueOf(ctx.index_to_global_array(i).INT().getText()));\n }\n\n this.globals.put(name, v);\n\n return new CodeFragment(\"\");\n }", "public void addGlobalVariable(int adr, int x){\n initInstructions.add(\"# adding a global variable\");\n initInstructions.add(\"li $a0, \" + x);\n initInstructions.add(\"sw $a0, \" + adr + \"($gp)\");\n initInstructions.add(\"# end of adding a global variable\");\n }", "public ActRuVariable(String alias) {\n this(DSL.name(alias), ACT_RU_VARIABLE);\n }", "private Node registerVariables(final Node n, final List<Node> variables) {\n if (n.isVariable() && !variables.contains(n)) {\n variables.add(n);\n }\n return n;\n }", "public void declare (String name, Value value){\n if (contains(name)){\n throw new VariableAlreadyDefined();\n }\n this.values.put(name, value);\n }", "public void setVariable(Variable variable) {\n this.variable = variable;\n }", "public static void addVar(Var var) {\n if (var != null) {\n varSet.add(var);\n }\n }", "public void agregarVar(EntradaVarInst v ) {\r\n\t\t//le asigno un offset a la variable nueva (1,2,3, etc)\r\n\t\tv.setOffset(maximoOffsetVarInst);\r\n\t\t\r\n\t\t\r\n\t\t//aumento el offset\r\n\t\t//maximoOffsetVarInst++;\r\n\t\t//agrego la variable a mi tabla de variables de instancia\r\n\t\tentradaVar.put(v.getNombre(), v);\r\n\t}", "public void setVariable(Name variable) {\n this.variable = variable;\n }", "private void addVariableToZ3(QFLanVariable var) throws Z3Exception {\n\t}", "public void addVariables(IJobSetup setup) {\n\t\tsetup.addVariable(\"someFactor\", \"factor used to adjust something\", \"int\", \"2\");\r\n\t}", "public VariableIF createVariable(VariableDecl decl);", "public static void loadVar(Register variable, MethodVisitor mv) {\n load(variable, mv);\n box(variable.getType(), mv);\n }", "VarReference createVarReference();", "private void putVariable(String memVar, int value){\n\t\tram[Integer.parseInt(\n\t\t\t\tCharacter.toString(memVar.charAt(1)))]\n\t\t\t\t= value;\n\t}", "public void testBoundToVariable()\n throws Exception\n {\n String varname =\"ITEM\";\n String id = \"occ_hermes1\";\n Occurrence occ = (Occurrence) tm.getObjectByID(id);\n // resolver shall resolve by id\n tag.setOccurrence(occ);\n\n // resolved topic shall be stored in\n // the variable named TOPIC\n tag.setVar(varname);\n \n // resolve\n setScriptForTagBody(tag);\n tag.doTag(null);\n \n // the item should be stored in the variable\n assertEquals(occ, ctx.getVariable(varname));\n \n // make a new tag, bound to the same variable \n // set resolvement to non existant topic\n tag = new UseOccurrenceTag();\n tag.setContext(ctx);\n tag.setVar(varname);\n tag.setId(\"nonexistantntifd\");\n\n // resolve\n tag.doTag(null);\n\n // the variable should be resetted\n assertNull(ctx.getVariable(varname));\n \n }", "public void addSelectVariable(String selectVariable) {\n\n\t\tvariableList.add(selectVariable);\n\t}", "final public void define() throws ParseException {\n String name=\"\";\n Long value;\n jj_consume_token(DEFINE);\n jj_consume_token(VARIABLE);\n name = token.image;\n jj_consume_token(NUMERO);\n try {\n value = Long.parseLong(token.image);\n }\n catch(Exception e) {\n {if (true) throw new ParseException(\"Una variable solo puede guardar numeros\");}\n }\n userVals.put(name, value);\n }", "public ActRuVariable(Name alias) {\n this(alias, ACT_RU_VARIABLE);\n }", "private void smem_variable_create(smem_variable_key variable_id, long variable_value) throws SQLException\n {\n final PreparedStatement var_create = db.var_create;\n \n var_create.setInt(1, variable_id.ordinal());\n var_create.setLong(2, variable_value);\n \n var_create.execute();\n }", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "public void addVariable(VariableItem _variableItem) {\n\t\tvariableItem.add(_variableItem);\n\t}", "public LocalVariableGen addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end) {\n/* 170 */ return this._allocatorInit ? addLocalVariable2(name, type, start) : super.addLocalVariable(name, type, start, end);\n/* */ }", "public final void register(CVar cvar) {\n if (cvarList.containsKey(cvar.getName())) {\n logger.warn(\"Trying to add cvar '{}', which already exists!\", cvar.getName());\n return;\n }\n cvarList.put(cvar.getName(), cvar);\n }", "public void addVarToJoiningVariables( String var ) ;", "public void setVariable(String variable, Integer value) {\n _variables.put(variable, value);\n }", "public Potential addVariable(Node var) {\n Vector v;\n PTreeCredalSet pot;\n \n v = new Vector();\n v.addElement(var);\n pot = (PTreeCredalSet)addVariable(v);\n return pot;\n }", "public void addUsedVarName(String varName) {\n addVarName(varName);\n \n // Ignore action if variable name already exists\n if (usedVarNames.contains(varName)) {\n return;\n }\n\n usedVarNames.add(varName);\n }", "public Var(String var) {\r\n this.variable = var;\r\n }", "public IVariable createInternalVariable(String name, IJavaType referencType) {\n IVariable var = new InterpreterVariable(name, referencType, fContext.getVM());\n fInternalVariables.put(name, var);\n return var;\n }", "public ActRuVariable() {\n this(DSL.name(\"act_ru_variable\"), null);\n }", "VariableExp createVariableExp();", "final public void varcall() throws ParseException {\n jj_consume_token(VARIABLE);\n if(userVals.get(token.image)==null) {\n {if (true) throw new ParseException(\"La variable no ha sido definida.\");}\n }\n }", "VariableRef createVariableRef();", "public void insertValue(Integer variable, Integer currentValue) {\n variables.put(variable, new ImmutablePair<>(currentValue, currentValue));\n }", "public UserVariableDefinitionDto updateUserVariableDefinition(UserVariableDefinitionDto definition) throws ServerCallFailedException;", "public void setVar(String var)\n {\n this.var = var;\n }", "@Override\n\tpublic void visit(UserVariable arg0) {\n\t\t\n\t}", "AliasVariable createAliasVariable();", "public Variable addNewPrefixedVar(String prefix, String rootName, Type t, Use u) {\n\t\t//System.out.println(\"symbol table addNewPrefixedVar \" + prefix + \" \" + n);\n\t\treturn addNewVar(prefix + \"_\" + rootName, t, u);\n\t}", "public void a(j jVar) {\n synchronized (this.l) {\n if (!this.l.contains(jVar)) {\n this.l.add(jVar);\n } else {\n throw new IllegalStateException(\"Cannot register already registered manager\");\n }\n }\n }", "public void setVariable(String strVariable)\n {\n this.strVariable = strVariable;\n }", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "public Variable(String name){\n this.name = name;\n }", "public void install(final String variableName, final Integer variableValue) {\n this.variables.put(variableName, variableValue);\n }", "public void addValue(String variable, Integer int_value) {\n\t\tDate date = new Date();\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseIntegerStore(variable,\n\t\t\t\tint_value.toString(), date);\n\t\taddQuestion(ds);\n\t}", "public void setVarName(String text) {\n\t\tvarName=text;\r\n\t}", "public void setTransientVariable(String name, Object value) {\n transientVariables.put(name, value);\n }", "public void addVariableToTable(String name, VoogaData value) {\n\t\tthis.getItems().add(new Property(name, value));\n\t\tproperties.put(name, value);\n\t}", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "public /* synthetic */ void m93351a(DbEditorHashTagSuggestItem nVar) {\n this.f64770d.add(nVar);\n }", "final int addVar(MatrixVariableI var) {\r\n\t\t\tObject index = varRefs.get(var);\r\n\t\t\tif (index == null) {\r\n\t\t\t\tint size = varRefs.size();\r\n\t\t\t\texpandVarArray(var);\r\n\t\t\t\tvarRefs.put((Variable) var, size);\r\n\t\t\t\tcopyFromVar(var, size);\r\n\t\t\t\t((Variable) var).addObserver(this);\r\n\t\t\t\treturn size;\r\n\t\t\t}\r\n\t\t\treturn ((Integer) index).intValue();\r\n\t\t}", "private SWRLVariable initalizeVariable(String name, SWRLVariable var1) {\n\n if (literalVocabulary.containsKey(name)) {\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + literalVocabulary.get(name)));\n } else {\n char variable = this.generateVariable();\n literalVocabulary.put(name, String.valueOf(variable));\n var1 = factory.getSWRLVariable(IRI.create(manager.getOntologyDocumentIRI(domainOntology) + \"#\" + variable));\n }\n\n return var1;\n }", "public boolean addPVar(String pVName, boolean pIsNotNull, Type pType, Serializable pValue,\n boolean IsValueExpr, MoreData pMoreInfo, Location pLocation, MoreData pMoreData);", "@Override String opStr() { return \"var\"; }", "public Potential addVariable(Node var) {\n \n return (Potential)(new CaseListOutMem());\n}", "private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }", "public void addValue(String variable, String str_value) {\n\t\tDate date = new Date();\n\t\tGregorianCalendar gc = new GregorianCalendar();\n\t\tgc.setTime(date);\n\t\tgc.add(Calendar.HOUR_OF_DAY, -6);\n\t\tdate = gc.getTime();\n\t\tDatabaseStore ds = DatabaseStore.DatabaseTextStore(variable,\n\t\t\t\tstr_value.toString(), date);\n\t\taddQuestion(ds);\n\t}", "public /* synthetic */ void m93357b(DbEditorHashTagSuggestItem nVar) {\n this.f64770d.add(nVar);\n }", "void setupVariables(IVariableFactory factory);", "public interface Register {\n // M E T H O D S -------------------------------------------------------------------------\n\n /**\n * Returns the object to bind to the variable map for this workflow instance.\n *\n * @param context The current workflow context\n * @param entry The workflow entry. Note that this might be null, for example in a pre function\n * before the workflow has been initialised\n * @param args Map of arguments as set in the workflow descriptor\n *\n * @param ps\n * @return the object to bind to the variable map for this workflow instance\n */\n public Object registerVariable(WorkflowContext context, ProcessInstance entry, Map<String,String> args, PersistentVars persistentVars) throws WorkflowException;\n}", "@Override\n public Void visitVariableAntecedent(GraafvisParser.VariableAntecedentContext ctx) {\n variables.add(ctx.HID().getText());\n return null;\n }", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "public void declareVariable(String name, String value) {\n checkNotNull(name);\n checkNotNull(value);\n addLine(VARIABLE_MODIFIER + ' ' + name + \" = \" + value + ';');\n }", "private void declareWithReference(Variable newVar,String variableName, boolean isFinal,boolean\r\n\t\t\tisArgument, String value)throws IllegalDeclarationException,\r\n\t\t\tIncompatibleTypeException, TypeNotSupportedException{\r\n\t\tVariable reference = findVariable(value);\r\n\t\tif (reference != null) {//if it is indeed a reference to a previously declared variable:\r\n\t\t\t// we'll check if the referenced var is initialised + if it's type's compatible with newVar's\r\n\t\t\tif (newVar.compatibleWith(reference)&&reference.isInitialized()){\r\n\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\tparent==null);\r\n\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, we'll declare a new variable\r\n\t\t\t\treturn;\r\n\t\t\t}else{\r\n\t\t\t\t//check if value's an uninitialised global var that we've already initialised in this scope\r\n\t\t\t\treference = uninitialisedGlobalVariables.get(value);\r\n\t\t\t\tif(reference!=null&&newVar.compatibleWith(reference)){\r\n\t\t\t\t\tVariable varToDeclare = vFactory.createVariable(true,isFinal,isArgument,reference.getType(),\r\n\t\t\t\t\t\t\tparent==null);\r\n\t\t\t\t\tscopeVariables.put(variableName, varToDeclare);//if it is, declare a new variable\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}//if value's type isn't compatible with type ,value isn't a reference or isn't a good one:\r\n\t\tthrow new IllegalDeclarationException();\r\n\r\n\t}", "public int addVar(String name, Value value) {\n \n for (int i = 0; i < table.size(); i++) {\n if (table.get(i).getName().compareTo(name) == 0 &&\n table.get(i).getType().equals(value.getType()))\n return 1;\n if (table.get(i).getName().compareTo(name) == 0 &&\n !(table.get(i).getType().equals(value.getType())))\n return 2;\n }\n \n table.add(new OurSymbol(name, value));\n return 0;\n }", "public Variable(String name) {\n this.name = name;\n checkRep();\n }", "Aliasing getVariable();", "public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) {\n/* 177 */ return addLocalVariable(name, type, this._slotAllocator.allocateSlot(type), start, null);\n/* */ }", "public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }", "public void defineReadonlyVariable(String name, IRubyObject value) {\n globalVariables.defineReadonly(name, new ValueAccessor(value));\n }", "public Boolean setVariable(String var_name) {\n\t\tthis.setTitle(var_name);\n\t\tthis.setVarName(var_name);\n\t\tthis.sT.addVariable(var_name);\n\t\treturn true;\n\t}", "public void storeEval(final String expression, final String variableName);", "public void setVar(String var) {\n\t\tthis.var = var;\n\t}", "public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }", "public void setVar(String var) {\n\t\tthis._var = var;\n\t}", "public void addNewVarInCurrentScope(String varName, String graphNodeId){\n symbolTable.computeIfAbsent(varName, v -> new ArrayList<>()).add(graphNodeId);\n newVarInCurrentScope.get(newVarInCurrentScope.size() - 1).add(varName);\n }", "public void variableChanged(VariableAttribute var);" ]
[ "0.67127323", "0.66458744", "0.66458744", "0.6390818", "0.6376135", "0.6339001", "0.62793595", "0.62793595", "0.61942357", "0.6099403", "0.6099403", "0.607391", "0.60606563", "0.603018", "0.6024377", "0.60093516", "0.6006309", "0.5940072", "0.58465147", "0.57988", "0.5755108", "0.5749381", "0.5744971", "0.5742199", "0.57052344", "0.5702935", "0.56866956", "0.5664276", "0.5655872", "0.56340843", "0.56289166", "0.5626824", "0.5626482", "0.56197506", "0.56175226", "0.5586316", "0.5572372", "0.557055", "0.5559851", "0.5557445", "0.55370766", "0.55349183", "0.55349183", "0.55349183", "0.5522649", "0.5518348", "0.5511577", "0.5490658", "0.5472078", "0.54685485", "0.5464445", "0.5444512", "0.5440785", "0.54194975", "0.5415027", "0.5413013", "0.5400496", "0.540044", "0.5398476", "0.53971875", "0.53959733", "0.53959346", "0.539418", "0.53936607", "0.5379639", "0.53683203", "0.5356366", "0.53563255", "0.53472114", "0.53353417", "0.5324597", "0.53166616", "0.5310916", "0.53089464", "0.530292", "0.5295685", "0.5283956", "0.5279648", "0.52674204", "0.52657676", "0.52606493", "0.52587646", "0.52573514", "0.52571815", "0.5256189", "0.5253505", "0.5250676", "0.52382594", "0.523634", "0.52290887", "0.5222994", "0.521581", "0.521581", "0.5212946", "0.52103394", "0.52003443", "0.5197081", "0.5196176", "0.51953346", "0.5181218" ]
0.6538073
3
Sets the limiter that will limit the selection produced by the query.
public void setSelectionLimiter(Limiter limiter) { this.selectionLimiter = limiter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSelectionLimit(long limit)\n {\n if (limit < 0L) {\n this.selLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.selLimitCount = 1L;\n } else {\n this.selLimitCount = limit;\n }\n }", "public void setSelectionLimit(EventData.LimitType limitType, long limit)\n {\n this.selLimitType = (limitType != null)? limitType : EventData.LimitType.FIRST;\n this.setSelectionLimit(limit);\n }", "DbQuery setLimit(Limit limit, int limitNum) {\n this.limit = limit;\n this.limitNum = limitNum;\n return this;\n }", "void setLimit(int limit);", "public void setLimit(Integer limit) {\n this.limit = limit;\n }", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> limit(int limit);", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public void setLimit(int limit) {\n\tLimit = limit;\n }", "public void setLimit(int limit) {\n this.limit=limit;\n }", "public void setMiterLimit(float limit);", "public void setLimit(int limit) {\n this.limit = limit;\n }", "public void setLimit(int limit) {\n\t\tthis.limit = limit;\n\t}", "public void setOrderAndLimit(YadaPageRequest pageable) {\r\n\t\tsetOrder(pageable);\r\n\t\tStringBuffer sqlLimit = new StringBuffer(\" limit \");\r\n\t\tsqlLimit.append(pageable.getOffset()).append(\",\").append(pageable.getPageSize());\r\n\t\tthis.orderAndLimit = this.orderAndLimit + sqlLimit.toString();\r\n\t}", "public void setLimit(Long limit) {\n this.limit = limit;\n }", "public void setLimit(double limit) {\n\t\tthis.limit = limit;\n\t }", "void setLimit( Token t, int limit) {\r\n \tMExprToken tok = (MExprToken)t;\r\n \ttok.charEnd = limit;\r\n \ttok.charStart = limit;\r\n }", "void setMaxResults(int limit);", "public void setLimitnumber(Integer limitnumber) {\n this.limitnumber = limitnumber;\n }", "private void setLimit(\n com.google.protobuf.Int32Value.Builder builderForValue) {\n limit_ = builderForValue.build();\n \n }", "@SuppressWarnings(\"unchecked\")\n public Q limit(int limit) {\n this.limit = limit;\n return (Q) this;\n }", "public ListInfrastructure limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListProxy limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public Builder limit(long limit) {\n this.limit = limit;\n return this;\n }", "public void setLimitNum(int limitNum) {\r\n this.limitNum = limitNum;\r\n this.endNum = this.skipNum + this.limitNum +1;\r\n }", "@Override\n public void setMiterLimit(double limit) {\n graphicsEnvironmentImpl.setMiterLimit(canvas, limit);\n }", "public ListDNS limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListConsole limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListFeatureGate limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public void setLimit(Long Limit) {\n this.Limit = Limit;\n }", "public void setLimit_Base (String Limit_Base);", "public void setLimit(float value) {\n this.limit = value;\n }", "public FoursquarePathBuilder setLimit(Integer limit) {\n String limits = limit.toString();\n addParameter(\"limit\", limits);\n return this;\n }", "public void setLimit(java.math.BigInteger limit)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.setBigIntegerValue(limit);\r\n }\r\n }", "public ListNetwork limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListBuild limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public static void SetMaxPassengers(double inLimit) \r\n {\r\n if (inLimit > 0) \r\n {\r\n maxPassengers = inLimit;\r\n } \r\n else \r\n {\r\n maxPassengers = 0;\r\n }\r\n }", "public ListAPIServer limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListScheduler limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void setReportLimit(long limit)\n {\n if (limit < 0L) {\n this.rptLimitCount = -1L;\n } else\n if (limit == 0L) {\n this.rptLimitCount = 1L;\n } else {\n this.rptLimitCount = limit;\n }\n //Print.logInfo(\"Report record limit: %d\", this.rptLimitCount);\n }", "@Override\n\tpublic List<User> selectLimit() {\n\t\treturn userDao.selectLimit();\n\t}", "public void xsetLimit(org.apache.xmlbeans.XmlNonNegativeInteger limit)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNonNegativeInteger target = null;\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().find_element_user(LIMIT$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlNonNegativeInteger)get_store().add_element_user(LIMIT$6);\r\n }\r\n target.set(limit);\r\n }\r\n }", "private void limitRows()\n {\n paginate(currentPage, getResultsPerPage());\n }", "public DeleteCollectionProxy limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public Builder clearLimit() { copyOnWrite();\n instance.clearLimit();\n return this;\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "protected Limit getLimit() {\n return new Limit(skip, limit);\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "public DeleteCollectionInfrastructure limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListOAuth limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListAuthentication limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public final native void setMaxResults(double maxResults) /*-{\n this.setMaxResults(maxResults);\n }-*/;", "public RateBasedStatement withLimit(Long limit) {\n setLimit(limit);\n return this;\n }", "public SearchBuilder<T> limit(final int limit) {\n\t\treturn take(limit);\n\t}", "public LinearConstraint setLimit(Double limit) {\n this.limit = limit;\n return this;\n }", "public abstract Builder commentLimit(@Nullable Integer limit);", "public String getLimit() {\r\n\t\treturn this.limit;\r\n\t}", "public int getLimit() {\n return limit;\n }", "public ListOperatorHub limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public QueryBuilder<T, R> setMaxResults(int maxResults) {\n this.maxResults = maxResults;\n return this;\n }", "public DeleteCollectionConsole limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListNamespacedComponent limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "@Override\n\tpublic IElementsQuery addLimit(IElementsQuery iElementsQuery) {\n\t\treturn null;\n\t}", "public void setLimitStart(Integer limitStart) {\r\n this.limitStart=limitStart;\r\n }", "public void setRowLimit(int newVal, ObjectChangeSink sink)\n {\n if(newVal==getRowLimit()) return;\n\n if(rootObj.isAutoValidate())\n _get_objectmanager().validate_rowLimit(new ObjectManagerContextImpl(Action.SET), newVal, this);\n\n ((TableReadCapabilityAttributesExtension)_imfObject).setRowLimit(newVal);\n Utils.setBitCascade(sink, getAdaptee());\n if (sink != null) {\n ObjectChange change = createPropertyChange(getAdaptee(), TableReadCapabilityAttributesExtension.Properties.ROW_LIMIT);\n sink.addObjectChange(getAdaptee(), change);\n }\n\n\n }", "public void setMaxDept(int limit);", "public MapReduceToCollectionOperation limit(final int limit) {\n this.limit = limit;\n return this;\n }", "public DeleteCollectionBuild limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "@Accessor(qualifier = \"redemptionQuantityLimit\", type = Accessor.Type.SETTER)\n\tpublic void setRedemptionQuantityLimit(final Integer value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REDEMPTIONQUANTITYLIMIT, value);\n\t}", "public ListClusterOperator limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public int getLimit(){\r\n return limit;\r\n\r\n }", "public final void setRowLimit(int newObj)throws SL_Exception\n {\n setRowLimit(newObj, null);\n }", "public int getLimit() {\r\n return limit;\r\n }", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "public int getLimit() {\n return limit;\n }", "public void setNumericalLimit(double value) {\n\tif (value < 0) {\n\t String msg = errorMsg(\"lessThanZero\", value);\n\t throw new IllegalArgumentException(msg);\n\t}\n\tNUMERICAL_LIMIT = value;\n }", "public DeleteCollectionAPIServer limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public ListImage limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "@Override\r\n\t\tpublic void setLimitPanel(BackOfficePanel panel) {\n\t\t\t\r\n\t\t}", "public DeleteCollectionOAuth limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public void setLimitStart(int limitStart) {\n this.limitStart=limitStart;\n }", "public void setDBSelectQueryViewable(DBSelectQueryViewable viewableQuery)\n {\n query = viewableQuery;\n setResultSet(query.getResultSet());\n }", "public DeleteCollectionScheduler limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "public Query getTop(int limit){\n setLimit(limit);\n return this; //builder pattern allows users to chain methods\n }", "public void setIterationLimit(int limit) {\n\t\titerationLimit = limit;\n\t }", "public void setMaxResults(int wordLimit) {\r\n\t\tthis.wordLimit = wordLimit;\r\n\t}", "public EventData.LimitType getSelectionLimitType()\n {\n return this.selLimitType;\n }", "public Long getLimit() {\n return this.limit;\n }", "private void setCharLimitOnFields() {\n Common.setCharLimit(nameField, Constants.CHAR_LIMIT_NORMAL);\n Common.setCharLimit(addressField, Constants.CHAR_LIMIT_LARGE);\n Common.setCharLimit(postalField, Constants.CHAR_LIMIT_NORMAL);\n Common.setCharLimit(phoneField, Constants.CHAR_LIMIT_NORMAL);\n }", "public int getLimit() {\n\t\treturn limit;\n\t}", "public int getLimit() {\n\t\treturn limit;\n\t}", "public Integer getLimit() {\n return limit;\n }", "public ListIngress limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "String getLimit(boolean hasWhereClause, long limit);", "public void setSelector(final Player selector) {\n this.selector = selector;\n }", "public DeleteCollectionAuthentication limit(Number limit) {\n put(\"limit\", limit);\n return this;\n }", "@Accessor(qualifier = \"redemptionQuantityLimitPerUser\", type = Accessor.Type.SETTER)\n\tpublic void setRedemptionQuantityLimitPerUser(final Integer value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REDEMPTIONQUANTITYLIMITPERUSER, value);\n\t}" ]
[ "0.6131327", "0.60770875", "0.60437286", "0.60272", "0.5830993", "0.58189344", "0.58188707", "0.5811002", "0.5800102", "0.5760946", "0.5749277", "0.56666166", "0.56444323", "0.562577", "0.55833703", "0.5538735", "0.5527977", "0.5523925", "0.5490702", "0.5485002", "0.5462256", "0.54530257", "0.544104", "0.5403631", "0.53806496", "0.53697073", "0.53432775", "0.534106", "0.53395104", "0.53395104", "0.5324531", "0.53001654", "0.52619135", "0.52408355", "0.5223952", "0.52010953", "0.51983064", "0.5190469", "0.5182759", "0.5134254", "0.511901", "0.5086852", "0.5083617", "0.50814843", "0.5075466", "0.50635296", "0.5063181", "0.506126", "0.50533503", "0.5040726", "0.5015636", "0.5010277", "0.50032175", "0.49996048", "0.49869388", "0.49834576", "0.49765664", "0.49276298", "0.49246302", "0.49194992", "0.49164313", "0.49098453", "0.4895287", "0.48939568", "0.48920387", "0.4881969", "0.48803496", "0.48757756", "0.48748615", "0.4870753", "0.48640126", "0.48636582", "0.4855892", "0.48548117", "0.48548117", "0.48548117", "0.4844709", "0.4843217", "0.48391214", "0.4836285", "0.4827949", "0.48270074", "0.48270074", "0.48270074", "0.4823071", "0.48229593", "0.4820009", "0.48130485", "0.48102358", "0.48078072", "0.48032784", "0.47966117", "0.47843796", "0.47843796", "0.4784168", "0.47825447", "0.47731158", "0.47683546", "0.47625586", "0.47582805" ]
0.8099683
0
Sets the sorter that will sort the entities selected by the query.
public void setSelectionSorter(EntitySorter sorter) { this.selectionSorter = sorter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeViewerSorterHandler(Tree tree, TreeViewerSorter sorter) {\n\t\tthis.tree = tree;\n\t\tthis.sorter = sorter;\n\t\tthis.registerColumns();\n\t}", "public void setSortOrder(String sortOrder);", "public void sort() {\n if (sorter != null)\n sort(sorter);\n }", "public void setSortProvider(DataTableSortProvider sortProvider) {\n\t\tif (this.sortProvider != sortProvider) {\n\t\t\tinvalidateIndexMapping();\n\t\t\tthis.sortProvider = sortProvider;\n\t\t\tfireEvent();\n\t\t}\n\t}", "public void setSort(Integer sort) {\r\n this.sort = sort;\r\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSort(Integer sort) {\n this.sort = sort;\n }", "public void setSortby(String sortby) {\n\t\tparameters.put(\"sortby\", sortby);\n\t}", "private void setQueryResults(final QueryResultBundle bundle){\n\t\t// Get the sort info\n\t\tthis.synapseClient.getSortFromTableQuery(this.startingQuery.getSql(), new AsyncCallback<List<SortItem>>() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<SortItem> sortItems) {\n\t\t\t\tsetQueryResultsAndSort(bundle, sortItems);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tshowError(caught);\n\t\t\t}\n\t\t});\n\n\t}", "public void setSortBy(final ProductSearchSortBy sortBy) {\r\n\t\tthis.sortBy = sortBy;\r\n\t}", "public void setSorting(final GallerySorting gallerySorting) {\n\t\t_currentSorting = gallerySorting;\r\n\t}", "public ShowsDisplayRequest setSort( ShowsSort sort )\n {\n currentSort = sort;\n setParameter( PARAM_SORT, sort.getIdentifier() );\n return this;\n }", "public QueryResultBuilder<T> applySort(Option<Sort> sort);", "public void setSortBy(java.lang.String newSortBy) {\n\t\tsortBy = newSortBy;\n\t}", "public static void setSortType(SortType sortType) {\n Employee.sortType = sortType;\n }", "public void sortBy(Comparator<Trip> cmp) {\n comparator = cmp;\n modifiedSinceLastResult = true;\n }", "public final native void setOrderBy(String orderBy) /*-{\n this.setOrderBy(orderBy);\n }-*/;", "void setOrderedQueryParameter(Query query, T value);", "void setOrderBy(DriveRequest<?> request, String orderBy);", "public void setSort(@Nullable final SortType sort) {\n mSort = sort;\n }", "@Override\r\n\tpublic void setSortProperties(List<? extends ISortProperty> sortProperties) {\n\t\t\r\n\t}", "public void setOrderBy(boolean value) {\n this.orderBy = value;\n }", "private void initialize() {\n filterSelectedField = \"-1\";\n filterCriteria = \"\";\n\n // Initialize sort with default values\n sortHelper = new SortHelper();\n try {\n sortHelper.setField(getPrimarySortedField());\n sortHelper.setAscending(primarySortedFieldAsc);\n } catch (PrimarySortedFieldNotFoundException ex) {\n java.util.logging.Logger.getLogger(AbstractCrudBean.class.getName()).log(\n Level.SEVERE,\n i18n.iValue(\"web.client.backingBean.message.Error\")\n + ex.getMessage(), ex);\n }\n }", "public void setTreeBuffer(TreeBuffer tb) {\r\n\t\t_tb = tb;\r\n\t\t_sortColumn = 0;\r\n\t\t_sortDir = TreeBuffer.SORT_ASC;\r\n\t\t_clickSortColumn = -1;\r\n\t\tif (_sortPathDir != TreeBuffer.SORT_ANY)\r\n\t\t\t_sortPathDir = TreeBuffer.SORT_ASC;\r\n\t}", "public void setIdxSearchSort(String idxSearchSort) {\n Preferences prefs = getPreferences();\n prefs.put(PROP_SEARCH_SORT, idxSearchSort);\n }", "@Required\n\tpublic void setSortDao(SortDao sortDao) {\n\t\tthis.sortDao = sortDao;\n\t}", "@Override\n\tpublic void setSorting(Object[] propertyIds, boolean[] ascending) {\n\t\t\n\t}", "public void setSort(boolean sort) {\n this.sort = sort;\n }", "public abstract void setSortKeys(List<? extends SortKey> keys);", "public void initializeSortModel()\r\n {\r\n oldSortColumnProperty = sortColumnProperty;\r\n oldAscending = !ascending; // To make sure Sort happens on first render \r\n }", "public void setSortOrder(Integer sortOrder) {\n this.sortOrder = sortOrder;\n }", "public void setSorte( final String sorte )\r\n {\r\n this.sorte = sorte;\r\n }", "public static void setOrderBy (String columnList){\n fetchAllOrderBy=columnList;\n }", "public void setSortFunction(JSFunction sortFunction) {\r\n this.sortFunction = sortFunction;\r\n }", "public SmartSorting() {\n this(DSL.name(\"smart_sorting\"), null);\n }", "public void setSort(Short sort) {\n this.sort = sort;\n }", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "public void setSortOrder(int value) {\r\n this.sortOrder = value;\r\n }", "public void setGuiSortStrategy(IDataBrowserComparator comparator)\n {\n this.lastSortStrategy = new SortStrategy(this, comparator, null);\n }", "public void setSort(org.biocatalogue.x2009.xml.rest.TagsParameters.Sort sort)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.biocatalogue.x2009.xml.rest.TagsParameters.Sort target = null;\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort)get_store().find_element_user(SORT$0, 0);\r\n if (target == null)\r\n {\r\n target = (org.biocatalogue.x2009.xml.rest.TagsParameters.Sort)get_store().add_element_user(SORT$0);\r\n }\r\n target.set(sort);\r\n }\r\n }", "public final native void setSortOrder(String sortOrder) /*-{\n this.setSortOrder(sortOrder);\n }-*/;", "public void set_sort(String column) {\n\t\tset_sort(column,\"\");\n\t}", "public void set_sort(String column, String direction) {\n\t\tif (column == null || column.equals(\"\"))\n\t\t\tsort_by = new ArrayList<SortingRule>();\n\t\telse\n\t\t\tsort_by.add(new SortingRule(column,direction));\n\t}", "public void setOrderby(String Orderby) {\n this.Orderby = Orderby;\n }", "public void setUp() {\n list = new LinkedList<Song>();\n Song song1 = new Song(\"James\", \"Rock\", 2019, \"three\");\n Song song2 = new Song(\"Jason\", \"Hip-Hop\", 2000, \"one\");\n Song song3 = new Song(\"Hayley\", \"R&B\", 2011, \"two\");\n list.add(song1);\n list.add(song2);\n list.add(song3);\n sorter = new Sorter(list);\n }", "private void sort() {\n\t\tCollections.sort(this.entities, comparator);\n\t}", "public void setSortingStatus(boolean sorted) {\n this.sorted = sorted;\n }", "@Override\n\tpublic void onToggleSort(String header) {\n\t\tsynapseClient.toggleSortOnTableQuery(this.startingQuery.getSql(), header, new AsyncCallback<String>(){\n\t\t\t@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tshowError(caught);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(String sql) {\n\t\t\t\trunSql(sql);\n\t\t\t}});\n\t}", "private void sortBy(Query query, DimensionDescriptor timeDimension, DimensionDescriptor elevationDimension) {\n final List<SortBy> clauses = new ArrayList<SortBy>();\n // TODO: Check sortBy clause is supported\n if (timeDimension != null) {\n clauses.add(new SortByImpl(FeatureUtilities.DEFAULT_FILTER_FACTORY.property(timeDimension.getStartAttribute()),\n SortOrder.DESCENDING));\n }\n if (elevationDimension != null) {\n clauses.add(new SortByImpl(FeatureUtilities.DEFAULT_FILTER_FACTORY.property(elevationDimension.getStartAttribute()),\n SortOrder.ASCENDING));\n }\n final SortBy[] sb = clauses.toArray(new SortBy[] {});\n query.setSortBy(sb);\n \n }", "protected void setSortKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableOrder(key.getTableOrder()) ;\n\t\t\t\tky.setTableDesc(key.getTableDesc()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}", "private void setSortOrder(String sortOrder){\n Log.d(LOG_TAG, \"setSortOrder()\");\n // If the user selected the MOST POPULAR sort order, then...\n if (sortOrder.equals(SORT_ORDER_MOST_POPULAR)){\n Log.d(LOG_TAG, \"#Sort Order: Most Popular\");\n // Initialize the variable.\n sortOrderCurrent = SORT_ORDER_MOST_POPULAR;\n }\n // The user selected the TOP RATED sort order, so...\n else {\n Log.d(LOG_TAG, \"#Sort Order: Top Rated\");\n // Initialize the variable.\n sortOrderCurrent = SORT_ORDER_TOP_RATED;\n }\n }", "public void setSortOrder(Boolean sortOrder) {\n this.sortOrder = sortOrder;\n }", "public void resetSortModel()\r\n {\r\n oldSortColumnProperty = sortColumnProperty;\r\n oldAscending = ascending;\r\n }", "public void sortTable() {\n\t\tlist = new TableSorter<Attribute>().sortByAttrNameTranslation(getList());\n\t\tdataProvider.flush();\n\t\tdataProvider.refresh();\n\t}", "private void sort(){\r\n\t\tCollections.sort(people,new PeopleComparator(columnSelect.getSelectedIndex(),(String)sortOrder.getSelectedItem()));\r\n\t\tpersonTableModel.fireTableDataChanged();\r\n\t}", "public void setqTypeSort(Integer qTypeSort) {\n this.qTypeSort = qTypeSort;\n }", "void setCollator(RuleBasedCollator collator)\n {\n m_collator_ = collator;\n updateInternalState();\n }", "public static void setSortCriteria(String method)\n \t{\n \t\tsortCriteria = method;\n \t}", "public void setColumnSort(ColumnSort columnSort) {\n\n this.columnSort = columnSort;\n }", "@VTID(26)\n void setSortItems(\n com.exceljava.com4j.excel.XlSlicerSort rhs);", "public SortAdapter( IModelAdapter adapter, SortKeyHandle keyHandle ) throws AdapterException\n \t{\n \t\tExpressionHandle handle = keyHandle.getExpressionProperty( SortKey.KEY_MEMBER );\n \t\tif( handle == null )\n \t\t\treturn;\n \t\tIScriptExpression expr = adapter.adaptExpression( (Expression)handle.getValue( ) );\n \t\tthis.setExpression( expr );\n\t\t/*this( keyHandle.getKey(), \n\t\t\t keyHandle.getDirection() );*/\n \t\tthis.setSortStrength( keyHandle.getStrength( ) );\n \t\tif( keyHandle.getLocale( )!= null )\n \t\t\tthis.setSortLocale( keyHandle.getLocale( ) );\n \t}", "@Override\n public void onSortByRating() {\n mSorter.sortLocationsByRating(mListLocations);\n mAdapter.notifyDataSetChanged();\n }", "@Override\r\n\tpublic void addSort() {\n\t\t\r\n\t}", "void sort(OrderBy orderBy);", "public void setSortOrder(Short sortOrder) {\n this.sortOrder = sortOrder;\n }", "public Builder setSortTime(double value) {\n \n sortTime_ = value;\n onChanged();\n return this;\n }", "public void setUseClientSorting(Boolean useClientSorting) {\r\n setAttribute(\"useClientSorting\", useClientSorting, true);\r\n }", "public void setSortnum(Integer sortnum) {\n this.sortnum = sortnum;\n }", "public void changeSortOrder();", "@Override\n public void sort() {\n\n List<Doctor> unsortedDocs = this.doctors;\n\n Collections.sort(unsortedDocs, new Comparator<Doctor>() {\n @Override\n public int compare(Doctor a, Doctor b) {\n //Compare first name for doctors and re-arrange list\n return a.getFirstName().compareTo(b.getFirstName());\n }\n });\n \n this.doctors = unsortedDocs;\n\n }", "private static void setSorted(JobConf conf) {\n conf.setBoolean(INPUT_SORT, true);\n }", "public void setOrderBy(com.sforce.soap.partner.ListViewOrderBy[] orderBy) {\r\n this.orderBy = orderBy;\r\n }", "public void setSortByFields (LSPSortByField[] sortByFields) {\r\n this.sortByFields = sortByFields;\r\n }", "public void setOrderbyid(Integer orderbyid) {\r\n this.orderbyid = orderbyid;\r\n }", "public void setSortOrder(java.math.BigInteger sortOrder)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SORTORDER$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SORTORDER$0);\n }\n target.setBigIntegerValue(sortOrder);\n }\n }", "protected void fireRowSorterChanged(int[] lastRowIndexToModel) {\n fireRowSorterChanged(new RowSorterEvent(this, RowSorterEvent.Type.SORTED, lastRowIndexToModel));\n }", "@Override\n\t\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\tupdateSortingProperty(property);\n\t\t\t\t}", "public ProductSearchSortBy getSortBy() {\r\n\t\treturn sortBy;\r\n\t}", "@Override\n public void onSortByDate() {\n mSorter.sortLocationsByDate(mListLocations);\n mAdapter.notifyDataSetChanged();\n }", "@NotNull\n EntityIterable asSortResult();", "@Override\n public void resetFilter() {\n getTableRowSorter().setRowFilter(null);\n }", "Sort asc(QueryParameter parameter);", "@Override\r\n\tpublic void setFilterQueryProvider(FilterQueryProvider filterQueryProvider) {\n\t\tsuper.setFilterQueryProvider(filterQueryProvider);\r\n\t}", "public void setSortNumber(int sortNumber) {\n this.sortNumber = sortNumber;\n }", "public void setSortIndex(Integer sortIndex) {\r\n this.sortIndex = sortIndex;\r\n }", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "public void setSortindex(Integer sortindex) {\n this.sortindex = sortindex;\n }", "public final native void setSortValues(boolean sortValues) /*-{\r\n\t\tthis.sortValues = sortValues;\r\n\t}-*/;", "public void setOrderBy(java.lang.Object[] orderBy) {\n this.orderBy = orderBy;\n }", "public void setSortConfiguration(BoxPlotSortConfiguration sortConfiguration) {\n this.sortConfiguration = sortConfiguration;\n }", "public void setTimeSort(Integer timeSort) {\n this.timeSort = timeSort;\n }", "private void sort(final OrderBy orderBy) {\n callback.orderByProperty().set(orderBy);\n\n sort();\n }", "public String getOrderby() {\n return this.Orderby;\n }" ]
[ "0.55450696", "0.5541409", "0.55271333", "0.54969853", "0.54657227", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54483044", "0.54322165", "0.5417276", "0.5372395", "0.534946", "0.52625877", "0.5154848", "0.51539487", "0.51142544", "0.5057646", "0.5056384", "0.5029025", "0.5013212", "0.49921635", "0.49545005", "0.49508506", "0.49337754", "0.49305072", "0.49223512", "0.48956257", "0.48863307", "0.4881176", "0.4878137", "0.4876381", "0.48760802", "0.48703256", "0.4867626", "0.4846586", "0.48449773", "0.48445144", "0.48426172", "0.48068187", "0.48025188", "0.47866738", "0.4783023", "0.4767714", "0.47614503", "0.47439525", "0.4738629", "0.47254556", "0.47216412", "0.4719502", "0.47159168", "0.47082406", "0.47011974", "0.47001016", "0.4682555", "0.46460465", "0.46458194", "0.46393993", "0.46281025", "0.4611819", "0.4609649", "0.45945805", "0.45854613", "0.45834637", "0.45818165", "0.45696178", "0.4569054", "0.45652786", "0.45639172", "0.45580435", "0.45352724", "0.45345008", "0.45205766", "0.45128965", "0.45054248", "0.45019564", "0.4499684", "0.44778362", "0.44548818", "0.44502243", "0.44442114", "0.44360176", "0.44190058", "0.44185343", "0.44181398", "0.44099984", "0.43969765", "0.43883327", "0.43649727", "0.43555126", "0.4351542", "0.43450513", "0.4341226", "0.4331265", "0.43239555" ]
0.7600748
0
Builds a new query based on the current configuration of the builder.
public Query buildSelectionQuery(SelectionResolver resolver) throws SelectionResolutionException { if(log.isDebugEnabled()) log.debug("Resolving SOURCE selection [" + this.sourceSelectionLabel + "] for [" + this.label + "]"); // Resolving the source selection (where we are selecting from). Selection sourceSelection = resolver.resolveSelection(this.sourceSelectionLabel); if(sourceSelection == null) throw new NoSuchElementException("Impossible to resolve source selection [" + this.sourceSelectionLabel + "] for query: " + this.label); else if(log.isDebugEnabled()) log.debug("Source selection RESOLVED [" + this.sourceSelectionLabel + "] for [" + this.label + "]"); // Update the scopes with the resolved selection (if necessary). resolver.updateScopesWithResolvedSelection(sourceSelection); // Resolve any selection referenced by stats functions. Iterator<String> referencedLabels = this.selectionLabelsReferencedByStats.iterator(); while(referencedLabels.hasNext()) { String refSelectionLabel = referencedLabels.next(); if(log.isDebugEnabled()) log.debug("Resolving REFERENCED selection [" + refSelectionLabel + "] for [" + this.label + "]"); if(resolver.resolveSelection(refSelectionLabel) == null) throw new NoSuchElementException("Impossible to resolve referenced selection [" + refSelectionLabel + "] for query: " + this.label); else if(log.isDebugEnabled()) log.debug("Referenced selection RESOLVED [" + refSelectionLabel + "] for [" + this.label + "]"); // Update the scopes with the resolved selection (if necessary). resolver.updateScopesWithResolvedSelection(sourceSelection); } return new Query(label, queryCondition, sourceSelection, variablesMap, selectionSorter, selectionLimiter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public QueryBuilder buildQueryBuilder() {\n return dao.getQueryBuilder()\n .from(dao.getEntityClass(), (joinBuilder != null ? joinBuilder.getRootAlias() : null))\n .join(joinBuilder)\n .add(queryRestrictions)\n .debug(debug)\n .audit(isAuditQuery());\n }", "public QueryOptions build() {\n return new QueryOptions(this.columns, this.excludeColumns, this.excludeAttributes, this.shards);\n }", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "public Query buildQuery(String from, String where, QueryBuilder builder){\n\t\tbuilder.from(from);\n builder.where(where);\n return builder.getQuery();\n\t}", "private QueryConfig(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "void build(ISqlClauseBuilder builder);", "public SearchQuery build() {\n this._Web_search.set_maxDepth(_maxDepth);\n this._Web_search.set_maxResults(_maxResults);\n this._Web_search.set_threshold(_threshold);\n this._Web_search.set_beamWidth(_beamWidth);\n if (heuristicSearchType == null) {\n this._Web_search.setHeuristicSearchType(Enums.HeuristicSearchType.BEST_FIRST);\n } else {\n this._Web_search.setHeuristicSearchType(heuristicSearchType);\n }\n\n return new SearchQuery(this._query, this._Web_search);\n }", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "public org.apache.drill.exec.proto.UserBitShared.QueryId.Builder getQueryIdBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getQueryIdFieldBuilder().getBuilder();\n }", "public org.apache.drill.exec.proto.UserBitShared.QueryId.Builder getQueryIdBuilder() {\n bitField0_ |= 0x00000001;\n onChanged();\n return getQueryIdFieldBuilder().getBuilder();\n }", "public Query(QueryFilterBuilder builder) {\n super(builder);\n }", "protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}", "private QueryImpl(com.google.protobuf.GeneratedMessageLite.Builder builder) {\n super(builder);\n\n }", "@Override\n public Object build() {\n return AggregationBuilders.filter(this.getName(),\n (org.opensearch.index.query.QueryBuilder)this.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build());\n }", "public WorldUps.UQuery.Builder getQueriesBuilder(\n int index) {\n return getQueriesFieldBuilder().getBuilder(index);\n }", "public abstract Query<T> buildFilter(Query<T> builder, T exampleObj);", "@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }", "public QueryBuilder()\n {\n\tlabel = null;\n\tqueryCondition = null;\n\tselectionLimiter = null;\n\tselectionSorter = null;\n\n\tvariablesMap = new HashMap<String, Expression>();\n\tselectionLabelsReferencedByStats = new HashSet<String>();\n }", "@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}", "CampusSearchQuery generateQuery();", "public interface QueryBuilder {\n QueryBuilder from();\n QueryBuilder where();\n QueryBuilder orderBy();\n QueryBuilder groupBy();\n Object execute(Object... args);\n Object execute(Tuple args);\n}", "private UQuery(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private SearchRequestBuilder createSearchBuilder(StoreURL storeURL, EsQuery esQuery) {\n SearchRequestBuilder searchBuilder = this.getClient(storeURL)\n .prepareSearch(esQuery.getGraph())\n .setQuery(RootBuilder.get(esQuery))\n .setFetchSource(true)\n .setFrom(esQuery.getPageNo())\n .setSize(esQuery.getPageSize());\n if(CollectionUtils.isNotEmpty(esQuery.getSchemas())){\n searchBuilder.setTypes(esQuery.getSchemas().toArray(new String[]{}));\n }\n this.addAggregations(esQuery, searchBuilder); // aggregation\n this.addSortFields(esQuery, searchBuilder); // sort\n this.addHighlightFields(esQuery, searchBuilder); // highlight\n return searchBuilder;\n }", "protected BooleanQuery.Builder newBooleanQuery() {\n return new BooleanQuery.Builder();\n }", "public Builder clearQuery() {\n bitField0_ = (bitField0_ & ~0x00000010);\n query_ = getDefaultInstance().getQuery();\n\n return this;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n \tprivate CriteriaQueryImpl constructSelectQuery(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal CriteriaQueryImpl q = new CriteriaQueryImpl(this.metamodel);\n \n \t\tthis.constructFrom(cb, q, tree.getChild(1));\n \n \t\tfinal Tree select = tree.getChild(0);\n \t\tfinal List<Selection<?>> selections = this.constructSelect(cb, q, select.getChild(select.getChildCount() - 1));\n \n \t\tif (selections.size() == 1) {\n \t\t\tq.select(selections.get(0));\n \t\t}\n \t\telse {\n \t\t\tq.multiselect(selections);\n \t\t}\n \n \t\tif (select.getChild(0).getType() == JpqlParser.DISTINCT) {\n \t\t\tq.distinct(true);\n \t\t}\n \n \t\tint i = 2;\n \t\twhile (true) {\n \t\t\tfinal Tree child = tree.getChild(i);\n \n \t\t\t// end of query\n \t\t\tif (child.getType() == JpqlParser.EOF) {\n \t\t\t\tbreak;\n \t\t\t}\n \n \t\t\t// where fragment\n \t\t\tif (child.getType() == JpqlParser.WHERE) {\n \t\t\t\tq.where(this.constructJunction(cb, q, child.getChild(0)));\n \t\t\t}\n \n \t\t\t// group by fragment\n \t\t\tif (child.getType() == JpqlParser.LGROUP_BY) {\n \t\t\t\tq.groupBy(this.constructGroupBy(cb, q, child));\n \t\t\t}\n \n \t\t\t// having fragment\n \t\t\tif (child.getType() == JpqlParser.HAVING) {\n \t\t\t\tq.having(this.constructJunction(cb, q, child.getChild(0)));\n \t\t\t}\n \n \t\t\t// order by fragment\n \t\t\tif (child.getType() == JpqlParser.LORDER) {\n \t\t\t\tthis.constructOrder(cb, q, child);\n \t\t\t}\n \n \t\t\ti++;\n \t\t\tcontinue;\n \t\t}\n \n \t\treturn q;\n \t}", "protected MultiPhraseQuery.Builder newMultiPhraseQueryBuilder() {\n return new MultiPhraseQuery.Builder();\n }", "public static QueryResult build() {\n return new QueryResult(ImmutableList.of());\n }", "public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }", "public WorldUps.UQuery.Builder addQueriesBuilder() {\n return getQueriesFieldBuilder().addBuilder(\n WorldUps.UQuery.getDefaultInstance());\n }", "public Query(){\n this(new MongoQueryFilter.MongoQueryFilterBuilder());\n }", "private BaseQueryImpl<?> construct(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal Tree type = tree.getChild(0);\n \t\tif (type.getType() == JpqlParser.SELECT) {\n \t\t\treturn this.constructSelectQuery(cb, tree);\n \t\t}\n \t\telse if (type.getType() == JpqlParser.DELETE) {\n \t\t\treturn this.constructDeleteQuery(cb, tree);\n \t\t}\n \t\telse {\n \t\t\treturn this.constructUpdateQuery(cb, tree);\n \t\t}\n \t}", "public Builder query(final String query) {\n this.query = query;\n return this;\n }", "protected StringBuilder generateQuery() {\n StringBuilder sb = new StringBuilder();\n sb.append(\" FROM \") \n .append(dao.getParameterClass(0).getName())\n .append(\" d WHERE (:incorrectEvent = '' OR d.incorrectEvent.id = :incorrectEvent) \")\n .append(\"AND (d.createDate BETWEEN :dateFrom AND :dateTo ) \")\n .append(\"AND ( ((:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName) \")\n .append(\" OR (:incorrectEvent ='' AND :incorrectEventName!='' AND UPPER(d.incorrectEvent.name) LIKE :incorrectEventName)) \")\n .append(\" OR (:search='' OR d.searchField LIKE :search) ) \");\n return sb;\n }", "public interface QueryResultBuilder <T>{\n\t\n\t/**\n\t * Apply the given filter to the underlying query.\n\t * \n\t * @param filter The filter to apply.\n\t * @param params Filter parameters\n\t * @return Builder for chaining\n\t */\n\tpublic QueryResultBuilder<T> applyFilter(Option<QueryFilter<T>> filter, Option<Map<String, Object>> params);\n\t\n\t/**\n\t * Apply the given filter to the underlying query.\n\t * \n\t * @param filters The filter to apply\n\t * @return Builder for chaining\n\t */\n\tpublic QueryResultBuilder<T> applyFilters(Option<Filters> filters);\n\t\n\t/**\n\t * Apply the given search to the underlying query.\n\t * \n\t * @param search The search to apply\n\t * @return Builder for chaining\n\t */\n\tpublic QueryResultBuilder<T> applySearch(Option<Search> search);\n\t\n\t/**\n\t * Set the given page for the underlying query.\n\t * \n\t * @param page The page to apply\n\t * @return Builder for chaining\n\t */\n\tpublic QueryResultBuilder<T> setPage(Option<Page> page);\n\t\n\t/**\n\t * Apply the given sort to the underlying query.\n\t * \n\t * @param sort The sort to apply\n\t * @return Builder for chaining\n\t */\n\tpublic QueryResultBuilder<T> applySort(Option<Sort> sort);\n\t\n\t/**\n\t * Get the final result\n\t * @return\n\t */\n\tpublic QueryResult<T> getResult();\n}", "String buildQuery(\n CanaryConfig canaryConfig,\n NewRelicCanaryScope canaryScope,\n NewRelicCanaryMetricSetQueryConfig queryConfig,\n NewRelicScopeConfiguration scopeConfiguration) {\n\n String[] baseScopeAttributes = new String[] {\"scope\", \"location\", \"step\"};\n\n // New Relic requires the time range to be in the query and for it to be in epoch millis or\n // some other weird timestamp that is not an ISO 8061 TS.\n // You cannot use the keys `start` and `end` here as the template engine tries to read the value\n // out\n // of the canary scope bean instead of the values you supply here and you get an ISO 8061 ts\n // instead of epoch secs.\n // Thus we add the epoch millis to the context to be available in templates as startEpochSeconds\n // and endEpochSeconds\n Map<String, String> originalParams =\n canaryScope.getExtendedScopeParams() == null\n ? new HashMap<>()\n : canaryScope.getExtendedScopeParams();\n Map<String, String> paramsWithExtraTemplateValues = new HashMap<>(originalParams);\n paramsWithExtraTemplateValues.put(\n \"startEpochSeconds\", String.valueOf(canaryScope.getStart().getEpochSecond()));\n paramsWithExtraTemplateValues.put(\n \"endEpochSeconds\", String.valueOf(canaryScope.getEnd().getEpochSecond()));\n canaryScope.setExtendedScopeParams(paramsWithExtraTemplateValues);\n\n String customFilter =\n QueryConfigUtils.expandCustomFilter(\n canaryConfig, queryConfig, canaryScope, baseScopeAttributes);\n\n return Optional.ofNullable(customFilter)\n .orElseGet(\n () -> {\n // un-mutate the extended scope params, so that the additional values we injected into\n // the map for templates don't make it into the simplified flow query.\n canaryScope.setExtendedScopeParams(originalParams);\n return buildQueryFromSelectAndQ(canaryScope, queryConfig, scopeConfiguration);\n });\n }", "public static FilterBuilder build() {\n return new FilterBuilder();\n }", "public SQLQuery _buildQuery(E event) throws SQLException, ErrorResponseException {\n withoutIdField = true;\n return buildQuery(event);\n }", "public String build() {\n\treturn prefixes.toString() + \" \\n CONSTRUCT { \" + variables.toString()\n\t\t+ \" } WHERE { \" + wheres.toString() + \" }\";\n }", "@Override\n public Object build() {\n Map<String, org.opensearch.index.query.QueryBuilder> filterMap = new HashMap<>();\n for (FilterComposite filter : this.getChildren().stream()\n .filter(child -> FilterComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (FilterComposite) child).collect(Collectors.toList())) {\n\n org.opensearch.index.query.QueryBuilder filterBuilder = (org.opensearch.index.query.QueryBuilder)filter.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build();\n filterMap.put(filter.getName(), filterBuilder);\n }\n\n FiltersAggregationBuilder filtersAggsBuilder = AggregationBuilders.filters(this.getName(),\n Stream.ofAll(filterMap.entrySet())\n .map(entry -> new FiltersAggregator.KeyedFilter(entry.getKey(), entry.getValue()))\n .toJavaArray(FiltersAggregator.KeyedFilter.class));\n\n for (Composite childComposite : this.getChildren().stream()\n .filter(child -> !FilterComposite.class.isAssignableFrom(child.getClass()) &&\n !ParamComposite.class.isAssignableFrom(child.getClass()) &&\n !HavingComposite.class.isAssignableFrom(child.getClass())).collect(Collectors.toList())) {\n\n applySubAggregationFromChild(filtersAggsBuilder, childComposite);\n }\n\n return filtersAggsBuilder;\n }", "public interface BaseQueryBuilder {\n\n /**\n * \n * 查询构建完成\n * \n * @return {@link EsdslBuilder}\n * @since JDK 1.8\n */\n EsdslBuilder queryDone();\n}", "private SearchSourceBuilder buildBaseSearchSource() {\n long histogramSearchStartTime = Math.max(0, context.start - ExtractorUtils.getHistogramIntervalMillis(context.aggs));\n\n SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder()\n .size(0)\n .query(ExtractorUtils.wrapInTimeRangeQuery(context.query, context.timeField, histogramSearchStartTime, context.end));\n\n context.aggs.getAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n context.aggs.getPipelineAggregatorFactories().forEach(searchSourceBuilder::aggregation);\n return searchSourceBuilder;\n }", "public interface GroupQueryBuilder extends QueryBuilder\n{\n /**\n * Create GroupQuery based on conditions set using other GroupQueryBuilder methods.\n * @return\n */\n GroupQuery createQuery();\n\n /**\n * Reset all query conditions\n * @return\n */\n GroupQueryBuilder reset();\n\n /**\n * Search for a Group with a given key\n *\n * @param key\n * @return\n */\n GroupQueryBuilder setKey(String key);\n\n /**\n * Search for groups with a given name and type\n * @param name\n * @param type\n * @return\n */\n GroupQueryBuilder setNameAndType(String name, String type);\n\n /**\n * Search for groups with a given name\n *\n * @param name\n * @return\n */\n GroupQueryBuilder setName(String name);\n\n /**\n * Search for groups with a given type\n * @param type\n * @return\n */\n GroupQueryBuilder setType(String type);\n\n /**\n * Search for groups that are associated with a given group\n *\n * @param group\n * @param parent\n * @return\n */\n GroupQueryBuilder addAssociatedGroup(Group group, boolean parent);\n\n /**\n * Search for groups that are associated with a given group\n *\n * @param key\n * @param parent\n * @return\n */\n GroupQueryBuilder addAssociatedGroup(String key, boolean parent);\n\n /**\n * Search for groups that are associated with a given groups\n * @param groups\n * @param parent\n * @return\n */\n GroupQueryBuilder addAssociatedGroups(Collection<Group> groups, boolean parent);\n\n /**\n * Search for groups that are associated with a given groups\n *\n * @param keys\n * @param parent\n * @return\n */\n GroupQueryBuilder addAssociatedGroupsKeys(Collection<String> keys, boolean parent);\n\n /**\n * Search for groups that are associated with a given user\n *\n * @param user\n * @return\n */\n GroupQueryBuilder addAssociatedUser(User user);\n\n /**\n * Search for groups that are associated with a given user\n *\n * @param key\n * @return\n */\n GroupQueryBuilder addAssociatedUser(String key);\n\n /**\n * Search for groups that are associated with a given users\n *\n * @param users\n * @return\n */\n GroupQueryBuilder addAssociatedUsers(Collection<User> users);\n\n /**\n * Search for groups that are associated with a given users\n *\n * @param keys\n * @return\n */\n GroupQueryBuilder addAssociatedUsersKeys(Collection<String> keys);\n\n /**\n * Search for groups that are connected with a Role with a given user\n *\n * @param user\n * @return\n */\n GroupQueryBuilder addUserConnectedByRole(User user);\n\n /**\n * Search for groups that are connected with a Role with a given user\n *\n * @param key\n * @return\n */\n GroupQueryBuilder addUserConnectedByRole(String key);\n\n /**\n * Search for groups that are connected with a Role with a given users\n *\n * @param users\n * @return\n */\n GroupQueryBuilder addUsersConnectedByRole(Collection<User> users);\n\n /**\n * Search for groups that are connected with a Role with a given users\n *\n * @param ids\n * @return\n */\n GroupQueryBuilder addUsersIdsConnectedByRole(Collection<String> ids);\n\n /**\n * Search for groups that are associated or connected with a Role with a given user\n *\n * @param user\n * @return\n */\n GroupQueryBuilder addRelatedUser(User user);\n\n /**\n * Search for groups that are associated or connected with a Role with a given user\n *\n * @param id\n * @return\n */\n GroupQueryBuilder addRelatedUser(String id);\n\n /**\n * Sort results\n *\n * @param order\n * @return\n * @throws UnsupportedQueryCriterium\n */\n GroupQueryBuilder sort(SortOrder order) throws UnsupportedQueryCriterium;\n\n /**\n * Sort by attribute name\n *\n * @param name\n * @return\n * @throws UnsupportedQueryCriterium\n */\n GroupQueryBuilder sortAttributeName(String name) throws UnsupportedQueryCriterium;\n\n /**\n * Return specified page from results\n *\n * @param firstResult\n * @param maxResults\n * @return\n * @throws UnsupportedQueryCriterium\n */\n GroupQueryBuilder page(int firstResult, int maxResults) throws UnsupportedQueryCriterium;\n\n /**\n * Filter resuts by a given attribute values. All values need to be present \n *\n * @param attributeName\n * @param attributeValue\n * @return\n * @throws UnsupportedQueryCriterium\n */\n GroupQueryBuilder attributeValuesFilter(String attributeName, String[] attributeValue) throws UnsupportedQueryCriterium;\n\n}", "public Query QueryCompiler(Logger logger, BooleanJunction<BooleanJunction> booleanQuery) {\n logger.info(\"Compiling queries into super query.\");\n Query builtQuery = booleanQuery.createQuery();\n\n return builtQuery;\n }", "public Builder addQueries(\n WorldUps.UQuery.Builder builderForValue) {\n if (queriesBuilder_ == null) {\n ensureQueriesIsMutable();\n queries_.add(builderForValue.build());\n onChanged();\n } else {\n queriesBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n \tprivate CriteriaUpdateImpl<?> constructUpdateQuery(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal CriteriaUpdateImpl<?> q = new CriteriaUpdateImpl(this.metamodel);\n \n \t\tfinal Tree updateDef = tree.getChild(0);\n \n \t\tfinal Tree aliasedDef = updateDef.getChild(0);\n \t\tfinal Aliased aliased = new Aliased(aliasedDef);\n \n \t\tfinal EntityTypeImpl entity = this.getEntity(aliased.getQualified().toString());\n \t\tfinal RootImpl<?> r = (RootImpl<?>) q.from(entity);\n \t\tthis.putAlias(q, aliasedDef, aliased, r);\n \n \t\tfinal Tree setDefs = updateDef.getChild(1);\n \t\tfor (int i = 0; i < setDefs.getChildCount(); i++) {\n \t\t\tfinal Tree setDef = setDefs.getChild(i);\n \n \t\t\tfinal BasicPath left = (BasicPath) this.getExpression(cb, q, setDef.getChild(0), null);\n \t\t\tfinal AbstractExpression right = this.getExpression(cb, q, setDef.getChild(1), left.getJavaType());\n \n \t\t\tq.set(left, right);\n \t\t}\n \n \t\tif (updateDef.getChildCount() == 3) {\n \t\t\tq.where(this.constructJunction(cb, q, updateDef.getChild(2)));\n \t\t}\n \n \t\treturn q;\n \t}", "public Builder clearQueries() {\n if (queriesBuilder_ == null) {\n queries_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000010);\n onChanged();\n } else {\n queriesBuilder_.clear();\n }\n return this;\n }", "private void updateQueryWithSpecificConditions(BuildParams buildParams, StringBuilder builder) {\n if (buildParams.isExcludeInternalDependencies()) {\n // exclude internal dependencies\n builder.append(\" where c not in (select build_modules.module_name_id from build_modules \\n\" +\n \"inner join builds on builds.build_id = build_modules.build_id\\n\" +\n \" where builds.build_number=? and builds.build_date=?)\");\n }\n }", "protected String buildQueryFromSelectAndQ(\n NewRelicCanaryScope canaryScope,\n NewRelicCanaryMetricSetQueryConfig queryConfig,\n NewRelicScopeConfiguration scopeConfiguration) {\n\n String select =\n queryConfig.getSelect().startsWith(\"SELECT\")\n ? queryConfig.getSelect()\n : \"SELECT \" + queryConfig.getSelect().trim();\n\n StringBuilder query = new StringBuilder(select);\n query.append(\" TIMESERIES \");\n\n if (canaryScope.getStep() == 0) {\n query.append(\"MAX\");\n } else {\n query.append(canaryScope.getStep());\n query.append(\" seconds\");\n }\n\n query.append(\" SINCE \");\n query.append(canaryScope.getStart().getEpochSecond());\n query.append(\" UNTIL \");\n query.append(canaryScope.getEnd().getEpochSecond());\n query.append(\" WHERE \");\n if (!StringUtils.isEmpty(queryConfig.getQ())) {\n query.append(queryConfig.getQ());\n query.append(\" AND \");\n }\n\n for (Map.Entry<String, String> extendedParam :\n canaryScope.getExtendedScopeParams().entrySet()) {\n if (extendedParam.getKey().startsWith(\"_\")) {\n continue;\n }\n query.append(extendedParam.getKey());\n query.append(\" LIKE \");\n query.append('\\'');\n query.append(extendedParam.getValue());\n query.append('\\'');\n query.append(\" AND \");\n }\n\n query.append(getScopeKey(canaryScope, scopeConfiguration));\n query.append(\" LIKE '\");\n query.append(canaryScope.getScope());\n query.append('\\'');\n\n getLocationKey(canaryScope, scopeConfiguration)\n .ifPresent(\n locationKey -> {\n query.append(\" AND \");\n query.append(locationKey);\n query.append(\" LIKE \");\n query.append('\\'');\n query.append(canaryScope.getLocation());\n query.append('\\'');\n });\n\n return query.toString();\n }", "private String buildQuery(final String projectId, final Date date,\r\n\t\t\tfinal State from, final State to) {\r\n\r\n\t\treturn from.equals(to) ? buildReflexiveStateQuery(projectId, date, from)\r\n\t\t\t\t: buildFromToStateQuery(projectId, date, from, to);\r\n\t}", "public ConditionQueryBuilder getSubqueryBuilder()\r\n\t\t{\r\n\t\t\treturn subqueryBuilder;\r\n\t\t}", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "public Query build(Type type) throws WrapperException\r\n\t{\r\n\t\tif(type == Type.SELECT)\r\n\t\t{\r\n\t\t\tZQuery query = new ZQuery();\r\n\t\t\tquery.addFrom(froms);\r\n\t\t\tquery.addSelect(selects);\r\n\t\t\tquery.addWhere(where);\r\n\t\t\tif(!orderBys.isEmpty())\r\n\t\t\t\tquery.addOrderBy(orderBys);\r\n\t\t\t\r\n\t\t\treturn new Query(query.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.UPDATE)\r\n\t\t{\r\n\t\t\tZUpdate update = new ZUpdate(imperativeTable.getName());\r\n\t\t\tupdate.addWhere(where);\r\n\t\t\tupdate.addSet(columnValues);\r\n\t\t\treturn new Query(update.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.DELETE)\r\n\t\t{\r\n\t\t\tZDelete delete = new ZDelete(imperativeTable.getName());\r\n\t\t\tdelete.addWhere(where);\r\n\t\t\t\r\n\t\t\treturn new Query(delete.toString(), model);\r\n\t\t}\r\n\t\telse if(type == Type.INSERT)\r\n\t\t{\r\n\t\t\tZInsert insert = new ZInsert(imperativeTable.getName());\r\n\t\t\t\r\n\t\t\tVector<String> columns = new Vector<String>();\r\n\t\t\tZExpression values = new ZExpression(\",\");\r\n\t\t\tfor(String columnName : columnValues.keySet())\r\n\t\t\t{\r\n\t\t\t\tcolumns.addElement(columnName);\r\n\t\t\t\tvalues.addOperand(columnValues.get(columnName));\r\n\t\t\t}\r\n\t\t\tinsert.addColumns(columns);\r\n\t\t\tinsert.addValueSpec(values);\r\n\t\t\t\t\t\t\r\n\t\t\treturn new Query(insert.toString(), model);\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "SelectQuery createSelectQuery();", "public Builder clearQueryVisibility() {\n bitField0_ = (bitField0_ & ~0x00000020);\n queryVisibility_ = getDefaultInstance().getQueryVisibility();\n\n return this;\n }", "public void buildQuery() {\n\t\tif (constraints.propertyNodes.isEmpty()) {\n\t\t\tconstraints.propertyNodes.add(new AssertStmt(new IntLiteral(1)));\n\t\t}\n\t\t\n\t\tStringBuilder query = new StringBuilder();\n\t\tquery.append(\"(set-logic QF_BV)\\n\");\n\t\t\n\t\tquery.append(\"(define-fun tobv32 ((p Bool)) (_ BitVec 32) (ite p (_ bv1 32) (_ bv0 32)))\\n\");\n\t\tquery.append(\"(define-fun tobool ((p (_ BitVec 32))) Bool (not (= p (_ bv0 32))))\\n\");\n\t\t// Defined more functions above (for convenience), as needed.\n\t\t\n\t\tfor (String varName : constraints.variableNames) {\n\t\t\tquery.append(\"(declare-fun \" + varName + \" () (_ BitVec 32))\\n\");\n\t\t}\n\t\tfor (int i = 0; i < constraints.propertyNodes.size(); ++i) {\n\t\t\tquery.append(\"(declare-fun \" + propName(i) + \" () Bool)\\n\");\n\t\t}\n\t\tfor (AssignStmt stmt : constraints.transitionNodes) {\n\t\t\tquery.append(\"(assert (= \" + stmt.getLhs().getName() + \" \" +\n\t\t\t\t\texprConverter.visit(stmt.getRhs()) + \"))\\n\");\n\t\t}\n\t\tfor (int i = 0; i < constraints.propertyNodes.size(); ++i) {\n\t\t\tAssertStmt stmt = constraints.propertyNodes.get(i);\n\t\t\tif (stmt.isHoudini())\n\t\t\t\thoudiniConditions.add(i);\n\t\t\tif (stmt.isUnwinding())\n\t\t\t\tunwindingConditions.add(propName(i));\n\t\t\t\n \t\t\tString assertionQuery = \"(not (tobool \" + exprConverter.visit(stmt.getCondition()) + \"))\";\n\t\t\tquery.append(\"(assert (= \" + propName(i) + \" \" + assertionQuery + \"))\\n\");\n\t\t}\n\t\tquery.append(\"(assert (or\" + getAllProps() + \"))\\n\");\n\t\t\n\t\tquery.append(\"\\n(check-sat)\\n\");\n\t\t// append all unwinding conditions\n\t\tquery.append(\"(get-value (\" + getAllProps() + \" ))\\n\");\n\t\t\n\t\tqueryString = query.toString();\n\t}", "public String buildSearchQuery() throws Exception\r\n { \r\n String query;\r\n \r\n searchContext.setText(getSearchString());\r\n \r\n if(!locations.isEmpty())\r\n {\r\n searchContext.setLocations(locations);\r\n }\r\n\r\n if (ext != null) {\r\n for (AdvancedSearchOptions option : ext.getAdvOptionsExtensions()) {\r\n option.setSearchParam(searchContext);\r\n }\r\n }\r\n \r\n // we always want to exclude CAT ignore & hidden rendition aspects\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_IGNORE);\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_HIDDEN_RENDITION);\r\n\r\n // we always want to exclude thumbnail types\r\n searchContext.addTypeToExclude(VeloConstants.TYPE_THUMBNAIL);\r\n \r\n query = searchContext.buildQuery(2);\r\n logger.debug(\"AdvancedSearchQuery:\" + query);\r\n \r\n return query;\r\n \r\n }", "private RealmQuery buildRealmQuery(Realm realm, Class myClass) {\n RealmQuery query = RealmQuery.createQuery(realm, myClass);\n return query;\n }", "AggregationBuilder buildAggregation();", "private void generateQuery() {\n\t\tString edgeType = \"\";\n\n\t\tif (isUnionTraversal || isTraversal || isWhereTraversal) {\n\t\t\tString previousNode = prevsNode;\n\t\t\tif (isUnionTraversal) {\n\t\t\t\tpreviousNode = unionMap.get(unionKey);\n\t\t\t\tisUnionTraversal = false;\n\t\t\t}\n\n\t\t\tEdgeRuleQuery edgeRuleQuery = new EdgeRuleQuery.Builder(previousNode, currentNode).build();\n\t\t\tEdgeRule edgeRule = null;\n\n\t\t\ttry {\n\t\t\t\tedgeRule = edgeRules.getRule(edgeRuleQuery);\n\t\t\t} catch (EdgeRuleNotFoundException | AmbiguousRuleChoiceException e) {\n\t\t\t}\n\n\t\t\tif (edgeRule == null) {\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t} else if (\"none\".equalsIgnoreCase(edgeRule.getContains())){\n\t\t\t\tedgeType = \"EdgeType.COUSIN\";\n\t\t\t}else {\n\t\t\t\tedgeType = \"EdgeType.TREE\";\n\t\t\t}\n\n\t\t\tquery += \".createEdgeTraversal(\" + edgeType + \", '\" + previousNode + \"','\" + currentNode + \"')\";\n\n\t\t}\n\n\t\telse\n\t\t\tquery += \".getVerticesByProperty('aai-node-type', '\" + currentNode + \"')\";\n\t}", "public Builder clearWhereClause() {\n\n whereClause_ = getDefaultInstance().getWhereClause();\n onChanged();\n return this;\n }", "public static QueryInterface createQuery() {\n return new XmlQuery();\n }", "public Query advancedQuery() \n {\n return null;\n }", "private Request build() {\n Request.Builder builder =\n new Request.Builder().cacheControl(new CacheControl.Builder().noCache().build());\n\n HttpUrl.Builder urlBuilder = HttpUrl.parse(url).newBuilder();\n for (Map.Entry<String, String> entry : queryParams.entrySet()) {\n urlBuilder = urlBuilder.addEncodedQueryParameter(entry.getKey(), entry.getValue());\n }\n builder = builder.url(urlBuilder.build());\n\n for (Map.Entry<String, String> entry : headers.entrySet()) {\n builder = builder.header(entry.getKey(), entry.getValue());\n }\n\n RequestBody body = (bodyBuilder == null) ? null : bodyBuilder.build();\n builder = builder.method(method.name(), body);\n\n return builder.build();\n }", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }", "public entities.Torrent.SearchRequest.Builder getSearchRequestBuilder() {\n\n onChanged();\n return getSearchRequestFieldBuilder().getBuilder();\n }", "Query createQuery(final String query);", "@SuppressWarnings(\"rawtypes\")\n\tprivate void buildQuery(SearchRequestBuilder searchReq, List<TableRelation> relations,\n\t QueryBuilder query, AggregationBuilder aggregation, List<OrderBy> orderings,\n\t int limit, boolean useCache, boolean requestScore) {\n\t\tString[] types = new String[relations.size()];\n\t\tfor(int i=0; i<relations.size(); i++) types[i] = relations.get(i).getTable(); \n\t\tSearchRequestBuilder req = searchReq.setTypes(types);\n\t\t\n\t\t// add filters and aggregations\n\t\tif(aggregation != null){\n\t\t\t// when aggregating the query must be a query and not a filter\n\t\t\tif(query != null)\treq.setQuery(query);\n\t\t\treq.addAggregation(aggregation);\n\t\t\t\n\t\t// ordering does not work on aggregations (has to be done in client)\n\t\t}else if(query != null){\n\t\t\tif(requestScore) req.setQuery(query); // use query instead of filter to get a score\n\t\t\telse req.setPostFilter(query);\n\t\t\t\n\t\t\t// add order\n\t\t\tfor(OrderBy ob : orderings){\n\t\t\t\treq.addSort(ob.getField(), ob.getOrder());\n\t\t\t}\n\t\t} else req.setQuery(QueryBuilders.matchAllQuery());\n\t\t\n\t\tint fetchSize = Utils.getIntProp(props, Utils.PROP_FETCH_SIZE, 10000);\n\t\t// add limit and determine to use scroll\n\t\tif(aggregation != null) {\n\t\t\treq = req.setSize(0);\n\t\t} else if(determineLimit(limit) > 0 && determineLimit(limit) < fetchSize){\n\t\t\treq.setSize(determineLimit(limit) );\n\t\t} else if (orderings.isEmpty()){ // scrolling does not work well with sort\n\t\t\treq.setSize(fetchSize); \n\t\t\treq.addSort(\"_doc\", SortOrder.ASC);\n\t\t\treq.setScroll(new TimeValue(Utils.getIntProp(props, Utils.PROP_SCROLL_TIMEOUT_SEC, 60)*1000));\n\t\t}\n\t\t\n\t\t// use query cache when this was indicated in FROM clause\n\t\tif(useCache) req.setRequestCache(true);\n\t\treq.setTimeout(TimeValue.timeValueMillis(Utils.getIntProp(props, Utils.PROP_QUERY_TIMEOUT_MS, 10000)));\n\t}", "public ContainsBuilder(DataBaseConnection dataBaseConnection) {\n super(dataBaseConnection);\n selectBuilder = new SelectBuilder(dataBaseConnection);\n }", "@Override\n\tpublic Query createQuery(CriteriaUpdate updateQuery) {\n\t\treturn null;\n\t}", "public String toQuery() {\n // determine ordering\n String ordering = \"\";\n if (ratingFirst) {\n ordering += \"ORDER BY rating\" + (ratingDescend ? \" DESC, \" : \", \") +\n (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\");\n } else {\n ordering += \"ORDER BY \" + (nameDescend ? \"make DESC, model DESC, year DESC\" : \"make, model, year\")\n + \", rating\" + (ratingDescend ? \" DESC\" : \"\");\n }\n\n // determine pagination offsets\n String pagination = \"\";\n if (pageNumber > 1) {\n pagination += \"\\nLIMIT 100\\nOFFSET \" + (convertToBase() - 1) * 100 + \";\";\n }\n\n return query + ordering + pagination;\n }", "static DbQuery createValueQuery() {\n DbQuery query = new DbQuery();\n query.order = OrderBy.VALUE;\n return query;\n }", "private QueryReconnectReq(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private QueryProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private String buildQuery(String ... sql) {\n\t\tfinal StringBuffer sb = new StringBuffer();\n\t\t\n\t\tfor (String s : sql) {\n\t\t\tsb.append(ParsingUtil.QUERY + \" \" + s + \"\\n\");\n\t\t}\n\t\t\n\t\treturn sb.toString(); \n\t}", "public JpqlQuery(EntityManagerFactoryImpl entityManagerFactory, CriteriaBuilderImpl cb, NamedQueryMetadata metadata) {\n \t\tthis(entityManagerFactory, metadata.getQuery(), cb);\n \n \t\tthis.lastUsed = Long.MAX_VALUE;\n \n \t\t// force sql compilation\n \t\tthis.q.getSql();\n \n \t\tthis.lockMode = metadata.getLockMode();\n \t\tif (metadata.getHints().size() > 0) {\n \t\t\tthis.hints = Maps.newHashMap();\n \t\t\tthis.hints.putAll(metadata.getHints());\n \t\t}\n \n \t\tentityManagerFactory.addNamedQuery(metadata.getName(), this);\n \t}", "public Builder addQueries(\n int index, WorldUps.UQuery.Builder builderForValue) {\n if (queriesBuilder_ == null) {\n ensureQueriesIsMutable();\n queries_.add(index, builderForValue.build());\n onChanged();\n } else {\n queriesBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public Builder() {\n\t\t}", "public Builder() { }", "private Quat(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private GetDatabaseRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "protected String buildDataQuery() {\n StringBuilder sql = new StringBuilder(\"select\");\n String delim = \" \";\n for (String vname : getColumnNames()) {\n sql.append(delim).append(vname);\n delim = \", \";\n }\n \n Element ncElement = getNetcdfElement();\n \n String table = ncElement.getAttributeValue(\"dbTable\");\n if (table == null) {\n String msg = \"No database table defined. Must set 'dbTable' attribute.\";\n _logger.error(msg);\n throw new TSSException(msg);\n }\n sql.append(\" from \" + table);\n \n String predicate = ncElement.getAttributeValue(\"predicate\");\n if (predicate != null) sql.append(\" where \" + predicate);\n \n //Order by time.\n String tname = getTimeVarName();\n sql.append(\" order by \"+tname+\" ASC\");\n \n return sql.toString();\n }" ]
[ "0.78497106", "0.7767496", "0.7522502", "0.72714865", "0.6823172", "0.67454636", "0.6728924", "0.65993994", "0.65700215", "0.65700215", "0.65192986", "0.6475855", "0.63733995", "0.6338121", "0.6251722", "0.6249504", "0.62315786", "0.6195236", "0.6169297", "0.615444", "0.614408", "0.6119609", "0.6101747", "0.605773", "0.6008792", "0.60001075", "0.5999925", "0.59901047", "0.5986995", "0.5980543", "0.59590864", "0.59317917", "0.5921173", "0.5894839", "0.58837205", "0.5803814", "0.57967764", "0.579661", "0.5776594", "0.57753634", "0.57516265", "0.5743609", "0.57237405", "0.571725", "0.56919456", "0.56912273", "0.56690276", "0.5651297", "0.56412625", "0.563836", "0.5599405", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.55937797", "0.5561884", "0.5543726", "0.5542952", "0.5538015", "0.55274194", "0.55239695", "0.5520259", "0.55048764", "0.5502367", "0.54955655", "0.54816216", "0.5477128", "0.5440845", "0.54271805", "0.54221296", "0.5421491", "0.54089403", "0.54064745", "0.53991026", "0.53976995", "0.53674966", "0.53346425", "0.5321827", "0.5321013", "0.530943", "0.53063905", "0.53058165", "0.52967817", "0.52943283", "0.5285933" ]
0.0
-1
On va lire le fichier Json
public DataRepository() throws IOException { this.init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)obj;\n\n Long age = (Long)jsonObj.get(\"age\");\n System.out.println(\"age:\"+age);\n\n String name = (String)jsonObj.get(\"name\");\n System.out.println(\"name:\" + name);\n\n JSONArray address = (JSONArray)jsonObj.get(\"address\");\n\n for(Object str : address){\n System.out.println(str);\n }\n\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return 1;\n }", "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n catch (Exception ex)\n {\n Log.e(\"ivan\", \"Error al escribir fichero a memoria interna\");\n }\n finally\n {\n try {\n if(escritor!=null)\n escritor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n }", "private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }", "private static JSONObject fileReader(String path) throws Exception{\r\n return (JSONObject) jsonParser.parse(new String(Files.readAllBytes(Paths.get(path))));\r\n }", "@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}", "private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }", "@Override\n public String toString() {return \"Json-File Reader\";}", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}", "private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }", "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public static String getFileType() {return \"json\";}", "private String readJsonFile(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n byte bufferByte[] = new byte[1024];\n int length;\n try {\n while ((length = inputStream.read(bufferByte)) != -1) {\n outputStream.write(bufferByte, 0, length);\n }\n outputStream.close();\n inputStream.close();\n } catch (IOException e) {\n\n }\n return outputStream.toString();\n }", "public String fileToString(String file){\n String path = new File(\"./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json\").getAbsolutePath();\n File fileObj = new File(path);\n Log.d(\"Reading JSON file\", \"File exists: \" + fileObj.exists());\n Log.d(\"Reading JSON file\", \"File is directory: \" + fileObj.isDirectory());\n Log.d(\"Reading JSON file\", \"File can read: \" + fileObj.canRead());\n Log.d(\"Reading JSON file\", \"Current directory: \" + path);\n Log.d(\"Reading JSON file\", \"The path is: \" + file);\n try(Scanner in = new Scanner(new File(file))){\n StringBuilder sb = new StringBuilder();\n while(in.hasNextLine()){\n sb.append(in.nextLine());\n sb.append('\\n');\n }\n in.close();\n\n return sb.toString();\n }\n catch (FileNotFoundException ex){\n ex.printStackTrace();\n }\n return null;\n }", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "public static void readFile(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (Reader reader = new FileReader(filename)) {\n JSONObject jo = (JSONObject) jsonParser.parse(reader);\n\n SHORT_PERIOD = (int) (long) jo.get(\"shortPeriod\");\n LONG_PERIOD = (int) (long) jo.get(\"longPeriod\");\n AVG_AMOUNT_PERIOD = (int) (long) jo.get(\"avgAmountPeriod\");\n SESSION_INTERVAL = (int) (long) jo.get(\"sessionInterval\");\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void fromFile(final String file) {\n // Model会关心文件路径,所以这里需要这个操作\n this.jsonFile = file;\n final JsonObject data = Ut.ioJObject(this.jsonFile);\n this.fromJson(data);\n }", "String getJson();", "String getJson();", "String getJson();", "@SuppressWarnings(\"unchecked\")\n\tprivate void ucitajRestorane(String contextPath) {\n\t\tFileWriter fileWriter = null;\n\t\tBufferedReader in = null;\n\t\tFile file = null;\n\t\ttry {\n\t\t\tfile = new File(contextPath + \"/data/restorani.txt\");\n\t\t\tin = new BufferedReader(new FileReader(file));\n\n\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\tobjectMapper.setVisibilityChecker(\n\t\t\t\t\tVisibilityChecker.Std.defaultInstance().withFieldVisibility(JsonAutoDetect.Visibility.ANY));\n\t\t\tTypeFactory factory = TypeFactory.defaultInstance();\n\t\t\tMapType type = factory.constructMapType(HashMap.class, String.class, Restoran.class);\n\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\trestorani = ((HashMap<Integer, Restoran>) objectMapper.readValue(file, type));\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t\tfileWriter = new FileWriter(file);\n\t\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\t\tobjectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);\n\t\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\t\tString stringRestaurants = objectMapper.writeValueAsString(restorani);\n\t\t\t\tfileWriter.write(stringRestaurants);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tif (fileWriter != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\ttry {\n\t\t\t\t\tin.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String readJsonFile(String fileName)\n {\n FileInputStream fileInputStream = null;\n String text;\n StringBuilder stringBuilder = new StringBuilder();\n\n try\n {\n fileInputStream = mainContext.openFileInput(fileName);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while((text = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(text).append(\"\\n\");\n }\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n }\n\n return stringBuilder.toString();\n }", "@Override\n public Object loadFromJson(Context context) {\n Gson gson = new Gson();\n String json = FileManager.getInstance().loadFromFile(getFileName(), context);\n if(json.equals(\"\")) {\n return null;\n }\n\n return gson.fromJson(json, MatchStorage.class);\n\n }", "public JSONArray readFromJSON(){\n\n JSONArray jsonArray=null;\n\n try {\n InputStream inputStream =context.getResources().getAssets().open(FILE_NAME);\n int size = inputStream.available();\n byte[] data = new byte[size];\n inputStream.read(data);\n inputStream.close();\n String json = new String(data, \"UTF-8\");\n jsonArray = new JSONArray(json);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonArray;\n }", "public static String readJsonObject(String filename) {\r\n\t\tBufferedReader br = null;\r\n\t\tFileReader fr = null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString sCurrentLine;\r\n\t\ttry {\r\n\r\n\t\t\tfr = new FileReader(filename);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(sCurrentLine);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "public String getJson()\n {\n String json=null;\n try\n {\n // Opening cities.json file\n InputStream is = getAssets().open(\"cities.json\");\n // is there any content in the file\n int size = is.available();\n byte[] buffer = new byte[size];\n // read values in the byte array\n is.read(buffer);\n // close the stream --- very important\n is.close();\n // convert byte to string\n json = new String(buffer, \"UTF-8\");\n }\n catch (IOException ex)\n {\n ex.printStackTrace();\n return json;\n }\n return json;\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "public void ReadJson() {\n System.out.println(\"Read Json Method in the Mother Class\");\n }", "String getJSON();", "private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }", "public static HashMap<String,String> read_json_file(String filepath){\n HashMap<String,String> map = new HashMap<String,String>();\n try{\n BufferedReader bufferedReader = new BufferedReader(new FileReader(filepath));\n Gson gson = new Gson();\n Object json = gson.fromJson(bufferedReader, Object.class);\n map = new Gson().fromJson(\n json.toString(), new TypeToken<HashMap<String, String>>() {}.getType()\n );\n } catch (FileNotFoundException e ) {\n e.printStackTrace();\n }\n return map;\n }", "public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}", "public static String loadJSONFromAsset(Context context,String filePath) {\n String json = null;\n try {\n InputStream is = context.getAssets().open(filePath);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, ENCODING);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "public static JSONArray parsedFile() {\n JSONParser parser = new JSONParser();\n try {\n String filePath = new File(\"\").getAbsolutePath();\n if (!filePath.substring(filePath.length()-3, filePath.length()).equals(\"src\")) {\n filePath = filePath.concat(\"/src\");\n }\n filePath = filePath.concat(\"/cardData/data.json\");\n FileReader file = new FileReader(filePath);\n Object parsedFile = parser.parse(file);\n return (JSONArray) parsedFile;\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(0);\n } catch (ParseException p) {\n System.out.println(\"Caught a Parsing Exception\" + p.getMessage());\n p.printStackTrace();\n System.exit(0);\n }\n return null;\n }", "public Tamagotchi read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return tamagotchiToJson(jsonObject);\n }", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static Quote[] readFromJson(String filename) throws IOException {\n File file = new File(filename);\n file.createNewFile();\n Gson read = new Gson();\n InputStream inStream = new FileInputStream(filename);\n BufferedReader buffer = new BufferedReader(new InputStreamReader(inStream));\n Quote[] quotes = read.fromJson(buffer, Quote[].class);\n buffer.close();\n return quotes;\n }", "public static JsonObject fileToJson(File jsonFile) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();\n JsonObject jsonObject = null;\n\n try {\n Reader reader = new FileReader(jsonFile);\n jsonObject = gson.fromJson(reader, JsonObject.class);\n } catch (FileNotFoundException e) {\n //log.error(\"FileNotFound Exception occurred when converting JSON file to JSON Object\", e); //todo: FileNotFound exception occured. error message?\n e.printStackTrace();\n }\n\n return jsonObject;\n }", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\n }\n }", "public String loadJSONFromAsset() {\n String json;\n try {\n InputStream is = getAssets().open(\"track_v0649.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public void init() {\n\n mJokes = new ArrayList<>();\n\n StringBuilder sBuilder = new StringBuilder();\n\n try {\n\n InputStream in = getClass().getResourceAsStream(\"/jokes.json\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(in));\n\n String mLine = reader.readLine();\n while (mLine != null) {\n //process line\n sBuilder.append(mLine);\n mLine = reader.readLine();\n }\n\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n String jsonString = sBuilder.toString();\n\n if( jsonString != null ){\n\n JsonParser parser = new JsonParser();\n JsonObject jsonObject = parser.parse(jsonString).getAsJsonObject();\n\n JsonArray jokesArray = jsonObject.getAsJsonArray(\"jokes\");\n\n for (JsonElement element : jokesArray) {\n String joke = element.getAsJsonObject().get(\"joke\").getAsString();\n mJokes.add(joke);\n }\n }\n\n }", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "public String loadJSONFromAsset(Context context) {\n json = null;\n try {\n InputStream is = getApplicationContext().getAssets().open(\"techdrop.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "@GetMapping(\"/getJson\")\r\n\tpublic HashMap<String, Object> getJsonValue() throws IOException {\n\r\n\t\tHashMap<String, Object> globalVariable = null;\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tString path = \"rules/backUp.json\";\r\n\r\n\t\tResourceLoader resource = new DefaultResourceLoader();\r\n\t\torg.springframework.core.io.Resource resource2 = resource.getResource(\"classpath:\" + path);\r\n\r\n\t\tReader reader = new InputStreamReader(resource2.getInputStream());\r\n\t\tSystem.out.println(\"reader ouput \" + reader.toString());\r\n\t\tString fileData = FileCopyUtils.copyToString(reader);\r\n\t\tSystem.out.println(\" filedate is \" + fileData);\r\n\r\n\t\tTypeReference<HashMap<String, Object>> typeRef = new TypeReference<HashMap<String, Object>>() {\r\n\t\t};\r\n\t\tHashMap<String, Object> readValue = mapper.readValue(fileData, typeRef);\r\n\t\treturn readValue;\r\n\t}", "public static void loadPracticeListFromFile() {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"src/practiceList.json\")) {\n // Read JSON file\n Object object = jsonParser.parse(reader);\n\n //Iterate over word list array\n JSONArray wordList = (JSONArray) object;\n for (Object o : wordList) {\n\n JSONObject next = (JSONObject) o;\n String extra = \"\";\n\n if (((String) next.get(\"wordType\")).equalsIgnoreCase(\"verb\")) {\n extra = \"to \";\n }\n\n Word loadedWord = new Word(extra + next.get(\"english\"), (String) next.get(\"welsh\"), (String) next.get(\"wordType\"));\n\n addIntoPracticedWords(loadedWord);\n }\n\n } catch (ParseException | IOException e) {\n System.out.println(\"PracticeList file not found, will be created on exit.\");\n }\n }", "public static LinkedTreeMap<String, Object> importJsonData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n LinkedTreeMap<String, Object> fileData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( writer.toString(),\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n Gson gson = new Gson();\n\n // convert the file JSON into a list of objects\n fileData = gson.fromJson( reader,\n new TypeToken<LinkedTreeMap<String, Object>>(){}.getType() );\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::importJsonData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::importJsonData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return fileData;\n }", "public static String getFilenameExtension() {return \"json\";}", "public String readJsonResponse(String filePath){\n\t\tBufferedReader br = null;\n\t\tString jsonString=\"\";\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(filePath));\n\t\t\tString line=\"\";\n\t\t\twhile((line = br.readLine()) != null){\n\t\t\t\tjsonString += line +\"\\n\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treportObj.AddDataToTestReport(\"Exception in readJsonResponse. \"+e.getMessage(), false);\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(br != null){\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn jsonString;\n\t}", "private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }", "public static JSONObject loadMOTD() {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n \n if (!JSONFile.exists()){\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json was not found in the config directory. Attempting to create a blank file.\");\n boolean worked = saveMOTD(new JSONObject());\n if (worked) Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json created!\");\n else Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"JawaToolBox was unable to generate the blank motd.json. This is likely a permissions problem.\");\n return new JSONObject();\n }\n\n try {\n String source = new String(Files.readAllBytes(Paths.get(JSONFile.toURI())));\n return new JSONObject(source);\n } catch (FileNotFoundException ex) {\n return new JSONObject();\n } catch (IOException ex) {\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, \"Something went wrong JawaToolBox wasn't able to read the motd.json. Check directory permissions.\");\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return new JSONObject();\n }\n }", "public String readJson() {\n\t\t\tif (lastReadChar == ']') {\n\t\t\t\tSystem.out.println(\"Nunca deberia llegar a aca si usa hasNext()\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Si fue una coma, busco el siguiente '{'\n\t\t\twhile (read()!= '{');\n\t\t\t\n\t\t\tStringBuilder jsonText = new StringBuilder();\n\t\t\tjsonText.append((char) '{');\n\t\t\tlastReadChar = read();\n\t\t\t\n\t\t\twhile (lastReadChar != '}') { \n\t\t\t\tjsonText.append((char) lastReadChar);\n\t\t\t\tlastReadChar = read();\n\t\t\t} jsonText.append('}');\n\t\t\t\n\t\t\t// To satisfy Invariant: find the next ']' or ','\n\t\t\twhile (lastReadChar != ']' && lastReadChar != ',') lastReadChar = read(); \n\t\t\t\n\t\t\t//System.out.println(\"Analizando : \" + jsonText.toString());\n\t\t\treturn jsonText.toString();\n\t\t}", "public String loadJSONFromAsset(Context context) {\n String json = null;\n try {\n InputStream is;\n int id = context.getResources().getIdentifier(\"sentiment\", \"raw\", context.getPackageName());\n is = context.getResources().openRawResource(id);\n\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "public static List<DataItem> importFromJSON(Context context){\n FileReader reader = null;\n File file = new File(Environment.getExternalStorageDirectory(), FILE_NAME);\n\n try {\n //Instantiate FileReader with file\n reader = new FileReader(file);\n //Populate DataItems class and return result\n Gson gson = new Gson();\n DataItems dataItems = gson.fromJson(reader, DataItems.class);\n return dataItems.getDataItems();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }finally {\n if (reader != null) {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return null;\n }", "public JSONObject reader_File(JSONObject obj)\n {\n CSVReader reader = null;\n try\n {\n\n String path = obj.get(\"path\").toString(); //retrieve path of file from json obj\n JSONObject json = (JSONObject)obj.get(\"query\"); //retrieve json object that has query from json obj\n\n reader = new CSVReader(new FileReader(path), ',');\n\n String [] nextLine;\n\n //Read one line at a time\n JSONObject json3 = new JSONObject();\n\n //need to use JSONArray\n JSONArray jArr = new JSONArray(); //create an object of JSONArray\n while ((nextLine = reader.readNext()) != null)\n {\n\n JSONObject json2 = search(json, nextLine); //return json object that contains all the value of each lines if query matches\n\n if(!json2.isEmpty()){ //check whether json2 is empty\n jArr.add(json2); //insert json2 in in jsonArray\n\n }\n\n }\n json3.put(\"response\", jArr); //insert jArr in json3\n return json3;\n\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n finally {\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }", "public JSONObject LoadJson(String filename) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tnew FileInputStream(filename), \"UTF-8\"));\n\t\t\tStringBuffer buffer = new StringBuffer(1024);\n\t\t\tString line;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tbuffer.append(line);\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\treturn new JSONObject(buffer.toString());\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to open file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t} catch (JSONException e) {\n\t\t\tSystem.err.format(\"[Error]Failed to parse json file %s!\", filename);\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private JSONObject importFlowJSON (Path pathToFolder) {\n // Create a JSONParser to parse the content of the file\n JSONParser parser = new JSONParser();\n\n // The JSONObject instance that will be returned\n JSONObject flow;\n\n try{\n // Read and parse the json file\n flow = (JSONObject) parser.parse(new FileReader(pathToFolder.toString() + \"/\" + FLOW_FILE_NAME));\n // If the file has been found and parsed we return it as a JSONObject\n return flow;\n } catch (ParseException | IOException e) {\n // If the file hasn't been found we return null\n e.printStackTrace();\n return null;\n }\n }", "private void parseJsonFeed(JSONObject response,String file) {\n\t\ttry { \n\t\t\t\tjsonObjSend = new JSONObject(response.toString()); \n\t\t\t\t if((jsonObjSend.getBoolean(Reponse.retourVerifUser))&&(!file.equals(\"\")))\n\t\t\t\t {\n\t\t\t\t\t//Toast.makeText(getBaseContext(), \"\"+jsonObjSend.getString(Reponse.retour), Toast.LENGTH_LONG).show();\n\n\t\t\t\t\t file_path=file;\n\t\t\t\t\t\tThread thread = new Thread(entityRunnable);\n\t\t thread.start();\n\t\t\t\t } \n\t\t\t\t publication.setText(\"\");\n imageview.setImageResource(R.drawable.icone_ajout);\t\n\t\t\t\t\tToast.makeText(getBaseContext(), \"\"+jsonObjSend.getString(Reponse.retour), Toast.LENGTH_LONG).show();\n\n\t\t\t\t\t envoyer.setEnabled(true);\n\t\t\thideProgressDialog(); \n\t\t} catch (JSONException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\r\n\t\tJsonParser parser = Json.createParser(new FileReader(JSON_FILE_NAME));\r\n\t\t\r\n\t\t// parse the file\r\n\t\twhile (parser.hasNext()) {\r\n\t\t\tJsonParser.Event event = parser.next();\r\n\t\t\tif (event.equals(JsonParser.Event.KEY_NAME)) {\r\n\t\t\t\tString key = parser.getString();\r\n\t\t\t\tparser.next();\r\n\t\t\t\tString value = parser.getString();\r\n\t\t\t\tSystem.out.printf(\">> %s: %s\\n\", key, value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}", "public JsonReader(String file) {\n this.file = file;\n }", "private void downloadJSON() {\n new downloadJsonAsync().execute(Urls.GET_TAGS, Urls.GET_REST);\n }", "public static JsonObject getTestVectors(String filename) throws \n IOException {\n InputStream is = JsonUtil.class.getClassLoader().getResourceAsStream(filename);\n JsonReader reader = new JsonReader(new InputStreamReader(is, UTF_8));\n JsonElement elem = JsonParser.parseReader(reader);\n return elem.getAsJsonObject();\n }", "public String getJson();", "@Override\n public int importRegionFromJsonFile(String path) {\n ObjectMapper mapper = new ObjectMapper();\n int length = 0;\n try {\n // Convert JSON string from file to Object\n List<Region> regions = mapper.readValue(new File(path), new TypeReference<List<Region>>(){});\n for(Region region: regions){\n regionRepository.save(region);\n }\n length = regions.size();\n } catch (JsonGenerationException e) {\n e.printStackTrace();\n } catch (JsonMappingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return length;\n }", "private static void initJSONData(String filename, List<JSONObject> list) {\n\n\t\ttry {\n\t\t\t// init transactions list\n\t\t\tString transactionsContent = FileUtils.readFileToString(new File(filename), \"UTF-8\");\n\n\t\t\tJSONArray jArray = (JSONArray) new JSONTokener(transactionsContent).nextValue();\n\t\t\tfor (int i = 0; i < jArray.length(); i++) {\n\t\t\t\tlist.add((JSONObject) jArray.get(i));\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private static ConfigImpl loadJson(Path path) throws IOException {\n final ConfigImpl ret;\n try (FileInputStream stream = new FileInputStream(path.toFile())) {\n try (InputStreamReader reader = new InputStreamReader(stream, UTF_8)) {\n ret = loadJson(reader);\n }\n }\n return ret;\n }", "public static void jsonWrite() \n\t{\n JSONArray arrJson = new JSONArray(); \n FileWriter writeFile = null;\n Iterator<Taxi_Model> taxiIterator = L.iterator();\n\n while(taxiIterator.hasNext()) \n {\n \tJSONObject jsonObject = new JSONObject();\n \tTaxi_Model aux = new Taxi_Model();\n \taux = taxiIterator.next();\n \tJSONArray array = new JSONArray();\n \tarray.add(aux.getLocalizacao()[0]);\n \tarray.add(aux.getLocalizacao()[1]);\n \t\n \t//Armazena dados em um Objeto JSON\n \tjsonObject.put(\"Usuario\", aux.getUsuario());\n jsonObject.put(\"Nome\", aux.getNome());\n jsonObject.put(\"Senha\", aux.getSenha());\n jsonObject.put(\"CPF\", aux.getCpf());\n jsonObject.put(\"Cor do Carro\", aux.getCorCarro());\n jsonObject.put(\"Modelo do Carro\", aux.getModeloCarro());\n jsonObject.put(\"Placa do Carro\", aux.getPlaca());\n jsonObject.put(\"Localizacao\", array);\n jsonObject.put(\"Pontuacao\", aux.getPontuacao());\n jsonObject.put(\"Corridas\", aux.getTotalCorridas());\n jsonObject.put(\"Tempo total\", aux.getTempoTotal());\n jsonObject.put(\"Tempo programado\", aux.getTempoProgramada());\n arrJson.add(jsonObject);\n }\n \n try\n {\n writeFile = new FileWriter(\"taxis.json\");\n //Escreve no arquivo conteudo do Objeto JSON\n writeFile.write(arrJson.toJSONString());\n writeFile.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\t}", "@SuppressWarnings(\"unused\")\n public AppCMSPageUI getDataFromFile(String fileName) {\n StringBuilder buf = new StringBuilder();\n try {\n InputStream json = currentActivity.getAssets().open(fileName);\n BufferedReader in =\n new BufferedReader(new InputStreamReader(json, \"UTF-8\"));\n String str;\n\n while ((str = in.readLine()) != null) {\n buf.append(str);\n }\n\n in.close();\n } catch (Exception e) {\n //Log.e(TAG, \"Error getting data from file: \" + e.getMessage());\n }\n\n Gson gson = new Gson();\n\n return gson.fromJson(buf.toString().trim(), AppCMSPageUI.class);\n }", "private static void loadJsonFile() throws FileNotFoundException {\n Log.println(Log.INFO, \"FileAccessing\", \"Loading settings file.\");\n StringBuilder stringBuilder = new StringBuilder();\n InputStreamReader inputStreamReader = new InputStreamReader(context.openFileInput(\"settingDetails.json\"), StandardCharsets.UTF_8);\n try (BufferedReader reader = new BufferedReader(inputStreamReader)) {\n String line = reader.readLine();\n while (line != null) {\n stringBuilder.append(line).append('\\n');\n line = reader.readLine();\n }\n } catch (IOException e) {\n Log.println(Log.ERROR, \"FileAccessing\", \"Settings file reading error.\");\n throw new FileNotFoundException();\n }\n if (stringBuilder.toString().equals(\"\")) {\n Log.println(Log.INFO, \"FileAccessing\", \"Settings file does not exist.\");\n throw new FileNotFoundException();\n }\n\n Gson gson = new Gson();\n JsonObject jsonObject = gson.fromJson(stringBuilder.toString(), JsonObject.class);\n if (jsonObject == null) {\n throw new FileNotFoundException();\n }\n JsonArray mappingControls = (JsonArray) jsonObject.get(\"mappingControls\");\n\n TaskDetail.actionToTask.clear();\n for (JsonElement o : mappingControls) {\n JsonObject individualMapping = (JsonObject) o;\n byte combinedAction = individualMapping.get(\"combinedAction\").getAsByte();\n int outerControl = individualMapping.get(\"task\").getAsInt();\n TaskDetail.actionToTask.put(combinedAction, TaskDetail.taskDetails.get(outerControl));\n }\n\n int setting = 0;\n JsonArray generalSettings = (JsonArray) jsonObject.get(\"generalSettings\");\n for (JsonElement o : generalSettings) {\n JsonObject individualSetting = (JsonObject) o;\n int status = individualSetting.get(\"status\").getAsInt();\n SettingDetail.settingDetails.get(setting++).changeSetting(status);\n }\n\n DeviceDetail.deviceDetails.clear();\n JsonArray deviceList = (JsonArray) jsonObject.get(\"devices\");\n for (JsonElement o : deviceList) {\n JsonObject individualDevice = (JsonObject) o;\n String deviceName = individualDevice.get(\"name\").getAsString();\n String deviceMac = individualDevice.get(\"mac\").getAsString();\n DeviceDetail.deviceDetails.add(new DeviceDetail(deviceMac, deviceName));\n }\n\n SensitivitySetting.sensitivitySettings.clear();\n JsonArray sensitivityList = (JsonArray) jsonObject.get(\"sensitivities\");\n for (JsonElement o : sensitivityList) {\n JsonObject individualSensitivity = (JsonObject) o;\n int multiplicativeFactor = individualSensitivity.get(\"factor\").getAsInt();\n int sensitivity = individualSensitivity.get(\"sensitivity\").getAsInt();\n SensitivitySetting.sensitivitySettings.add(new SensitivitySetting(multiplicativeFactor, sensitivity));\n }\n\n int currentDevice = jsonObject.get(\"currentlySelected\").getAsInt();\n DeviceDetail.setIndexSelected(currentDevice);\n\n updateAllSetting(false);\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"playerData.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public void getCityJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"cities.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"cities\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n City cityData = new City();\n\n cityData.setCityId(Integer.parseInt(cit.getString(\"id\")));\n cityData.setCityName(cit.getString(\"name\"));\n cityData.setStateId(Integer.parseInt(cit.getString(\"state_id\")));\n cityObject.add(cityData);\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static void generarFicheroJSON(App aplicacion) throws IOException {\n\n ObjectMapper mapeador = new ObjectMapper();\n\n mapeador.configure(SerializationFeature.INDENT_OUTPUT, true);\n\n // Escribe en un fichero JSON el objeto que le pasamos\n mapeador.writeValue(new File(\"./aplicaciones/\" + aplicacion.getNombre() + \".json\"), aplicacion);\n\n }", "private static void jsonWriter(JSONObject bookList) throws Exception{\r\n FileWriter file = new FileWriter(\"libreria.json\");\r\n file.write(bookList.toJSONString());\r\n file.flush();\r\n }", "public void readInventoryMainJsonFile() throws IOException, ParseException {\n\n\t\t// Providing read-only access to JSON data.\n\t\tJSONParser parser = new JSONParser();\n\n\t\t// Reading the external JSON file.\n\t\tFileReader reader = new FileReader(\".\\\\resources\\\\InventoryMain.json\");\n\n\t\t// Creating main object to store JSONParser, JSONObject and JSONArray.\n\t\tObject inventoryMain = parser.parse(reader);\n\n\t\t// Parsing object to JSONObject from InventoryMain.json file.\n\t\tJSONObject inventoryObj = (JSONObject) inventoryMain;\n\n\t\t// Getting the arrays of JSON file.\n\t\tJSONArray riceArray = (JSONArray) inventoryObj.get(\"Rice\");\n\t\tJSONArray pulseArray = (JSONArray) inventoryObj.get(\"Pulses\");\n\t\tJSONArray wheatArray = (JSONArray) inventoryObj.get(\"Wheat\");\n\n\t\t// Getting details of rice.\n\t\tSystem.out.println(\"Details of Rice are: \");\n\t\tfor (int i = 0; i < riceArray.size(); i++) {\n\t\t\tJSONObject riceDetails = (JSONObject) riceArray.get(i);\n\n\t\t\tString name = (String) riceDetails.get(\"name\");\n\t\t\tlong weight = (long) riceDetails.get(\"weight\");\n\t\t\tlong price = (long) riceDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of rice.\n\t\t\tlong ricePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + riceDetails.get(\"name\") + \" is \" + ricePrice);\n\n\t\t}\n\n\t\t// Getting details of Pulse.\n\t\tSystem.out.println(\"\\nDetails of Pulse are: \");\n\t\tfor (int j = 0; j < pulseArray.size(); j++) {\n\t\t\tJSONObject pulseDetails = (JSONObject) pulseArray.get(j);\n\n\t\t\tString name = (String) pulseDetails.get(\"name\");\n\t\t\tlong weight = (long) pulseDetails.get(\"weight\");\n\t\t\tlong price = (long) pulseDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\n\t\t\t// Calculating price of different types of Pulses.\n\t\t\tlong pulsePrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + pulseDetails.get(\"name\") + \" is \" + pulsePrice);\n\n\t\t}\n\t\t// Getting details of Wheat.\n\t\tSystem.out.println(\"\\nDetails of Wheat are: \");\n\t\tfor (int i = 0; i < wheatArray.size(); i++) {\n\t\t\tJSONObject wheatDetails = (JSONObject) wheatArray.get(i);\n\n\t\t\tString name = (String) wheatDetails.get(\"name\");\n\t\t\tlong weight = (long) wheatDetails.get(\"weight\");\n\t\t\tlong price = (long) wheatDetails.get(\"price\");\n\n\t\t\tSystem.out.println(\"\\nName: \" + name);\n\t\t\tSystem.out.println(\"Weight: \" + weight);\n\t\t\tSystem.out.println(\"Price per KG is: \" + price);\n\t\t\t// Calculating price of different types of Wheat.\n\t\t\tlong wheatPrice = weight * price;\n\t\t\tSystem.out.println(\"\\nTotal price of \" + wheatDetails.get(\"name\") + \" is \" + wheatPrice);\n\n\t\t}\n\n\t}", "public String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"election-county-2012.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "private JSON() {\n\t}", "private void loadFromFile() {\n try {\n FileInputStream fis = openFileInput(FILENAME);\n BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Sub>>(){}.getType();\n subList = gson.fromJson(in, listType);\n\n } catch (FileNotFoundException e) {\n subList = new ArrayList<Sub>();\n }\n }", "<T> T readJson(FsPath path, Class<T> clazz);", "public void load(){\n // Recover docIDs\n try(Reader reader = new FileReader(\"postings/docIDs.json\")){\n this.docIDs = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, String>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/docLengths.json\")){\n this.docLengths = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try(Reader reader = new FileReader(\"postings/titleToNumber.json\")){\n this.titleToNumber = (new Gson()).fromJson(reader,\n new TypeToken<Map<String, Integer>>(){}.getType());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static JsonReader readJSONFromAsset(Context context) throws IOException {\n AssetManager assetManager = context.getAssets();\n JsonReader reader;\n try {\n reader = new JsonReader(new InputStreamReader(assetManager.open(\"questionlist.json\")));\n } finally {\n\n }\n return reader;\n }", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void loadDia() throws JSONException {\n\n\n String json = \"{\\n\" +\n \" \\\"mes\\\": 10,\\n\" +\n \" \\\"ano\\\": 2017,\\n\" +\n \" \\\"dias\\\":[\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":1,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"asd\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$4050,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdsaf\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$50,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"2a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 2,\\n\" +\n \" \\\"sinal\\\": 2,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"1b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":13,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 3,\\n\" +\n \" \\\"sinal\\\": 3,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"13a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 4,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"13b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":16,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 5,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"16a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":18,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 6,\\n\" +\n \" \\\"sinal\\\": 4,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 7,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 8,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2000,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n\n\n //Toast.makeText(getApplicationContext(), \"certo\",Toast.LENGTH_LONG).show();\n }", "public String toJSon() {\n File jsonFile = new File(context.getFilesDir(), \"data.json\");\n String previousJson = null;\n if (jsonFile.exists()) {\n previousJson = readFromFile(jsonFile);\n } else {\n previousJson = \"{}\";\n }\n\n // create new \"complex\" object\n JSONObject mO = null;\n try {\n mO = new JSONObject(previousJson);\n\n JSONArray arr;\n if (!mO.has(getIntent().getStringExtra(\"date\"))) {\n arr = new JSONArray();\n }\n else{\n arr = mO.getJSONArray(getIntent().getStringExtra(\"date\"));\n }\n JSONObject jo = new JSONObject();\n jo.put(\"title\", titleField.getText().toString());\n jo.put(\"minute\", minute);\n jo.put(\"hour\", hour);\n jo.put(\"description\", descriptionField.getText().toString());\n jo.put(\"location\", locationField.getText().toString());\n\n arr.put(jo);\n\n mO.put(getIntent().getStringExtra(\"date\"), arr);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // generate string from the object\n String jsonString = null;\n try {\n jsonString = mO.toString(4);\n return jsonString;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n\n }", "public static List<User> getUserFromJson(String filename){\n \tString s = readJsonFile(filename);\n \tList<User> users = JSONObject.parseArray(s, User.class);\n \treturn users;\n }" ]
[ "0.70525455", "0.70312405", "0.7001609", "0.683884", "0.6826393", "0.6823993", "0.6819573", "0.681854", "0.6809285", "0.68010944", "0.67570823", "0.66947603", "0.66760087", "0.6597922", "0.65481234", "0.6542778", "0.6506653", "0.6485498", "0.6478553", "0.6440432", "0.643277", "0.64294404", "0.641905", "0.64028823", "0.63827336", "0.63587767", "0.63587767", "0.63587767", "0.63475317", "0.6339345", "0.6337003", "0.633337", "0.6324084", "0.6302182", "0.6293785", "0.626135", "0.62612325", "0.62466854", "0.62191397", "0.6217732", "0.62108046", "0.62086475", "0.6208586", "0.61899877", "0.6186712", "0.618545", "0.6177527", "0.61622864", "0.6157245", "0.6156951", "0.61496794", "0.61416805", "0.6132697", "0.6132541", "0.6130409", "0.61210966", "0.6112497", "0.61124367", "0.6109829", "0.6101181", "0.6100614", "0.6074323", "0.6071231", "0.6068672", "0.6063187", "0.6054448", "0.60464185", "0.60321355", "0.60113484", "0.59880227", "0.5987781", "0.5985503", "0.5975423", "0.59676164", "0.59598434", "0.59595454", "0.5953426", "0.59515256", "0.59509563", "0.59414184", "0.5939197", "0.5932157", "0.5922425", "0.59204096", "0.59153", "0.59147197", "0.59118086", "0.5909845", "0.5909287", "0.58937204", "0.5893285", "0.5889101", "0.58796746", "0.5876457", "0.58733773", "0.5869929", "0.5869565", "0.58586", "0.5850335", "0.5849485", "0.5843085" ]
0.0
-1
Ecriture sur fichier json
public void commit() { if (commit) { // Récupérer le path du JSON System.out.println(ClassLoader.getSystemResource(jsonFile)); URL url = ClassLoader.getSystemResource(jsonFile); // On ouvre un flux d'écriture vers le fichier JSON try (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) { // Ecriture du fichier JSON avec formatage // (WithDefaultPrettyPrinter) objectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database); logger.info("OK - fichier JSON mis à jour " + jsonFile); } catch (FileNotFoundException e) { logger.info("KO - FILE_NOT_FOUND" + jsonFile); throw new DataRepositoryException("KO - FILE_NOT_FOUND", e); } catch (IOException e) { logger.info("KO - I/O ERROR" + jsonFile); throw new DataRepositoryException("KO - I/O ERROR", e); } catch (URISyntaxException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void guardarEnJSON () {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String s = gson.toJson(this);\n try {\n FileWriter fw = new FileWriter(\"files/graph.json\");\n fw.write(s);\n fw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void escribirFichero(String textoenjson){\n {\n OutputStreamWriter escritor=null;\n try\n {\n escritor=new OutputStreamWriter(openFileOutput(\"datos.json\", Context.MODE_PRIVATE));\n escritor.write(textoenjson);\n }\n catch (Exception ex)\n {\n Log.e(\"ivan\", \"Error al escribir fichero a memoria interna\");\n }\n finally\n {\n try {\n if(escritor!=null)\n escritor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n }", "public String leerArchivoJSON() {\n String contenido = \"\";\n FileReader entradaBytes;\n try {\n entradaBytes = new FileReader(new File(ruta));\n BufferedReader lector = new BufferedReader(entradaBytes);\n String linea;\n try {\n while ((linea = lector.readLine()) != null) {\n contenido += linea;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (entradaBytes != null) {\n entradaBytes.close();\n }\n if (lector != null) {\n lector.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n } catch (FileNotFoundException ex) {\n Logger.getLogger(GenerarIsla.class.getName()).log(Level.SEVERE, null, ex);\n }\n return contenido;\n }", "@Override\n public String toString() {return \"Json-File Reader\";}", "public static String getFileType() {return \"json\";}", "String getJson();", "String getJson();", "String getJson();", "public void exportAsJsonFile(String path) throws IOException {\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n String json = gson.toJson(this);\n\n FileWriter writer = new FileWriter(path);\n writer.write(json);\n writer.close();\n }", "public Integer loadJSONFile()\n {\n JSONParser parser = new JSONParser();\n try{\n\n Object obj = parser.parse(new FileReader(\"/Users/rnuka/Desktop/sample.json\"));\n JSONObject jsonObj = (JSONObject)obj;\n\n Long age = (Long)jsonObj.get(\"age\");\n System.out.println(\"age:\"+age);\n\n String name = (String)jsonObj.get(\"name\");\n System.out.println(\"name:\" + name);\n\n JSONArray address = (JSONArray)jsonObj.get(\"address\");\n\n for(Object str : address){\n System.out.println(str);\n }\n\n\n\n }catch(Exception e){\n e.printStackTrace();\n }\n return 1;\n }", "String getJSON();", "String toJson() throws IOException;", "public String getJson();", "private void writeToFile() {\n try {\n FileOutputStream fos = new FileOutputStream(f);\n String toWrite = myJSON.toString(4);\n byte[] b = toWrite.getBytes();\n fos.write(b);\n fos.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private JSONObject readJSONFile(Path path) throws ExtensionManagementException {\n\n if (Files.exists(path) && Files.isRegularFile(path)) {\n try {\n String jsonString = FileUtils.readFileToString(path.toFile(), UTF8);\n return new JSONObject(jsonString);\n } catch (JSONException e) {\n throw new ExtensionManagementException(\"Error while parsing JSON file: \" + path, e);\n } catch (IOException e) {\n throw new ExtensionManagementException(\"Error while reading JSON file: \" + path, e);\n }\n } else {\n throw new ExtensionManagementException(\"JSON file not found: \" + path);\n }\n }", "private static void exportJsonFile(File configFile) {\n Gson gson = new Gson();\n \n // Java object to JSON, and assign to a String\n String jsonInString = gson.toJson(GameConfig.getInstance());\n \n try {\n FileWriter writer = new FileWriter(configFile);\n \n writer.append(jsonInString);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n LogUtils.error(\"exportJsonFile => \",e);\n }\n }", "public void saveJSON(String fileName, Object o){\n // System.err.println(\"accessing disk\");\n Gson gson = new Gson();\n try(FileWriter writer = new FileWriter(fileName)){\n gson.toJson(o, writer);\n //System.err.println(\"\\n Token stored\");\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static JsonObject readJSON(String path) {\n\n\t\tString fileContents = \"\";\n\t\tBufferedReader reader = null;\n\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(path));\n\t\t} catch (FileNotFoundException e) {\n\t\t\tfail(ErrorMessage.inputFileNotFoundError);\n\t\t}\n\n\t\tString line;\n\n\t\ttry {\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tfileContents += line;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.readFileError);\n\t\t}\n\n\t\ttry {\n\t\t\treader.close();\n\t\t} catch (IOException e) {\n\t\t\tfail(ErrorMessage.closeFileError);\n\t\t}\n\n\t\tJsonObject jsonLicense = Json.createReader(new StringReader(fileContents)).readObject();\n\n\t\treturn jsonLicense;\n\t}", "public String parseJSON(){\r\n String json = null;\r\n try{\r\n InputStream istream = context.getAssets().open(\"restaurantopeninghours.json\");\r\n int size = istream.available();\r\n byte[] buffer = new byte[size];\r\n istream.read(buffer);\r\n istream.close();\r\n json = new String(buffer, \"UTF-8\");\r\n }catch (IOException ex){\r\n ex.printStackTrace();\r\n return null;\r\n }\r\n return json;\r\n }", "public String loadJSONFromAsset() {\n String json = null;\n try {\n json = new String(buffer, \"UTF-8\");\n } catch (UnsupportedEncodingException e1) {\n e1.printStackTrace();\n }\n\n return json;\n }", "private String loadJSONFromAsset(){\n String json = null;\n AssetManager assetManager = getAssets();\n try{\n InputStream IS = assetManager.open(\"datosFases.json\");\n int size = IS.available();\n byte[] buffer = new byte[size];\n IS.read(buffer);\n IS.close();\n json = new String(buffer,\"UTF-8\");\n\n } catch (IOException ex){\n ex.printStackTrace();\n return null;\n }\n\n return json;\n }", "@Test\n\tpublic void readJSONFromFile() {\n\t\t\n\t\tJsonPath jsonFile = new JsonPath(new File (\"C:\\\\Users\\\\cmlzd\\\\Desktop\\\\employees.json\"));\n\t\t\n\t\tSystem.out.println(jsonFile.getString(\"items.email\"));\n\t\t\n\t\t\n\t}", "private JSON() {\n\t}", "public static String getFilenameExtension() {return \"json\";}", "public static void generarFicheroJSON(App aplicacion) throws IOException {\n\n ObjectMapper mapeador = new ObjectMapper();\n\n mapeador.configure(SerializationFeature.INDENT_OUTPUT, true);\n\n // Escribe en un fichero JSON el objeto que le pasamos\n mapeador.writeValue(new File(\"./aplicaciones/\" + aplicacion.getNombre() + \".json\"), aplicacion);\n\n }", "private void read() {\n\n\t\t\t\tString road=getActivity().getFilesDir().getAbsolutePath()+\"product\"+\".txt\";\n\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(road); \n\t\t\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\t\t\tint length = fis.available(); \n\t\t\t\t\tbyte [] buffer = new byte[length]; \n\t\t\t\t\tfis.read(buffer); \n\t\t\t\t\tString res1 = EncodingUtils.getString(buffer, \"UTF-8\"); \n\t\t\t\t\tfis.close(); \n\t\t\t\t\tjson(res1.toString());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t}", "private String readJsonFile(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n byte bufferByte[] = new byte[1024];\n int length;\n try {\n while ((length = inputStream.read(bufferByte)) != -1) {\n outputStream.write(bufferByte, 0, length);\n }\n outputStream.close();\n inputStream.close();\n } catch (IOException e) {\n\n }\n return outputStream.toString();\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void ucitajRestorane(String contextPath) {\n\t\tFileWriter fileWriter = null;\n\t\tBufferedReader in = null;\n\t\tFile file = null;\n\t\ttry {\n\t\t\tfile = new File(contextPath + \"/data/restorani.txt\");\n\t\t\tin = new BufferedReader(new FileReader(file));\n\n\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\tobjectMapper.setVisibilityChecker(\n\t\t\t\t\tVisibilityChecker.Std.defaultInstance().withFieldVisibility(JsonAutoDetect.Visibility.ANY));\n\t\t\tTypeFactory factory = TypeFactory.defaultInstance();\n\t\t\tMapType type = factory.constructMapType(HashMap.class, String.class, Restoran.class);\n\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\trestorani = ((HashMap<Integer, Restoran>) objectMapper.readValue(file, type));\n\t\t} catch (FileNotFoundException fnfe) {\n\t\t\ttry {\n\t\t\t\tfile.createNewFile();\n\t\t\t\tfileWriter = new FileWriter(file);\n\t\t\t\tObjectMapper objectMapper = new ObjectMapper();\n\t\t\t\tobjectMapper.configure(SerializationFeature.INDENT_OUTPUT, true);\n\t\t\t\tobjectMapper.getFactory().configure(JsonGenerator.Feature.ESCAPE_NON_ASCII, true);\n\t\t\t\tString stringRestaurants = objectMapper.writeValueAsString(restorani);\n\t\t\t\tfileWriter.write(stringRestaurants);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\tif (fileWriter != null) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfileWriter.close();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (in != null) {\n\t\t\t\ttry {\n\t\t\t\t\tin.close();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private JsonObject loadJSONFile(String jsonFilePath) throws IOException {\r\n\tInputStream is = new FileInputStream(jsonFilePath);\r\n\tJsonReader jsonReader = Json.createReader(is);\r\n\tJsonObject json = jsonReader.readObject();\r\n\tjsonReader.close();\r\n\tis.close();\r\n\treturn json;\r\n }", "private static void jsonWriter(JSONObject bookList) throws Exception{\r\n FileWriter file = new FileWriter(\"libreria.json\");\r\n file.write(bookList.toJSONString());\r\n file.flush();\r\n }", "public static void jsonWrite() \n\t{\n JSONArray arrJson = new JSONArray(); \n FileWriter writeFile = null;\n Iterator<Taxi_Model> taxiIterator = L.iterator();\n\n while(taxiIterator.hasNext()) \n {\n \tJSONObject jsonObject = new JSONObject();\n \tTaxi_Model aux = new Taxi_Model();\n \taux = taxiIterator.next();\n \tJSONArray array = new JSONArray();\n \tarray.add(aux.getLocalizacao()[0]);\n \tarray.add(aux.getLocalizacao()[1]);\n \t\n \t//Armazena dados em um Objeto JSON\n \tjsonObject.put(\"Usuario\", aux.getUsuario());\n jsonObject.put(\"Nome\", aux.getNome());\n jsonObject.put(\"Senha\", aux.getSenha());\n jsonObject.put(\"CPF\", aux.getCpf());\n jsonObject.put(\"Cor do Carro\", aux.getCorCarro());\n jsonObject.put(\"Modelo do Carro\", aux.getModeloCarro());\n jsonObject.put(\"Placa do Carro\", aux.getPlaca());\n jsonObject.put(\"Localizacao\", array);\n jsonObject.put(\"Pontuacao\", aux.getPontuacao());\n jsonObject.put(\"Corridas\", aux.getTotalCorridas());\n jsonObject.put(\"Tempo total\", aux.getTempoTotal());\n jsonObject.put(\"Tempo programado\", aux.getTempoProgramada());\n arrJson.add(jsonObject);\n }\n \n try\n {\n writeFile = new FileWriter(\"taxis.json\");\n //Escreve no arquivo conteudo do Objeto JSON\n writeFile.write(arrJson.toJSONString());\n writeFile.close();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\t}", "public String getJson()\n {\n String json=null;\n try\n {\n // Opening cities.json file\n InputStream is = getAssets().open(\"cities.json\");\n // is there any content in the file\n int size = is.available();\n byte[] buffer = new byte[size];\n // read values in the byte array\n is.read(buffer);\n // close the stream --- very important\n is.close();\n // convert byte to string\n json = new String(buffer, \"UTF-8\");\n }\n catch (IOException ex)\n {\n ex.printStackTrace();\n return json;\n }\n return json;\n }", "public String loadJSONFromAsset() {\n String json;\n String file = \"assets/words.json\";\n\n try {\n InputStream is = this.getClass().getClassLoader().getResourceAsStream(file);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }", "public void ReadJson() {\n System.out.println(\"Read Json Method in the Mother Class\");\n }", "private static JSONObject fileReader(String path) throws Exception{\r\n return (JSONObject) jsonParser.parse(new String(Files.readAllBytes(Paths.get(path))));\r\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n //AssetManager assetManager = getAssets();\n InputStream is = getAssets().open(\"sa.json\");\n //InputStream is = getResources().openRawResource(\"sa.json\");\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n Log.i(\"Json\",json);\n\n\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "private JSONObject getAssetJson(String filename) {\n return new JSONObject(\n resourceHandler.getResourceFileAsString(ResourceHandler.VALORANT_BASE_PATH + \"Data/\" + filename)\n );\n }", "public JSONObject getJSONFromFile() throws IOException\n\t{\n\t\tInputStream is = context.getResources().openRawResource(R.raw.schedule);\n\t\tWriter writer = new StringWriter();\n\t\tchar[] buffer = new char[1024];\n\t\ttry {\n\t\t Reader reader = new BufferedReader(new InputStreamReader(is, \"UTF-8\"));\n\t\t int n;\n\t\t while ((n = reader.read(buffer)) != -1) {\n\t\t writer.write(buffer, 0, n);\n\t\t }\n\t\t} finally {\n\t\t is.close();\n\t\t}\n\n\t\tString jsonString = writer.toString();\n\t\tJSONObject jObj=null;\n\t\t\n\t\t// try parse the string to a JSON object\n\t\ttry {\n\t\t\tjObj = new JSONObject(jsonString);\n\t\t} catch (JSONException e) {\n\t\t\tLog.e(\"JSON Parser\", \"Error parsing data \" + e.toString());\n\t\t}\n\t\t\t\n\t\treturn jObj;\n\t\t// return JSON String\n\n\t}", "@GetMapping(\"/getJson\")\r\n\tpublic HashMap<String, Object> getJsonValue() throws IOException {\n\r\n\t\tHashMap<String, Object> globalVariable = null;\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tString path = \"rules/backUp.json\";\r\n\r\n\t\tResourceLoader resource = new DefaultResourceLoader();\r\n\t\torg.springframework.core.io.Resource resource2 = resource.getResource(\"classpath:\" + path);\r\n\r\n\t\tReader reader = new InputStreamReader(resource2.getInputStream());\r\n\t\tSystem.out.println(\"reader ouput \" + reader.toString());\r\n\t\tString fileData = FileCopyUtils.copyToString(reader);\r\n\t\tSystem.out.println(\" filedate is \" + fileData);\r\n\r\n\t\tTypeReference<HashMap<String, Object>> typeRef = new TypeReference<HashMap<String, Object>>() {\r\n\t\t};\r\n\t\tHashMap<String, Object> readValue = mapper.readValue(fileData, typeRef);\r\n\t\treturn readValue;\r\n\t}", "public static void initialize() {\r\n\t\tjson = new JSONFile(filePath);\t\r\n\t}", "String toJSON();", "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"src//main//resources\"+\"//\"+fileName);\n Reader reader = new InputStreamReader(new FileInputStream(jsonFile),\"utf-8\");\n int ch = 0;\n StringBuffer sb = new StringBuffer();\n while((ch = reader.read())!=-1){\n sb.append((char) ch);\n }\n reader.close();\n jsonStr = sb.toString();\n return jsonStr;\n\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String readJson() {\n\t\t\tif (lastReadChar == ']') {\n\t\t\t\tSystem.out.println(\"Nunca deberia llegar a aca si usa hasNext()\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Si fue una coma, busco el siguiente '{'\n\t\t\twhile (read()!= '{');\n\t\t\t\n\t\t\tStringBuilder jsonText = new StringBuilder();\n\t\t\tjsonText.append((char) '{');\n\t\t\tlastReadChar = read();\n\t\t\t\n\t\t\twhile (lastReadChar != '}') { \n\t\t\t\tjsonText.append((char) lastReadChar);\n\t\t\t\tlastReadChar = read();\n\t\t\t} jsonText.append('}');\n\t\t\t\n\t\t\t// To satisfy Invariant: find the next ']' or ','\n\t\t\twhile (lastReadChar != ']' && lastReadChar != ',') lastReadChar = read(); \n\t\t\t\n\t\t\t//System.out.println(\"Analizando : \" + jsonText.toString());\n\t\t\treturn jsonText.toString();\n\t\t}", "public String toJSon() {\n File jsonFile = new File(context.getFilesDir(), \"data.json\");\n String previousJson = null;\n if (jsonFile.exists()) {\n previousJson = readFromFile(jsonFile);\n } else {\n previousJson = \"{}\";\n }\n\n // create new \"complex\" object\n JSONObject mO = null;\n try {\n mO = new JSONObject(previousJson);\n\n JSONArray arr;\n if (!mO.has(getIntent().getStringExtra(\"date\"))) {\n arr = new JSONArray();\n }\n else{\n arr = mO.getJSONArray(getIntent().getStringExtra(\"date\"));\n }\n JSONObject jo = new JSONObject();\n jo.put(\"title\", titleField.getText().toString());\n jo.put(\"minute\", minute);\n jo.put(\"hour\", hour);\n jo.put(\"description\", descriptionField.getText().toString());\n jo.put(\"location\", locationField.getText().toString());\n\n arr.put(jo);\n\n mO.put(getIntent().getStringExtra(\"date\"), arr);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // generate string from the object\n String jsonString = null;\n try {\n jsonString = mO.toString(4);\n return jsonString;\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return null;\n\n }", "@Override\n public void updateServiceJson(){\n synchronized (lockUpdateServiceJson) {\n try (PrintWriter printer = new PrintWriter(\"Database/Movies.json\")) {\n GsonBuilder gsonBuilder = new GsonBuilder();\n gsonBuilder.setLongSerializationPolicy(LongSerializationPolicy.STRING);\n Gson writer = gsonBuilder.create();\n JsonObject jsonObject = new JsonObject();\n jsonObject.add(\"movies\", writer.toJsonTree(movieList));\n printer.print(jsonObject);\n } catch (IOException ex) {\n }\n }\n }", "public Tamagotchi read() throws IOException {\n String jsonData = readFile(source);\n JSONObject jsonObject = new JSONObject(jsonData);\n return tamagotchiToJson(jsonObject);\n }", "private void loadJSON() throws FileNotFoundException\n\t{\n\n\t\tGsonBuilder builder= new GsonBuilder();\n\t\tGson gson = builder.create();\n\t\t\t\t\n\t\t//get a list of folders in the data directory\n\t\t\n\t\tFile[] directories = new File(\"data\").listFiles();\n\n\t\t//Loop through folders in data directory\n\t\tfor(File folder : directories)\n\t\t\t{\n\t\t\t\t//get a list of files inside the folder\n\t\t\t\tFile[] jsonItems = new File(folder.toString()).listFiles();\n\t\t\t\t\n\t\t\t\t//Loop through files inside the folder \n\t\t\t\tfor(File file : jsonItems)\n\t\t\t\t{\n\t\t\t\t\t//Store in directory map... substring to remove the \"data/\" portion... placed by filename to foldername\n\t\t\t\t\tString dir = file.toString().substring(5);\n\t\t\t\t\t\n\t\t\t\t\t//Generate player data from gson\n\t\t\t\t\tJsonReader reader = new JsonReader(new FileReader(file));\n\t\t\t\t\tPlayer player = gson.fromJson(reader, Player.class);\n\t\t\t\t\t\n\t\t\t\t\t//Store it in the map tied to it's directory\n\t\t\t\t\tplayerData.put(dir, player);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public static JSONObject loadMOTD() {\n File JSONFile = new File(plugin.getDataFolder() + \"/motd.json\");\n \n if (!JSONFile.exists()){\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json was not found in the config directory. Attempting to create a blank file.\");\n boolean worked = saveMOTD(new JSONObject());\n if (worked) Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"motd.json created!\");\n else Logger.getLogger(MOTDHandler.class.getName()).log(Level.INFO, \"JawaToolBox was unable to generate the blank motd.json. This is likely a permissions problem.\");\n return new JSONObject();\n }\n\n try {\n String source = new String(Files.readAllBytes(Paths.get(JSONFile.toURI())));\n return new JSONObject(source);\n } catch (FileNotFoundException ex) {\n return new JSONObject();\n } catch (IOException ex) {\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, \"Something went wrong JawaToolBox wasn't able to read the motd.json. Check directory permissions.\");\n Logger.getLogger(MOTDHandler.class.getName()).log(Level.SEVERE, null, ex);\n return new JSONObject();\n }\n }", "public void writeToFile (String json) {\n // reset fos to null for checks\n FileOutputStream fos = null;\n try {\n String FILE_NAME = \"ExportedLearningCards.json\";\n fos = openFileOutput(FILE_NAME, MODE_PRIVATE);\n fos.write(json.getBytes());\n Toast.makeText(this, \"Saved to \" + getFilesDir() + \"/\" + FILE_NAME,\n Toast.LENGTH_LONG).show();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void readFromJSON(String filename) {\n JSONParser parser = new JSONParser();\n\n try\n {\n Object obj = parser.parse(new FileReader(filename));\n JSONObject jsonObject = (JSONObject) obj;\n Menu drinks = getMenu(jsonObject, \"Drink\");\n Menu types = getMenu(jsonObject, \"Type\");\n Menu toppings = getMenu(jsonObject, \"Toppings\");\n Menu sizes = getMenu(jsonObject, \"Size\");\n menuMap.put(\"Drink\", drinks);\n menuMap.put(\"Size\", sizes);\n menuMap.put(\"Toppings\", toppings);\n menuMap.put(\"Type\", types);\n\n } catch (FileNotFoundException e) {\n System.out.println(\"Not found menu.json, exit now.\");\n System.exit(1);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n }", "public String loadJSONFromAsset(Context context) {\n json = null;\n try {\n InputStream is = getApplicationContext().getAssets().open(\"techdrop.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public String loadJSONFromAsset() {\n String json;\n try {\n InputStream is = getAssets().open(\"track_v0649.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "@Override\n public Object loadFromJson(Context context) {\n Gson gson = new Gson();\n String json = FileManager.getInstance().loadFromFile(getFileName(), context);\n if(json.equals(\"\")) {\n return null;\n }\n\n return gson.fromJson(json, MatchStorage.class);\n\n }", "@Override\n public void fromFile(final String file) {\n // Model会关心文件路径,所以这里需要这个操作\n this.jsonFile = file;\n final JsonObject data = Ut.ioJObject(this.jsonFile);\n this.fromJson(data);\n }", "public static Books readJSON(){\n Gson gson = new GsonBuilder().create();\n Books books = new Books();\n try {\n books = gson.fromJson(new JsonReader(new FileReader(\"books.json\")), Books.class);\n } catch (IOException e){\n e.printStackTrace();\n }\n return books;\n }", "public String readtexto() {\n String texto=\"\";\n try\n {\n BufferedReader fin =\n new BufferedReader(\n new InputStreamReader(\n openFileInput(\"datos.json\")));\n\n texto = fin.readLine();\n fin.close();\n }\n catch (Exception ex)\n {\n Log.e(\"Ficheros\", \"Error al leer fichero desde memoria interna\");\n }\n\n\n\n return texto;\n }", "public String generateJsonFileFromParsedTextFileInApp() {\n\t\treturn generateJsonFileFromParsedTextFile(TEXTSAMPLEFILE);\n\t}", "public String loadJSONFromAsset(Context context) {\n String json = null;\n try {\n InputStream is;\n int id = context.getResources().getIdentifier(\"sentiment\", \"raw\", context.getPackageName());\n is = context.getResources().openRawResource(id);\n\n int size = is.available();\n\n byte[] buffer = new byte[size];\n\n is.read(buffer);\n\n is.close();\n\n json = new String(buffer, \"UTF-8\");\n\n\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n\n }", "public static void readFile(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (Reader reader = new FileReader(filename)) {\n JSONObject jo = (JSONObject) jsonParser.parse(reader);\n\n SHORT_PERIOD = (int) (long) jo.get(\"shortPeriod\");\n LONG_PERIOD = (int) (long) jo.get(\"longPeriod\");\n AVG_AMOUNT_PERIOD = (int) (long) jo.get(\"avgAmountPeriod\");\n SESSION_INTERVAL = (int) (long) jo.get(\"sessionInterval\");\n\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }", "public void WriteJSON(Costumer costumer) {\n\n JSONObject costumerDetails = new JSONObject();\n JSONObject documentDetails = new JSONObject();\n\n documentDetails.put(\"type\", costumer.getDocument().getType());\n documentDetails.put(\"nDocument\", costumer.getDocument().getnDocument());\n documentDetails.put(\"ExpiryDate\", costumer.getDocument().getDateExpiry());\n\n System.out.println(\"dco \" + documentDetails);\n\n costumerDetails.put(\"name\", costumer.getName());\n costumerDetails.put(\"surname\", costumer.getSurname());\n costumerDetails.put(\"dateOfBirth\", costumer.getDateOfBirth());\n costumerDetails.put(\"cityOfBirth\", costumer.getCityOfBirth());\n costumerDetails.put(\"cityOfResidence\", costumer.getCityOfResidence());\n costumerDetails.put(\"address\", costumer.getAddress());\n costumerDetails.put(\"telephone\", costumer.getTelephone());\n costumerDetails.put(\"fiscalCode\", costumer.getFiscalCode());\n costumerDetails.put(\"province\", costumer.getProvince());\n costumerDetails.put(\"document\", documentDetails);\n\n costumerObject.put(\"costumer\", costumerDetails);\n\n //Add costumer to list\n costumerList.add(costumerObject);\n\n //add costumer ot the object list\n this.cList.add(costumer);\n\n //Write JSON file\n try (FileWriter file = new FileWriter(\"costumers.json\")) {\n\n file.write(costumerList.toJSONString());\n file.flush();\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public void exportJSON()\n {\n Gson JSONConverter = new Gson();\n FileWriter writer;\n\n try\n {\n // wipe the file\n PrintWriter write = new PrintWriter(new File(fp));\n write.print(\"\");\n write.close();\n\n // Initialize FileWriter to write Strings into JSON file.\n writer = new FileWriter(fp + \"/queue.json\");\n\n Iterator<ComparableCalendar> iter = this.queue.iterator();\n // Loop through the PQ.\n while(iter.hasNext())\n {\n ComparableCalendar nextObject = iter.next();\n // Convert an issue object into a JSON-formatted representation of it, as a String.\n String representationJSON = JSONConverter.toJson(nextObject);\n\n // Write that String to the file.\n writer.write(representationJSON + \"\\n\");\n }\n // Close the FileWriter to conserve system resources.\n writer.close();\n\n }\n catch (Exception e)\n {\n // Print any error messages that results to the console.\n e.printStackTrace();\n }\n\n }", "public static String readJsonObject(String filename) {\r\n\t\tBufferedReader br = null;\r\n\t\tFileReader fr = null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tString sCurrentLine;\r\n\t\ttry {\r\n\r\n\t\t\tfr = new FileReader(filename);\r\n\t\t\tbr = new BufferedReader(fr);\r\n\t\t\t\r\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) {\r\n\t\t\t\tsb.append(sCurrentLine);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (br != null)\r\n\t\t\t\t\tbr.close();\r\n\t\t\t\tif (fr != null)\r\n\t\t\t\t\tfr.close();\r\n\t\t\t} catch (IOException ex) {\r\n\t\t\t\tex.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn sb.toString();\r\n\t}", "public static String getJSONData( String filePath, boolean assetFile )\n {\n FileReader reader = null;\n String jsonData = null;\n\n if( assetFile )\n {\n AssetManager mgr = WeatherLionApplication.getAppContext().getAssets();\n String filename;\n\n try\n {\n filename = WeatherLionApplication.OPEN_SOURCE_LICENCE;\n InputStream in = mgr.open( filename, AssetManager.ACCESS_BUFFER );\n Writer writer = new StringWriter();\n char[] buffer = new char[ 1024 ];\n\n try\n {\n Reader assetReader = new BufferedReader( new InputStreamReader( in, StandardCharsets.UTF_8 ) );\n int n;\n\n while ( ( n = assetReader.read( buffer ) ) != -1 )\n {\n writer.write( buffer, 0, n) ;\n }// end of while loop\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n\n jsonData = writer.toString();\n\n in.close();\n }// end of try block\n catch ( IOException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n else\n {\n try\n {\n File file = new File( filePath );\n\n // if the is a file present then it will contain a list with at least on object\n if( file.exists() )\n {\n reader = new FileReader( file );\n jsonData = reader.toString();\n }// end of if block\n\n }// end of try block\n catch ( FileNotFoundException | JsonSyntaxException e )\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE, e.getMessage(),\n TAG + \"::getJSONData [line: \" +\n UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n finally\n {\n // close the file reader object\n if( reader != null )\n {\n try\n {\n reader.close();\n } // end of try block\n catch (IOException e)\n {\n UtilityMethod.logMessage( UtilityMethod.LogLevel.SEVERE,\n e.getMessage(),TAG + \"::getJSONData [line: \"\n + UtilityMethod.getExceptionLineNumber( e ) + \"]\" );\n }// end of catch block\n }// end of if block\n }// end of finally block\n }// end of else block\n\n return jsonData;\n }", "@GET\n @Path(\"location/Arovince\")\n @Produces(\"application/json\")\n public String getJson() throws IOException {\n FileWriter file = new FileWriter(\"/home/component/NetBeansProjects/ArovinceAndSchool/web/api/Arovince.json\");\n JSONObject jsonArray = null;\n\n try {\n URL url = new URL(\"https://opend.data.go.th/get-ckan/datastore_search?resource_id=df922923-e009-4dee-92fc-d963a86ce4b8\"); \n HttpURLConnection httpURLConnection = (HttpURLConnection)url.openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setRequestProperty(\"api-key\", \"XOe9aVTolOhCbyTU103IqAKTNNNPX8b5\");\n String line = \"\";\n InputStreamReader inputStreamReader = new InputStreamReader(httpURLConnection.getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder response = new StringBuilder();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n file.write(line);\n response.append(line);\n }\n } catch (IOException var10) {\n }\n\n file.close();\n bufferedReader.close();\n jsonArray = new JSONObject(response.toString());\n return jsonArray.toString(4);\n } catch (Exception var11) {\n return \"\" + var11;\n }\n }", "public void jsonPresentation () {\n System.out.println ( \"****** Json Data Module ******\" );\n ArrayList<Book> bookArrayList = new ArrayList<Book>();\n String jsonData = \"\";\n ObjectMapper mapper = new ObjectMapper();\n bookArrayList = new Request().postRequestBook();\n try {\n jsonData = mapper.writeValueAsString(bookArrayList);\n } catch (JsonProcessingException e) {\n System.out.println(\"Error: \"+ e);\n }\n System.out.println(jsonData);\n ClientEntry.showMenu ( );\n }", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE);\n\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos));\n\n Gson gson = new Gson();\n Log.d(\"PersonList\", personList.toString());\n gson.toJson(personList, out);\n out.flush();\n\n fos.close();\n\n } catch (FileNotFoundException e){\n throw new RuntimeException();\n } catch (IOException e){\n e.printStackTrace();\n }\n\n }", "public void saveGame(String fileName){\n Gson gson = new Gson();\n String userJson = gson.toJson(player);\n\n try(Writer w = new BufferedWriter(new OutputStreamWriter( new FileOutputStream(fileName), \"UTF-8\"))) {\n w.write(userJson);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public String getJSONString(String fileName){\n\n String line = \"\";\n String jsonString = \"\";\n\n try {\n FileReader fileReader = new FileReader(fileName);\n\n BufferedReader bufferedReader = new BufferedReader(fileReader);\n\n while ((line = bufferedReader.readLine()) != null) {\n jsonString+=line+'\\n';\n }\n bufferedReader.close();\n }\n catch (FileNotFoundException ex){\n System.out.println(\"Unable to open file '\" + fileName + \"'\");\n }\n catch (IOException ex) {\n System.out.println( \"Error reading file '\" + fileName +\"'\");\n }\n\n return jsonString;\n }", "public static JsonObject fileToJson(File jsonFile) {\n Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting().create();\n JsonObject jsonObject = null;\n\n try {\n Reader reader = new FileReader(jsonFile);\n jsonObject = gson.fromJson(reader, JsonObject.class);\n } catch (FileNotFoundException e) {\n //log.error(\"FileNotFound Exception occurred when converting JSON file to JSON Object\", e); //todo: FileNotFound exception occured. error message?\n e.printStackTrace();\n }\n\n return jsonObject;\n }", "@SuppressWarnings(\"unused\")\n public void SaveJsonCollectionsToFiles(){\n try {\n String formattedDate = FileNameUtils.DATE_FORMAT.format(new Date());\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n writer.writeValue(new File(FileNameUtils.GetValuesFileName(formattedDate)), jsonObjects);\n }\n catch(IOException exp){\n System.err.println(\"Error while creating JSON file. Reason: \" + exp.getMessage());\n }\n }", "private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }", "public static Quote[] readFromJson(String filename) throws IOException {\n File file = new File(filename);\n file.createNewFile();\n Gson read = new Gson();\n InputStream inStream = new FileInputStream(filename);\n BufferedReader buffer = new BufferedReader(new InputStreamReader(inStream));\n Quote[] quotes = read.fromJson(buffer, Quote[].class);\n buffer.close();\n return quotes;\n }", "public synchronized void saveTableInJson(Table table) throws IOException {\r\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\r\n\r\n /*\r\n * I don't know why but this line below doesn't work...\r\n * The strange thing is it was working fine, but just in one moment stopped.\r\n * I checked everything, I even reverted the done work to the initial state.\r\n * Nothing helped.\r\n */\r\n //gson.toJson(table, new FileWriter(stringPathToTable));\r\n\r\n String jsonTable = gson.toJson(table);\r\n FileWriter fileWriter = new FileWriter(stringPathToTable);\r\n fileWriter.write(jsonTable);\r\n fileWriter.close();\r\n }", "JsonObject raw();", "public String readJsonFile(String fileName)\n {\n FileInputStream fileInputStream = null;\n String text;\n StringBuilder stringBuilder = new StringBuilder();\n\n try\n {\n fileInputStream = mainContext.openFileInput(fileName);\n InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n\n while((text = bufferedReader.readLine()) != null)\n {\n stringBuilder.append(text).append(\"\\n\");\n }\n }\n catch (IOException e)\n {\n System.out.println(e.getMessage());\n }\n\n return stringBuilder.toString();\n }", "public static String loadJSONFromAsset(Context context,String filePath) {\n String json = null;\n try {\n InputStream is = context.getAssets().open(filePath);\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, ENCODING);\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public abstract String toJson();", "private static ConfigImpl loadJson(Path path) throws IOException {\n final ConfigImpl ret;\n try (FileInputStream stream = new FileInputStream(path.toFile())) {\n try (InputStreamReader reader = new InputStreamReader(stream, UTF_8)) {\n ret = loadJson(reader);\n }\n }\n return ret;\n }", "private void downloadJSON() {\n new downloadJsonAsync().execute(Urls.GET_TAGS, Urls.GET_REST);\n }", "private void loadDia() throws JSONException {\n\n\n String json = \"{\\n\" +\n \" \\\"mes\\\": 10,\\n\" +\n \" \\\"ano\\\": 2017,\\n\" +\n \" \\\"dias\\\":[\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":1,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"asd\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$4050,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdsaf\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$50,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"fdasfa\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$452,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 1,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"2a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 2,\\n\" +\n \" \\\"sinal\\\": 2,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"1b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":13,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 3,\\n\" +\n \" \\\"sinal\\\": 3,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"13a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$450,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 4,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"13b\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$40,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":16,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 5,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"16a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"dia\\\":18,\\n\" +\n \" \\\"titulos\\\": [\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 6,\\n\" +\n \" \\\"sinal\\\": 4,\\n\" +\n \" \\\"grupo\\\": 3,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$52,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 7,\\n\" +\n \" \\\"sinal\\\": 5,\\n\" +\n \" \\\"grupo\\\": 1,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2,00\\\"\\n\" +\n \" },\\n\" +\n \" {\\n\" +\n \" \\\"id\\\": 8,\\n\" +\n \" \\\"sinal\\\": 1,\\n\" +\n \" \\\"grupo\\\": 2,\\n\" +\n \" \\\"nome\\\": \\\"18a\\\",\\n\" +\n \" \\\"valor\\\": \\\"R$2000,00\\\"\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \" }\\n\" +\n \" ]\\n\" +\n \"}\";\n\n\n //Toast.makeText(getApplicationContext(), \"certo\",Toast.LENGTH_LONG).show();\n }", "public String autocreateJSON(String filePath, JSONObject jsonObject) throws ExistException, UnderlyingStorageException, UnimplementedException {\n \t\ttry {\n \t\t\tDocument doc=cspace266Hack_munge(jxj.json2xml(jsonObject));\n \t\t\tSystem.err.println(\"153 got \"+doc.asXML());\n \t\t\tReturnedURL url = conn.getURL(RequestMethod.POST,\"collectionobjects/\",doc);\n \t\t\tif(url.getStatus()>299 || url.getStatus()<200)\n \t\t\t\tthrow new UnderlyingStorageException(\"Bad response \"+url.getStatus());\n \t\t\treturn url.getURLTail();\n \t\t} catch (BadRequestException e) {\n \t\t\tthrow new UnderlyingStorageException(\"Service layer exception\",e);\n \t\t} catch (InvalidXTmplException e) {\n \t\t\tthrow new UnimplementedException(\"Error in template\",e);\n \t\t}\n \t}", "default String fileExtension() {\n\t\treturn \".json\";\n\t}", "public void writeJSONFile(Client client) {\n try {\n this.jsonParser = new JSONParser();\n JSONObject obj = (JSONObject) jsonParser.parse(new FileReader(file.getPath()));\n\n JSONArray listUsers = (JSONArray) obj.get(\"Registry\");\n\n boolean found = false;\n JSONObject user;\n int i = 0;\n\n while (!found && i < listUsers.size()) {\n user = (JSONObject) listUsers.get(i);\n\n if (client.getId() == ((Long) user.get(\"id\")).intValue()) {\n found = true;\n ((JSONObject) listUsers.get(i)).put(\"isInfected\", client.isInfected());\n ((JSONObject) listUsers.get(i)).put(\"isNotified\", client.isNotified());\n }\n\n i++;\n }\n\n JSONArray county = (JSONArray) obj.get(\"Counties\");\n JSONArray unregisteredUsers = (JSONArray) obj.get(\"UnregisteredUsers\");\n\n if (unregisteredUsers == null) {\n unregisteredUsers = new JSONArray();\n }\n\n JSONObject objWrite = new JSONObject();\n\n objWrite.put(\"UnregisteredUsers\", unregisteredUsers);\n objWrite.put(\"Registry\", listUsers);\n objWrite.put(\"Counties\", county);\n\n FileWriter fileWriter = new FileWriter(file.getPath());\n\n fileWriter.write(objWrite.toJSONString());\n\n fileWriter.close();\n\n } catch (IOException | ParseException e) {\n e.printStackTrace();\n }\n }", "public JSONArray readFromJSON(){\n\n JSONArray jsonArray=null;\n\n try {\n InputStream inputStream =context.getResources().getAssets().open(FILE_NAME);\n int size = inputStream.available();\n byte[] data = new byte[size];\n inputStream.read(data);\n inputStream.close();\n String json = new String(data, \"UTF-8\");\n jsonArray = new JSONArray(json);\n } catch (IOException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n return jsonArray;\n }", "private void loadData() {\n FileInputStream fis;\n\n try {\n fis = openFileInput(DATA_FILE);\n user = (User) new JsonReader(fis).readObject();\n fis.close();\n } catch(Exception e) {\n Log.i(\"Exception :\", e.toString());\n }\n }", "public void createJSON(String filePath, JSONObject jsonObject) throws ExistException, UnimplementedException, UnderlyingStorageException {\n \t\tSystem.err.println(jsonObject);\n \t\tjsonObject=cspace264Hack_munge(jsonObject,filePath);\n \t\tautocreateJSON(\"\",jsonObject);\n \t\t// XXX End of here's what we do because of CSPACE-264\t\t\n \t\t// Here's what we should do ->\n \t\t// throw new UnimplementedException(\"Cannot create collectionobject at known path, use autocreateJSON\");\n \t}", "JSONObject toJson();", "JSONObject toJson();", "public String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"election-county-2012.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "private String loadJSONFromAsset() {\n String json = null;\n try {\n InputStream is = getAssets().open(\"playerData.json\");\n int size = is.available();\n byte[] buffer = new byte[size];\n is.read(buffer);\n is.close();\n json = new String(buffer, \"UTF-8\");\n } catch (IOException ex) {\n ex.printStackTrace();\n return null;\n }\n return json;\n }", "public static void storeJsonData(JSONObject json) throws JSONException{\n Iterator<String> keys = json.keys();\n while(keys.hasNext()){\n String key = keys.next();\n String val = json.getString(key);\n \n if(val != null){\n map.put(key,val);\n try {\n \t\t\tBufferedWriter out = new BufferedWriter(new FileWriter(file,true));\n \t\t\tout.write(key + \" : \" + val);\n \t\t\tout.newLine();\n \t\t\tout.close();\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n }\n }\n}", "public JSONObject save();", "public String fileToString(String file){\n String path = new File(\"./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json\").getAbsolutePath();\n File fileObj = new File(path);\n Log.d(\"Reading JSON file\", \"File exists: \" + fileObj.exists());\n Log.d(\"Reading JSON file\", \"File is directory: \" + fileObj.isDirectory());\n Log.d(\"Reading JSON file\", \"File can read: \" + fileObj.canRead());\n Log.d(\"Reading JSON file\", \"Current directory: \" + path);\n Log.d(\"Reading JSON file\", \"The path is: \" + file);\n try(Scanner in = new Scanner(new File(file))){\n StringBuilder sb = new StringBuilder();\n while(in.hasNextLine()){\n sb.append(in.nextLine());\n sb.append('\\n');\n }\n in.close();\n\n return sb.toString();\n }\n catch (FileNotFoundException ex){\n ex.printStackTrace();\n }\n return null;\n }", "public void getCityJson() throws JSONException {\n String json = null;\n try {\n InputStream inputStream = getAssets().open(\"cities.json\");\n int size = inputStream.available();\n byte[] buffer = new byte[size];\n inputStream.read(buffer);\n inputStream.close();\n json = new String(buffer, \"UTF-8\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n JSONObject jsonObject = new JSONObject(json);\n JSONArray events = jsonObject.getJSONArray(\"cities\");\n for (int j = 0; j < events.length(); j++) {\n JSONObject cit = events.getJSONObject(j);\n City cityData = new City();\n\n cityData.setCityId(Integer.parseInt(cit.getString(\"id\")));\n cityData.setCityName(cit.getString(\"name\"));\n cityData.setStateId(Integer.parseInt(cit.getString(\"state_id\")));\n cityObject.add(cityData);\n }\n }", "private String getFileContent(){\n\t\tString employeesJsonString=\"\";\n\t\ttry {\n\t\t\tScanner sc = new Scanner(file);\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\temployeesJsonString += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\te1.printStackTrace();\n\t\t\tSystem.out.println(\"file error\");\n\t\t}\n\t\treturn employeesJsonString;\n\t}", "public void crearPrimerFichero(){\n File f=new File(getApplicationContext().getFilesDir(),\"datos.json\");\n // si no existe lo creo\n if(!f.exists()) {\n String filename = \"datos.json\";\n String fileContents = \"[]\";\n FileOutputStream outputStream;\n\n try {\n outputStream = openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(fileContents.getBytes());\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n }", "public void writeToJSON(String filePath) throws IOException {\n try (PrintWriter pw = new PrintWriter(filePath)) {\n pw.printf(\"{\\n\\t\\\"patients\\\": [\\n\");\n for (int i = 0; i < dataFrame.getRowCount(); i++) {\n pw.printf(\"\\t\\t{\\n\");\n Iterator<String> it = dataFrame.getColumnNames().iterator();\n while (it.hasNext()){\n String colName = it.next();\n if (it.hasNext())\n pw.printf(\"\\t\\t\\t\\\"%s\\\":\\\"%s\\\",\\n\", colName, dataFrame.getValue(colName, i));\n else\n pw.printf(\"\\t\\t\\t\\\"%s\\\":\\\"%s\\\"\\n\", colName, dataFrame.getValue(colName, i));\n }\n if (i+1<dataFrame.getRowCount())\n pw.printf(\"\\t\\t},\\n\");\n else\n pw.printf(\"\\t\\t}\\n\\t]\\n\");\n }\n pw.printf(\"}\\n\");\n }\n }", "public static HashMap<String,String> read_json_file(String filepath){\n HashMap<String,String> map = new HashMap<String,String>();\n try{\n BufferedReader bufferedReader = new BufferedReader(new FileReader(filepath));\n Gson gson = new Gson();\n Object json = gson.fromJson(bufferedReader, Object.class);\n map = new Gson().fromJson(\n json.toString(), new TypeToken<HashMap<String, String>>() {}.getType()\n );\n } catch (FileNotFoundException e ) {\n e.printStackTrace();\n }\n return map;\n }", "java.lang.String getMetadataJson();" ]
[ "0.7228319", "0.7037551", "0.69191945", "0.67376626", "0.6707089", "0.6665017", "0.6665017", "0.6665017", "0.65430313", "0.64753896", "0.6475273", "0.6471174", "0.6457775", "0.64472795", "0.64280283", "0.6423619", "0.6410349", "0.64091265", "0.6384293", "0.63772106", "0.6374263", "0.6345765", "0.63391507", "0.6285437", "0.62563276", "0.62164295", "0.6177683", "0.6175564", "0.61711115", "0.616289", "0.6123069", "0.6107794", "0.6090342", "0.6089876", "0.60897577", "0.6080536", "0.607521", "0.60507834", "0.60383606", "0.60175294", "0.6004627", "0.5995124", "0.5990439", "0.5958188", "0.5952478", "0.595016", "0.5931345", "0.5918891", "0.591276", "0.5891132", "0.58876723", "0.586812", "0.5867034", "0.58650607", "0.5852134", "0.5839207", "0.5832365", "0.5822693", "0.5822458", "0.5820438", "0.58122474", "0.5807314", "0.5804281", "0.5798441", "0.57981884", "0.5781044", "0.5777956", "0.57733214", "0.5760599", "0.5746465", "0.5741689", "0.5734966", "0.57310796", "0.5721729", "0.5719142", "0.5717065", "0.5713989", "0.5710079", "0.56950283", "0.56911284", "0.5682638", "0.56796986", "0.5678215", "0.56771344", "0.56741196", "0.566764", "0.5661064", "0.5652935", "0.5652935", "0.5652746", "0.5649619", "0.5645485", "0.5640813", "0.5631836", "0.5625392", "0.5625026", "0.56194377", "0.56163716", "0.56091356", "0.5602525" ]
0.58758175
51
Autorisation de modifier la velur de commit
public void setCommit(boolean commit) { this.commit = commit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void commit() {\n }", "public void commit() {\n }", "@Override\n public void commit() {\n }", "@Override\n\tpublic void commit() {\n\n\t}", "public void commit(){\n \n }", "protected void post_commit_hook() { }", "public void commit() {\n doCommit();\n }", "void commit();", "void commit();", "@Override\n\tpublic int commit() {\n\t\treturn 0;\n\t}", "public void commit();", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "public Commit() {\n }", "public Commit() {\n }", "public abstract void commit();", "public void commit() {\n tryCommit(true);\n }", "public abstract void commitMiembrosDeEquipo();", "public void commit() {\n\t\tcommitted = true;\n\t}", "@Override\n\tpublic void commit() throws Throwable {\n\t\tthrow new Warning(\"please use commit(context)\");\n\t}", "public void commitChanges()\n {\n }", "protected void pretendCommit() {\n \t\t\tif (fStart > -1) {\n \t\t\t\tfText= fDocumentUndoManager.fTextBuffer.toString();\n \t\t\t\tfPreservedText= fDocumentUndoManager.fPreservedTextBuffer.toString();\n \t\t\t}\n \t\t}", "void commit() throws CommitException;", "void commit() {\r\n tx.commit();\r\n tx = new Transaction();\r\n }", "R commit(C change);", "@Override\n public void commitTx() {\n \n }", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit() throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "void commit( boolean onSave );", "public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit() throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "void commit() throws SoarException\n {\n // if lazy, commit\n if(db != null && params.lazy_commit.get() == LazyCommitChoices.on)\n {\n // Commit and then start next lazy-commit transaction\n try\n {\n db.commitExecuteUpdate( /* soar_module::op_reinit */);\n db.beginExecuteUpdate( /* soar_module::op_reinit */);\n }\n catch(SQLException e)\n {\n throw new SoarException(\"Error while forcing commit: \" + e.getMessage(), e);\n }\n }\n \n }", "void commit(boolean isMajor);", "@Override\n\tpublic void commitInmate(InmateData inmate) {\n\t\t\n\t}", "protected void commit() {\n \t\t\tif (fStart < 0) {\n \t\t\t\tif (fDocumentUndoManager.fFoldingIntoCompoundChange) {\n \t\t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t\t} else {\n \t\t\t\t\treinitialize();\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tupdateTextChange();\n \t\t\t\tfDocumentUndoManager.fCurrent= createCurrent();\n \t\t\t}\n \t\t\tfDocumentUndoManager.resetProcessChangeState();\n \t\t}", "@Override\r\n public void beforeCommit(boolean readOnly) {\n }", "@Override\r\n\t\tpublic void commit() throws SQLException {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void commit(boolean onSave) {\n\t\tsuper.commit(onSave);\n\t}", "public void forceCommitTx()\n{\n}", "public void commitEntity();", "TCommit createCommit();", "public GlBuffer commit(){\n return commit(true);\n }", "public void commitTransaction() {\n\r\n\t}", "public void initCommit(MeubleModele meuble){\n this.getPanier().initCommit(meuble);\n this.getCatalogue().initCommit(meuble);\n this.infoPane.initCommit(meuble);\n }", "GitCommit(RevCommit anRC) { _rev = anRC; }", "void commit(Transaction transaction);", "void commit(String tpcid);", "@Override\r\n\tpublic void commit(String tableName) {\n\t}", "public static void deshabilitarTransaccionManual() {\n try {\n\n con.setAutoCommit(true);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\r\n\t{\r\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\r\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "public final void commit(com.mendix.systemwideinterfaces.core.IContext context) throws com.mendix.core.CoreException\n\t{\n\t\tcom.mendix.core.Core.commit(context, getMendixObject());\n\t}", "protected abstract void commitIndividualTrx();", "private void commit(){\n System.out.println(\"Masukan pesan commit : \");\n Scanner input = new Scanner(System.in);\n String message = input.nextLine();\n \n if(initialize == null){\n commitInitialize(message);\n } else {\n commitNext(message);\n }\n }", "private void commit() {\n if (vote != Vote.COMMIT) {\n throw new IllegalStateException(\"Cannot commit transaction with vote: \" + vote);\n }\n\n for (ObjectVersion<V> objectVersion : objectVersions.values()) {\n objectVersion.commit();\n }\n }", "public static void commit(Commit proposal)\n {\n logger.debug(\"committing {}\", proposal);\n RowMutation rm = proposal.makeMutation();\n Table.open(rm.getTable()).apply(rm, true);\n\n synchronized (lockFor(proposal.key))\n {\n PaxosState state = SystemTable.loadPaxosState(proposal.key, proposal.update.metadata());\n SystemTable.savePaxosCommit(proposal, !state.inProgressCommit.isAfter(proposal));\n }\n }", "default void registerCommit(Commit commit) {\n }", "void commitTransaction();", "@Override\n\tpublic void commitOffsets() {\n\n\t}", "@Override\n void undo() {\n assert false;\n }", "public void commit(int tid) {\n List<Lock> lockList = null;\n\n // check wheter there is read-only transaction running\n boolean hasRO = _tm.hasRunningReadonly();\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n Lock lc = lockList.get(i);\n if (lc.getTranId() == tid) {\n\n // If the lock type is write, means this transaction writes a variable\n // in uncommitDataMap\n if (lc.getType() == Lock.Type.WRITE) {\n if (_uncommitDataMap.containsKey(varIndex)) {\n List<Data> dataList = _dataMap.get(varIndex);\n Data d = _uncommitDataMap.get(varIndex);\n d.setCommitTime(_tm.getCurrentTime());\n\n // If no read-only transaction, replace the old version\n if (!hasRO) {\n dataList.clear();\n }\n dataList.add(d);\n _uncommitDataMap.remove(varIndex);\n }\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }", "public static void habilitarTransaccionManual() {\n try {\n con.setAutoCommit(false);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "public void actualizar() {\n\n\t}", "public void commit() throws ResourceException;", "public void actualizar();", "public void storeAndCommit() {\n \tsynchronized(mDB.lock()) {\n \t\ttry {\n \t \t\tstoreWithoutCommit();\n \t \t\tcheckedCommit(this);\n \t\t}\n \t\tcatch(RuntimeException e) {\n \t\t\tcheckedRollbackAndThrow(e);\n \t\t}\n \t}\n }", "public void errorWhenCommitting();", "void commit(Session session);", "void commit() throws InterruptedException;", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "public void commitWriter () {\n try {\n writer.commit();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public abstract void commitProductBacklog();", "void setCommitID(long commit_id) {\r\n this.commit_id = commit_id;\r\n }", "protected void aktualisieren() {\r\n\r\n\t}", "void commit(IDevTree tree, Map options) throws IOException;", "boolean shouldCommit();", "public void commit() {\n\t\tif (commit) {\n\t\t\t// Récupérer le path du JSON\n\t\t\tSystem.out.println(ClassLoader.getSystemResource(jsonFile));\n\t\t\tURL url = ClassLoader.getSystemResource(jsonFile);\n\t\t\t// On ouvre un flux d'écriture vers le fichier JSON\n\t\t\ttry (OutputStream ops = new FileOutputStream(Paths.get(url.toURI()).toFile())) {\n\t\t\t\t// Ecriture du fichier JSON avec formatage\n\t\t\t\t// (WithDefaultPrettyPrinter)\n\t\t\t\tobjectMapper.writerWithDefaultPrettyPrinter().writeValue(ops, database);\n\t\t\t\tlogger.info(\"OK - fichier JSON mis à jour \" + jsonFile);\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tlogger.info(\"KO - FILE_NOT_FOUND\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - FILE_NOT_FOUND\", e);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlogger.info(\"KO - I/O ERROR\" + jsonFile);\n\t\t\t\tthrow new DataRepositoryException(\"KO - I/O ERROR\", e);\n\t\t\t} catch (URISyntaxException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void undo(Transaction tx) {\r\n\t\t// do nothing\r\n\t\t\r\n\t}", "@Override\n public void commit() throws HeuristicMixedException, HeuristicRollbackException, IllegalStateException,\n RollbackException, SecurityException, SystemException {\n assertActiveTransaction();\n try {\n getTransaction().commit();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n txns.set(null);\n }\n\n }", "public synchronized void writeCommit(Transaction t) {\n\t\tflush();\n\t\tpw.println(t.transactionId() + \" commit\");\t\n\t\tflush();\n\t}", "public void commit(Writer output) throws IOException {\n postData(new StringReader(\"<commit/>\"), output);\n }", "@Override\r\n\tpublic void redo(Transaction tx) {\r\n\t\t// do nothing\r\n\t}", "long getCommitID() {\r\n return commit_id;\r\n }", "void rollback();", "public void rollbackTx()\n\n{\n\n}", "private void commitApuesta() {\n\t\tif(tipo != -1){\n\t\t\tmodelo.setDestLogin(ModeloApuestas.DEST_APOSTUBERRI);\n\t\t\tmodelo.setApuestaInProgress(apostado.get(), tipo);\n\t\t\tif(!myController.isScreenLoaded(\"login\")){\n\t\t\t\tmyController.loadScreen(ScreensFramework.Login, ScreensFramework.Login_FXML);\n\t\t\t}\n\t\t\tmyController.setScreenOverlay(\"login\");\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n\tprotected int getCommitUnit() {\n\t\treturn ImportConstants.COMMIT_UNIT;\n\t}", "public void helperCommit(Commit newCommit) throws IOException {\n newCommit.setFiles(INDEX, REMOVAL);\n newCommit.changeStatus(true);\n addCommit(newCommit);\n Utils.writeObject(curHeadBranch(), newCommit.getShaCode());\n Utils.writeObject(HEADFILE, newCommit.getShaCode());\n clearStages();\n }", "@Override\n public void commit() throws IOException {\n if (!committed && currentFile != null) {\n long pos = currentFile.getLineReadPos();\n currentFile.setPos(pos);\n currentFile.setLastUpdated(updateTime);\n committed = true;\n }\n }" ]
[ "0.7609484", "0.71931285", "0.71917814", "0.7178478", "0.7127877", "0.69512457", "0.6944263", "0.6937619", "0.6937619", "0.6933956", "0.68916106", "0.6805306", "0.6757449", "0.6757449", "0.67483175", "0.6646738", "0.664375", "0.6620891", "0.6576139", "0.65309894", "0.651625", "0.6464617", "0.64562076", "0.6438477", "0.64334834", "0.6313776", "0.6313776", "0.6313776", "0.6313776", "0.6313776", "0.6303938", "0.6289739", "0.6284611", "0.6284611", "0.6284611", "0.6284611", "0.6270335", "0.62404615", "0.6234422", "0.62232536", "0.6206247", "0.6182083", "0.6151037", "0.61457604", "0.61333984", "0.61284804", "0.6052839", "0.60443383", "0.6040252", "0.6003399", "0.5998103", "0.59560543", "0.5946961", "0.59094083", "0.5878323", "0.5878323", "0.5878323", "0.5878323", "0.5878323", "0.5856318", "0.5856318", "0.5856318", "0.5856318", "0.58524054", "0.5845308", "0.58422107", "0.58403623", "0.582173", "0.58165294", "0.5803243", "0.57998055", "0.5770721", "0.5759345", "0.57421726", "0.57385653", "0.5729637", "0.5704047", "0.5700515", "0.5697504", "0.5696108", "0.5693069", "0.56833917", "0.56784093", "0.56657404", "0.5656101", "0.5653557", "0.5650828", "0.56508017", "0.56499565", "0.5646225", "0.5644188", "0.5641964", "0.5639878", "0.56280506", "0.5608421", "0.56049013", "0.55939996", "0.55932957", "0.5592903", "0.55777895" ]
0.59393543
53
Write your code here
public static void print2DArray(int input[][]) { int m = input.length; if (m == 0) return; int n = input[0].length; for (int i = 0; i < m; i++) { int k = i; while (k < m) { for (int j = 0; j < n; j++) { System.out.print(input[i][j] + " "); } k++; System.out.println(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "public void ganar() {\n // TODO implement here\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "CD withCode();", "public void mo38117a() {\n }", "private stendhal() {\n\t}", "public void mo4359a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "Programming(){\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void working()\n {\n \n \n }", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void baocun() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "private void kk12() {\n\n\t}", "public void mo55254a() {\n }", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "public void mo9848a() {\n }", "protected void mo6255a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void themesa()\n {\n \n \n \n \n }", "private void yy() {\n\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void perder() {\n // TODO implement here\n }", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "public static void main(String[] args) {\n\t// write your code here\n }", "private static void oneUserExample()\t{\n\t}", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public void mo3376r() {\n }", "public void mo97908d() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void cocinar(){\n\n }", "private void getStatus() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void mo5382o() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected void execute() {\n\t\t\n\t}", "@Override\n public void execute() {\n \n \n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo21793R() {\n }", "public void mo12930a() {\n }", "private void test() {\n\n\t}", "public void mo6081a() {\n }", "static void feladat5() {\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tvoid output() {\n\t\t\n\t}", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo3749d() {\n }", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "public void mo21791P() {\n }", "public final void cpp() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void skystonePos5() {\n }", "@Override\n protected void execute() {\n \n }", "@Override\n\tprotected void postRun() {\n\n\t}", "@Override\n\tpublic void HowtoEat() {\n\t\tSystem.out.println(\"Fırında Ye!!\");\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "@Override\n\tpublic void view() {\n\t\t\n\t}" ]
[ "0.6385292", "0.62825674", "0.6094859", "0.59705144", "0.59174407", "0.5879631", "0.58751583", "0.58699447", "0.5869017", "0.58553624", "0.5826625", "0.5825323", "0.58233553", "0.577183", "0.576982", "0.5769503", "0.57691693", "0.5748044", "0.57379705", "0.573767", "0.57285726", "0.57275313", "0.5722168", "0.5715661", "0.5709839", "0.5709839", "0.5704307", "0.5681891", "0.5681891", "0.5673934", "0.5651873", "0.56415623", "0.5629833", "0.56136686", "0.560722", "0.5603319", "0.55986965", "0.55838263", "0.55780625", "0.55713314", "0.55659115", "0.55621606", "0.5556605", "0.5549954", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55463374", "0.55281407", "0.5525562", "0.55151445", "0.55151445", "0.55058944", "0.5503766", "0.55010456", "0.5500997", "0.5495365", "0.54874974", "0.5482034", "0.5477928", "0.54772", "0.5475188", "0.5473774", "0.54694617", "0.54655695", "0.54646754", "0.5460583", "0.54583234", "0.54577816", "0.5457681", "0.54538816", "0.5452503", "0.54493356", "0.54453313", "0.5444872", "0.5440357", "0.54393566", "0.54381615", "0.5435557", "0.54309005", "0.5428512", "0.54260683", "0.5423332", "0.5419551", "0.5419505", "0.5419252", "0.54156613", "0.5414246", "0.54133856", "0.5403345", "0.5401036", "0.5401036", "0.5394768", "0.53913885", "0.5389031", "0.5386461", "0.5383817", "0.5380636" ]
0.0
-1
For test use only.
public IgniteThread checkpointerThread() { return checkpointerThread; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void test() {\n\n\t}", "private ProtomakEngineTestHelper() {\r\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "private stendhal() {\n\t}", "@Before\n\t public void setUp() {\n\t }", "private test5() {\r\n\t\r\n\t}", "@Override\n public void setUp() throws Exception {}", "public void testSetBasedata() {\n }", "@Override\n public void test() {\n \n }", "@Override\n public void setUp() {\n }", "@Before\n\tpublic void setUp() {\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Before\n public void setUp () {\n }", "@Override\n protected void tearDown() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "protected void onFirstUse() {}", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "public void setUp() {\n\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "private JacobUtils() {}", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "protected void setupLocal() {}", "@Override\n protected void setup() {\n }", "@Before public void setUp() { }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "protected TestBench() {}", "@Override\n public void runTest() {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "public void testLoadOrder() throws Exception {\n }", "@Before\n public void setup() {\n }", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "protected void setUp() {\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "protected void setUp() throws Exception {\n \n }", "private void init() {\n\n\t}", "private Mocks() { }", "@Before\n public void setUp() throws Exception {\n\n }", "protected void setup() {\r\n }", "private Util() { }", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@Override\n protected void tearDown() throws Exception {\n\n }", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "public void testWriteOrders() throws Exception {\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}", "protected void setUp() {\n\n }", "private OMUtil() { }", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Override\n public void tearDown() {\n }", "@Override\n public void tearDown() {\n }", "@Override\n public void tearDown() {\n }", "@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }", "public void testGetBasedata() {\n }", "public void testGetInsDyn() {\n }" ]
[ "0.68118864", "0.67399323", "0.6441675", "0.6423817", "0.6395269", "0.62986887", "0.6264853", "0.6168618", "0.61100763", "0.6105351", "0.6069076", "0.60551643", "0.6035609", "0.60191655", "0.60188746", "0.599938", "0.5992773", "0.59913504", "0.5978525", "0.597235", "0.59691143", "0.59691143", "0.59691143", "0.59691143", "0.59691143", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963531", "0.59629107", "0.5961767", "0.5961767", "0.5957127", "0.595414", "0.5942927", "0.5940154", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.59342754", "0.5932659", "0.5929651", "0.5922336", "0.59153485", "0.59153485", "0.59153485", "0.59153485", "0.59119433", "0.59119433", "0.59058094", "0.59014195", "0.589884", "0.58984774", "0.58984774", "0.5896421", "0.58924997", "0.5887982", "0.5887982", "0.5887982", "0.5887977", "0.5879435", "0.58677447", "0.58675176", "0.5866794", "0.5865983", "0.58636606", "0.5862065", "0.5862065", "0.585625", "0.5850878", "0.5841863", "0.58353674", "0.5832098", "0.5830432", "0.5829716", "0.5813145", "0.58111584", "0.58107394", "0.58107394", "0.58107394", "0.58063674", "0.5802749", "0.57940745" ]
0.0
-1
For test use only.
public IgniteInternalFuture<Void> enableCheckpoints(boolean enable) { GridFutureAdapter<Void> fut = new GridFutureAdapter<>(); enableChangeApplied = fut; checkpointsEnabled = enable; wakeupForCheckpoint("enableCheckpoints()"); return fut; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "private void test() {\n\n\t}", "private ProtomakEngineTestHelper() {\r\n\t}", "@Override\n @Before\n public void setUp() throws IOException {\n }", "private stendhal() {\n\t}", "@Before\n\t public void setUp() {\n\t }", "private test5() {\r\n\t\r\n\t}", "@Override\n public void setUp() throws Exception {}", "public void testSetBasedata() {\n }", "@Override\n public void test() {\n \n }", "@Override\n public void setUp() {\n }", "@Before\n\tpublic void setUp() {\n\t}", "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Before\n public void setUp () {\n }", "@Override\n protected void tearDown() {\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\t\n\t}", "protected void onFirstUse() {}", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "public void setUp() {\n\n\t}", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Before\r\n\tpublic void setUp() {\n\t}", "private JacobUtils() {}", "@Before\n public void setUp() throws Exception {\n }", "@Before\n public void setUp() throws Exception {\n }", "protected void setupLocal() {}", "@Override\n protected void setup() {\n }", "@Before public void setUp() { }", "@Before\n public void setUp() {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "@Before\n public void setUp()\n {\n }", "protected TestBench() {}", "@Override\n public void runTest() {\n }", "@Override\n\tpublic void test() {\n\t\t\n\t}", "@Before\n public void setUp() throws Exception {\n\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\r\n public void setUp()\r\n {\r\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "@Before\n\tpublic void setUp() throws Exception {\n\t}", "public void testLoadOrder() throws Exception {\n }", "@Before\n public void setup() {\n }", "@Before\r\n\tpublic void setup() {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t}", "protected void setUp() {\n\t}", "@Before\n\tpublic void setup() {\n\t\t\n\t\t\n\t}", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "@Before\n public void setup() {\n }", "protected void setUp() throws Exception {\n \n }", "private void init() {\n\n\t}", "private Mocks() { }", "@Before\n public void setUp() throws Exception {\n\n }", "protected void setup() {\r\n }", "private Util() { }", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "protected void setUp()\n {\n }", "protected void setUp()\n {\n }", "@Override\n protected void tearDown() throws Exception {\n\n }", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "public void testWriteOrders() throws Exception {\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\t//This method is unused. \r\n\t}", "@Override\r\n\tpublic void sssDoLwTestInit() {\n\r\n\t}", "protected void setUp() {\n\n }", "private OMUtil() { }", "@Test\n public void testGetProductInfo() throws Exception {\n }", "@Override\n public void tearDown() {\n }", "@Override\n public void tearDown() {\n }", "@Override\n public void tearDown() {\n }", "@Override\n @Before\n public void before() throws Exception {\n\n super.before();\n }", "public void testGetBasedata() {\n }", "public void testGetInsDyn() {\n }" ]
[ "0.68118864", "0.67399323", "0.6441675", "0.6423817", "0.6395269", "0.62986887", "0.6264853", "0.6168618", "0.61100763", "0.6105351", "0.6069076", "0.60551643", "0.6035609", "0.60191655", "0.60188746", "0.599938", "0.5992773", "0.59913504", "0.5978525", "0.597235", "0.59691143", "0.59691143", "0.59691143", "0.59691143", "0.59691143", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963873", "0.5963531", "0.59629107", "0.5961767", "0.5961767", "0.5957127", "0.595414", "0.5942927", "0.5940154", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.593931", "0.59342754", "0.5932659", "0.5929651", "0.5922336", "0.59153485", "0.59153485", "0.59153485", "0.59153485", "0.59119433", "0.59119433", "0.59058094", "0.59014195", "0.589884", "0.58984774", "0.58984774", "0.5896421", "0.58924997", "0.5887982", "0.5887982", "0.5887982", "0.5887977", "0.5879435", "0.58677447", "0.58675176", "0.5866794", "0.5865983", "0.58636606", "0.5862065", "0.5862065", "0.585625", "0.5850878", "0.5841863", "0.58353674", "0.5832098", "0.5830432", "0.5829716", "0.5813145", "0.58111584", "0.58107394", "0.58107394", "0.58107394", "0.58063674", "0.5802749", "0.57940745" ]
0.0
-1
Create metastorage data region configuration with enabled persistence by default.
private DataRegionConfiguration createMetastoreDataRegionConfig(DataStorageConfiguration storageCfg) { DataRegionConfiguration cfg = new DataRegionConfiguration(); cfg.setName(METASTORE_DATA_REGION_NAME); cfg.setInitialSize(storageCfg.getSystemRegionInitialSize()); cfg.setMaxSize(storageCfg.getSystemRegionMaxSize()); cfg.setPersistenceEnabled(true); cfg.setLazyMemoryAllocation(false); return cfg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createDataStore (){\n\t\tcloseActiveStoreData ();\n\t\tif (_usablePersistenceManager){\n\t\t\tclosePersistence ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tthis.pm = DataStoreUtil.createDataStore (getDataStoreEnvironment (), true);\n\t\t_usablePersistenceManager = true;\n\t}", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "private Path createMobStoreFile(String family) throws IOException {\n return createMobStoreFile(HBaseConfiguration.create(), family);\n }", "private void createLocation() throws CoreException {\n \t\tFile file = location.append(F_META_AREA).toFile();\n \t\ttry {\n \t\t\tfile.mkdirs();\n \t\t} catch (Exception e) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_couldNotCreate, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, e));\n \t\t}\n \t\tif (!file.canWrite()) {\n \t\t\tString message = NLS.bind(CommonMessages.meta_readonly, file.getAbsolutePath());\n \t\t\tthrow new CoreException(new Status(IStatus.ERROR, IRuntimeConstants.PI_RUNTIME, IRuntimeConstants.FAILED_WRITE_METADATA, message, null));\n \t\t}\n \t\t// set the log file location now that we created the data area\n \t\tIPath logPath = location.append(F_META_AREA).append(F_LOG);\n \t\ttry {\n \t\t\tActivator activator = Activator.getDefault();\n \t\t\tif (activator != null) {\n \t\t\t\tFrameworkLog log = activator.getFrameworkLog();\n \t\t\t\tif (log != null)\n \t\t\t\t\tlog.setFile(logPath.toFile(), true);\n \t\t\t\telse if (debug())\n \t\t\t\t\tSystem.out.println(\"ERROR: Unable to acquire log service. Application will proceed, but logging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\t// set the trace file location now that we created the data area\n \t\tIPath tracePath = location.append(F_META_AREA).append(F_TRACE);\n \t\tActivator activator = Activator.getDefault();\n \t\tif (activator != null) {\n \t\t\tDebugOptions debugOptions = activator.getDebugOptions();\n \t\t\tif (debugOptions != null) {\n \t\t\t\tdebugOptions.setFile(tracePath.toFile());\n \t\t\t} else {\n \t\t\t\tSystem.out.println(\"ERROR: Unable to acquire debug service. Application will proceed, but debugging will be disabled.\"); //$NON-NLS-1$\n \t\t\t}\n \t\t}\n \t}", "public StorageConfig() {\n }", "public void setStorageRegion(String StorageRegion) {\n this.StorageRegion = StorageRegion;\n }", "@Override\n public DataStore initialize(Map<String, Object> dsInfos) {\n final String CAPACITY_IOPS = \"capacityIops\";\n\n String url = (String)dsInfos.get(\"url\");\n Long zoneId = (Long)dsInfos.get(\"zoneId\");\n Long podId = (Long)dsInfos.get(\"podId\");\n Long clusterId = (Long)dsInfos.get(\"clusterId\");\n String storagePoolName = (String)dsInfos.get(\"name\");\n String providerName = (String)dsInfos.get(\"providerName\");\n Long capacityBytes = (Long)dsInfos.get(\"capacityBytes\");\n Long capacityIops = (Long)dsInfos.get(CAPACITY_IOPS);\n String tags = (String)dsInfos.get(\"tags\");\n @SuppressWarnings(\"unchecked\")\n Map<String, String> details = (Map<String, String>)dsInfos.get(\"details\");\n\n if (podId == null) {\n throw new CloudRuntimeException(\"The Pod ID must be specified.\");\n }\n\n if (clusterId == null) {\n throw new CloudRuntimeException(\"The Cluster ID must be specified.\");\n }\n\n String storageVip = SolidFireUtil.getStorageVip(url);\n int storagePort = SolidFireUtil.getStoragePort(url);\n\n if (capacityBytes == null || capacityBytes <= 0) {\n throw new IllegalArgumentException(\"'capacityBytes' must be present and greater than 0.\");\n }\n\n if (capacityIops == null || capacityIops <= 0) {\n throw new IllegalArgumentException(\"'capacityIops' must be present and greater than 0.\");\n }\n\n HypervisorType hypervisorType = getHypervisorTypeForCluster(clusterId);\n\n if (!isSupportedHypervisorType(hypervisorType)) {\n throw new CloudRuntimeException(hypervisorType + \" is not a supported hypervisor type.\");\n }\n\n String datacenter = SolidFireUtil.getValue(SolidFireUtil.DATACENTER, url, false);\n\n if (HypervisorType.VMware.equals(hypervisorType) && datacenter == null) {\n throw new CloudRuntimeException(\"'Datacenter' must be set for hypervisor type of \" + HypervisorType.VMware);\n }\n\n PrimaryDataStoreParameters parameters = new PrimaryDataStoreParameters();\n\n parameters.setType(getStorageType(hypervisorType));\n parameters.setZoneId(zoneId);\n parameters.setPodId(podId);\n parameters.setClusterId(clusterId);\n parameters.setName(storagePoolName);\n parameters.setProviderName(providerName);\n parameters.setManaged(false);\n parameters.setCapacityBytes(capacityBytes);\n parameters.setUsedBytes(0);\n parameters.setCapacityIops(capacityIops);\n parameters.setHypervisorType(hypervisorType);\n parameters.setTags(tags);\n parameters.setDetails(details);\n\n String managementVip = SolidFireUtil.getManagementVip(url);\n int managementPort = SolidFireUtil.getManagementPort(url);\n\n details.put(SolidFireUtil.MANAGEMENT_VIP, managementVip);\n details.put(SolidFireUtil.MANAGEMENT_PORT, String.valueOf(managementPort));\n\n String clusterAdminUsername = SolidFireUtil.getValue(SolidFireUtil.CLUSTER_ADMIN_USERNAME, url);\n String clusterAdminPassword = SolidFireUtil.getValue(SolidFireUtil.CLUSTER_ADMIN_PASSWORD, url);\n\n details.put(SolidFireUtil.CLUSTER_ADMIN_USERNAME, clusterAdminUsername);\n details.put(SolidFireUtil.CLUSTER_ADMIN_PASSWORD, clusterAdminPassword);\n\n if (capacityBytes < SolidFireUtil.MIN_VOLUME_SIZE) {\n capacityBytes = SolidFireUtil.MIN_VOLUME_SIZE;\n }\n\n long lMinIops = 100;\n long lMaxIops = 15000;\n long lBurstIops = 15000;\n\n try {\n String minIops = SolidFireUtil.getValue(SolidFireUtil.MIN_IOPS, url);\n\n if (minIops != null && minIops.trim().length() > 0) {\n lMinIops = Long.parseLong(minIops);\n }\n } catch (Exception ex) {\n LOGGER.info(\"[ignored] error getting Min IOPS: \" + ex.getLocalizedMessage());\n }\n\n try {\n String maxIops = SolidFireUtil.getValue(SolidFireUtil.MAX_IOPS, url);\n\n if (maxIops != null && maxIops.trim().length() > 0) {\n lMaxIops = Long.parseLong(maxIops);\n }\n } catch (Exception ex) {\n LOGGER.info(\"[ignored] error getting Max IOPS: \" + ex.getLocalizedMessage());\n }\n\n try {\n String burstIops = SolidFireUtil.getValue(SolidFireUtil.BURST_IOPS, url);\n\n if (burstIops != null && burstIops.trim().length() > 0) {\n lBurstIops = Long.parseLong(burstIops);\n }\n } catch (Exception ex) {\n LOGGER.info(\"[ignored] error getting Burst IOPS: \" + ex.getLocalizedMessage());\n }\n\n if (lMinIops > lMaxIops) {\n throw new CloudRuntimeException(\"The parameter '\" + SolidFireUtil.MIN_IOPS + \"' must be less than or equal to the parameter '\" + SolidFireUtil.MAX_IOPS + \"'.\");\n }\n\n if (lMaxIops > lBurstIops) {\n throw new CloudRuntimeException(\"The parameter '\" + SolidFireUtil.MAX_IOPS + \"' must be less than or equal to the parameter '\" + SolidFireUtil.BURST_IOPS + \"'.\");\n }\n\n if (lMinIops != capacityIops) {\n throw new CloudRuntimeException(\"The parameter '\" + CAPACITY_IOPS + \"' must be equal to the parameter '\" + SolidFireUtil.MIN_IOPS + \"'.\");\n }\n\n if (lMinIops > SolidFireUtil.MAX_MIN_IOPS_PER_VOLUME) {\n throw new CloudRuntimeException(\"This volume's Min IOPS cannot exceed \" + NumberFormat.getInstance().format(SolidFireUtil.MAX_MIN_IOPS_PER_VOLUME) + \" IOPS.\");\n }\n\n if (lMaxIops > SolidFireUtil.MAX_IOPS_PER_VOLUME) {\n throw new CloudRuntimeException(\"This volume's Max IOPS cannot exceed \" + NumberFormat.getInstance().format(SolidFireUtil.MAX_IOPS_PER_VOLUME) + \" IOPS.\");\n }\n\n if (lBurstIops > SolidFireUtil.MAX_IOPS_PER_VOLUME) {\n throw new CloudRuntimeException(\"This volume's Burst IOPS cannot exceed \" + NumberFormat.getInstance().format(SolidFireUtil.MAX_IOPS_PER_VOLUME) + \" IOPS.\");\n }\n\n details.put(SolidFireUtil.MIN_IOPS, String.valueOf(lMinIops));\n details.put(SolidFireUtil.MAX_IOPS, String.valueOf(lMaxIops));\n details.put(SolidFireUtil.BURST_IOPS, String.valueOf(lBurstIops));\n\n SolidFireUtil.SolidFireConnection sfConnection = new SolidFireUtil.SolidFireConnection(managementVip, managementPort, clusterAdminUsername, clusterAdminPassword);\n\n SolidFireCreateVolume sfCreateVolume = createSolidFireVolume(sfConnection, storagePoolName, capacityBytes, lMinIops, lMaxIops, lBurstIops);\n\n SolidFireUtil.SolidFireVolume sfVolume = sfCreateVolume.getVolume();\n\n String iqn = sfVolume.getIqn();\n\n details.put(SolidFireUtil.VOLUME_ID, String.valueOf(sfVolume.getId()));\n\n parameters.setUuid(iqn);\n\n if (HypervisorType.VMware.equals(hypervisorType)) {\n String datastore = iqn.replace(\"/\", \"_\");\n String path = \"/\" + datacenter + \"/\" + datastore;\n\n parameters.setHost(\"VMFS datastore: \" + path);\n parameters.setPort(0);\n parameters.setPath(path);\n\n details.put(SolidFireUtil.DATASTORE_NAME, datastore);\n details.put(SolidFireUtil.IQN, iqn);\n details.put(SolidFireUtil.STORAGE_VIP, storageVip);\n details.put(SolidFireUtil.STORAGE_PORT, String.valueOf(storagePort));\n }\n else {\n parameters.setHost(storageVip);\n parameters.setPort(storagePort);\n parameters.setPath(iqn);\n }\n\n ClusterVO cluster = clusterDao.findById(clusterId);\n\n GlobalLock lock = GlobalLock.getInternLock(cluster.getUuid());\n\n if (!lock.lock(SolidFireUtil.LOCK_TIME_IN_SECONDS)) {\n String errMsg = \"Couldn't lock the DB on the following string: \" + cluster.getUuid();\n\n LOGGER.debug(errMsg);\n\n throw new CloudRuntimeException(errMsg);\n }\n\n DataStore dataStore = null;\n\n try {\n // this adds a row in the cloud.storage_pool table for this SolidFire volume\n dataStore = primaryDataStoreHelper.createPrimaryDataStore(parameters);\n\n // now that we have a DataStore (we need the id from the DataStore instance), we can create a Volume Access Group, if need be, and\n // place the newly created volume in the Volume Access Group\n List<HostVO> hosts = hostDao.findByClusterId(clusterId);\n\n String clusterUuId = clusterDao.findById(clusterId).getUuid();\n\n SolidFireUtil.placeVolumeInVolumeAccessGroups(sfConnection, sfVolume.getId(), hosts, clusterUuId);\n\n SolidFireUtil.SolidFireAccount sfAccount = sfCreateVolume.getAccount();\n Account csAccount = CallContext.current().getCallingAccount();\n\n SolidFireUtil.updateCsDbWithSolidFireAccountInfo(csAccount.getId(), sfAccount, dataStore.getId(), accountDetailsDao);\n } catch (Exception ex) {\n if (dataStore != null) {\n primaryDataStoreDao.expunge(dataStore.getId());\n }\n\n throw new CloudRuntimeException(ex.getMessage());\n }\n finally {\n lock.unlock();\n lock.releaseRef();\n }\n\n return dataStore;\n }", "private static void initializeNewOmMetadataManager(\n File omDbDir)\n throws IOException {\n omConfiguration = new OzoneConfiguration();\n omConfiguration.set(OZONE_OM_DB_DIRS,\n omDbDir.getAbsolutePath());\n omConfiguration.set(OMConfigKeys\n .OZONE_OM_ENABLE_FILESYSTEM_PATHS, \"true\");\n omMetadataManager = new OmMetadataManagerImpl(\n omConfiguration, null);\n\n String volumeKey = omMetadataManager.getVolumeKey(VOL);\n OmVolumeArgs args =\n OmVolumeArgs.newBuilder()\n .setObjectID(VOL_OBJECT_ID)\n .setVolume(VOL)\n .setAdminName(TEST_USER)\n .setOwnerName(TEST_USER)\n .build();\n omMetadataManager.getVolumeTable().put(volumeKey, args);\n\n OmBucketInfo bucketInfo1 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_ONE)\n .setObjectID(BUCKET_ONE_OBJECT_ID)\n .setBucketLayout(getFSOBucketLayout())\n .build();\n\n OmBucketInfo bucketInfo2 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_TWO)\n .setObjectID(BUCKET_TWO_OBJECT_ID)\n .setBucketLayout(getLegacyBucketLayout())\n .build();\n\n OmBucketInfo bucketInfo3 = OmBucketInfo.newBuilder()\n .setVolumeName(VOL)\n .setBucketName(BUCKET_THREE)\n .setObjectID(BUCKET_THREE_OBJECT_ID)\n .setBucketLayout(getOBSBucketLayout())\n .build();\n\n String bucketKey = omMetadataManager.getBucketKey(\n bucketInfo1.getVolumeName(), bucketInfo1.getBucketName());\n String bucketKey2 = omMetadataManager.getBucketKey(\n bucketInfo2.getVolumeName(), bucketInfo2.getBucketName());\n String bucketKey3 = omMetadataManager.getBucketKey(\n bucketInfo3.getVolumeName(), bucketInfo3.getBucketName());\n\n omMetadataManager.getBucketTable().put(bucketKey, bucketInfo1);\n omMetadataManager.getBucketTable().put(bucketKey2, bucketInfo2);\n omMetadataManager.getBucketTable().put(bucketKey3, bucketInfo3);\n }", "@Test public void buildManaged_persistentZone() {\n // Restart.\n Location loc = Location.create(ZONE_DIR);\n Zone zone = Zone.connect(loc);\n\n Quad q1 = SSE.parseQuad(\"(:g :s :p 1)\");\n Quad q2 = SSE.parseQuad(\"(:g :s :p 2)\");\n\n {\n DatasetGraph dsg = ManagedDatasetBuilder.create()\n .deltaLink(deltaLink)\n .logName(\"ABD\")\n .zone(zone)\n .syncPolicy(SyncPolicy.TXN_RW)\n .storageType(LocalStorageType.TDB2)\n .build();\n\n DeltaConnection conn = (DeltaConnection)(dsg.getContext().get(symDeltaConnection));\n Txn.executeWrite(dsg, ()->dsg.add(q1));\n Txn.executeRead( conn.getDatasetGraph(), ()->assertTrue(conn.getDatasetGraph().contains(q1)) );\n }\n\n // Same zone\n Zone.clearZoneCache();\n zone = Zone.connect(loc);\n // Storage should be recovered from the on-disk state.\n\n {\n DatasetGraph dsg1 = ManagedDatasetBuilder.create()\n .deltaLink(deltaLink)\n .logName(\"ABD\")\n .zone(zone)\n .syncPolicy(SyncPolicy.TXN_RW)\n //.storageType(LocalStorageType.TDB2) // Storage required. Should detect [FIXME]\n .build();\n DatasetGraph dsg2 = ManagedDatasetBuilder.create()\n .deltaLink(deltaLink)\n .logName(\"ABD\")\n .zone(zone)\n .syncPolicy(SyncPolicy.TXN_RW)\n //.storageType(LocalStorageType.TDB) // Wrong storage - does not matter; dsg1 setup choice applies\n .build();\n DeltaConnection conn1 = (DeltaConnection)(dsg1.getContext().get(symDeltaConnection));\n DeltaConnection conn2 = (DeltaConnection)(dsg2.getContext().get(symDeltaConnection));\n\n Txn.executeRead(conn1.getDatasetGraph(), ()->assertTrue(conn1.getDatasetGraph().contains(q1)) );\n Txn.executeWrite(conn2.getDatasetGraph(), ()->conn2.getDatasetGraph().add(q2));\n Txn.executeRead(conn1.getDatasetGraph(), ()->assertTrue(conn1.getDatasetGraph().contains(q2)) );\n }\n }", "public MetaDataManager createMetaDataManager() throws ServiceException {\r\n initialize(); \r\n return new MetaDataManager(multiDomainMetaService); \r\n\t}", "private Path createMobStoreFile(Configuration conf, String family) throws IOException {\n HColumnDescriptor hcd = new HColumnDescriptor(family);\n hcd.setMaxVersions(4);\n hcd.setMobEnabled(true);\n mobCacheConf = new MobCacheConfig(conf, hcd);\n return createMobStoreFile(conf, hcd);\n }", "@Override\n public void init() throws MetadataException {\n if (!config.isEnableIDTableLogFile()\n && config.getDeviceIDTransformationMethod().equals(\"SHA256\")) {\n throw new MetadataException(\n \"enableIDTableLogFile OR deviceIDTransformationMethod==\\\"Plain\\\"\");\n }\n File schemaRegionFolder = SystemFileFactory.INSTANCE.getFile(schemaRegionDirPath);\n if (!schemaRegionFolder.exists()) {\n if (schemaRegionFolder.mkdirs()) {\n logger.info(\"create schema region folder {}\", schemaRegionDirPath);\n } else {\n if (!schemaRegionFolder.exists()) {\n logger.error(\"create schema region folder {} failed.\", schemaRegionDirPath);\n throw new SchemaDirCreationFailureException(schemaRegionDirPath);\n }\n }\n }\n logger.info(\"initialized successfully: {}\", this);\n }", "public void setup() {\n\t\tif(!plugin.getDataFolder().exists()) {\n\t\t\tplugin.getDataFolder().mkdir();\n\t\t}\n\n\t\t// Create main file\n\t\tString FileLocation = plugin.getDataFolder().toString() + File.separator + \"Storage\" + \".yml\";\n\t\tFile tmp = new File(FileLocation);\n\t\tstoragefile = tmp;\n\t\t// Check if file exists\n\t\tif (!storagefile.exists()) {\n\t\t\ttry {\n\t\t\t\tstoragefile.createNewFile();\n\t\t\t}catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tBukkit.getServer().getConsoleSender().sendMessage(net.md_5.bungee.api.ChatColor.RED + \"Storage file unable to be created!\");\n\t\t\t}\n\t\t}\n\t\tstoragecfg = YamlConfiguration.loadConfiguration(storagefile);\n\t\tcreateStorageValues();\n\t}", "TestStorage initializeSourceStorage(SyncOptions options, boolean addMappingMetadata) {\n TestStorage storage = new TestStorage();\n storage.withConfig(testConfig).withOptions(options);\n for (String key : pathMap.keySet()) {\n boolean directory = directories.contains(key);\n ObjectMetadata meta = new ObjectMetadata().withContentLength(0).withDirectory(directory);\n // add mapping metadata if necessary\n if (addMappingMetadata) meta.setUserMetadataValue(mappingMetadataName, pathMap.get(key));\n SyncObject syncObject = new SyncObject(this.storage, key, meta, new ByteArrayInputStream(new byte[0]), new ObjectAcl());\n // updateObject expects a storage identifier (absolute path), so here we have to add the\n // internal path prefix that it uses\n storage.updateObject(testStoragePrefix + key, syncObject);\n }\n return storage;\n }", "public Storage() {\n\t\tstorageReader = new StorageReader();\n\t\tstorageWriter = new StorageWriter();\n\t\tdirectoryManager = new DirectoryManager();\n\n\t\tFile loadedDirectory = storageReader.loadDirectoryConfigFile(FILENAME_DIRCONFIG);\n\t\tif (loadedDirectory != null) {\n\t\t\tif (directoryManager.createDirectory(loadedDirectory) == true) {\n\t\t\t\tdirectory = loadedDirectory;\n\t\t\t\tSystem.out.println(\"{Storage} Directory loaded | \" + directory.getAbsolutePath());\n\t\t\t} else { //loaded directory was invalid or could not be created\n\t\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t\t}\n\t\t} else { //directory config file was not found\n\t\t\tdirectoryManager.createDirectory(DEFAULT_DIRECTORY);\n\t\t\tdirectory = DEFAULT_DIRECTORY;\n\t\t}\n\t}", "public String getStorageRegion() {\n return this.StorageRegion;\n }", "public StorageConfiguration() {\n }", "public ManagedConfiguration createConfiguration() throws SmartFrogException, RemoteException {\n return ManagedConfiguration.createConfiguration(this, true, isClusterRequired(), false);\n }", "void setup( File storeDir, Consumer<GraphDatabaseService> create );", "public SystemMetadataDaoMetacatImpl() {\n this(MetacatDataSourceFactory.getMetacatDataSource());\n }", "private static Datacenter CreateDataCenter() {\n\t\tList<Pe> peList = new ArrayList<Pe>();\n\t\t//One PE with 1000 Mips\n\t\tPeProvisionerSimple peProvisioner = new PeProvisionerSimple(1000);\n\t\t////Four 1000 MIPS PEs\n\t\tfor (int id = 0; id < 4; id++) {\n\t\t\tPe core = new Pe(id, peProvisioner);\n\t\t\tpeList.add(core);\n\t\t}\n\t\t//Initialize the hosts\n\t\tList<Host> hostList = new ArrayList<Host>();\n\t\t//8 GB RAM\n\t\tint ram = 8000;\n\t\t//1 MPBS network bandwidth\n\t\tint bw = 1000;\n\t\t//100 GB storage\n\t\tlong storage = 100000;\n\t\tfor (int id = 0; id < 4; id++) {\n\t\t\tHost host = new Host(id, new RamProvisionerSimple(ram), new BwProvisionerSimple(bw), storage, peList,\n\t\t\t\t\tnew VmSchedulerSpaceShared(peList));\n\t\t\thostList.add(host);\n\t\t}\n\t\t//Initialize the data center\n\t\tString architecture = \"x64\";\n\t\tString os = \"Kelly Linux\";\n\t\tString vmm = \"XEN\";\n\t\tdouble timeZone = -4.0;\n\t\tdouble computeCostPerSec = 3.0;\n\t\tdouble costPerMem = 1.0;\n\t\tdouble costPerStorage = 0.05;\n\t\tdouble costPerBW = 0.10;\n\t\tDatacenterCharacteristics datacenterCharacteristics = new DatacenterCharacteristics(architecture, os, vmm,\n\t\t\t\thostList, timeZone, computeCostPerSec, costPerMem, costPerStorage, costPerBW);\n\t\tLinkedList<Storage> SANstorage = new LinkedList<Storage>();\n\t\tDatacenter datacenter = null;\n\t\ttry {\n\t\t\tdatacenter = new Datacenter(\"datacenter0\", datacenterCharacteristics,\n\t\t\t\t\tnew VmAllocationPolicySimple(hostList), SANstorage, 1);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn datacenter;\n\t}", "CommunityStorage createCommunityStorage( String name, byte[] user_short_pid ) \r\n throws CommunityException;", "boolean hasStorageConfig();", "Cloud createCloud();", "public static StoreMap createEntity(EntityManager em) {\n StoreMap storeMap = new StoreMap()\n .validityStart(DEFAULT_VALIDITY_START)\n .validityEnd(DEFAULT_VALIDITY_END)\n .url(DEFAULT_URL)\n .wallMap(DEFAULT_WALL_MAP)\n .pathMap(DEFAULT_PATH_MAP)\n .dimensionX(DEFAULT_DIMENSION_X)\n .dimensionY(DEFAULT_DIMENSION_Y)\n .scale(DEFAULT_SCALE);\n // Add required entity\n Store store = StoreResourceIntTest.createEntity(em);\n em.persist(store);\n em.flush();\n storeMap.setStore(store);\n return storeMap;\n }", "private void initConfig() throws DatabaseAccessException {\n\t\tStatement stmt = null;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\n\t\t\t// With synchronous OFF, SQLite continues without syncing\n\t\t\t// as soon as it has handed data off to the operating system.\n\t\t\tstmt.execute(\"PRAGMA synchronous = OFF;\");\n\n\t\t\t// The MEMORY journaling mode stores the rollback journal in volatile RAM.\n\t\t\t// This saves disk I/O but at the expense of database safety and integrity.\n\t\t\tstmt.execute(\"PRAGMA journal_mode = MEMORY;\");\n\n\t\t\t// The journal_size_limit pragma may be used to limit the size of rollback-journal.\n\t\t\t// -1 means no limit.\n\t\t\tstmt.execute(\"PRAGMA journal_size_limit = -1;\");\n\n\t\t\t// If the argument N is negative, then the number of cache pages\n\t\t\t// is adjusted to use approximately N*1024 bytes of memory.\n\t\t\tstmt.execute(\"PRAGMA cache_size = -50000;\");\n\n\t\t\t// Once an encoding has been set for a database, it cannot be changed.\n\t\t\tstmt.execute(\"PRAGMA encoding = \\\"UTF-8\\\";\");\n\n\t\t\t// When temp_store is MEMORY temporary tables and indices are kept\n\t\t\t// in as if they were pure in-memory databases memory.\n\t\t\tstmt.execute(\"PRAGMA temp_store = MEMORY;\");\n\n\t\t\tstmt.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tthrow new DatabaseAccessException(Failure.CONFIG);\n\t\t}\n\t}", "public void initPersistence (){\n\t\tif (!this._onAppInit){\n\t\t\t/*\n\t\t\t * Evita stackoverflow\n\t\t\t */\n\t\t\tcloseActiveStoreData ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tfinal Properties properties = this._dataStoreEnvironment.getDataStoreProperties ();\n\t\tfinal PersistenceManagerFactory pmf =\n\t\t\t\t\t JDOHelper.getPersistenceManagerFactory(properties);\n\t\t\n//\t\tSystem.out.println (\"Setting persistent manager from \"+properties);\n\t\t\n\t\tthis.pm = pmf.getPersistenceManager();\n\t\t\n\t\tif (this.pm.currentTransaction().isActive ()){\n\t\t\tthis.pm.currentTransaction().commit();\n\t\t}\n\t\tthis.pm.currentTransaction().setOptimistic (false);\n//\t\tthis.pm.currentTransaction().begin();\n\t}", "public PersistentDataStore() {\n datastore = DatastoreServiceFactory.getDatastoreService();\n }", "public DataPersistence() {\n storage = new HashMap<>();\n idCounter = 0;\n }", "public StorageManager() {\n makeDirectory();\n }", "private static void populateOMDB() throws IOException {\n // Bucket1 FSO layout\n writeKeyToOm(reconOMMetadataManager,\n KEY_ONE,\n BUCKET_ONE,\n VOL,\n FILE_ONE,\n KEY_ONE_OBJECT_ID,\n BUCKET_ONE_OBJECT_ID,\n BUCKET_ONE_OBJECT_ID,\n VOL_OBJECT_ID,\n KEY_ONE_SIZE,\n getFSOBucketLayout());\n\n // Bucket2 Legacy layout\n writeKeyToOm(reconOMMetadataManager,\n KEY_TWO,\n BUCKET_TWO,\n VOL,\n FILE_TWO,\n KEY_TWO_OBJECT_ID,\n PARENT_OBJECT_ID_ZERO,\n BUCKET_TWO_OBJECT_ID,\n VOL_OBJECT_ID,\n KEY_TWO_SIZE,\n getLegacyBucketLayout());\n\n // Bucket3 OBS layout\n writeKeyToOm(reconOMMetadataManager,\n KEY_THREE,\n BUCKET_THREE,\n VOL,\n FILE_THREE,\n KEY_THREE_OBJECT_ID,\n PARENT_OBJECT_ID_ZERO,\n BUCKET_THREE_OBJECT_ID,\n VOL_OBJECT_ID,\n KEY_THREE_SIZE,\n getOBSBucketLayout());\n }", "@Override\n @POST\n @Path(\"/storages\")\n public Response createStorage() throws Exception {\n URI resourceUri = new URI(\"/1\");\n return Response.created(resourceUri).build();\n }", "private StorageSystemConfiguration() {\r\n super(IStorageSystemConfiguration.TYPE_ID);\r\n }", "@Override\n\tpublic Map<String, Object> create(StoreBase entity) {\n\t\treturn null;\n\t}", "public interface IStorageManager {\n\n\tpublic String getStorageType();\n\n\tpublic String getStorageId();\n\n\tpublic void initialize(String configFile) throws Exception;\n}", "@Override\n\tpublic void setStorage() {\n\t\tcom.setStorage(\"256g SSD\");\n\t}", "public DefaultStorage() {\n }", "public static void createCacheServer1() throws Exception {\n ds = (new ClearGlobalDUnitTest()).getSystem(props);\n cache = CacheFactory.create(ds);\n AttributesFactory factory = new AttributesFactory();\n factory.setScope(Scope.GLOBAL);\n RegionAttributes attr = factory.create();\n region = cache.createRegion(REGION_NAME, attr);\n\n }", "public interface DataStoreManager {\n\n\t/**\n\t * Create a database file.\n\t * \n\t * If only a file name is given, the database will create in %USER_HOME%/zoodb on Windows \n\t * or ~/zoodb on Linux/UNIX.\n\t * \n\t * If a full path is given, the full path will be used instead.\n\t * \n * Any necessary parent folders are created automatically.\n\n * It is recommended to use <code>.zdb</code> as file extension, for example \n * <code>myDatabase.zdb</code>.\n * \n\t * @param dbName The database file name or path \n\t * @see ZooJdoProperties#ZooJdoProperties(String)\n\t */\n\tvoid createDb(String dbName);\n\t\n\t/**\n\t * Check if a database exists. This checks only whether the file exists, not whether it is a \n\t * valid database file.\n\t * \n\t * @param dbName The database file name or path \n\t * @return <code>true</code> if the database exists.\n\t */\n\tboolean dbExists(String dbName);\n\n /**\n * Delete a database(-file).\n * @param dbName The database file name or path \n * @return {@code true} if the database could be removed, otherwise false\n */\n\tboolean removeDb(String dbName);\n\t\n /**\n * \n * @return The default database folder.\n */\n\tString getDefaultDbFolder();\n\t\n\t/**\n\t * Calculates the full path for the given database name, whether the database exists or not.\n\t * @param dbName The database file name or path \n\t * @return The full path of the database given by <code>dbName</code>.\n\t */\n\tString getDbPath(String dbName);\n}", "@SuppressWarnings(\"deprecation\")\n private static void createCompressedRegion(final String regionName) {\n final Cache cache = CacheFactory.getAnyInstance();\n\n RegionFactory<String, Integer> dataRegionFactory =\n cache.createRegionFactory(RegionShortcut.REPLICATE);\n dataRegionFactory.setCompressor(SnappyCompressor.getDefaultInstance());\n dataRegionFactory.create(regionName);\n }", "public InMemoryKeyValueStorage() {\n this(SEGMENT_IDENTIFIER);\n }", "public DataStorage getDataStorage();", "interface WithStorageCapacity {\n /**\n * Sets the storage limit for the SQL Azure Database Elastic Pool in MB.\n *\n * @param storageMB storage limit for the SQL Azure Database Elastic Pool in MB\n * @return The next stage of the definition.\n */\n @Deprecated\n SqlElasticPoolOperations.DefinitionStages.WithCreate withStorageCapacity(int storageMB);\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "private static void initMetadataContext(SessionState state)\n\t{\n\t\t// define MetadataSets map\n\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\t\tif(metadataGroups == null)\n\t\t{\n\t\t\tmetadataGroups = new Vector();\n\t\t\tstate.setAttribute(STATE_METADATA_GROUPS, metadataGroups);\n\t\t}\n\t\t// define DublinCore\n\t\tif( !metadataGroups.contains(new MetadataGroup(rb.getString(\"opt_props\"))) )\n\t\t{\n\t\t\tMetadataGroup dc = new MetadataGroup( rb.getString(\"opt_props\") );\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_TITLE);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_DESCRIPTION);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_ALTERNATIVE);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_CREATOR);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_PUBLISHER);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_SUBJECT);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_CREATED);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_ISSUED);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_MODIFIED);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_TABLEOFCONTENTS);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_ABSTRACT);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_CONTRIBUTOR);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_TYPE);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_FORMAT);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_IDENTIFIER);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_SOURCE);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_LANGUAGE);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_COVERAGE);\n\t\t\t// dc.add(ResourcesMetadata.PROPERTY_DC_RIGHTS);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_AUDIENCE);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_EDULEVEL);\n\t\t\tmetadataGroups.add(dc);\n\t\t\tstate.setAttribute(STATE_METADATA_GROUPS, metadataGroups);\n\t\t}\n\t\t/*\n\t\t// define DublinCore\n\t\tif(!metadataGroups.contains(new MetadataGroup(\"Test of Datatypes\")))\n\t\t{\n\t\t\tMetadataGroup dc = new MetadataGroup(\"Test of Datatypes\");\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_TITLE);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_DESCRIPTION);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_ANYURI);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_DOUBLE);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_DATETIME);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_TIME);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_DATE);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_BOOLEAN);\n\t\t\tdc.add(ResourcesMetadata.PROPERTY_DC_INTEGER);\n\t\t\tmetadataGroups.add(dc);\n\t\t\tstate.setAttribute(STATE_METADATA_GROUPS, metadataGroups);\n\t\t}\n\t\t*/\n\t}", "private static void createMetadataNode(MetadataStore store, String path, byte[] data)\n throws InterruptedException, ExecutionException {\n try {\n store.put(path, data, Optional.of(-1L)).get();\n } catch (ExecutionException e) {\n if (!(e.getCause() instanceof MetadataStoreException.BadVersionException)) {\n throw e;\n }\n // Ignore\n }\n }", "WithCreate withRegion(Region location);", "WithCreate withRegion(Region location);", "public RockyStorage(String exportName) {\n\t\t\tsuper(exportName);\n\t\t\tSystem.out.println(\"RockyStorage constructor entered\");\n\t\t\tif (RockyController.backendStorage.equals(RockyController.BackendStorageType.DynamoDBLocal)) {\n\t\t\t\t//pBmStore = new ValueStorageDynamoDB(pBmTableName, true);\n\t\t\t\t//cloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, true);\n\t\t\t\t//cloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, true);\n\t\t\t\tcloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, ValueStorageDynamoDB.AWSRegionEnum.LOCAL);\n\t\t\t\tcloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, ValueStorageDynamoDB.AWSRegionEnum.LOCAL);\n\t\t\t} else if (RockyController.backendStorage.equals(RockyController.BackendStorageType.DynamoDB_SEOUL)) {\n\t\t\t\t//pBmStore = new ValueStorageDynamoDB(pBmTableName, false);\n\t\t\t\t//cloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, false);\n\t\t\t\t//cloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, false);\n\t\t\t\tcloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, ValueStorageDynamoDB.AWSRegionEnum.SEOUL);\n\t\t\t\tcloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, ValueStorageDynamoDB.AWSRegionEnum.SEOUL);\n\t\t\t} else if (RockyController.backendStorage.equals(RockyController.BackendStorageType.DynamoDB_LONDON)) {\n\t\t\t\t//pBmStore = new ValueStorageDynamoDB(pBmTableName, false);\n\t\t\t\t//cloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, false);\n\t\t\t\t//cloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, false);\n\t\t\t\tcloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, ValueStorageDynamoDB.AWSRegionEnum.LONDON);\n\t\t\t\tcloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, ValueStorageDynamoDB.AWSRegionEnum.LONDON);\n\t\t\t} else if (RockyController.backendStorage.equals(RockyController.BackendStorageType.DynamoDB_OHIO)) {\n\t\t\t\t//pBmStore = new ValueStorageDynamoDB(pBmTableName, false);\n\t\t\t\t//cloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, false);\n\t\t\t\t//cloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, false);\n\t\t\t\tcloudEpochBitmaps = new ValueStorageDynamoDB(cloudEpochBitmapsTableName, ValueStorageDynamoDB.AWSRegionEnum.OHIO);\n\t\t\t\tcloudBlockSnapshotStore = new ValueStorageDynamoDB(cloudBlockSnapshotStoreTableName, ValueStorageDynamoDB.AWSRegionEnum.OHIO);\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Error: Unknown backendStorageType\");\n\t \t\t \tSystem.exit(1);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tlocalEpochBitmaps = new ValueStorageLevelDB(localEpochBitmapsTableName);\n\t\t\t\tlocalBlockSnapshotStore = new ValueStorageLevelDB(localBlockSnapshotStoreTableName);\n\t\t\t\tversionMap = new ValueStorageLevelDB(versionMapTableName);\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tnumBlock = (int) (size() / 512); //blocksize=512bytes\n\t\t\tpresenceBitmap = new BitSet(numBlock);\n\t\t\tdirtyBitmap = new BitSet(numBlock);\n\t\t\tpresenceBitmap.set(0, numBlock);\n\t\t\tdirtyBitmap.clear();\n\t\t\tqueue = new LinkedBlockingDeque<WriteRequest>();\n\t\t\tepochCnt = getEpoch();\n\t\t\tprefetchedEpoch = getPrefetchedEpoch();\n\t\t\t//System.out.println(\">>>> epochCn=\" + epochCnt);\n\t\t\twriteMap = new HashMap<Integer, byte[]>();\n\t\t\tCloudPackageManager cpm = new CloudPackageManager(queue);\n\t\t\tcloudPackageManagerThread = new Thread(cpm);\n\t\t\tPrefetcher prefetcher = new Prefetcher(this);\n\t\t\tprefetcherThread = new Thread(prefetcher);\n\t\t\tRockyController.role = RockyControllerRoleType.None;\n\t\t\troleSwitchFlag = false;\n\t\t\troleSwitcherThread = new Thread(new RoleSwitcher());\n\t\t\troleSwitcherThread.start();\n\t\t\tcui = new ControlUserInterfaceRunner(roleSwitcherThread);\n\t\t\tcui.rockyStorage = this;\n\t\t\tcontrolUIThread = new Thread(cui);\n\t\t\tcontrolUIThread.start();\n\t\t}", "private HRegionInfo createRegion(final HTableDescriptor\n htd, byte[] startKey, byte[] endKey)\n throws IOException {\n Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = new HRegionInfo(htd.getTableName(), startKey, endKey);\n MetaTableAccessor.addRegionToMeta(meta, hri);\n meta.close();\n return hri;\n }", "private void configStorage(){\n try {\n final StorageReference storageReference = FirebaseStorage.getInstance()\n .getReference(\"motolost/\"+ String.valueOf(Math.random()) + getFileExtension(filePath));\n storageReference.putFile(filePath)\n .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n return storageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n saveRegistry(downloadUri.toString());\n }\n }\n });\n } catch (Exception ex) {\n Constant.showMessage(\"Exception\", ex.getMessage(), this);\n }\n }", "public void setStorageLocation( String name ) throws IOException {\n\t \tlog.config( \"update Storage Location to: \"+name );\n\t\tPersistentData data = null;\n\t\ttry {\n\t\t\tdata = io.readState();\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.log( Level.SEVERE, ex.toString(), ex );\n\t\t\tdata = new PersistentData();\n\t\t}\n\t\tio.setFile( name );\n\t\tio.writeState(data);\n\t}", "@Override\n public void initialize(Map<String, Param> params) throws TikaConfigException {\n //params have already been set...ignore them\n //TODO -- add other params to the builder as needed\n storage = StorageOptions.newBuilder().setProjectId(projectId).build().getService();\n }", "@Bean\n\tpublic DataSourceDao dataSourceDao() {\n\t\tDataSourceDao metadata = new DataSourceDao();\n\t\tmetadata.put(\"rslite\", dsRSLite());\n\t\tmetadata.put(\"rastreosat\", dsRS());\n\t\tmetadata.put(\"entel\", dsEntel());\n\t\tmetadata.put(\"mongo\", dsMongo());\n\t\treturn metadata;\n\t}", "@Override\n protected CheckpointStorageAccess createCheckpointStorage(Path checkpointDir) throws Exception {\n return new MemoryBackendCheckpointStorageAccess(\n new JobID(), checkpointDir, null, DEFAULT_MAX_STATE_SIZE);\n }", "default void createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataStoreMethod(), responseObserver);\n }", "private void createConfig() {\n try {\n if (!getDataFolder().exists()) {\n getDataFolder().mkdirs();\n }\n File file = new File(getDataFolder(), \"config.yml\");\n if (!file.exists()) {\n getLogger().info(\"config.yml not found :( Creating one with default values...\");\n saveDefaultConfig();\n } else {\n getLogger().info(\"config.yml found :) Loading...\");\n }\n } catch (Exception e) {\n e.printStackTrace();\n\n }\n\n }", "OStorage getStorage();", "@Nonnull\n HashMap<String, Object> createAgentConfiguration();", "private Datacenter createDatacenter(String name){\n List<Host> hostList = new ArrayList<Host>();\n\n for (int i=0; i<HostCount; i++){\n\n // 2. A Machine contains one or more PEs or CPUs/Cores.\n List<Pe> peList = new ArrayList<Pe>();\n\n // 3. Create PEs and add these into a list.\n for (int j=0; j<HostCoreCount; j++){\n peList.add(new Pe(j, new PeProvisionerSimple(HostCoreMips)));\n }\n\n\n //in this example, the VMAllocatonPolicy in use is SpaceShared. It means that only one VM\n //is allowed to run on each Pe. As each Host has only one Pe, only one VM can run on each Host.\n hostList.add(\n new Host(\n i,\n new RamProvisionerSimple(HostRam),\n new BwProvisionerSimple(HostBandwidth),\n HostStorage,\n peList,\n new VmSchedulerSpaceShared(peList)\n )\n );\n }\n\n\n // 5. Create a DatacenterCharacteristics object that stores the\n // properties of a data center: architecture, OS, list of\n // Machines, allocation policy: time- or space-shared, time zone\n // and its price (G$/Pe time unit).\n String arch = \"x86\"; // system architecture\n String os = \"Linux\"; // operating system\n String vmm = \"Xen\";\n double time_zone = 10.0; // time zone this resource located\n double cost = 3.0; // the cost of using processing in this resource\n double costPerMem = 0.05;\t\t// the cost of using memory in this resource\n double costPerStorage = 0.001;\t// the cost of using storage in this resource\n double costPerBw = 0.0;\t\t\t// the cost of using bw in this resource\n LinkedList<Storage> storageList = new LinkedList<Storage>();\t//we are not adding SAN devices by now\n\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\n arch, os, vmm, hostList, time_zone, cost, costPerMem, costPerStorage, costPerBw);\n\n // 6. Finally, we need to create a PowerDatacenter object.\n Datacenter datacenter = null;\n\n try {\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return datacenter;\n }", "private static Datastore setDatastore(Configuration config, String dbName) {\n MongoCredential credential = MongoCredential.createCredential(\n config.getString(\"data.mongo.user\"),\n config.getString(\"data.mongo.db\"),\n config.getString(\"data.mongo.password\").toCharArray());\n MongoClientSettings settings = MongoClientSettings.builder()\n .uuidRepresentation(UuidRepresentation.JAVA_LEGACY)\n .applyToClusterSettings(builder -> builder.hosts(Collections.singletonList(new ServerAddress(config.getString(\"data.mongo.host\"), config.getInt(\"data.mongo.port\")))))\n .credential(credential)\n .build();\n Datastore datastore = Morphia.createDatastore(MongoClients.create(settings), dbName, MapperOptions.builder()\n .enablePolymorphicQueries(true)\n .build());\n if (dbName.equalsIgnoreCase(\"master\")) datastore.getMapper().map(Event.class);\n else datastore.getMapper().map(DataPlayer.class);\n datastore.ensureIndexes();\n datastore.ensureCaps();\n datastore.enableDocumentValidation();\n return datastore;\n }", "private CinaImageDataSetInformation createDataSetInformation()\n {\n CinaImageDataSetInformation metadataDataSetInfo = new CinaImageDataSetInformation();\n metadataDataSetInfo.setSampleCode(replicaSampleId.getSampleCode());\n metadataDataSetInfo.setSpaceCode(replicaSampleId.getSpaceLevel().getSpaceCode());\n metadataDataSetInfo.setDataSetType(globalState.getImageDataSetType().getDataSetType());\n metadataDataSetInfo.setDataSetKind(DataSetKind.PHYSICAL);\n List<String> parentDataSetCodes =\n Collections.singletonList(bundleMetadataDataSetInformation.getDataSetCode());\n metadataDataSetInfo.setParentDataSetCodes(parentDataSetCodes);\n metadataDataSetInfo.setShareId(bundleMetadataDataSetInformation.getShareId());\n return metadataDataSetInfo;\n }", "private static void init() throws Exception \r\n\t{\r\n dynamoDB = new AmazonDynamoDBClient(new ClasspathPropertiesFileCredentialsProvider());\r\n Region usEast1 = Region.getRegion(Regions.US_EAST_1);\r\n dynamoDB.setRegion(usEast1);\r\n }", "public abstract FlowNodeStorage instantiateStorage(MockFlowExecution exec, File storageDirectory);", "public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }", "public com.google.longrunning.Operation createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMetadataStoreMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n createMetadataStore(com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMetadataStoreMethod(), getCallOptions()), request);\n }", "public boolean createCustomTemperatureConfig() {\n TEMPERATURES.getConfig().save();\n return true;\n }", "protected abstract void createDatabaseData(EntityManager entityManager);", "private void loadPersistedData() {\n IntegerRange storedAutoStartOnDisconnectDelayRange =\n AUTOSTART_ON_DISCONNECT_DELAY_RANGE_SETTING.load(mDeviceDict);\n if (storedAutoStartOnDisconnectDelayRange != null) {\n mPilotingItf.getAutoStartOnDisconnectDelay().updateBounds(storedAutoStartOnDisconnectDelayRange);\n }\n\n DoubleRange endingHoveringAltitudeRange = ENDING_HOVERING_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (endingHoveringAltitudeRange != null) {\n mPilotingItf.getEndingHoveringAltitude().updateBounds(endingHoveringAltitudeRange);\n }\n\n DoubleRange minAltitudeRange = MIN_ALTITUDE_RANGE_SETTING.load(mDeviceDict);\n if (minAltitudeRange != null) {\n mPilotingItf.getMinAltitude().updateBounds(minAltitudeRange);\n }\n\n applyPresets();\n }", "WithCreate withRegion(String location);", "WithCreate withRegion(String location);", "public StoreProvider() {\n super(null,\n Map.of( Namespaces.GML, \"application/gml+xml\",\n Namespaces.CSW, \"application/vnd.ogc.csw_xml\",\n LegacyNamespaces.CSW, \"application/vnd.ogc.csw_xml\",\n LegacyNamespaces.GMD, \"application/vnd.iso.19139+xml\",\n LegacyNamespaces.GMI, \"application/vnd.iso.19139+xml\",\n LegacyNamespaces.GMI_ALIAS, \"application/vnd.iso.19139+xml\"),\n Map.of(\"MD_Metadata\", \"application/vnd.iso.19139+xml\"));\n // More types to be added in future versions.\n }", "@Bean\n public MetadataGenerator metadataGenerator() {\n final MetadataGenerator metadataGenerator = new MetadataGenerator();\n metadataGenerator.setEntityId(this.samlProperties.getSp().getEntityId());\n metadataGenerator.setExtendedMetadata(extendedMetadata());\n metadataGenerator.setIncludeDiscoveryExtension(false);\n metadataGenerator.setKeyManager(keyManager());\n if (this.samlProperties.getSp().getEntityBaseURL() != null) {\n metadataGenerator.setEntityBaseURL(this.samlProperties.getSp().getEntityBaseURL());\n }\n return metadataGenerator;\n }", "private void getMetadata() {\n masterRoot = AbstractMetadata.getAbstractedMetadata(sourceProduct);\n masterMetadata = new MetadataDoris(masterRoot);\n masterOrbit = new OrbitsDoris();\n masterOrbit.setOrbit(masterRoot);\n \n // SLAVE METADATA\n // hash table or just map for slaves - now it supports only a single sourceSlave image\n slaveRoot = sourceProduct.getMetadataRoot().getElement(AbstractMetadata.SLAVE_METADATA_ROOT).getElementAt(0);\n slaveMetadata = new MetadataDoris(slaveRoot);\n slaveOrbit = new OrbitsDoris();\n slaveOrbit.setOrbit(slaveRoot);\n }", "public void setStorageType(short type) {\n\tstorageType = type;\n }", "private Path createMobStoreFile(Configuration conf, HColumnDescriptor hcd)\n throws IOException {\n // Setting up a Store\n HTableDescriptor htd = new HTableDescriptor(TableName.valueOf(TABLE));\n htd.addFamily(hcd);\n HMobStore mobStore = (HMobStore) region.getStore(hcd.getName());\n KeyValue key1 = new KeyValue(ROW, hcd.getName(), QF1, 1, VALUE);\n KeyValue key2 = new KeyValue(ROW, hcd.getName(), QF2, 1, VALUE);\n KeyValue key3 = new KeyValue(ROW2, hcd.getName(), QF3, 1, VALUE2);\n KeyValue[] keys = new KeyValue[] { key1, key2, key3 };\n int maxKeyCount = keys.length;\n HRegionInfo regionInfo = new HRegionInfo();\n StoreFile.Writer mobWriter = mobStore.createWriterInTmp(currentDate,\n maxKeyCount, hcd.getCompactionCompression(), regionInfo.getStartKey());\n Path mobFilePath = mobWriter.getPath();\n String fileName = mobFilePath.getName();\n mobWriter.append(key1);\n mobWriter.append(key2);\n mobWriter.append(key3);\n mobWriter.close();\n String targetPathName = MobUtils.formatDate(currentDate);\n Path targetPath = new Path(mobStore.getPath(), targetPathName);\n mobStore.commitFile(mobFilePath, targetPath);\n return new Path(targetPath, fileName);\n }", "@Override\n\tpublic PersistedRegion load(final Region region) throws Exception {\n\t\tfinal long startTime = System.currentTimeMillis();\n\t\tPersistedRegion persistedRegion = RegionDatastoreAccessService\n\t\t\t\t.getInstance().load(region.getId());\n\t\tLOG.info(\"Fetching persisted region for region \" + region\n\t\t\t\t+ \" from datastore took \"\n\t\t\t\t+ (System.currentTimeMillis() - startTime) + \" ms.\");\n\n\t\tif (persistedRegion == null || persistedRegion.hasMissingSubregions()) {\n\t\t\t// if null, convert the Region into PersistedRegion. left parent to\n\t\t\t// null since we assume this is a province level region.\n\t\t\tif (persistedRegion == null) {\n\t\t\t\tpersistedRegion = RegionDatastoreAccessService.getInstance()\n\t\t\t\t\t\t.toPersistedRegion(region, null);\n\t\t\t}\n\n\t\t\t// fetch the subregions\n\t\t\tfinal List<Region> kpuSubregions = fetchSubregionsFromKPU(region\n\t\t\t\t\t.getId());\n\n\t\t\tLOG.finer(\"Fetched subregion of region \" + region + \" are \"\n\t\t\t\t\t+ kpuSubregions);\n\n\t\t\t// convert subregions to PersistedRegion with the persistedRegion\n\t\t\t// constructed above as its parent entity\n\t\t\tfinal Collection<PersistedRegion> persistedSubregions = RegionDatastoreAccessService\n\t\t\t\t\t.getInstance().toPersistedRegions(kpuSubregions,\n\t\t\t\t\t\t\tpersistedRegion);\n\n\t\t\tLOG.finer(\"Converted persisted subregions of region \" + region\n\t\t\t\t\t+ \" are \" + persistedSubregions);\n\n\t\t\t// set the subregions as subregions of the parent region\n\t\t\tfor (PersistedRegion persistedSubregion : persistedSubregions) {\n\t\t\t\tpersistedRegion.addSubregion(persistedSubregion);\n\t\t\t}\n\n\t\t\t// store the persistedRegion first since this is the parent entity\n\t\t\tRegionDatastoreAccessService.getInstance().save(persistedRegion);\n\n\t\t\t// store the persistedSubregions\n\t\t\tRegionDatastoreAccessService.getInstance()\n\t\t\t\t\t.save(persistedSubregions);\n\t\t}\n\n\t\tLOG.finer(\"Persisted subregion of persisted region \" + persistedRegion\n\t\t\t\t+ \" that is about to be converted to regions are \"\n\t\t\t\t+ persistedRegion.getSubregions());\n\n\t\treturn persistedRegion;\n\t}", "void setPermStorage(Map<String, Object> storage);", "protected JDBCDataStore createDataStoreInternal(JDBCDataStore dataStore, Map params)\n throws IOException {\n return dataStore;\n }", "void setTempStorage(Map<String, Object> storage);", "@Override\n\tpublic void save(DataConfig storeConfig) throws RemoteException {\n\t\t\n\t\tsuper.save(storeConfig);\n\t\t\n\t\tUriAdapter adapter = new UriAdapter(storeConfig);\n\t\tsaveBnetMap(adapter, bnetMap, storeConfig.getStoreUri(), getName());\n\t\tadapter.close();\n\t}", "protected void initStorageDevices() throws OBStorageException, OBException {\r\n OBStorageConfig conf = new OBStorageConfig();\r\n conf.setTemp(false);\r\n conf.setDuplicates(false);\r\n conf.setBulkMode(! isFrozen());\r\n conf.setIndexType(IndexType.HASH);\r\n this.A = fact.createOBStoreLong(\"A\", conf );\r\n if (!this.isFrozen()) {\r\n conf = new OBStorageConfig();\r\n conf.setTemp(false);\r\n conf.setDuplicates(false);\r\n conf.setBulkMode(false);\r\n conf.setRecordSize(fixedRecordSize);\r\n if(fixedRecord){\r\n conf.setIndexType(IndexType.FIXED_RECORD);\r\n }\r\n this.preFreeze = fact.createOBStore(\"pre\", conf);\r\n }\r\n }", "public boolean initStore(String dbname) {\n return true;\n }", "public abstract void Configure( DataMap<String, Serializable> configuration);", "public void persistDataSourcesNode() {\n repository.persist(node.getDataSourcesNodeFullRootPath(), \"\");\n }", "private void createDbConfig (String address) {\n\t\tProperties dbConfig = new Properties();\n\t\t\n\t\t/*\n\t\t * Load any previous version of the property file at the address.\n\t\t */\n\t\tFile dbConfigFile = new File(address);\n\t\ttry {\n\t\t\t/*\n\t\t\t * Creates file/directory if it could not be found\n\t\t\t */\n\t\t\tif(dbConfigFile.getParentFile().mkdirs()) System.err.println(\"[WARNING] Database properties directory location was missing and has been created.\");\n\t\t\tif(dbConfigFile.createNewFile()) System.err.println(\"[WARNING] Database properties file was missing and has been created.\");\n\t\t\t\n\t\t\tFileReader dbConfigReader = new FileReader(dbConfigFile);\n\t\t\tdbConfig.load(dbConfigReader);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"[ERROR]: Could not initialize database properties file: \" + address);\n\t\t\tSystem.err.println(e.getMessage());\n\t\t}\n\t\t\n\t\t/*\n\t\t * Check to see if any properties are missing.\n\t\t */\n\t\tif(!dbConfig.containsKey(\"useLocal\")) dbConfig.put(\"useLocal\", \"true\");\n\t\t\n\t\t//AWS DynamoDB settings\n\t\tif(!dbConfig.containsKey(\"dynamoDbAccessKey\")) dbConfig.put(\"dynamoDbAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbSecretKey\")) dbConfig.put(\"dynamoDbSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbEndpoint\")) dbConfig.put(\"dynamoDbEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"dynamoDbRegion\")) dbConfig.put(\"dynamoDbRegion\", \"\");\n\t\t\n\t\t//AWS KMS settings\n\t\tif(!dbConfig.containsKey(\"kmsAccessKey\")) dbConfig.put(\"kmsAccessKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsSecretKey\")) dbConfig.put(\"kmsSecretKey\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsEndpoint\")) dbConfig.put(\"kmsEndpoint\", \"\");\n\t\tif(!dbConfig.containsKey(\"kmsRegion\")) dbConfig.put(\"kmsRegion\", \"\");\n\t\t\n\t\t//Google Drive Settings\n\t\tif(!dbConfig.containsKey(\"driveClientId\")) dbConfig.put(\"driveClientId\", \"\");\n\t\tif(!dbConfig.containsKey(\"driveClientSecret\")) dbConfig.put(\"driveClientSecret\", \"\");\n\t\t\n\n\t\tthis.databaseConfig = dbConfig;\n\t\t\n\t\t/*\n\t\t * Save any changes\n\t\t */\n\t\tthis.saveDbConfig();\n\t}", "public static void registerDimensions() {\n Artifice.registerDataPack(id(\"dimensions\"), (pack) -> {\n pack.setDisplayName(\"Lotr Dimensions\");\n pack.setDescription(\"Dimensions added by the Lord of the Rings Mod\");\n //Dimension Type need to be added as file to prevent server issues, so not included here\n pack.addDimension(id(\"middle_earth_classic\"), dimensionBuilder -> dimensionBuilder\n .dimensionType(id(\"middle_earth_classic\"))\n .noiseGenerator(noiseChunkGeneratorTypeBuilder -> {\n noiseChunkGeneratorTypeBuilder.multiNoiseBiomeSource(multiNoiseBiomeSourceBuilder -> {\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:shire\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.0F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.8F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:mordor\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.2F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.8F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:rohan\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.0F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.7F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:misty_mountains\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.8F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.1F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:misty_mountains_foothills\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.5F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.1F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:shire_woodlands\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.0F);\n biomeParametersBuilder.humidity(1.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.8F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:river\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(-0.3F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.0F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:trollshaws\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.2F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.5F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:blue_mountains\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.7F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.6F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:blue_mountains_foothills\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.5F);\n biomeParametersBuilder.humidity(1.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.6F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:eriador\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.15F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.2F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:lone_lands\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.1F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.2F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:ithilien\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.3F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.05F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:brown_lands\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.15F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.25F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:lothlorien\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.4F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.8F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:iron_hills\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.6F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.6F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:dunland\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.2F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.3F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:emyn_muil\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.0F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(-0.15F);\n });\n });\n multiNoiseBiomeSourceBuilder\n .addBiome(biomeBuilder -> {\n biomeBuilder.biome(\"lotr:lindon\");\n biomeBuilder.parameters(biomeParametersBuilder -> {\n biomeParametersBuilder.altitude(0.1F);\n biomeParametersBuilder.humidity(0.0F);\n biomeParametersBuilder.offset(0.0F);\n biomeParametersBuilder.temperature(-0.2F);\n biomeParametersBuilder.weirdness(0.75F);\n });\n });\n multiNoiseBiomeSourceBuilder.altitudeNoise(noiseSettings -> {\n noiseSettings.amplitudes(1.0F, 1.0F);\n noiseSettings.firstOctave(-7);\n });\n multiNoiseBiomeSourceBuilder.humidityNoise(noiseSettings -> {\n noiseSettings.amplitudes(1.0F, 1.0F);\n noiseSettings.firstOctave(-7);\n });\n multiNoiseBiomeSourceBuilder.temperatureNoise(noiseSettings -> {\n noiseSettings.amplitudes(1.0F, 1.0F);\n noiseSettings.firstOctave(-7);\n });\n multiNoiseBiomeSourceBuilder.weirdnessNoise(noiseSettings -> {\n noiseSettings.amplitudes(1.0F, 1.0F);\n noiseSettings.firstOctave(-7);\n });\n multiNoiseBiomeSourceBuilder.seed((int)(new Random().nextLong()));\n })\n .type(\"minecraft:multi_noise\");\n noiseChunkGeneratorTypeBuilder.seed((int)(new Random().nextLong()));\n noiseChunkGeneratorTypeBuilder.noiseSettings(\"minecraft:overworld\");\n noiseChunkGeneratorTypeBuilder.type(\"minecraft:noise\");\n }));\n pack.shouldOverwrite();\n });\n Registry.register(Registry.SURFACE_BUILDER, id(\"middle_earth_surface_builder\"), ME_SURFACE_CONFIG);\n //Registry.register(Registry.CHUNK_GENERATOR, id(\"middle_earth_chunk_generator\"), );\n }", "public DataManager() {\n\t\tthis(PUnit == null ? \"eElectionsDB\" : PUnit);\n\t}", "private static Datacenter createDatacenter(String name) {\n List<Host> hostList = new ArrayList<Host>();\r\n\r\n // 2. A Machine contains one or more PEs or CPUs/Cores.\r\n // In this example, it will have only one core.\r\n List<Pe> peList = new ArrayList<Pe>();\r\n\r\n\r\n // 3. Create PEs and add these into a list.\r\n peList.add(new Pe(0, new PeProvisionerSimple(mips+100))); // need to store Pe id and MIPS Rating\r\n\r\n // 4. Create Host with its id and list of PEs and add them to the list\r\n // of machines\r\n long storage = 1000000; // host storage\r\n\r\n\r\n for (int hostId = 0; hostId < vmNum; hostId++) {\r\n hostList.add(\r\n new Host(\r\n hostId,\r\n new RamProvisionerSimple((int)((ram*1.1)/Constants.MB)),\r\n new BwProvisionerSimple(bw+10),\r\n storage,\r\n peList,\r\n new VmSchedulerTimeShared(peList)\r\n )\r\n ); // This is our machine\r\n }\r\n\r\n\r\n // 5. Create a DatacenterCharacteristics object that stores the\r\n // properties of a data center: architecture, OS, list of\r\n // Machines, allocation policy: time- or space-shared, time zone\r\n // and its price (G$/Pe time unit).\r\n String arch = \"x86\"; // system architecture\r\n String os = \"Linux\"; // operating system\r\n String vmm = \"Xen\";\r\n double time_zone = 10.0; // time zone this resource located\r\n double cost = 3.0; // the cost of using processing in this resource\r\n double costPerMem = 0.05; // the cost of using memory in this resource\r\n double costPerStorage = 0.001; // the cost of using storage in this\r\n // resource\r\n double costPerBw = 0.0; // the cost of using bw in this resource\r\n LinkedList<Storage> storageList = new LinkedList<Storage>(); // we are not adding SAN\r\n // devices by now\r\n\r\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\r\n arch, os, vmm, hostList, time_zone, cost, costPerMem,\r\n costPerStorage, costPerBw);\r\n\r\n // 6. Finally, we need to create a PowerDatacenter object.\r\n Datacenter datacenter = null;\r\n try {\r\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return datacenter;\r\n }", "boolean hasCreateStore();", "public static OdbStorage createWithSpecificLocation(\n final NodeDeserializer nodeDeserializer, final File mvstoreFile) {\n return new OdbStorage(Optional.ofNullable(mvstoreFile), Optional.ofNullable(nodeDeserializer));\n }", "public AzureDataLakeStoreDataset() {\n }", "private Virtualnetworkmanager createVirtualnetworkmanager() throws DatatypeConfigurationException {\n\t\t\n\t\tVirtualnetworkmanager root = objFactory.createVirtualnetworkmanager();\n\t\t\t\n\t\t// create catalog\n\t\tCatalog catalog = createCatalog();\n\t\t// create nffgs\n\t\tSet<Nffg> nffgs = createNffgs();\n\t\t// create in\n\t\tIn in = createIn();\n\t\t\n\t\t// populate the root element\n\t\troot.setCatalog(catalog);\n\t\tfor(Nffg nffg : nffgs){\n\t\t\troot.getNffg().add(nffg);\n\t\t}\t\t\t\n\t\troot.setIn(in);\n\t\t\n\t\treturn root;\n\t\t\n\t}", "@Test\n public void testPersistence_Custom_Store() throws Exception {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testPersistence_Custom_Store\");\n file.mkdirs();\n file.deleteOnExit();\n\n File saveToFile = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(file);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(saveToFile))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(saveToFile))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "public interface DataSource {\r\n\t\r\n\tstatic final String FILE_PATH = \"plugins/DataManager/\";\r\n\t\r\n\tpublic void setup();\r\n\t\r\n\tpublic void close();\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String pluginKey, String dataKey);\r\n\t\r\n\tpublic boolean addGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean deleteGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean isGroup(String group, String pluginKey);\r\n\t\r\n\tpublic boolean addMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean removeMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic boolean isMember(UUID uuid, String group, String pluginKey);\r\n\t\r\n\tpublic Optional<List<UUID>> getMemberIDs(String group, String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(String pluginKey);\r\n\t\r\n\tpublic List<String> getGroups(UUID uuid, String pluginKey);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, String data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(String group, String pluginKey, String dataKey);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, String data) ;\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, int data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, long data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, float data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, double data);\r\n\t\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, boolean data);\r\n\r\n\tpublic boolean set(UUID uuid, String group, String pluginKey, String dataKey, List<String> data);\r\n\t\r\n\tpublic Optional<String> getString(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Integer> getInt(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Long> getLong(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Float> getFloat(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Double> getDouble(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<Boolean> getBoolean(UUID uuid, String group, String pluginKey, String dataKey);\r\n\t\r\n\tpublic Optional<List<String>> getList(UUID uuid, String group, String pluginKey, String dataKey);\r\n\r\n}", "public void createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMetadataStoreMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "@Override\r\n\tpublic void addStorageUnit() {\r\n\t}", "DataStore getDataStore ();", "private static void initDirectories() {\n String storeName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_META_DATA_DIRECTORY\n + File.separator\n + QVCSConstants.QVCS_FILEID_STORE_NAME\n + \".dat\";\n File storeFile = new File(storeName);\n if (storeFile.exists()) {\n storeFile.delete();\n }\n deleteAuthenticationStore();\n initAuthenticationStore();\n\n deleteRoleProjectViewStore();\n initRoleProjectViewStore();\n\n initProjectProperties();\n }" ]
[ "0.5467329", "0.5379992", "0.526712", "0.52541983", "0.5242318", "0.5227086", "0.5193207", "0.51484364", "0.51256025", "0.5109171", "0.51066595", "0.49793178", "0.49724832", "0.4969937", "0.4964335", "0.4956125", "0.49286464", "0.4927425", "0.49120197", "0.49055472", "0.4901438", "0.48883492", "0.48872575", "0.4866554", "0.48582253", "0.48567325", "0.48427916", "0.4841141", "0.48377666", "0.4834628", "0.48266447", "0.48258466", "0.48214644", "0.48195195", "0.47817007", "0.4772836", "0.47723177", "0.4770503", "0.4763877", "0.47532213", "0.47432604", "0.47241375", "0.4716688", "0.47071105", "0.47066492", "0.46994403", "0.46912155", "0.46912155", "0.46902034", "0.4687002", "0.46767598", "0.46752048", "0.4667167", "0.4666669", "0.46631396", "0.4660724", "0.4651326", "0.46459886", "0.46416712", "0.46273878", "0.46265364", "0.46189743", "0.46141204", "0.4585306", "0.45832607", "0.4575304", "0.45743895", "0.45735264", "0.4560135", "0.4557959", "0.4555857", "0.4555857", "0.45531476", "0.45512155", "0.4544086", "0.45392835", "0.45265383", "0.4523457", "0.45211503", "0.4520805", "0.4515844", "0.45139387", "0.4511489", "0.45089543", "0.45061168", "0.44944632", "0.44943327", "0.4487769", "0.44854906", "0.4478975", "0.4477398", "0.4475781", "0.44754598", "0.44736776", "0.44729912", "0.44632134", "0.44590348", "0.44543862", "0.445139", "0.44497344" ]
0.7956725
0
Cleanup checkpoint directory from all temporary files.
@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException { try { try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) { for (Path path : files) Files.delete(path); } } catch (IOException e) { throw new IgniteCheckedException("Failed to cleanup checkpoint directory from temporary files: " + cpDir, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }", "protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }", "@AfterClass\n public static void teardown() {\n logger.info(\"teardown: remove the temporary directory\");\n\n // the assumption is that we only have one level of temporary files\n for (File file : directory.listFiles()) {\n file.delete();\n }\n directory.delete();\n }", "@AfterClass\n public static void cleanup() throws Exception {\n fs.delete(new Path(baseDir), true);\n }", "private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }", "@AfterClass\n\tpublic static void cleanUp() throws IOException {\n\t\tLpeFileUtils.removeDir(tempDir.getAbsolutePath());\n\t}", "private void tearDown() {\n if (tempDir != null) {\n OS.deleteDirectory(tempDir);\n tempFiles.clear();\n tempDir = null;\n }\n }", "private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "private static void cleanUpGlobalStateAndFileStore() {\n FileUtils.deleteDirectory(Paths.get(GLOBAL_STATE_DIR));\n }", "private void deleteTempFiles() {\n\t\tfor (int i = 0; i < prevPrevTotalBuckets; i++) {\n\t\t\ttry {\n\t\t\t\tString filename = DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode + \"_\"\n\t\t\t\t\t\t+ (passNumber - 1) + \"_\" + i;\n\t\t\t\tFile file = new File(filename);\n\t\t\t\tfile.delete();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@AfterClass\n public static void cleanup() throws IOException {\n File directory = new File(TMP_DIR_BASE);\n File dirname = directory.getParentFile();\n final String basename = directory.getName() + \"[0-9]+\";\n File[] files = dirname.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String name) {\n return name.matches(basename);\n }\n });\n for (File file : files) {\n if (file.delete() == false) {\n throw new IOException(\"Can't delete \" + file);\n }\n }\n }", "@After\n\tpublic void tearDown() throws Exception {\n\t\tFileUtils.cleanDirectory(new File(this.tempFolderPath));\n\t}", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }", "@After\n public void after() throws Exception\n {\n Files.walkFileTree(tempDir, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return(FileVisitResult.CONTINUE);\n }\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException {\n Files.delete(dir);\n return(FileVisitResult.CONTINUE);\n }\n });\n // Check that it has been cleared.\n if(tempDir.toFile().exists()) { throw new AssertionError(\"cleanup failed: \" + tempDir); }\n tempDir = null;\n }", "public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}", "private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }", "public static void cleanUpCustomTempDirectories(){\n\n\t\tif(tempDirectoryList != null){\n\t\t\tlog.info(\"Removing custom temp directories\");\n\t\t\ttry {\n\t\t\t\tfor(File tempFile : tempDirectoryList)\n\t\t\t\t\tif(tempFile.exists()){\n\t\t\t\t\t\tlog.info(\"Deleting : \" + tempFile.getCanonicalPath());\n\t\t\t\t\t\tdeleteDirectory(tempFile);\n\t\t\t\t\t}\n\t\t\t\t// also remove all file references from ArrayList\n\t\t\t\ttempDirectoryList.clear();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t\telse\n\t\t\tlog.info(\"No custom temp directory created.\");\n\t\tlog.info(\"Finished removing custom temp directories\");\n\t}", "public static void cleanOldTemp(String rootOutput){\r\n\t\tif(new File(rootOutput).exists()){\r\n\t\t\tLog.log(\"cleanOldTemp \"+rootOutput);\r\n\t\t\tPath pathToBeDeleted = Paths.get(rootOutput);\r\n\t\t\ttry {\r\n\t\t\t\tFiles.walk(pathToBeDeleted)\r\n\t\t\t\t .sorted(Comparator.reverseOrder())\r\n\t\t\t\t .map(Path::toFile)\r\n\t\t\t\t .forEach(File::delete);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tLog.error(e);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }", "@AfterClass\n public static void deleteOutputDir() throws OfficeException {\n\n // Delete the output directory\n FileUtils.deleteQuietly(new File(OUTPUT_DIR));\n }", "@AfterClass\r\n\tpublic static void cleanupBoogiePrinterFiles() {\r\n\r\n\t\tfinal File root = getRootFolder(ROOT_FOLDER);\r\n\r\n\t\tCollection<File> files = TestUtil.getFiles(root, new String[] { \".bpl\" });\r\n\t\tfiles = TestUtil.filterFiles(files, TEMPORARY_BOOGIE_FILENAME_PATTERN);\r\n\r\n\t\tif (files.isEmpty()) {\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\tString.format(\"No cleanup of %s necessary, no files matching the pattern %s have been found\",\r\n\t\t\t\t\t\t\tROOT_FOLDER, TEMPORARY_BOOGIE_FILENAME_PATTERN));\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(String.format(\"Begin cleanup of %s\", ROOT_FOLDER));\r\n\t\tfor (final File f : files) {\r\n\t\t\ttry {\r\n\t\t\t\tif (f.delete()) {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Sucessfully deleted %s\", f.getAbsolutePath()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(String.format(\"Deleteing %s failed\", f.getAbsolutePath()));\r\n\t\t\t\t}\r\n\t\t\t} catch (final SecurityException e) {\r\n\t\t\t\tSystem.err.println(String.format(\"Exception while deleting file %s\", f));\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\n public void testInitialCleanup() throws Exception{\n File f = new File(path);\n assertTrue(f.exists());\n assertTrue(f.isDirectory());\n File[] files = f.listFiles();\n // Expect all files were deleted\n assertTrue(files.length == 0);\n }", "public void cleanUp() {\n if (penv != null) {\n penv.cleanup();\n }\n List<ONDEXGraph> indexed = new LinkedList<ONDEXGraph>();\n Set<String> graphFolders = new HashSet<String>();\n for (Entry<ONDEXGraph, String> ent : indexedGraphs.entrySet()) {\n if (!indeciesToRetain.contains(ent.getValue())) graphFolders.add(new File(ent.getValue()).getParent());\n indexed.add(ent.getKey());\n }\n for (ONDEXGraph graph : indexed) removeIndex(graph, null);\n for (String graphDir : graphFolders) {\n try {\n DirUtils.deleteTree(graphDir);\n } catch (IOException e) {\n }\n }\n }", "public void tempcheck(){\r\n \t//clear last data\r\n if(workplace!=null){\r\n \tFile temp = new File(workplace +\"/temp\");\r\n \tif(temp.exists()){\r\n \t\tFile[] dels = temp.listFiles();\r\n \t\tif(dels[0]!=null){\r\n \t\t\tfor(int i=0; i<dels.length; i++){\r\n \t\t\t\tif(dels[i].isFile()){\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}else{\r\n \t\t\t\t\tFile[] delss = dels[i].listFiles();\r\n \t\t\t\t\tif(delss[0]!=null){\r\n \t\t\t\t\t\tfor(int k=0; k<delss.length; k++){\r\n \t\t\t\t\t\t\tdelss[k].delete();\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\tdels[i].delete();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \ttemp.delete();\r\n }\r\n }", "public void cleanup() {\n try {\n Files.delete(path);\n } catch (final IOException e) {\n throw new StageAccessException(\"Unable to delete staged document!\", e);\n }\n }", "public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}", "public void clean()\r\n {\r\n // DO NOT TOUCH\r\n // System.out.println(unzipedFilePath);\r\n\r\n // only clean if there was a successful unzipping\r\n if (success)\r\n {\r\n // only clean if the file path to remove matches the zipped file.\r\n if (unzippedFilePath.equals(zippedFilePath.substring(0,\r\n zippedFilePath.length() - 4)))\r\n {\r\n // System.out.println(\"to be implmented\");\r\n for (File c : outputDir.listFiles())\r\n {\r\n // System.out.println(c.toString());\r\n if (!c.delete())\r\n {\r\n System.out.println(\"failed to delete\" + c.toString());\r\n }\r\n }\r\n outputDir.delete();\r\n outputDir = null;\r\n }\r\n }\r\n }", "public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void cleanUp() {\r\n\t\tscalerStore.cleanUp();\r\n\t\tv2Store.cleanUp();\r\n\t\tv3Store.cleanUp();\r\n\t\tv4Store.cleanUp();\r\n\t\tvnStore.cleanUp();\r\n\t\tm22Store.cleanUp();\r\n\t\tm23Store.cleanUp();\r\n\t\tm24Store.cleanUp();\r\n\t\tm32Store.cleanUp();\r\n\t\tm33Store.cleanUp();\r\n\t\tm34Store.cleanUp();\r\n\t\tm42Store.cleanUp();\r\n\t\tm43Store.cleanUp();\r\n\t\tm44Store.cleanUp();\r\n\t\tmnnStore.cleanUp();\r\n\t}", "public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }", "protected static void deleteTrash() {\n\t\tArrays.stream(new File(\".\").listFiles())\n\t\t\t.filter(f -> f.getName().startsWith(\"_tmp.\"))\n\t\t\t.forEach(File::delete);\n\t}", "public void deleteTemporaryFiles() {\n if (!shouldReap()) {\n return;\n }\n\n for (File file : temporaryFiles) {\n try {\n FileHandler.delete(file);\n } catch (UncheckedIOException ignore) {\n // ignore; an interrupt will already have been logged.\n }\n }\n }", "static void clean(TreeDeleter treeDeleter, Path outputBase) {\n Path stashDir = getStashBase(outputBase);\n if (!stashDir.isDirectory()) {\n return;\n }\n Path stashTrashDir = stashDir.getChild(\"__trash\");\n try {\n stashDir.renameTo(stashTrashDir);\n } catch (IOException e) {\n // If we couldn't move the stashdir away for deletion, we need to delete it synchronously\n // in place, so we can't use the treeDeleter.\n treeDeleter = null;\n stashTrashDir = stashDir;\n }\n try {\n if (treeDeleter != null) {\n treeDeleter.deleteTree(stashTrashDir);\n } else {\n stashTrashDir.deleteTree();\n }\n } catch (IOException e) {\n logger.atWarning().withCause(e).log(\"Failed to clean sandbox stash %s\", stashDir);\n }\n }", "private void clearFiles() {\r\n File file = new File(\"test_files/upload\");\r\n File[] files = file.listFiles();\r\n for (File delFile : files) {\r\n delFile.delete();\r\n }\r\n file = new File(\"test_files/stress.jar\");\r\n file.delete();\r\n }", "@After\n\tpublic void cleanUp() {\n\t\tsuper.unload();\n\n\t\t// shutdown the database\n\t\tif (db != null) {\n\t\t\tdb.shutDownDb();\n\t\t}\n\t\tassertTrue(Files.deleteDir(tmpDir));\n\t}", "@Test\n\tpublic void cleanupTargetDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tFileUtil.mkDirs(targetDir);\n\t\tArchiveUtil.decompressTarGz(installerTar, targetDir);\n\n\t\t// test\n\t\tassertTrue(targetDir.toFile().list().length > 0, \"target dir should exist with children\");\n\t\tServerInstaller.cleanupTargetDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(targetDir.toFile().exists(), \"target dir should not exist\");\n\t}", "private void doCleanup() {\n Log.INFO(\"Final cleanup\");\n try { // return to full-cluster-running state\n restartNode(); \n } catch (HoneycombTestException e) {\n Log.ERROR(\"Final cleanup failed: \" + e);\n }\n }", "private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }", "public void cleanup() {\n this.close();\n this.delete(this.backingFileBasename + RECORDING_OUTPUT_STREAM_SUFFIX);\n this.delete(this.backingFileBasename + RECORDING_INPUT_STREAM_SUFFIX);\n }", "private void setUp() {\n if (tempDir != null) {\n tearDown();\n }\n tempDir = new File(OS.getTmpPath() + \"imagecompare\" + System.nanoTime());\n tempDir.mkdir();\n tempDir.deleteOnExit();\n tempFiles.clear();\n log.debug(\"using temp directory \" + tempDir.getAbsolutePath());\n\n }", "protected void tearDown() throws Exception {\n\t\tthis.tmpDir.clear();\r\n\t}", "public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }", "File prepareTempSourceDirectory() throws FileNotFoundException, IOException{\n\t\tFile tempfile = null;\n\t\tFile tempdir = null;\n\t\ttempfile = File.createTempFile(\"temp\", \"Delete\");\n\t\ttempdir = tempfile.getParentFile();\n\t\ttempfile.delete();\n\t\ttempdir = new File(tempdir, \"SAFS_UPDATE\");\n\t\ttempdir.mkdir();\n\n\t\tFile[] files = tempdir.listFiles();\n\t\tif(files != null && files.length > 0){\n\t\t\tfor(File file:files){\n\t\t\t\tif(file.isDirectory()) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tFileUtilities.deleteDirectoryRecursively(file.getAbsolutePath(), false);\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\t// java.lang.NoClassDefFoundError\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfile.delete();\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(tempdir==null || !tempdir.isDirectory()) throw new IOException(\"Cannot deduce a root source directory for HTTP extraction.\");\n\t\treturn tempdir;\n\t}", "private void clearExpiredFiles(long checkpointId) throws IOException {\n NavigableMap<Long, List<Path>> outOfDateMetas = expiredFiles.headMap(checkpointId, true);\n for (List<Path> paths : outOfDateMetas.values()) {\n for (Path meta : paths) {\n fileSystem.delete(meta, true);\n }\n }\n outOfDateMetas.clear();\n }", "private Step deleteLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)\n .tasklet(deleteLocalWorkingDir)\n .build();\n }", "@AfterSuite\n\tpublic void tearDown() {\n\t\tremoveSingleFileOrAllFilesInDirectory(\"file\", \"./Logs/Log4j.log\");\n\n\t\t// Flushing extent report after completing all test cases\n\t\treports.endTest(extent);\n\t\treports.flush();\n\t}", "static void clean(Configuration conf) throws IOException {\n if (!debug(conf)) {\n int iteration = getCurrentIteration(conf);\n for (int i = 0; i <= iteration; i++) {\n deleteIfExists(conf, OUTPUT_BASE + i);\n deleteIfExists(conf, OUTPUT_BASE + i + TEMP_SUFFIX);\n deleteIfExists(conf, SCHEMA_BASE + i);\n }\n deleteIfExists(conf, \"input\");\n }\n }", "private void cleanTempImages(String[] images) {\n for (int i = 1; i < images.length; i++) {\n File f = new File(images[i]);\n f.deleteOnExit();\n }\n }", "private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n \t\n \t// Remove graph database\n \tFileUtil.deleteFileOrDirectory(DBUtil.getNeo4jPath());\n }", "private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void removeTempData(CopyTable table)\n\t{\n\t\tFile dataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_data.csv\");\n\t\tFile countFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_count.txt\");\n\t\tFile metaDataFile = new File(config.getTempDirectory(), table.getTempFilePrefix() + \"_metadata.ser\");\n\t\t\n\t\tdataFile.delete();\n\t\tcountFile.delete();\n\t\tmetaDataFile.delete();\n\t\t\n\t\tFile tempDir = new File(config.getTempDirectory());\n\t\ttempDir.delete();\n\t}", "private Step deleteHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_HDFS_WORK_DIR)\n .tasklet(deleteHdfsWorkingDir)\n .build();\n }", "public static void clean(Task task, String localTemp) {\n\t\tif (state.getErrCode() == null) S3IO.uploadDir(task.getOutputPath(), localTemp);\n\t\ttry {\n\t\t\tFileUtils.deleteDirectory(new File(localTemp));\n\t\t\tFileUtils.deleteDirectory(task.getTaskType() == TaskType.MAP_TASK\n\t\t\t ? new File(MAP_INPUT_DIR + task.getTaskId()) : new File(REDUCE_INPUT_DIR + task.getTaskId()));\n\t\t} catch (IOException e) {\n\t\t\tlogger.error(\"Exception occoured while deleting input files and local temporary directory \\n\"\n\t\t\t + e.getLocalizedMessage());\n\t\t\tstate.setErrCode(state.getTsk() == TaskType.MAP_TASK ? ERR_CODE.EXCEPTION_DELETING_TEMP_DIR_MAP\n\t\t\t : ERR_CODE.EXCEPTION_DELETING_TEMP_DIR_REDUCE);\n\t\t}\n\n\t}", "protected void tearDown() throws Exception {\r\n filePersistence = null;\r\n readOnlyFile.delete();\r\n }", "@AfterEach\n public void tearDown() {\n if (topoPath != null) {\n try {\n Utils.forceDelete(topoPath.toString());\n } catch (IOException e) {\n // ignore...\n }\n }\n }", "public void cleanup(Appendable err) throws IOException {\n\n String[] toRemove = {\".data\", \".properties\", \".script\", \".tmp\", \".log\"};\n\n for (String aToRemove : toRemove) {\n String tmpFile = \"\" + Globals.DBname + aToRemove;\n File f = new File(tmpFile);\n if (f.exists()) {\n\n f.delete();\n err.append(\"Abacus disk clean up: removing \" + tmpFile + \"\\n\");\n\n }\n }\n err.append(\"\\n\");\n }", "@After\n public final void tearDown() throws Throwable\n {\n myLog.debug( \"entering...\" );\n\n try\n {\n if ( Files.exists( Testconstants.ROOT_DIR ) )\n {\n Helper.deleteDirRecursive( Testconstants.ROOT_DIR );\n }\n \n Files.deleteIfExists( myExcludeFile );\n \n myLog.debug( \"leaving...\" );\n }\n catch ( Throwable t )\n {\n myLog.error( \"Throwable caught in tearDown()\", t );\n throw t;\n }\n }", "private void removeTmpConfigFile() throws IOException {\n fileSystem.delete(tempConfigPath, true);\n LOG.info(\"delete temp configuration file: \" + tempConfigPath);\n }", "public synchronized static void cleanOldFiles() {\n\t\tGregorianCalendar yesterday = new GregorianCalendar();\n\t\tyesterday.roll(GregorianCalendar.HOUR_OF_DAY,-4);\n\t\tcleanOldFiles(yesterday.getTime());\n\t}", "void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }", "@Override\n protected void setUp() throws Exception {\n baseDirectory = new File(TEST_DIR_NAME);\n assertTrue(ConnectorTestUtils.deleteAllFiles(baseDirectory));\n // Then recreate it empty\n assertTrue(baseDirectory.mkdirs());\n }", "public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void shutdown() {\n logger.debug(\"Shutting down.\");\n try {\n // stop the cleaner first\n if (cleaner != null)\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n cleaner.shutdown();\n }\n });\n // flush the logs to ensure latest possible recovery point\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.flush();\n }\n });\n // close the logs\n Utils.foreach(allLogs(), new Callable1<Log>() {\n @Override\n public void apply(Log _) {\n _.close();\n }\n });\n // update the last flush point\n checkpointRecoveryPointOffsets();\n // mark that the shutdown was clean by creating the clean shutdown marker file\n Utils.foreach(logDirs, new Callable1<File>() {\n @Override\n public void apply(final File dir) {\n Utils.swallow(new Runnable() {\n @Override\n public void run() {\n try {\n new File(dir, Logs.CleanShutdownFile).createNewFile();\n } catch (IOException e) {\n throw new KafkaException(e);\n }\n }\n });\n }\n });\n } finally {\n // regardless of whether the close succeeded, we need to unlock the data directories\n Utils.foreach(dirLocks, new Callable1<FileLock>() {\n @Override\n public void apply(FileLock _) {\n _.destroy();\n }\n });\n }\n\n logger.debug(\"Shutdown complete.\");\n }", "protected void tearDown()\n {\n super.tearDown();\n ClassLoader classLoader = getClass().getClassLoader();\n File folder = null;\n try\n {\n folder = new File(classLoader.getResource(\"levels\").toURI().getPath());\n } catch (URISyntaxException e)\n {\n e.printStackTrace();\n }\n File[] listOfFiles = folder.listFiles();\n\n for (File f : listOfFiles)\n {\n if (!f.getPath().contains(\"level1.txt\") && !f.getPath().contains(\"level2.txt\") &&\n !f.getPath().contains(\"level3.txt\"))\n {\n try\n {\n Files.delete(f.toPath());\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n }\n }", "public void cleanup() {\n try {\n resManager.stopVirtualNodes();\n } catch (Exception e) {\n logger.error(ITConstants.TS + \": \" + DEL_VM_ERR, e);\n }\n logger.info(\"Cleanup done\");\n }", "@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook);\r\n\t\t\tUtility.destroyTestVault();\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}", "@After\r\n public void tearDown() throws Exception {\r\n org.apache.log4j.LogManager.shutdown();\r\n new File(TestsHelper.LOG_FILE).delete();\r\n }", "@Test\n\tpublic void removeUnneededDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path fsTargetDir = targetDir.resolve(DIR_FIRSTSPIRIT_5);\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tServerInstaller.decompressInstaller(targetDir, installerTar);\n\t\tassertTrue(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should exist\");\n\n\t\t// test\n\t\tServerInstaller.removeUnneededDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should have been deleted\");\n\t}", "@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyTestVault();\r\n\t\t\tUtility.destroyTestVault(\"My Vault\");\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook, \"DestroyUsers\");\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}", "@Override\n\tprotected void finalize() throws Throwable\n\t{\n\t\tsuper.finalize(); // currently empty but there for safer refactoring\n\n\t\tFile outputFile = dfos.getFile();\n\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }", "public void assertJobAbortCleanedUp(JobData jobData) throws Exception {\n FileSystem fs = getFileSystem();\n try {\n FileStatus[] children = listChildren(fs, outputDir);\n if (children.length != 0) {\n lsR(fs, outputDir, true);\n }\n Assertions.assertThat(children)\n .as(\"Output directory not empty \" + ls(outputDir))\n .containsExactly(new FileStatus[0]);\n } catch (FileNotFoundException e) {\n // this is a valid state; it means the dest dir doesn't exist yet.\n }\n\n }", "@AfterClass\n public void cleanUp() {\n }", "void cleanUp() throws IOException;", "void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }", "public static void cleanUp() {\n\t\tHashDecay.stopAll();\n\t\tSystem.gc();\n\t}", "private void finalizeFileSystemFile() throws IOException {\n Path finalConfigPath = getFinalConfigPath(tempConfigPath);\n fileSystem.rename(tempConfigPath, finalConfigPath);\n LOG.info(\"finalize temp configuration file successfully, finalConfigPath=\"\n + finalConfigPath);\n }", "public void cleanup() {\n }", "protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}", "@AfterClass\r\n\tpublic static void testCleanup() {\r\n\t\tConfig.teardown();\r\n\t}", "public void deleteGeneratedFiles();", "public void cleanup() {\r\n }", "@Override\n protected void cleanup(Context context) throws IOException, InterruptedException {\n final int partition = context.getTaskAttemptID().getTaskID().getId();\n if (partition == 0) {\n final Map<String, String> metadata = ProcessingMetadata.config2metadata(conf, JobConfigNames.LEVEL3_METADATA_KEYS);\n final String aggregatedMetadataXml = metadataSerializer.toXml(processingGraphMetadata);\n metadata.put(JobConfigNames.PROCESSING_HISTORY, aggregatedMetadataXml);\n final Path workOutputPath = FileOutputFormat.getWorkOutputPath(context);\n ProcessingMetadata.write(workOutputPath, conf, metadata);\n }\n }", "protected void tearDown() throws Exception {\n\t\tdeployer.deleteDir(unitTestDir);\n\t\tassertFalse(new File(unitTestDir, \"composition.groovy\").exists());\n\t}", "@After\n public void pslBaseCleanup() {\n AbstractRule.unregisterAllRulesForTesting();\n\n // Close any known open models.\n TestModel.ModelInformation.closeAll();\n\n // Clear all options.\n Options.clearAll();\n\n disableLogger();\n }", "protected void deleteZipAndFiles() throws IOException {\n FileUtils.deleteDirectory(new File(workspace + \"\\\\\" + zipName.replace(\".zip\", \"\")));\n FileUtils.forceDelete(new File(workspace + \"\\\\\" + zipName));\n uploadStatus = \"Cleaning up :)\";\n System.out.println(\"Done!\");\n }", "public static void clean() {\n kryoThreadLocalContext.remove();\n }", "public void cleanUp();", "public void cleanUp();", "protected void tearDown() throws Exception {\r\n super.tearDown();\r\n clearFiles();\r\n StressTestHelper.clearConfig();\r\n }", "private void cleanOutputFiles() throws DeviceNotAvailableException {\n CLog.d(\"Remove output file: %s\", mOutputFile);\n String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE);\n mTestDevice.executeShellCommand(String.format(\"rm %s/%s\", extStore, mOutputFile));\n }", "@AfterClass(alwaysRun = true)\n\tpublic void destroy() throws Exception {\n\t\tsuper.cleanup();\n\t}", "@Override\n protected void performCleanup() {\n }", "@After\n public void cleanUp() {\n mApConfigFile.delete();\n }", "@AfterClass\n public static void tearDown() throws IOException {\n // delete testing-specific application.conf\n appConf.delete();\n\n // if there already was an application.conf present, rename and move it back.\n if(tempAppConf.exists()) {\n Files.move(\n tempAppConf.toPath(),\n appConf.toPath()\n );\n }\n }", "public void testCleanFile() {\n shouldCleanFile(\"jasmine1/jasmineTestBefore.js\");\n\n // Given a jasmine file with a fdescribe() and an fit().\n shouldCleanFile(\"jasmine2/jasmineTestBefore.js\");\n }", "private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }", "@AfterClass\n\tpublic static void testCleanup() {\n\t}", "public Runner() {\n this.config = ConfigUtils.getDefaultConfig();\n this.noSuchBaseDir = Files.createTempDir();\n this.noSuchBaseDir.deleteOnExit();\n }" ]
[ "0.79604423", "0.7311547", "0.7299983", "0.713398", "0.7092709", "0.70753884", "0.7058656", "0.70412415", "0.7029668", "0.6932536", "0.6748282", "0.673458", "0.6680451", "0.661228", "0.66098297", "0.65767014", "0.65359384", "0.6431233", "0.63882154", "0.63635164", "0.633722", "0.6326528", "0.6300177", "0.63001317", "0.62992966", "0.62217784", "0.61760825", "0.61341363", "0.6133476", "0.60872525", "0.60702527", "0.60600317", "0.6044442", "0.6028863", "0.60022426", "0.598317", "0.59708166", "0.5936765", "0.59249604", "0.59249103", "0.5919673", "0.5918753", "0.58768195", "0.58587044", "0.58543134", "0.58171207", "0.5812568", "0.5783989", "0.5778612", "0.57744426", "0.5771029", "0.5767471", "0.5765207", "0.57525504", "0.57337224", "0.5719315", "0.5717653", "0.57168084", "0.5716211", "0.5712904", "0.5689611", "0.56454384", "0.5640954", "0.5637881", "0.5637574", "0.56287634", "0.5627611", "0.56181365", "0.56083095", "0.5596049", "0.55946994", "0.55934703", "0.55922997", "0.55860955", "0.5548131", "0.5547396", "0.55424106", "0.5530444", "0.5528757", "0.5520622", "0.5517414", "0.55127805", "0.55093014", "0.5503061", "0.55012757", "0.5500909", "0.54967105", "0.549391", "0.5492095", "0.5492095", "0.549106", "0.5488513", "0.5487531", "0.5484178", "0.5483148", "0.5482278", "0.5470737", "0.5467442", "0.54551774", "0.54484785" ]
0.8643265
0
Parses checkpoint entry from given file.
@Nullable private CheckpointEntry parseFromFile(ByteBuffer buf, File file) throws IgniteCheckedException { Matcher matcher = CP_FILE_NAME_PATTERN.matcher(file.getName()); if (!matcher.matches()) return null; CheckpointEntryType type = CheckpointEntryType.valueOf(matcher.group(3)); if (type != CheckpointEntryType.START) return null; long cpTs = Long.parseLong(matcher.group(1)); UUID cpId = UUID.fromString(matcher.group(2)); WALPointer ptr = readPointer(file, buf); return createCheckPointEntry(cpTs, ptr, cpId, null, CheckpointEntryType.START); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@NonNull\n public static CheckpointManager parse(@NonNull BufferedReader reader) throws IOException {\n try (Stream<String> lines = reader.lines()) {\n Map<URI, Checkpoint> checkpoints =\n lines\n .map(\n line -> {\n int i = line.indexOf(';');\n URI resource = URI.create(line.substring(0, i));\n Checkpoint cp = Checkpoint.parse(line.substring(i + 1));\n return new SimpleEntry<>(resource, cp);\n })\n .collect(\n Collectors.toMap(\n Entry::getKey,\n Entry::getValue,\n (a, b) -> {\n a.merge(b);\n return a;\n },\n // use a concurrent map since this instance will be used in LogManager by\n // multiple threads.\n ConcurrentHashMap::new));\n return new CheckpointManager(checkpoints);\n }\n }", "public Checkpoint(File checkpointDir) {\n this.directory = checkpointDir;\n readValid();\n }", "@Override\n public void parse() {\n if (file == null)\n throw new IllegalStateException(\n \"File cannot be null. Call setFile() before calling parse()\");\n\n if (parseComplete)\n throw new IllegalStateException(\"File has alredy been parsed.\");\n\n FSDataInputStream fis = null;\n BufferedReader br = null;\n\n try {\n fis = fs.open(file);\n br = new BufferedReader(new InputStreamReader(fis));\n\n // Go to our offset. DFS should take care of opening a block local file\n fis.seek(readOffset);\n records = new LinkedList<T>();\n\n LineReader ln = new LineReader(fis);\n Text line = new Text();\n long read = readOffset;\n\n if (readOffset != 0)\n read += ln.readLine(line);\n\n while (read < readLength) {\n int r = ln.readLine(line);\n if (r == 0)\n break;\n\n try {\n T record = clazz.newInstance();\n record.fromString(line.toString());\n records.add(record);\n } catch (Exception ex) {\n LOG.warn(\"Unable to instantiate the updateable record type\", ex);\n }\n read += r;\n }\n\n } catch (IOException ex) {\n LOG.error(\"Encountered an error while reading from file \" + file, ex);\n } finally {\n try {\n if (br != null)\n br.close();\n\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n LOG.error(\"Can't close file\", ex);\n }\n }\n\n LOG.debug(\"Read \" + records.size() + \" records\");\n }", "@SuppressWarnings(\"resource\")//I ADDED\n\tpublic static CensusData parse(String filename) {\n\t\tCensusData result = new CensusData();\n\t\t\n try {\n BufferedReader fileIn = new BufferedReader(new FileReader(filename));\n \n // Skip the first line of the file\n // After that each line has 7 comma-separated numbers (see constants above)\n // We want to skip the first 4, the 5th is the population (an int)\n // and the 6th and 7th are latitude and longitude (floats)\n // If the population is 0, then the line has latitude and longitude of +.,-.\n // which cannot be parsed as floats, so that's a special case\n // (we could fix this, but noisy data is a fact of life, more fun\n // to process the real data as provided by the government)\n \n String oneLine = fileIn.readLine(); // skip the first line\n\n // read each subsequent line and add relevant data to a big array\n while ((oneLine = fileIn.readLine()) != null) {\n String[] tokens = oneLine.split(\",\");\n if(tokens.length != TOKENS_PER_LINE)\n \tthrow new NumberFormatException();\n int population = Integer.parseInt(tokens[POPULATION_INDEX]);\n if(population != 0)\n \tresult.add(population,\n \t\t\t Float.parseFloat(tokens[LATITUDE_INDEX]),\n \t\t Float.parseFloat(tokens[LONGITUDE_INDEX]));\n }\n\n fileIn.close();\n } catch(IOException ioe) {\n System.err.println(\"Error opening/reading/writing input or output file.\");\n System.exit(1);\n } catch(NumberFormatException nfe) {\n System.err.println(nfe.toString());\n System.err.println(\"Error in file format\");\n System.exit(1);\n }\n return result;\n\t}", "void checkpoint() throws IOException;", "public void parse(String fileName) throws Exception;", "public static List<Checkpoint> availableCheckpoints(File directory){\n File checkpointRecordFile = new File(directory, \"checkpointInfo.txt\");\n Preconditions.checkState(checkpointRecordFile.exists(), \"Could not find checkpoint record file at expected path %s\", checkpointRecordFile.getAbsolutePath());\n\n List<String> lines;\n try(InputStream is = new BufferedInputStream(new FileInputStream(checkpointRecordFile))){\n lines = IOUtils.readLines(is);\n } catch (IOException e){\n throw new RuntimeException(\"Error loading checkpoint data from file: \" + checkpointRecordFile.getAbsolutePath(), e);\n }\n\n List<Checkpoint> out = new ArrayList<>(lines.size()-1); //Assume first line is header\n for( int i=1; i<lines.size(); i++ ){\n Checkpoint c = Checkpoint.fromFileString(lines.get(i));\n if(new File(directory, c.getFilename()).exists()){\n out.add(c);\n }\n }\n return out;\n }", "public ImportCommand parseFile(File file) throws ParseException {\n\n FileReader fr;\n\n try {\n fr = new FileReader(file);\n } catch (FileNotFoundException fnfe) {\n throw new ParseException(\"File not found\");\n }\n\n BufferedReader br = new BufferedReader(fr);\n return parseLinesFromFile(br);\n }", "public void parse(String filename);", "private void parseModelIfNeeded(@NotNull File file) throws IOException {\n if (myModel == null) {\n TrebuchetBufferProducer producer;\n if (AtraceProducer.verifyFileHasAtraceHeader(file)) {\n producer = new AtraceProducer();\n }\n else {\n producer = new PerfettoProducer();\n }\n if (!producer.parseFile(file)) {\n throw new IOException(\"Failed to parse file: \" + file.getAbsolutePath());\n }\n\n ImportTask task = new ImportTask(new PrintlnImportFeedback());\n myModel = task.importBuffer(producer);\n // We check if we have a parent timestamp. If not this could be from an imported trace.\n // In the case it is 0, we use the first timestamp of our capture as a reference point.\n if (Double.compare(myModel.getParentTimestamp(), 0.0) == 0) {\n myMonoTimeAtBeginningSeconds = myModel.getBeginTimestamp();\n }\n else {\n myMonoTimeAtBeginningSeconds = myModel.getParentTimestamp() - (myModel.getParentTimestampBootTime() - myModel.getBeginTimestamp());\n }\n }\n }", "public static UserData parse(String file) {\n UserData data = new UserData();\n data.filename = file.toLowerCase();\n String line;\n // 0 = init values\n // 1 = scores\n // 2 = preferences\n int state = 0;\n KeyValuePair pair = null;\n\n try (BufferedReader br = new BufferedReader(new FileReader(data.filename))) {\n // for each line in the file\n while ((line = br.readLine()) != null) {\n pair = KeyValuePair.splitLine(line, false);\n int newState = state;\n if (line.equals(\"\")) {\n continue;\n }\n\n switch (state) {\n case 0:\n if (line.equals(\"scores\")) {\n newState = 1;\n break;\n }\n\n if (pair.key.equals(\"name\")) {\n data.name = pair.value;\n }\n\n break;\n case 1:\n if (line.equals(\"preferences\")) {\n newState = 2;\n break;\n }\n\n if (pair == null) {\n break;\n }\n\n UserDateScore newScore = new UserDateScore();\n newScore.date = pair.key;\n newScore.score = pair.valueAsInt();\n newScore.user = data;\n data.scores.add(newScore);\n break;\n case 2:\n if (pair == null) {\n break;\n }\n\n UserPreferenceValue pref = new UserPreferenceValue();\n pref.value = pair.value;\n data.preferences.put(pair.key, pref);\n break;\n }\n\n state = newState;\n }\n\n br.close();\n } catch (IOException e) {\n System.out.println(\"File does not yet exist\");\n// return null;\n }\n\n return data;\n }", "@Override\n public void parse() throws ParseException {\n\n /* parse file */\n try {\n\n Scanner scanner = new Scanner(file, CHARSET_UTF_8);\n\n MowerConfig mowerConfig = null;\n\n int lineNumber = 1;\n\n do {\n\n boolean even = lineNumber % 2 == 0;\n String line = scanner.nextLine();\n\n /* if nothing in the file */\n if ((line == null || line.isEmpty()) && lineNumber == 1) {\n\n throw new ParseException(\"Nothing found in the file: \" + file);\n\n /* first line: lawn top right position */\n } else if(lineNumber == 1) {\n\n Position lawnTopRight = Position.parsePosition(line);\n config.setLawnTopRightCorner(lawnTopRight);\n\n /* even line: mower init */\n } else if (even) {\n\n int lastWhitespace = line.lastIndexOf(' ');\n Position p = Position.parsePosition(line.substring(0, lastWhitespace));\n Orientation o = Orientation.parseOrientation(line.substring(lastWhitespace).trim());\n\n mowerConfig = new MowerConfig();\n mowerConfig.setInitialPosition(p);\n mowerConfig.setInitialOrientation(o);\n\n /* odd line: mower commands */\n } else {\n\n mowerConfig.setCommands(MowerCommand.parseCommands(line));\n config.addMowerConfig(mowerConfig);\n }\n\n lineNumber++;\n\n } while(scanner.hasNextLine());\n\n\n } catch (Exception e) {\n throw new ParseException(\"Exception: \" + e.getMessage());\n }\n\n }", "protected abstract void parseFile(File f) throws IOException;", "public String parse(File file);", "public Checkpoint lastCheckpoint(){\n if(!checkpointRecordFile.exists()){\n return null;\n }\n return lastCheckpoint(rootDir);\n }", "public void parse(){\n\t\t//Read next line in content; timestamp++\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(instructionfile))) {\n\t\t String line;\n\t\t while ((line = br.readLine()) != null) {\n\t\t \t//divide the line by semicolons\n\t\t \tString[] lineParts = line.split(\";\");\n\t\t \tfor(String aPart: lineParts){\n\t\t\t \tSystem.out.println(\"Parser:\"+aPart);\n\n\t\t\t \t// process the partial line.\n\t\t\t \tString[] commands = parseNextInstruction(aPart);\n\t\t\t \tif(commands!=null){\n\t\t\t\t\t\t\n\t\t\t \t\t//For each instruction in line: TransactionManager.processOperation()\n\t\t\t \t\ttm.processOperation(commands, currentTimestamp);\n\t\t\t \t}\n\t\t \t}\n\t\t \t//Every new line, time stamp increases\n\t \t\tcurrentTimestamp++;\n\t\t }\n\t\t} catch (FileNotFoundException e) {\n \t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n\t\t}\n\t}", "public void parseInputFile(String filename) throws BadInputFormatException {\r\n\t\tString line;\r\n\r\n\t\ttry {\r\n\t\t\tInputStream fis = new FileInputStream(filename);\r\n\t\t\tInputStreamReader isr = new InputStreamReader(fis);\r\n\t\t\tBufferedReader br = new BufferedReader(isr);\r\n\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tparseMessage(line);\r\n\t\t\t}\r\n\t\t\tbr.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void loadCoordinatesFromFile(File f) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n final BufferedReader in;\n try {\n in = new BufferedReader(new FileReader(f));\n } catch (FileNotFoundException ex) {\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Oops! No such file exists.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n return;\n }\n\n // Read and set markers.\n String tweet=\"\", coordinates, text, sep = \";&;\";\n try {\n // Read the CSV header to skip it.\n if(!TweetEntity.getCSVHeader(\";&;\").equals(in.readLine()))\n throw new Exception(\"Incorrect file.\");\n while (((tweet = in.readLine()) != null)) {\n coordinates = tweet.substring(UIutils.nthOccurrence(tweet, sep, 8)+sep.length(), \n UIutils.nthOccurrence(tweet, sep, 9));\n if(coordinates.equals(\"NULL\"))\n continue;\n int commaIndex = coordinates.indexOf(\",\");\n double lat = Double.parseDouble(coordinates.substring(1, commaIndex));\n double lon = Double.parseDouble(coordinates.substring(commaIndex + 1, \n coordinates.length()-1));\n text = tweet.substring(UIutils.nthOccurrence(tweet, sep, 3)+sep.length(), \n UIutils.nthOccurrence(tweet, sep, 4));\n newTweet(lat, lon, TweetEntity.getLinkedText(text));\n }\n } catch (IOException ex) {\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Cannot read file.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n } catch (Exception e) {\n System.out.println(tweet);\n JDialog.setDefaultLookAndFeelDecorated(true);\n JOptionPane.showMessageDialog(null, \"Unknown error occured. \"\n + \"Possibly loaded an incorrectly parsed file.\",\n \"Error\", JOptionPane.ERROR_MESSAGE);\n } finally {\n try {\n in.close();\n } catch (IOException ignore) {}\n }\n }\n }).start();\n }", "public SparseDataset parse(File file) throws FileNotFoundException, IOException, ParseException {\n String name = file.getPath();\n return parse(name, new FileInputStream(file));\n }", "private AbsoluteAddress getContinuosPoint(FileProcess file) {\n\t\tint t = 0;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tif (temp.contains(\"Address\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\"x\") + 1, temp.length());\n\t\t\t\treturn new AbsoluteAddress(Long.parseLong(temp, 16));\n\t\t\t}\n\t\t\tt++;\n\t\t}\n\t}", "private HashMap<ASTNode, NodeInfo> parseFile(String file) {\n ASTParser parser = ASTParser.newParser(AST.JLS3);\n parser.setSource(file.toCharArray());\n parser.setKind(ASTParser.K_COMPILATION_UNIT);\n final CompilationUnit cu = (CompilationUnit) parser.createAST(null);\n ASTStatsCollector astStatsCollector = new ASTStatsCollector(cu);\n cu.accept(astStatsCollector);\n\n\n return astStatsCollector.nodeSubNodeMap;\n }", "public void readVotes(File inFile);", "@NonNull\n static ChangeRecords load(File file) throws IOException {\n ChangeRecords changeRecords = new ChangeRecords();\n List<String> rawRecords = Files.readLines(file, Charsets.UTF_8);\n for (String rawRecord : rawRecords) {\n StringTokenizer st = new StringTokenizer(rawRecord, \",\");\n if (st.countTokens() != 2) {\n throw new IOException(\"Invalid incremental change record : \" + rawRecord);\n }\n changeRecords.add(Status.valueOf(st.nextToken()), st.nextToken());\n }\n return changeRecords;\n }", "public TranscriptEntry(String filename) {\n JSONParser jsonParser = new JSONParser();\n try (FileReader reader = new FileReader(filename)){\n Object obj = jsonParser.parse(reader);\n\n JSONObject entry = (JSONObject) obj;\n JSONObject myCourse = (JSONObject) entry.get(\"course\");\n course = parseCourse(myCourse);\n grade = (String) entry.get(\"grade\");\n inProgress = (boolean) entry.get(\"inProgress\");\n courseComplete = (boolean) entry.get(\"courseComplete\");\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Vector<Point> loadPoints(File f) throws IOException {\n\t\tSystem.err.println(\"Loading points\");\n\t\tVector<Point> pts = new Vector<Point>();\n\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null) {\n\t\t\tString [] curr = line.split(\"\\\\s+\");\n\t\t\tString coord = curr[0];\n\t\t\tif(!line.startsWith(\"#\")){\n\t\t\t\tif(curr.length>=3 && curr[2].contains(\":\")){coord = curr[2];}\n\t\t\t\tif(coord.contains(\":\")) {\n\t\t\t\t\tString [] currB = coord.split(\":\");\n\t\t\t\t\tString chrom = currB[0].replaceAll(\"chr\", \"\");\n\t\t\t\t\tchar strand = '?';\n\t\t\t\t\tif(currB.length==3)\n\t\t\t\t\t\tstrand = currB[2].charAt(0);\n\t\t\t\t\tPoint pt = null;\n\t\t\t\t\tint location=-1;\n\t\t\t\t\tif(currB[1].contains(\"-\")){\n\t\t\t\t\t\tString [] currC = currB[1].split(\"-\");\n\t\t\t\t\t\tint start = new Integer(currC[0]);\n\t\t\t\t\t\tint stop = new Integer(currC[1]);\n\t\t\t\t\t\tlocation = (start+stop)/2;\n\t\t\t\t\t\tif(strand=='-' && (stop-start)%2==1)\n\t\t\t\t\t\t\tlocation+=1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tlocation = new Integer(currB[1]);\n\t\t\t\t\t}\n\t\t\t\t\tif(strand!='?')\n\t\t\t\t\t\tpt = new StrandedPoint(genome, chrom, location, strand);\n\t\t\t\t\telse\n\t\t\t\t\t\tpt = new Point(genome, chrom, location);\n\t\t\t\t\n\t\t\t\t\tpts.add(pt);\n\t\t\t\t} else { \n\t\t\t\t\tSystem.err.println(String.format(\"Couldn't find point in line \\\"%s\\\"\", line));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tbr.close();\n\t\tSystem.err.println(pts.size()+\" points loaded\");\n\t\treturn pts;\n\t}", "private void parseInputFile(String inputFile) throws IOException {\n List<String> lines = Files.readAllLines(FileSystems.getDefault().getPath(inputFile), Charset.defaultCharset());\n for (int i = 1; i < lines.size(); ++i) {\n ParsedRecord record = new ParsedRecord(lines.get(i));\n if (!this.parsedRecords.containsKey(record.docName)) {\n this.parsedRecords.put(record.docName, new ArrayList<ParsedRecord>());\n }\n this.parsedRecords.get(record.docName).add(record);\n\n if (!this.docToMaxPosition.containsKey(record.docName) ||\n this.docToMaxPosition.containsKey(record.docName) && this.docToMaxPosition.get(record.docName) < record.position) {\n this.docToMaxPosition.put(record.docName, record.position);\n }\n }\n }", "public SparseDataset parse(String name, File file) throws FileNotFoundException, IOException, ParseException {\n return parse(name, new FileInputStream(file));\n }", "ReleaseFile parse( InputStream is ) throws IOException;", "TraceList read(File file) throws IOException;", "public void parse(){\n\t\tFile file = new File(fileLocation);\n\n\t\tlong seed = ConfigurationData.DEFAULT_SEED;\n\t\tString outputDest = ConfigurationData.DEFAULT_OUTPUT_DESTINATION;\n\t\tLong tickLength = ConfigurationData.DEFAULT_TICK_LENGTH;\n\t\tint port = ConfigurationData.DEFAULT_PORT;\n\n\t\ttry {\n\n\t\t\tScanner sc = new Scanner(file);\n\n\t\t\twhile(sc.hasNext()){\n\t\t\t\tString[] tok = sc.next().split(\"=\");\n\t\t\t\tswitch(tok[0]){\n\t\t\t\tcase \"seed\":\n\t\t\t\t\tseed = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"outputDestination\":\n\t\t\t\t\toutputDest = tok[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"tickLength\":\n\t\t\t\t\ttickLength = Long.parseLong(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"port\":\n\t\t\t\t\tport = Integer.parseInt(tok[1]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsc.close();\n\n\t\t\tconfigurationData = new ConfigurationData(seed, outputDest, tickLength, port);\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\tPrintWriter writer;\n\t\t\ttry {\n\t\t\t\twriter = new PrintWriter(fileLocation, \"UTF-8\");\n\t\t\t\twriter.println(\"seed=\"+seed);\n\t\t\t\twriter.println(\"outputDestination=\"+outputDest);\n\t\t\t\twriter.println(\"tickLength=\"+tickLength);\n\t\t\t\twriter.println(\"port=\"+port);\n\t\t\t\twriter.close();\n\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tconfigurationData = ConfigurationData.makeDefault();\n\t\t\tSystem.out.println(\"Default file created\");\n\t\t}\n\t}", "public File getFileForCheckpoint(Checkpoint checkpoint){\n return getFileForCheckpoint(checkpoint.getCheckpointNum());\n }", "protected void parseValues(File file){\r\n\t\ttry {\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\tString line;\r\n\t\t\tif(scanner.hasNext()) \r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tline = scanner.nextLine();\r\n\t\t\t\taddToSupplyValues(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private static SimpleNode parse(String filename) throws ParseException {\n\t\tParser parser;\n\t\t// open file as input stream\n\t\ttry {\n\t\t\tparser = new Parser(new java.io.FileInputStream(filename));\n\t\t}\n\t\tcatch (java.io.FileNotFoundException e) {\n\t\t\tSystem.out.println(\"ERROR: file \" + filename + \" not found.\");\n\t\t\treturn null;\n\t\t}\n\t\t// parse and return root node\n\t\treturn parser.parse();\n\t}", "public static FA parseFromFile(String path) throws Exception {\n\t\ttry {\n\t\t\tSet<State> states = new HashSet<>();\n\t\t\tSet<Character> alphabet = new HashSet<>();\n\t\t\tSet<Triple<State,Character,State>> transitions = new HashSet<>();\n\t\t\tString departureStName = null;\n\t\t\tString arrivalStName = null;\n\t\t\tSet<String> finalStsNames = new HashSet<>();\n\t\t\tString initialStName = \"\";\n\t\t\tState initialState = null;\n\t\t\tScanner firstScanner = new Scanner(new File(\"tp1/Automatas/\"+path+\".dot\"));\n\t\t\twhile(firstScanner.hasNextLine()) {\n\t\t\t\tString line = firstScanner.nextLine().replaceAll(\"\\\\s+\",\"\");\n\t\t\t\tif (line.contains(\"[shape=doublecircle]\")) {\n\t\t\t\t\tString newLine = line.replace('[', '/');\n\t\t\t\t\tString[] res = newLine.split(\"/\");\n\t\t\t\t\tfinalStsNames.add(res[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfirstScanner.close();\n\t\t\tScanner secondScanner = new Scanner(new File(\"tp1/Automatas/\"+path+\".dot\"));\n\t\t\twhile(secondScanner.hasNextLine()) {\n\t\t\t\tString line = secondScanner.nextLine().replaceAll(\"\\\\s+\",\"\");\n\t\t\t\tif (line.contains(\"inic->\")) {\n\t\t\t\t\tString[] res = line.split(\"->\");\n\t\t\t\t\tinitialStName = res[1].substring(0, res[1].length()-1);\n\t\t\t\t\tif (finalStsNames.contains(initialStName))\n\t\t\t\t\t\tinitialState = new State(initialStName, true, true);\n\t\t\t\t\telse\n\t\t\t\t\t\tinitialState = new State(initialStName, true, false);\n\t\t\t\t\tstates.add(initialState);\n\t\t\t\t}\n\t\t\t\telse if (line.contains(\"->\")) {\n\t\t\t\t\tString newLine = line.replaceAll(\"[->=]\",\"/\");\n\t\t\t\t\tnewLine = newLine.replace('[','/').replace('\"','/');\n\t\t\t\t\tString[] res = newLine.split(\"/\");\n\t\t\t\t\tdepartureStName = res[0];\n\t\t\t\t\tarrivalStName = res[2];\n\t\t\t\t\tCharacter symbol = res[5].charAt(0);\n\t\t\t\t\tState departureState;\n\t\t\t\t\tState arrivalState;\n\t\t\t\t\tif (departureStName.equals(initialStName)) {\n\t\t\t\t\t\tdepartureState = initialState;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (finalStsNames.contains(departureStName))\n\t\t\t\t\t\t\tdepartureState = new State(departureStName, false, true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdepartureState = new State(departureStName, false, false);\n\t\t\t\t\t\tstates.add(departureState);\n\t\t\t\t\t}\n\t\t\t\t\tif (arrivalStName.equals(initialStName)) {\n\t\t\t\t\t\tarrivalState = initialState;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif (finalStsNames.contains(arrivalStName))\n\t\t\t\t\t\t\tarrivalState = new State(arrivalStName, false, true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tarrivalState = new State(arrivalStName, false, false);\n\t\t\t\t\t\tstates.add(arrivalState);\n\t\t\t\t\t}\n\t\t\t\t\talphabet.add(symbol);\n\t\t\t\t\ttransitions.add(new Triple<>(departureState,symbol,arrivalState));\n\t\t\t\t}\n\t\t\t}\n\t\t\tsecondScanner.close();\n\t\t\tif (alphabet.contains(Lambda))\n\t\t\t\treturn new NFALambda(states, alphabet, transitions);\n\t\t\telse {\n\t\t\t\tfor (Triple<State,Character,State> t1 : transitions) {\n\t\t\t\t\tfor (Triple<State,Character,State> t2 : transitions) {\n\t\t\t\t\t\tif (t1.first().equals(t2.first()) && t1.second().equals(t2.second()) && !t1.third().equals(t2.third())) {\n\t\t\t\t\t\t\treturn new NFA(states, alphabet, transitions);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new DFA(states, alphabet, transitions);\n\t\t\t}\n\t\t}\n\t\tcatch(FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private boolean parseInput(String fileName)\n {\n try\n {\n Scanner in = new Scanner(new File(fileName));\n\n this.numIntxns = in.nextInt();\n this.roads = new Road[in.nextInt()];\n this.cities = new City[in.nextInt()];\n\n for (int i = 0; i < this.roads.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.roads[i] = new Road(start, end, length);\n }\n\n for (int i = 0; i < this.cities.length; i++)\n {\n int intersectionNum = in.nextInt();\n String name = in.next();\n\n this.cities[i] = new City(intersectionNum, name);\n }\n\n if (in.hasNextInt())\n {\n this.signs = new Sign[in.nextInt()];\n }\n\n for (int i = 0; i < this.signs.length; i++)\n {\n int start = in.nextInt();\n int end = in.nextInt();\n double length = in.nextDouble();\n\n this.signs[i] = new Sign(start, end, length);\n }\n }\n // lazy catch statement because computer science is hard\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n return false;\n }\n\n return true;\n }", "private void readFromFile() {\n\t\tPath filePath = Paths.get(inputFile);\n\n\t\ttry (BufferedReader reader = Files.newBufferedReader(filePath,\n\t\t\t\tCharset.forName(\"UTF-8\"));) {\n\t\t\tString line = null;\n\n\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\tString[] splitLine = line.split(\",\");\n\t\t\t\tcurrentGen.setValue(Integer.parseInt(splitLine[0]),\n\t\t\t\t\t\tInteger.parseInt(splitLine[1]), true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not find file provided.\");\n\t\t}\n\t}", "private void readFile(File filename) throws IOException {\n\t\tFileInputStream fis = new FileInputStream(filename);\n\t\tInputStreamReader isr = new InputStreamReader(fis, \"UTF-8\");\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tSimpleFieldSet fs = new SimpleFieldSet(br, false, true);\n\t\tbr.close();\n\t\t// Read contents\n\t\tString[] udp = fs.getAll(\"physical.udp\");\n\t\tif((udp != null) && (udp.length > 0)) {\n\t\t\tfor(int i=0;i<udp.length;i++) {\n\t\t\t\t// Just keep the first one with the correct port number.\n\t\t\t\tPeer p;\n\t\t\t\ttry {\n\t\t\t\t\tp = new Peer(udp[i], false, true);\n\t\t\t\t} catch (HostnameSyntaxException e) {\n\t\t\t\t\tLogger.error(this, \"Invalid hostname or IP Address syntax error while loading opennet peer node reference: \"+udp[i]);\n\t\t\t\t\tSystem.err.println(\"Invalid hostname or IP Address syntax error while loading opennet peer node reference: \"+udp[i]);\n\t\t\t\t\tcontinue;\n\t\t\t\t} catch (PeerParseException e) {\n\t\t\t\t\tthrow (IOException)new IOException().initCause(e);\n\t\t\t\t}\n\t\t\t\tif(p.getPort() == crypto.portNumber) {\n\t\t\t\t\t// DNSRequester doesn't deal with our own node\n\t\t\t\t\tnode.ipDetector.setOldIPAddress(p.getFreenetAddress());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tcrypto.readCrypto(fs);\n\t}", "public void readFile(File file){\n try{\n scan = new Scanner(file);\n while(scan.hasNextLine()){\n String line = scan.nextLine();\n if(line.startsWith(\"//\")){\n continue;\n }\n process(line);\n }\n }catch(IOException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n }catch(NullPointerException e){\n Alert alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"\");\n alert.setHeaderText(null);\n alert.setContentText(\"Oops the input was not read properly\");\n alert.showAndWait();\n e.printStackTrace();\n \n }\n }", "private void parseFile(String fileName) {\n Set<String> inputs = new HashSet<String>();\n Set<String> outputs = new HashSet<String>();\n double[] qos = new double[4];\n\n Properties p = new Properties(inputs, outputs, qos);\n\n try {\n Scanner scan = new Scanner(new File(fileName));\n while(scan.hasNext()) {\n\t\t\t\tString name = scan.next();\n\t\t\t\tString inputBlock = scan.next();\n\t\t\t\tString outputBlock = scan.next();\n\n\t\t\t\tqos[TIME] = scan.nextDouble();\n\t\t\t\tqos[COST] = scan.nextDouble();\n\t\t\t\tqos[AVAILABILITY] = scan.nextDouble()/100;\n\t\t\t\tqos[RELIABILITY] = scan.nextDouble()/100;\n\t\t\t\t// Throw the other two away;\n\t\t\t\tscan.nextDouble();\n\t\t\t\tscan.nextDouble();\n\n\t\t\t\tfor (String s :inputBlock.split(\",\"))\n\t\t\t\t\tinputs.add(s);\n\t\t\t\tfor (String s :outputBlock.split(\",\"))\n\t\t\t\toutputs.add(s);\n\n p = new Properties(inputs, outputs, qos);\n\n ServiceNode ws = new ServiceNode(name, p);\n serviceMap.put(name, ws);\n inputs = new HashSet<String>();\n outputs = new HashSet<String>();\n qos = new double[4];\n }\n scan.close();\n }\n catch(IOException ioe) {\n System.out.println(\"File parsing failed...\");\n }\n\t\tnumServices = serviceMap.size();\n }", "private void parseFile(IFile file) throws CoreException, IOException {\r\n \t\tBufferedReader reader = new BufferedReader(new InputStreamReader(file.getContents()));\r\n \t\tString nxt = \"\";\r\n \t\tStringBuilder builder = new StringBuilder();\r\n \t\tbuilder.append(reader.readLine());\r\n \t\twhile (nxt!=null) {\r\n \t\t\tnxt = reader.readLine();\r\n \t\t\tif (nxt!=null) {\r\n \t\t\t\tbuilder.append(\"\\n\");\r\n \t\t\t\tbuilder.append(nxt);\r\n \t\t\t}\r\n \t\t}\r\n \t\t// QUESTION: does this trigger the reconcilers?\r\n \t\tset(builder.toString());\r\n \t}", "void readFromFile(String file)\n {\n try\n {\n employees.clear();\n FileReader inputFile = new FileReader(fileName);\n BufferedReader input = new BufferedReader(inputFile);\n String line = input.readLine();\n \n while(line != null)\n {\n Employee worker = new Employee();\n StringTokenizer stringParser = new StringTokenizer(line, \",\");\n while(stringParser.hasMoreElements())\n {\n worker.setName(stringParser.nextElement().toString());\n worker.setHours(Integer.parseInt(stringParser.nextElement().toString()));\n worker.setRate(Float.parseFloat(stringParser.nextElement().toString()));\n }\n employees.add(worker);\n line = input.readLine();\n }\n inputFile.close();\n }\n catch(FileNotFoundException e)\n {\n e.getStackTrace();\n }\n catch(IOException e)\n {\n e.getStackTrace();\n }\n }", "public static Map<String, Integer> getStartingPositions(File file)\n\t\t\tthrows IOException, FileNotFoundException {\n\t\tMap<String, Integer> startPositions = new HashMap<String, Integer>();\n\t\ttry {\n\t\t\tString line;\n\t\t\tBufferedReader in;\n\t\t\tString extension = PdbHelper.getFileExtension(file);\n\t\t\tif (extension.equals(\"gz\")) {\n\t\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tnew GZIPInputStream(new FileInputStream(file))));\n\t\t\t} else {\n\t\t\t\tin = new BufferedReader(new FileReader(file));\n\t\t\t}\n\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tif (line.startsWith(\"DBREF \") || line.startsWith(\"DBREF1\")) {\n\t\t\t\t\tString chainLabel = line.substring(13 - 1, 13);\n\t\t\t\t\tint seqBegin = Integer.parseInt(line.substring(15 - 1, 18)\n\t\t\t\t\t\t\t.trim());\n\t\t\t\t\tstartPositions.put(chainLabel, seqBegin);\n\t\t\t\t\tif (line.startsWith(\"SEQADV \")) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\treturn startPositions;\n\t}", "private static GeneticProgram loadCheckpoint(String arg) {\n CheckpointLoader cpl = new CheckpointLoader(arg);\n GeneticProgram gp = cpl.instantiate();\n if (gp == null) {\n System.err.println(\"Could not load checkpoint.\");\n System.exit(-1);\n }\n return gp;\n }", "public void restoreInfoFromFile(File file) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(file);\n }catch(IOException e){\n e.getStackTrace();\n }\n HashMap<String, ArrayList<Passenger>> pasGroupList = new HashMap<>();\n ArrayList<Passenger> individualList = new ArrayList<Passenger>();\n Passenger pas;\n boolean isGrouped;\n boolean isEconomy;\n String seatPref;\n String name;\n String groupName;\n int seatCol;\n int seatRow;\n\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n String[] info = line.split(\",\");\n name = info[0];\n isEconomy = Boolean.valueOf(info[1]);\n seatRow = Integer.valueOf(info[2]);\n seatCol = Integer.valueOf(info[3]);\n isGrouped = Boolean.valueOf(info[4]);\n if (isGrouped) {\n groupName = info[5];\n pas = new Passenger(name, isEconomy, isGrouped, groupName);\n if (!pasGroupList.containsKey(groupName)) {\n pasGroupList.put(groupName, new ArrayList<Passenger>());\n }\n pasGroupList.get(groupName).add(pas);\n } else {\n seatPref = info[5];\n pas = new Passenger(name, isEconomy, seatPref);\n individualList.add(pas);\n }\n addPasDirectlyToSeat(pas, seatRow, seatCol);\n }\n updateTrackingList(pasGroupList, individualList);\n\n scanner.close();\n }", "public ComputationGraph loadCheckpointCG(Checkpoint checkpoint){\n return loadCheckpointCG(checkpoint.getCheckpointNum());\n }", "private void loadAssertPageFile(File f) throws VDDException {\n NodeList nodes;\n\n try {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(f);\n\n nodes = doc.getDocumentElement().getChildNodes();\n } catch (javax.xml.parsers.ParserConfigurationException e) {\n throw new VDDException(\"XML parser failed to load\", e);\n } catch (org.xml.sax.SAXException e) {\n throw new VDDException(\"Error during XML parsing\", e);\n } catch (java.io.IOException e) {\n throw new VDDException(\"Failed to read page assertion file\", e);\n }\n\n\n for (int k = 0; k < nodes.getLength(); k++) {\n Node node = nodes.item(k);\n String name;\n\n if (node.getNodeType() != Node.ELEMENT_NODE) {\n continue;\n }\n\n name = node.getNodeName().toLowerCase();\n\n if (name.equals(\"checks\")) {\n readEntries(this.assertions, node.getChildNodes());\n } else if (name.equals(\"ignores\")) {\n readEntries(this.whitelist, node.getChildNodes());\n } else {\n throw new VDDException(\"Unknown assert page entry type '\" +\n name + \"'\");\n }\n }\n }", "public static KSBlockDocument<KSEvaluation> parseAndEvaluate(\n final Path base,\n final Path file)\n throws IOException, KSOpFailed\n {\n KSParseAndEvaluate.LOG.debug(\"base directory: {}\", base);\n KSParseAndEvaluate.LOG.debug(\"checking: {}\", file);\n\n final KSParseContextType context = KSParseContext.Companion.empty(base);\n final KSParsers parsers = KSParsers.getInstance();\n final KSParserDriverType p = parsers.create(context, file);\n\n KSParseAndEvaluate.LOG.debug(\"parsing\");\n\n final KSResult<KSElement.KSBlock<KSParse>, KSParseError> parse_r;\n try {\n parse_r = p.parseBlock(context, file);\n } catch (final NoSuchFileException e) {\n KSParseAndEvaluate.LOG.error(\"file not found: {}\", p);\n throw e;\n } catch (final IOException e) {\n KSParseAndEvaluate.LOG.error(\"i/o error: {}\", p);\n throw e;\n }\n\n if (parse_r instanceof KSResult.KSFailure) {\n final KSResult.KSFailure<KSElement.KSBlock<KSParse>, KSParseError> f =\n (KSResult.KSFailure<KSElement.KSBlock<KSParse>, KSParseError>) parse_r;\n\n final Deque<KSParseError> errors = f.getErrors();\n for (final KSParseError e : errors) {\n KSParseAndEvaluate.LOG.error(\"{}\", e.show());\n }\n throw new KSOpFailed();\n }\n\n if (parse_r instanceof KSResult.KSSuccess) {\n KSParseAndEvaluate.LOG.debug(\"parsed successfully\");\n\n final KSResult.KSSuccess<KSElement.KSBlock<KSParse>, KSParseError> s =\n (KSResult.KSSuccess<KSElement.KSBlock<KSParse>, KSParseError>) parse_r;\n\n final KSElement.KSBlock<KSParse> r = s.getResult();\n return KSBlockMatch.INSTANCE.match(\n file,\n r,\n (c, doc) -> {\n KSParseAndEvaluate.LOG.debug(\"evaluating document\");\n\n final KSResult<KSElement.KSBlock.KSBlockDocument<KSEvaluation>, KSEvaluationError> eval_r =\n KSEvaluator.INSTANCE.evaluate(doc, c);\n\n if (eval_r instanceof KSResult.KSFailure) {\n final KSResult.KSFailure<KSElement.KSBlock.KSBlockDocument<KSEvaluation>, KSEvaluationError> f =\n (KSResult.KSFailure<KSElement.KSBlock.KSBlockDocument<KSEvaluation>, KSEvaluationError>) eval_r;\n\n final Deque<KSEvaluationError> errors = f.getErrors();\n for (final KSEvaluationError e : errors) {\n KSParseAndEvaluate.LOG.error(\"{}\", e.show());\n }\n throw new KSOpFailed();\n }\n\n KSParseAndEvaluate.LOG.debug(\"evaluated successfully\");\n final KSResult.KSSuccess<KSElement.KSBlock.KSBlockDocument<KSEvaluation>, KSEvaluationError> rs =\n (KSResult.KSSuccess<KSElement.KSBlock.KSBlockDocument<KSEvaluation>, KSEvaluationError>) eval_r;\n return rs.getResult();\n },\n (c, section) -> {\n throw KSParseAndEvaluate.notADocument(\"section\");\n },\n (c, subsection) -> {\n throw KSParseAndEvaluate.notADocument(\"subsection\");\n },\n (c, paragraph) -> {\n throw KSParseAndEvaluate.notADocument(\"paragraph\");\n },\n (c, formal) -> {\n throw KSParseAndEvaluate.notADocument(\"formal item\");\n },\n (c, footnote) -> {\n throw KSParseAndEvaluate.notADocument(\"footnote\");\n },\n (c, part) -> {\n throw KSParseAndEvaluate.notADocument(\"part\");\n },\n (c, import_e) -> {\n throw KSParseAndEvaluate.notADocument(\"import\");\n }\n );\n }\n\n throw new UnreachableCodeException();\n }", "public MapMessage processFile(File file) {\r\n\t\ttry {\r\n\r\n\t\t\tScanner input = new Scanner(file);\r\n\r\n\t\t\twhile (input.hasNext()) {\r\n\t\t\t\tString line = input.nextLine();\r\n\t\t\t\tif (!line.isEmpty()) {\r\n\t\t\t\t\tfileContent.append(line).append(\"\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tinput.close();\r\n\r\n\t\t} catch (FileNotFoundException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t\tMapMessage mapMessage = validateMap(fileContent.toString());\r\n\t\treturn mapMessage;\r\n\t}", "public static final List<SignalEntry> read(File file) {\r\n List<SignalEntry> result = new ArrayList<SignalEntry>();\r\n LineNumberReader reader = null;\r\n try {\r\n reader = new LineNumberReader(new FileReader(file));\r\n String line;\r\n do {\r\n line = reader.readLine();\r\n if (\"Entry:\".equals(line)) {\r\n String algorithm = unquote(reader.readLine());\r\n String parameterName = unquote(reader.readLine());\r\n String parameterValue = unquote(reader.readLine());\r\n result.add(new SignalEntry(algorithm, parameterName, parameterValue));\r\n }\r\n } while (null != line);\r\n reader.close();\r\n } catch (IOException e) {\r\n if (null != reader) {\r\n try {\r\n reader.close();\r\n } catch (IOException e1) {\r\n }\r\n }\r\n }\r\n return result;\r\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "public void loadJobDataFromFile(File file) {\n try {\n\n JAXBContext context = JAXBContext.newInstance(JobListWrapper.class);\n Unmarshaller um = context.createUnmarshaller();\n\n // Reading XML from the file and unmarshalling.\n JobListWrapper wrapper = (JobListWrapper) um.unmarshal(file);\n\n jobData.clear();\n jobData.addAll(wrapper.getJobs());\n\n // Save the file path to the registry.\n setJobFilePath(file);\n\n } catch (Exception e) { // catches ANY exception\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Could not load data\");\n alert.setContentText(\"Could not load data from file:\\n\" + file.getPath());\n\n alert.showAndWait();\n }\n }", "private WALPointer readPointer(File cpMarkerFile, ByteBuffer buf) throws IgniteCheckedException {\n buf.position(0);\n\n try (FileIO io = ioFactory.create(cpMarkerFile, READ)) {\n io.readFully(buf);\n\n buf.flip();\n\n return new FileWALPointer(buf.getLong(), buf.getInt(), buf.getInt());\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\n \"Failed to read checkpoint pointer from marker file: \" + cpMarkerFile.getAbsolutePath(), e);\n }\n }", "private Properties parseFile(File file) throws InvalidDeclarationFileException {\n Properties properties = new Properties();\n InputStream is = null;\n try {\n is = new FileInputStream(file);\n properties.load(is);\n } catch (Exception e) {\n throw new InvalidDeclarationFileException(String.format(\"Error reading declaration file %s\", file.getAbsoluteFile()), e);\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n LOG.error(\"IOException thrown while trying to close the declaration file.\", e);\n }\n }\n }\n\n if (!properties.containsKey(Constants.ID)) {\n throw new InvalidDeclarationFileException(String.format(\"File %s is not a correct declaration, needs to contains an id property\", file.getAbsoluteFile()));\n }\n return properties;\n }", "public void load (File file) throws Exception;", "public synchronized void parse( File schemaFile ) throws IOException, ParseException\n {\n schemaIn = Files.newInputStream( Paths.get( schemaFile.getPath() ) );\n\n if ( producerThread == null )\n {\n producerThread = new Thread( new DataProducer() );\n }\n\n producerThread.start();\n invokeParser( \"schema file ==> \" + schemaFile.getAbsolutePath() );\n }", "public void parseFile() {\n File file = new File(inputFile);\n try {\n Scanner scan = new Scanner(file);\n\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n line = line.replaceAll(\"\\\\s+\", \" \").trim();\n\n if (line.isEmpty()) {\n continue;\n }\n // System.out.println(line);\n String cmd = line.split(\" \")[0];\n String lineWithoutCmd = line.replaceFirst(cmd, \"\").trim();\n // System.out.println(lineWithoutCmd);\n\n // The fields following each command\n String[] fields;\n\n switch (cmd) {\n case (\"add\"):\n fields = lineWithoutCmd.split(\"<SEP>\");\n fields[0] = fields[0].trim();\n fields[1] = fields[1].trim();\n fields[2] = fields[2].trim();\n add(fields);\n break;\n case (\"delete\"):\n\n fields = split(lineWithoutCmd);\n delete(fields[0], fields[1]);\n break;\n case (\"print\"):\n if (lineWithoutCmd.equals(\"ratings\")) {\n printRatings();\n break;\n }\n fields = split(lineWithoutCmd);\n\n print(fields[0], fields[1]);\n\n break;\n case (\"list\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n list(fields[0], fields[1]);\n break;\n case (\"similar\"):\n // need to check if it is the movie or reviewer\n fields = split(lineWithoutCmd);\n similar(fields[0], fields[1]);\n break;\n default:\n break;\n }\n\n }\n\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "public void loadFile(File file) throws FileNotFoundException\n {\n FileReader reader = new FileReader(file);\n\n // Clear table to make sure it only shows tasks from file\n Item.getToDoList().clear();\n if(this.listView != null)\n {\n listView.getItems().clear();\n }\n\n index = 0;\n\n try(BufferedReader temp = new BufferedReader(reader))\n {\n String info;\n boolean check;\n\n while((info = temp.readLine()) != null)\n {\n // Make an array of values\n String[] values = info.split(\",\");\n\n //Array length is 3, since 3 columns. If not that then incorrect file\n if(values.length != 3)\n {\n if(this.status != null)\n {\n status.setText(\"Incompatible File. \");\n }\n break;\n }\n\n // If correct, add information from file to list\n else\n {\n check = !values[2].equals(\"false\");\n Item.getToDoList().add(new Item(values[0], values[1], check));\n }\n }\n\n } catch (IOException exception)\n {\n // If error, let user know\n if(this.status != null)\n {\n status.setText(\"File not found. \");\n }\n\n exception.printStackTrace();\n }\n }", "public Parser( File inFile ) throws FileNotFoundException\r\n {\r\n if( inFile.isDirectory() )\r\n throw new FileNotFoundException( \"Excepted a file but found a directory\" );\r\n \r\n feed = new Scanner( inFile );\r\n lineNum = 1;\r\n }", "public void parse(final File file) throws AbortCronJobException\n\t{\n\t\ttry\n\t\t{\n\t\t\tparser.parse(fileToURL(file).toString());\n\t\t}\n\t\tcatch (final TestParseAbortException e)\n\t\t{\n\t\t\tthrow new AbortCronJobException(\"Test: CronJob was aborted by client!\");\n\t\t}\n\t\tcatch (final AbortRequestedException e)\n\t\t{\n\t\t\tthrow new AbortCronJobException(\"CronJob was aborted by client!\");\n\t\t}\n\t\tcatch (final ParseFinishedException e)\n\t\t{\n\t\t\t// fine here since this is the only way to abort parsing without\n\t\t\t// processing the whole file\n\t\t}\n\t\tcatch (final ParseAbortException e)\n\t\t{\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\te.printStackTrace(System.err);\n\t\t\tthrow new AbortCronJobException(\"unknow abort exception type \" + e.getClass().getName() + \" \");\n\t\t}\n\t\tcatch (final SAXException e)\n\t\t{\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\te.printStackTrace(System.err);\n\t\t\tthrow new JaloSystemException(e);\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\te.printStackTrace(System.err);\n\t\t\tthrow new JaloSystemException(e);\n\t\t}\n\t}", "public static ArrayList<Point> read_from_file(String file){\n Locale.setDefault(new Locale(\"en\", \"US\"));\n\n ArrayList<Point> points = new ArrayList<>();\n\n try {\n //java.io.File myObj = new java.io.File(\"test_points_2.txt\");\n //java.io.File myObj = new java.io.File(\"points.txt\");\n java.io.File myObj = new java.io.File(file);\n Scanner myReader = new Scanner(myObj);\n int N = myReader.nextInt();\n\n //System.out.println(N);\n for (int i = 0; i < N; i++) {\n double x = myReader.nextDouble();\n double y = myReader.nextDouble();\n points.add(new Point(x, y));\n //System.out.println(\"x: \" + x + \" y: \" + y);\n }\n\n myReader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n return null;\n }\n return points;\n }", "private static void fileRead(String file) {\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString line = \"\";\n\t\t\twhile((line=br.readLine())!=null) {\n\t\t\t\tString data[] = line.split(\"\\\\t\");\n\t\t\t\tint id = Integer.parseInt(data[0]);\n\t\t\t\tint groundTruth = Integer.parseInt(data[1]);\n\t\t\t\tactualClusters.put(id, groundTruth);\n\t\t\t\tArrayList<Double> temp = new ArrayList<>();\n\t\t\t\tfor(int i=2;i<data.length;i++) {\n\t\t\t\t\ttemp.add(Double.parseDouble(data[i]));\n\t\t\t\t}\n\t\t\t\tcols = data.length-2;\n\t\t\t\tgeneAttributes.put(id, temp);\n\t\t\t\tallClusters.add(id+\"\");\n\t\t\t\ttotalGenes++;\n\t\t\t}\n\t\t\ttotalCluster = totalGenes;\n\t\t\tbr.close();\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void loadFromFile() {\n try {\n /* Load in the data from the file */\n FileInputStream fIn = openFileInput(FILENAME);\n BufferedReader inRead = new BufferedReader(new InputStreamReader(fIn));\n\n /*\n * access from the GSON file\n * Taken from lonelyTwitter lab code\n */\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<Counter>>() {}.getType();\n counters = gson.fromJson(inRead, listType);\n\n } catch (FileNotFoundException e) {\n counters = new ArrayList<Counter>();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "FormattedSmartPlaylist readFromFile(File file) throws JAXBException, FileNotFoundException;", "public void load_from_file() {\r\n // prompting file name from user\r\n System.out.print(\"Enter in FileName:\\n>\");\r\n\r\n // taking user input of file name\r\n String filename = Menu.sc.next();\r\n Scanner input;\r\n\r\n // try to open file, if fails throws exception and returns to main menu\r\n try {\r\n input = new Scanner(new FileReader(filename));\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"Unable to open file!!\");\r\n System.out.println();\r\n return;\r\n }\r\n\r\n int count = 0; // variable to count number of address entry read\r\n\r\n /* reading data until end of file */\r\n while (input.hasNextLine()) {\r\n String firstName = \"\", lastName = \"\", street = \"\", city = \"\", state = \"\", email = \"\", phone = \"\";\r\n int zip = 0;\r\n if (input.hasNextLine())\r\n firstName = input.nextLine();\r\n if (input.hasNextLine())\r\n lastName = input.nextLine();\r\n if (input.hasNextLine())\r\n street = input.nextLine();\r\n if (input.hasNextLine())\r\n city = input.nextLine();\r\n if (input.hasNextLine())\r\n state = input.nextLine();\r\n if (input.hasNextLine())\r\n zip = Integer.parseInt(input.nextLine());\r\n if (input.hasNextLine())\r\n phone = input.nextLine();\r\n if (input.hasNext())\r\n email = input.nextLine();\r\n if (input.hasNext())\r\n input.nextLine();\r\n addressEntryList.add(new AdressEntry(firstName, lastName, street, city, state, zip, phone, email));\r\n count++;\r\n }\r\n\r\n /*\r\n printing number of address entry variables\r\n and printing total number of AddressEntry in the list\r\n */\r\n System.out.println(\"Read in \" + count + \" new Addresses, successfully loaded, currently \"\r\n + addressEntryList.size() + \" Addresses\");\r\n input.close();\r\n System.out.println();\r\n }", "private ExecutionInfo fileToExecutionInfo(File dataFile){\n\t\tExecutionInfo info = new ExecutionInfo();\n\t\tProperties props = new Properties();\n\t\ttry {\n\t\t\tPropertiesUtil.loadFromFile(props, dataFile);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\t\n\t\tinfo.setId((String)props.get(ID_PROP));\n\t\tString status = (String)props.get(STATUS_PROP);\n\t\t\n\t\tStatus statusEnum;\n\t\tif(StringUtils.isBlank(status)){\n\t\t\tstatusEnum = Status.UNKNOWN;\n\t\t} else {\n\t\t\tstatusEnum = Status.valueOf(status);\n\t\t}\n\t\tinfo.setStatus(statusEnum);\n\t\t\n\t\tString start = (String)props.get(START_PROP);\n\t\tinfo.setStart(new Date(Long.parseLong(start)));\n\t\t\n\t\tString finish = (String)props.get(FINISH_PROP);\n\t\tif(StringUtils.isNotBlank(finish)){\n\t\t\tinfo.setFinish(new Date(Long.parseLong(finish)));\n\t\t}\n\t\t\n\t\tString error = (String)props.get(ERROR_PROP);\n\t\tif(StringUtils.isNotBlank(error)){\n\t\t\tinfo.setError(error);\n\t\t}\n\t\t\n\t\tString startParam = (String)props.get(START_DATE_PARAM_PROP);\n\t\tString endParam = (String)props.get(END_DATE_PARAM_PROP);\n\t\tString zipParam = (String)props.get(XML_FILE_NAME_PARAM_PROP);\n\t\t\n\t\tParameters params = new Parameters(startParam, endParam, zipParam);\n\t\t\n\t\tinfo.setParameters(params);\n\t\t\n\t\treturn info;\n\t}", "public static ComputationGraph loadCheckpointCG(File rootDir, Checkpoint checkpoint){\n return loadCheckpointCG(rootDir, checkpoint.getCheckpointNum());\n }", "public void readFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\t// read the headlines\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumVertices = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\tnumPaths = Integer.parseInt(lineElements[1]);\n\t\tsCurrentLine = br.readLine();\n\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\ttmax = Double.parseDouble(lineElements[1]);\n\t\t\n//\t\tSystem.out.println(numVertices + \", \" + numPaths + \", \" + tmax);\n\n\t\t/* read benefits1 */\n\t\tint index = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n//\t\t\t\tSystem.out.println(sCurrentLine);\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\tdouble x = Double.parseDouble(lineElements[0]);\n\t\t\tdouble y = Double.parseDouble(lineElements[1]);\n\t\t\tList<Double> scores = new ArrayList<Double>();\n\t\t\tfor (int i = 2; i < lineElements.length; i++) {\n\t\t\t\tdouble score = Double.parseDouble(lineElements[i]);\n\t\t\t\tscores.add(new Double(score));\n\t\t\t}\n\t\t\tPOI POI = new POI(index, x, y, scores);\n\t\t\t//POI.printMe();\n\t\t\t\n\t\t\tvertices.add(POI);\n\t\t\tindex ++;\n\t\t}\n\t\t\n\t\t// create the arcs and the graph\n\t\tfor (int i = 0; i < vertices.size(); i++) {\n\t\t\tfor (int j = 0; j < vertices.size(); j++) {\n\t\t\t\tArc arc = new Arc(vertices.get(i), vertices.get(j));\n\t\t\t\tarcs.add(arc);\n\t\t\t\tgraph.put(new Tuple2<POI, POI>(vertices.get(i), vertices.get(j)), arc);\n\t\t\t}\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "public int loadFile(File file)\r\n {\r\n try \r\n {\r\n ObjectInputStream src = new ObjectInputStream(new FileInputStream(file));\r\n root = (Person)src.readObject();\r\n return 0;\r\n } \r\n catch (FileNotFoundException ex) \r\n {\r\n System.out.println(\"A file related error has occurred while loading file: \" + ex);\r\n return 1;\r\n } \r\n catch (IOException | ClassNotFoundException ex) \r\n {\r\n System.out.println(\"A file related error has occurred while loading file: \" + ex);\r\n return 1;\r\n }\r\n }", "@Override\n\tpublic void run() {\n\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file)));\n\t\t\tString line = null;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] record = line.trim().split(\"@\");\n\t\t\t\tif (record.length != 2)\n\t\t\t\t\tcontinue;\n\t\t\t\tparse(record[0], record[1]);\n\n\t\t\t}\n\t\t\t// close buffer reader\n\t\t\tbr.close();\n\t\t\t// Debug catch An exception\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\t}", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "protected abstract Operation parseLine(File baseDir, String line, int lineNum) throws IOException;", "private void readFile( String fileName ) throws FileNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile train_file = new File( fileName );\n\t\t\tScanner in;\n\t\t\tin = new Scanner( train_file );\n\n\t\t\tString[] tokens = in.nextLine().trim().split( \"\\\\s+\" ); // Parse the file\n\t\t\tthis.attribute_list.add( new Attribute( 0, \"x0\" ) );\n\n\t\t\tint i = 1;\n\t\t\twhile ( i <= tokens.length )\n\t\t\t{\n\t\t\t\tthis.attribute_list.add( new Attribute( i, tokens[ i - 1 ] ) );\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\twhile ( in.hasNextLine() )\n\t\t\t{\n\t\t\t\ttokens = in.nextLine().trim().split( \"\\\\s+\" );\n\t\t\t\tif ( tokens.length > 1 )\n\t\t\t\t{\n\t\t\t\t\tthis.addTrainData( 0, 1 );\n\n\t\t\t\t\tfor ( i = 1; i < tokens.length; i++ )\n\t\t\t\t\t\tthis.addTrainData( i, Integer.parseInt( tokens[ i - 1 ] ) );\n\n\t\t\t\t\t// Last column would be the class attribute\n\t\t\t\t\tthis.class_data.add_data( Integer.parseInt( tokens[ i - 1 ] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tin.close();\n\t\t}\n\t\tcatch ( FileNotFoundException e )\n\t\t{\n\t\t\tSystem.out.println( \"Cannot find train file - \" + fileName );\n\t\t\tthrow e;\n\t\t}\n\t}", "public MultiLayerNetwork loadCheckpointMLN(Checkpoint checkpoint){\n return loadCheckpointMLN(checkpoint.getCheckpointNum());\n }", "private Point[] readTestFile(String filename) {\n In in = new In(filename);\n int N = in.readInt();\n Point[] points = new Point[N];\n for (int i = 0; i < N; i++) {\n int x = in.readInt();\n int y = in.readInt();\n points[i] = new Point(x, y);\n }\n return points;\n }", "private void readFile(File fp)throws IOException{\n Scanner in=new Scanner(fp);\n String line,s[];\n while(in.hasNext()){\n line=in.nextLine();\n s=line.split(\"[ ]+\");\n if(s.length<3){\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0])));\n }\n else{\n payroll.addLast(new ObjectListNode(new Employee(s[1],s[0],s[2].charAt(0),s[4].charAt(0),\n Integer.parseInt(s[3]),Double.parseDouble(s[5]))));\n }\n }\n }", "public void readFromTxtFile(String filename){\n try{\n File graphFile = new File(filename); \n Scanner myReader = new Scanner(graphFile); \n parseFile(myReader);\n myReader.close();\n } \n catch(FileNotFoundException e){\n System.out.println(\"ERROR: DGraphEdges, readFromTxtFile: file not found.\");\n e.printStackTrace();\n } \n }", "private void loadCheckingAccounts(String checkingAccountFileName)\n {\n try\n {\n /* Open the file to read */\n File inputFile = new File(checkingAccountFileName);\n\n /* Create a scanner to begin reading from file */\n Scanner input = new Scanner(inputFile);\n\n while (input.hasNextLine())\n {\n //reading...\n String currentLine = input.nextLine();\n\n //parse on commas\n String[] splitLine = currentLine.split(\",\");\n\n //DateFormat class to parse Date from file\n DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);\n\n //parsing out data...\n int accountId = Integer.parseInt(splitLine[0]);\n double balance = Double.parseDouble(splitLine[1]);\n String ssn = splitLine[2];\n double interestRate = Double.parseDouble(splitLine[3]);\n Date dateOpened = dateFormat.parse(splitLine[4]);\n int overdraftSavingsAccountId = Integer.parseInt(splitLine[5]);\n boolean isGoldDiamond = Boolean.parseBoolean(splitLine[6]);\n\n Checking checkingAccount = new Checking(accountId,\n balance,\n ssn,\n interestRate,\n dateOpened,\n overdraftSavingsAccountId,\n isGoldDiamond);\n\n ArrayList<Transaction> accountTransactions = transactionHashMap.get(accountId);\n checkingAccount.setTransactions(accountTransactions);\n\n //add checking account...\n accounts.add(checkingAccount);\n }\n\n input.close();\n\n } catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "private static int firstPassParse(String line, int offset)\r\n {\r\n String[] tokens = line.split(\"[\\\\s,]+\");\r\n\r\n if(tokens.length <= 0)\r\n {\r\n return offset;\r\n }\r\n \r\n if(!isOpcode(tokens[0]) && !tokens[0].startsWith(\".\"))\r\n {\r\n int address = beginningAddress + offset;\r\n \r\n if(isHex(tokens[0]))\r\n {\r\n throw new AssemblerException(\"Invalid label on line: \" + line);\r\n }\r\n else\r\n {\r\n symbolTable.put(tokens[0], address);\r\n }\r\n }\r\n\r\n return offset + ADDRESS_OFFSET;\r\n }", "public void parse(FileReader inputFile, LexemAnalizator lexemAnalizator, SyntaxisAnalizator syntaxisAnalizator){\n // TODO: Write realization of parsing (Maybe, chain of responsibilities will be ok for this case)\n }", "public void read(String file, String separator, NumberFormat numberFormat) throws Exception {\r\n\t\tparse(new String(Files.readAllBytes(Paths.get(file))), separator, numberFormat);\r\n\t}", "public void readCategoryFile(File file) {\n\ttry (BufferedReader br = new BufferedReader(new FileReader(file)))\n\t{\n\t\tString sCurrentLine;\n\t\tString [] lineElements;\n\t\t\n\t\tint row = 0;\n\t\twhile ((sCurrentLine = br.readLine()) != null) {\n\t\t\t//System.out.println(sCurrentLine);\n\t\t\t\n\t\t\tlineElements = sCurrentLine.split(\"\\\\s+\");\n\t\t\t//System.out.println(lineElements.length);\n\t\t\tfor (int column = 0; column < lineElements.length; column++) {\t\t\n\t\t\t\t//System.out.println(column);\n\t\t\t\tint category = Integer.parseInt(lineElements[column]);\n\t\t\t\t//System.out.println(vertices.size());\n\t\t\t\tPOI v1 = vertices.get(row);\n\t\t\t\tPOI v2 = vertices.get(column);\n\t\t\t\t\n\t\t\t\tArc arc = getArc(v1, v2);\n\t\t\t\tif (!distMtx) {\n\t\t\t\t\tdouble distance = v1.distanceTo(v2);\n\t\t\t\t\tif (data == Dataset.VERBEECK) {\n\t\t\t\t\t\tdistance = distance / 5.0;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tdistance = distance / 10.0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tarc.setLength(distance);\n\t\t\t\t}\n\t\t\t\tarc.setCategory(category);\n\t\t\t\tif (distConstraint) {\n\t\t\t\t\tarc.setSpeedTable(allOneSpeedTable);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tarc.setSpeedTable(speedTables.get(category));\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\trow ++;\n\t\t}\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n}", "public static ParsedData arffFileReader(File file) throws Exception {\n\n ParsedData data;\n String line = null;\n BufferedReader br = new BufferedReader(new FileReader(file));\n\n ArrayList<Attribute> attributes = new ArrayList<>();\n boolean attributeTest = true;\n int attributeNumber = 0;\n ArrayList<String> datasetList = new ArrayList<>();\n String relName = \"\";\n\n int rows = 0;\n int columns = 0;\n\n while ((line = br.readLine()) != null) {\n\n line = line.trim();\n\n if (attributeTest) {\n if(line.startsWith(\"@relation\")){\n relName = line.split(\" \")[1];\n }\n\n if (line.startsWith(\"@attribute\")) {\n attributes.add(parseAttribute(line, attributeNumber));\n attributeNumber++;\n }\n } else {\n String[] instance = parseInstance(line);\n if(instance.length != attributes.size()) {\n System.out.println(\"Skip illegal line: \" + Utils.concatStringArray(instance));\n continue;\n }\n for (int i = 0; i < instance.length; i++) {\n datasetList.add(instance[i]);\n }\n rows++;\n }\n if (line.startsWith(\"@data\")) {\n attributeTest = false;\n }\n\n }\n columns = attributes.size();\n\n String[] datasetArray = new String[datasetList.size()];\n for (int i = 0; i < datasetList.size(); i++) {\n datasetArray[i] = datasetList.get(i);\n }\n\n DataSet dataset = new DataSet(datasetArray, rows, columns);\n data = new ParsedData(dataset, attributes, relName);\n return data;\n\n }", "protected abstract void parse(String line);", "private boolean parse(String name) {\r\n BufferedReader in;\r\n\r\n try {\r\n in = new BufferedReader(new InputStreamReader(new FileInputStream(name)));\r\n\r\n }\r\n catch (IOException e) {\r\n return false;\r\n }\r\n\r\n try {\r\n while (true) {\r\n String line = in.readLine();\r\n if (line != null) {\r\n\r\n // skip the commented lines\r\n if (!line.startsWith(\"//\") && !line.startsWith(\";\") &&\r\n !line.startsWith(\"#\")) {\r\n int i = line.indexOf('=');\r\n\r\n // we also skip lines without an equal sign\r\n if (i != -1)\r\n keyvaluepairs.put(line.substring(0, i).trim().toLowerCase(),\r\n line.substring(i + 1).trim());\r\n }\r\n\r\n }\r\n else\r\n break;\r\n }\r\n }\r\n catch (IOException e) {\r\n }\r\n\r\n return true;\r\n }", "@Override\n public void parseFile(String id, Reader reader) throws Exception {\n lineNr = 0;\n BufferedReader fin = null;\n if (reader instanceof BufferedReader) {\n fin = (BufferedReader) reader;\n } else {\n fin = new BufferedReader(reader);\n }\n try {\n while (fin.ready()) {\n String sStr = nextLine(fin);\n if (sStr == null) {\n return;\n }\n if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+data;\\\\s*$\") || sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+characters;\\\\s*$\")) {\n m_alignment = parseDataBlock(fin);\n m_alignment.setID(id);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+calibration;\\\\s*$\")) {\n traitSet = parseCalibrationsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+assumptions;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+sets;\\\\s*$\") ||\n sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+mrbayes;\\\\s*$\")) {\n parseAssumptionsBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+taxa;\\\\s*$\")) {\n parseSATaxaBlock(fin);\n } else if (sStr.toLowerCase().matches(\"^\\\\s*begin\\\\s+trees;\\\\s*$\")) {\n parseSATreesBlock(fin);\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n throw new Exception(\"Around line \" + lineNr + \"\\n\" + e.getMessage());\n }\n }", "public synchronized T parse(IFile file, boolean updateCache) throws Exception {\n T model = _parse(file, updateCache);\n\n if (updateCache) {\n //System.out.println(\"AbstractCacheEntry.parse: a \" + _file);\n _file = file;\n //System.out.println(\"WodParserCacheEntry.parse: set model (file) = \" + model);\n _setModel(model);\n if (file != null && file.exists()) {\n _lastParseTime = file.getModificationStamp();\n }\n _documentChanged = false;\n }\n\n return model;\n }", "private static JSONTile parse(String configFile) {\n Gson gson = new Gson();\n\n try (BufferedReader reader = new BufferedReader(\n new InputStreamReader(new FileInputStream(configFile), StandardCharsets.UTF_8))) {\n return gson.fromJson(reader, JSONTile.class);\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Error when reading file: \" + configFile, e);\n }\n }", "public void readFile(String file) throws FileNotFoundException {\n\t\tsc = new Scanner(new File(file));\n\t\tString firstLine = sc.nextLine();\n\t\tString [] breakFirstLine = firstLine.split(\" \");\n\t\tvillages = Integer.parseInt(breakFirstLine[0]);\n\t\tlines = Integer.parseInt(breakFirstLine[1]);\n\t\tSystem.out.println(\"villages: \" + villages + \"\\nlines: \" + lines);\n\t\tString line = \"\"; // current line\n\t\twhile(sc.hasNextLine()) { \n\t\t\tline = sc.nextLine();\n\t\t\tSystem.out.println(line);\n\t\t\tString[] breaks = line.split(\" \");\n\t\t\tString city1 = breaks[0];\n\t\t\tString city2 = breaks[1];\n\t\t\tString col = breaks[2];\n\t\t\tcolor = color(col);\n\t\t\tString route = breaks[3];\n\t\t\ttransit = transit(route);\n\t\t\tVillage a = new Village(city1);\n\t\t\tVillage b = new Village(city2);\n\t\t\t\n\t\t\tEdge e = new Edge(a, b, transit, color);\n\t\t\ta.addEdge(e);\n\t\t\tb.addEdge(e);\n\t\t\tg.addEdge(e);\n\t\t\t\n\t\t\tvertices.add(a);\n\t\t\tlast_transit = transit;\n\t\t\tlast_color = color;\n\t\t}\n\t}", "protected void parse() throws ParseException {\n String s;\n try {\n s=getFullText();\n } catch (IOException ioe) {\n if (ioe instanceof FileNotFoundException) {\n throw new DataNotFoundException (\"Could not find log file.\", ioe);\n } else {\n throw new ParseException (\"Error getting log file text.\", new File (getFileName()));\n }\n }\n StringTokenizer sk = new StringTokenizer(s);\n ArrayList switches = new ArrayList(10);\n while (sk.hasMoreElements()) {\n String el =sk.nextToken().trim();\n if (el.startsWith(\"-J\")) {\n if (!(el.equals(\"-J-verbose:gc\"))) {\n if (!(el.startsWith(\"-J-D\"))) {\n JavaLineswitch curr = new JavaLineswitch(el.substring(2));\n addElement (curr); \n }\n }\n }\n }\n }", "public void parseFile(){\n try{\n BufferedReader br = new BufferedReader(new FileReader(\"ElevatorConfig.txt\"));\n \n String fileRead;\n \n totalSimulatedTime = 1000;\n Integer.parseInt(br.readLine());\n simulatedSecondRate = 30;\n Integer.parseInt(br.readLine());\n \n for (int onFloor = 0; onFloor< 5; onFloor++){\n \n fileRead = br.readLine(); \n String[] tokenize = fileRead.split(\";\");\n for (int i = 0; i < tokenize.length; i++){\n String[] floorArrayContent = tokenize[i].split(\" \");\n \n int destinationFloor = Integer.parseInt(floorArrayContent[1]);\n int numPassengers = Integer.parseInt(floorArrayContent[0]);\n int timePeriod = Integer.parseInt(floorArrayContent[2]);\n passengerArrivals.get(onFloor).add(new PassengerArrival(numPassengers, destinationFloor, timePeriod));\n }\n }\n \n br.close();\n \n } catch(FileNotFoundException e){ \n System.out.println(e);\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n\n }", "private void loadFromFile() {\n\t\ttry {\n\t\t\tFileInputStream fis = openFileInput(FILENAME);\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\tString line = in.readLine();\n\t\t\tGson gson = new Gson();\n\t\t\twhile (line != null) {\n\t\t\t\tCounterModel counter = gson.fromJson(line, CounterModel.class);\n\t\t\t\tif (counterModel.getCounterName().equals(counter.getCounterName())) {\n\t\t\t\t\tcounterListModel.addCounterToList(counterModel);\n\t\t\t\t\tcurrentCountTextView.setText(Integer.toString(counterModel.getCount()));\n\t\t\t\t} else {\n\t\t\t\t\tcounterListModel.addCounterToList(counter);\n\t\t\t\t}\n\t\t\t\tline = in.readLine();\n\t\t\t} \n\t\t\tfis.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public int parse()\n\t{\n\t\tString[] lines = data.split(System.getProperty(\"line.separator\"));\n\n\t\t//A '1' at the first line on the first char indicate that it has a saved data\n\t\tif(lines[0].charAt(0) == 0|| data == null || data.equals(\"\"))\n\t\t{\n\t\t\treturn -1; // should return an error or -1 to indicate so\n\t\t}\n\n\t\tfor(int i = 0;i<lines.length;i++)\n\t\t{\n\t\t\tdataArray[i] =\tInteger.parseInt(lines[i]);\n\t\t}\n\n\t\treturn 1; \n\t}", "String loadFromFile () throws Exception {\n\n Reader reader = new Reader(new FileReader(file));\n String line;\n\n// reads all lines of the file\n while ((line = reader.readLine()) != null) {\n\n// depending on the object tag [element], it reads relevant parameters and creates the Element\n if (line.contains(\"[timeline]\"))\n timelines.add(new Timeline(reader.getStringArgument()));\n\n else if (line.contains(\"[event]\")) {\n String timelineName = reader.getStringArgument();\n for (Timeline timeline : timelines) {\n if (timelineName.equals(timeline.name)) {\n timeline.addEvent(\n reader.getStringArgument(),\n reader.getDateArgument(),\n reader.getDateArgument(),\n reader.getIntArgument() != 0,\n reader.getNotesArgument());\n break;\n }\n }\n }\n }\n reader.close();\n return (\"Data loaded successfully\");\n }", "public void readFileToTransitionMap(String fileName){\n\t\ttry {\n\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(new FileInputStream(fileName),\"ISO-8859-1\"));\n\t\t\tString line=null;\n\t\t\t//each time we read a line, count its words\n\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\tparseLineAndCountTransitions(line);\n\t\t\t}\n\t\t\t//close the buffered reader\n\t\t\treader.close();\n\t\t\tupdateTransitionMap();\n\t\t\t\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "Points(String filepath){\n readPointsFile(filepath); //dengan file points.txt\n }", "public static ComputationGraph loadCheckpointCG(File rootDir, int checkpointNum){\n File f = getFileForCheckpoint(rootDir, checkpointNum);\n try {\n return ModelSerializer.restoreComputationGraph(f, true);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "public void LoadMaze(File file) {\r\n try {\r\n ObjectInputStream in = new ObjectInputStream(new FileInputStream(file));\r\n Maze m = (Maze) in.readObject();\r\n PlayerPositionRow = (int) in.readObject();\r\n PlayerPositionCol = (int) in.readObject();\r\n maze = new Maze(m.Struct);\r\n maze.setStartPotision( new Position(PlayerPositionRow, PlayerPositionCol));\r\n maze.setGoalPosition(new Position(m.getGoalPosition().getRowIndex(), m.getGoalPosition().getColIndex()));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } catch (ClassNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n setChanged();\r\n notifyObservers(\"load\");\r\n }", "public static ArrayList<BoardPair> readFile(String inFileName, String format) {\n ArrayList<BoardPair> boardPairs = new ArrayList<BoardPair>();\n try { \n File inFile = new File(inFileName); \n BufferedReader reader = new BufferedReader(new FileReader(inFile));\n String line = null;\n while ((line=reader.readLine()) != null) { // loop as long as there are input lines \n if(line.contains(\"id,delta\")) \n continue; // skip header\n String str = line.trim(); \n // line fields are: id, delta, start1..400, stop1..400\n String[] tokens = str.split(\",\"); \n int row_id = Integer.parseInt( tokens[0] );\n int delta = Integer.parseInt( tokens[1] );\n int[][] startBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n int[][] stopBoard = new int[Consts.BOARD_SIDE][Consts.BOARD_SIDE]; \n for(int col=0; col<Consts.BOARD_SIDE; col++) { \n for(int row=0; row<Consts.BOARD_SIDE; row++) {\n if(format==\"train\") { \n // train format: id, delta, start.1-start.400, stop.1-stop.400\n // note column major order!\n int startIndex = col*Consts.BOARD_SIDE + row + 2; \n int stopIndex = startIndex + Consts.BOARD_SIDE*Consts.BOARD_SIDE;\n startBoard[row][col]= Integer.parseInt( tokens[startIndex] );\n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n } \n if(format==\"test\") {\n // test format is: id, delta, stop.1-stop.400\n // note column major order!\n int stopIndex = col*Consts.BOARD_SIDE + row + 2; \n startBoard = null; \n stopBoard[ row][col]= Integer.parseInt( tokens[stopIndex ] );\n }\n }\n }\n boardPairs.add( new BoardPair(row_id, delta, startBoard, stopBoard) );\n } \n reader.close(); \n } catch (IOException e) {\n System.out.println(\"ERROR reading: \" + inFileName);\n }\n return boardPairs;\n }", "public Timeline loadTimeline(File file) throws Exception {\n\n\t\tJAXBContext context = JAXBContext.newInstance(Timeline.class);\n\t\tUnmarshaller unMarshaller = context.createUnmarshaller();\n\n\t\treturn (Timeline) unMarshaller.unmarshal(file);\n\n\t}", "private int inputFile(Integer parameterIndex) throws ExceptionMalformedInput\n {\n this.inputFile = parseParameter(args, parameterIndex+1);\n//TODO check that the file exists and is readable\n return parameterIndex + 1;\n }" ]
[ "0.60214067", "0.5674374", "0.5373554", "0.5331233", "0.52084637", "0.5195559", "0.51361215", "0.51248366", "0.5110789", "0.51027936", "0.509854", "0.5084068", "0.5080222", "0.50600874", "0.4952239", "0.4946312", "0.4943476", "0.48530856", "0.48403952", "0.48320338", "0.4830142", "0.48289415", "0.47992316", "0.479362", "0.4785419", "0.47682863", "0.4749359", "0.47260383", "0.47090977", "0.46967122", "0.46890774", "0.46843937", "0.46681136", "0.4660837", "0.46607673", "0.46566823", "0.46498826", "0.46498248", "0.46493998", "0.46390772", "0.46297625", "0.4625861", "0.46248558", "0.46188608", "0.46153036", "0.4615283", "0.46136123", "0.46094614", "0.46093333", "0.46086377", "0.4599487", "0.45974335", "0.45901683", "0.45811692", "0.45798767", "0.45680308", "0.45667613", "0.45628047", "0.4560633", "0.4560478", "0.4559849", "0.45588365", "0.45545495", "0.45523354", "0.454593", "0.4538118", "0.45323977", "0.45294443", "0.45291796", "0.4528311", "0.45260975", "0.4525433", "0.4525315", "0.4524968", "0.4519294", "0.4501009", "0.44977504", "0.44950697", "0.44775376", "0.44725254", "0.44666544", "0.44629985", "0.4460295", "0.44598258", "0.44582957", "0.4449027", "0.44257173", "0.44251055", "0.44168696", "0.44130468", "0.4408854", "0.44071552", "0.44071403", "0.44058737", "0.44006425", "0.4397524", "0.43958864", "0.43952507", "0.43946132", "0.43885976" ]
0.7379782
0
Restores last valid WAL pointer and resumes logging from that pointer. Recreates metastorage if needed.
private void finishRecovery() throws IgniteCheckedException { assert !cctx.kernalContext().clientNode(); long time = System.currentTimeMillis(); CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1); try { for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext())) lsnr.beforeResumeWalLogging(this); // Try to resume logging since last finished checkpoint if possible. if (walTail == null) { CheckpointStatus status = readCheckpointStatus(); walTail = CheckpointStatus.NULL_PTR.equals(status.endPtr) ? null : status.endPtr; } cctx.wal().resumeLogging(walTail); walTail = null; // Recreate metastorage to refresh page memory state after deactivation. if (metaStorage == null) metaStorage = createMetastorage(false); notifyMetastorageReadyForReadWrite(); U.log(log, "Finish recovery performed in " + (System.currentTimeMillis() - time) + " ms."); } catch (IgniteCheckedException e) { if (X.hasCause(e, StorageException.class, IOException.class)) cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, e)); throw e; } finally { CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void outRestore() throws IOException {\n if (lastWriteOffset > 0) {\n outSeek(lastWriteOffset);\n lastWriteOffset = -1;\n }\n }", "private void recover() throws IllegalStateException, InvalidRecordLocationException, IOException, IOException {\n \n RecordLocation pos = null;\n int transactionCounter = 0;\n \n log.info(\"Journal Recovery Started from: \" + journal);\n ConnectionContext context = new ConnectionContext();\n \n // While we have records in the journal.\n while ((pos = journal.getNextRecordLocation(pos)) != null) {\n org.activeio.Packet data = journal.read(pos);\n DataStructure c = (DataStructure) wireFormat.unmarshal(data);\n \n if (c instanceof Message ) {\n Message message = (Message) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(message.getDestination());\n if ( message.isInTransaction()) {\n transactionStore.addMessage(store, message, pos);\n }\n else {\n store.replayAddMessage(context, message);\n transactionCounter++;\n }\n } else {\n switch (c.getDataStructureType()) {\n case JournalQueueAck.DATA_STRUCTURE_TYPE:\n {\n JournalQueueAck command = (JournalQueueAck) c;\n JournalMessageStore store = (JournalMessageStore) createMessageStore(command.getDestination());\n if (command.getMessageAck().isInTransaction()) {\n transactionStore.removeMessage(store, command.getMessageAck(), pos);\n }\n else {\n store.replayRemoveMessage(context, command.getMessageAck());\n transactionCounter++;\n }\n }\n break;\n case JournalTopicAck.DATA_STRUCTURE_TYPE: \n {\n JournalTopicAck command = (JournalTopicAck) c;\n JournalTopicMessageStore store = (JournalTopicMessageStore) createMessageStore(command.getDestination());\n if (command.getTransactionId() != null) {\n transactionStore.acknowledge(store, command, pos);\n }\n else {\n store.replayAcknowledge(context, command.getClientId(), command.getSubscritionName(), command.getMessageId());\n transactionCounter++;\n }\n }\n break;\n case JournalTransaction.DATA_STRUCTURE_TYPE:\n {\n JournalTransaction command = (JournalTransaction) c;\n try {\n // Try to replay the packet.\n switch (command.getType()) {\n case JournalTransaction.XA_PREPARE:\n transactionStore.replayPrepare(command.getTransactionId());\n break;\n case JournalTransaction.XA_COMMIT:\n case JournalTransaction.LOCAL_COMMIT:\n Tx tx = transactionStore.replayCommit(command.getTransactionId(), command.getWasPrepared());\n if (tx == null)\n break; // We may be trying to replay a commit that\n // was already committed.\n \n // Replay the committed operations.\n tx.getOperations();\n for (Iterator iter = tx.getOperations().iterator(); iter.hasNext();) {\n TxOperation op = (TxOperation) iter.next();\n if (op.operationType == TxOperation.ADD_OPERATION_TYPE) {\n op.store.replayAddMessage(context, (Message) op.data);\n }\n if (op.operationType == TxOperation.REMOVE_OPERATION_TYPE) {\n op.store.replayRemoveMessage(context, (MessageAck) op.data);\n }\n if (op.operationType == TxOperation.ACK_OPERATION_TYPE) {\n JournalTopicAck ack = (JournalTopicAck) op.data;\n ((JournalTopicMessageStore) op.store).replayAcknowledge(context, ack.getClientId(), ack.getSubscritionName(), ack\n .getMessageId());\n }\n }\n transactionCounter++;\n break;\n case JournalTransaction.LOCAL_ROLLBACK:\n case JournalTransaction.XA_ROLLBACK:\n transactionStore.replayRollback(command.getTransactionId());\n break;\n }\n }\n catch (IOException e) {\n log.error(\"Recovery Failure: Could not replay: \" + c + \", reason: \" + e, e);\n }\n }\n break;\n case JournalTrace.DATA_STRUCTURE_TYPE:\n JournalTrace trace = (JournalTrace) c;\n log.debug(\"TRACE Entry: \" + trace.getMessage());\n break;\n default:\n log.error(\"Unknown type of record in transaction log which will be discarded: \" + c);\n }\n }\n }\n \n RecordLocation location = writeTraceMessage(\"RECOVERED\", true);\n journal.setMark(location, true);\n \n log.info(\"Journal Recovered: \" + transactionCounter + \" message(s) in transactions recovered.\");\n }", "private void recover() throws JournalException {\n if (!Utility.fileExists(this.node, this.filename)) {\n // no log file to recover, just start fresh\n startFresh();\n } else {\n PersistentStorageReader reader = null;\n try {\n reader = node.getReader(this.filename);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file: \" \n + this.filename + \" for recovery.\");\n }\n\n if (reader != null) {\n String line = null;\n try {\n while ((line = reader.readLine()) != null) {\n if (line.equals(COMPLETE_TOKEN)) {\n this.pendingOps.poll();\n } else {\n try {\n Serializable obj = (Serializable)Serialization.decode(Utility.fromBase64(line));\n this.pendingOps.offer(obj);\n } catch (Exception e) {\n throw new JournalException(\"Error deserializing on recovery.\");\n }\n }\n }\n } catch (IOException e) {\n throw new JournalException(\"Error while reading from recovery log.\");\n }\n } else {\n throw new JournalException(\"Failed to open log file: \"\n + this.filename + \" for recovery.\");\n }\n try {\n this.log = this.node.getWriter(this.filename, true);\n } catch (IOException e) {\n throw new JournalException(\"Failed to open log file.\");\n }\n }\n }", "public interface LogStorage {\n\n /**\n * Returns first log index in log.\n */\n long getFirstLogIndex();\n\n /**\n * Returns last log index in log.\n */\n long getLastLogIndex();\n\n /**\n * Get logEntry by index.\n */\n LogEntry getEntry(final long index);\n\n /**\n * Get logEntry's term by index. This method is deprecated, you should use {@link #getEntry(long)} to get the log id's term.\n * @deprecated\n */\n @Deprecated\n long getTerm(final long index);\n\n /**\n * Append entries to log.\n */\n boolean appendEntry(final LogEntry entry);\n\n /**\n * Append entries to log, return append success number.\n */\n int appendEntries(final List<LogEntry> entries);\n\n /**\n * Delete logs from storage's head, [first_log_index, first_index_kept) will\n * be discarded.\n */\n boolean truncatePrefix(final long firstIndexKept);\n\n /**\n * Delete uncommitted logs from storage's tail, (last_index_kept, last_log_index]\n * will be discarded.\n */\n boolean truncateSuffix(final long lastIndexKept);\n\n /**\n * Drop all the existing logs and reset next log index to |next_log_index|.\n * This function is called after installing snapshot from leader.\n */\n boolean reset(final long nextLogIndex);\n\n\n boolean init();\n}", "public void resetStore() {\n try {\n db.close();\n uncommited = null;\n uncommitedDeletes = null;\n autoCommit = true;\n bloom = new BloomFilter();\n utxoCache = new LRUCache(openOutCache, 0.75f);\n } catch (IOException e) {\n log.error(\"Exception in resetStore.\", e);\n }\n\n File f = new File(filename);\n if (f.isDirectory()) {\n for (File c : f.listFiles())\n c.delete();\n }\n openDB();\n }", "private void failureRecovery() throws IOException {\n //no requirement to check if current page version is the newest\n// HashMap<Integer, Integer> map = getLastPageVersions();\n\n //just overwrite pages with versions from log files\n List<UserData> lastCommittedPageVersions = getLastCommittedPageVersions();\n\n for (UserData lastCommittedPageVersion : lastCommittedPageVersions) {\n persistData(lastCommittedPageVersion);\n }\n }", "boolean reset(final long nextLogIndex);", "public void forceBackup() {\n // If you configures storage support as a file,\n // method push() send all data from memory into file referenced into properties file.\n // Before writing, all expired data will be flushed.\n DacasTransaction.push();\n\n }", "public void rollLog() throws IOException {\n this.snapLog.rollLog();\n resetTxnCount();\n }", "public void onStart() {\n FileWriteAheadLogManager wal = (FileWriteAheadLogManager)ctx.cache().context().wal();\n\n if (wal == null)\n return;\n\n this.wal = wal;\n\n SegmentRouter segmentRouter = wal.getSegmentRouter();\n\n if (segmentRouter.hasArchive())\n walFolders = new File[] {segmentRouter.getWalArchiveDir(), segmentRouter.getWalWorkDir()};\n else\n walFolders = new File[] {segmentRouter.getWalWorkDir()};\n }", "private void persistHistoricalData() {\n /*\n r4 = this;\n r1 = r4.mInstanceLock;\n monitor-enter(r1);\n r0 = r4.mReadShareHistoryCalled;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0012;\n L_0x0007:\n r0 = new java.lang.IllegalStateException;\t Catch:{ all -> 0x000f }\n r2 = \"No preceding call to #readHistoricalData\";\n r0.<init>(r2);\t Catch:{ all -> 0x000f }\n throw r0;\t Catch:{ all -> 0x000f }\n L_0x000f:\n r0 = move-exception;\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n throw r0;\n L_0x0012:\n r0 = r4.mHistoricalRecordsChanged;\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0018;\n L_0x0016:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n L_0x0017:\n return;\n L_0x0018:\n r0 = 0;\n r4.mHistoricalRecordsChanged = r0;\t Catch:{ all -> 0x000f }\n r0 = 1;\n r4.mCanReadHistoricalData = r0;\t Catch:{ all -> 0x000f }\n r0 = r4.mHistoryFileName;\t Catch:{ all -> 0x000f }\n r0 = android.text.TextUtils.isEmpty(r0);\t Catch:{ all -> 0x000f }\n if (r0 != 0) goto L_0x0031;\n L_0x0026:\n r0 = SERIAL_EXECUTOR;\t Catch:{ all -> 0x000f }\n r2 = new com.actionbarsherlock.widget.ActivityChooserModel$HistoryPersister;\t Catch:{ all -> 0x000f }\n r3 = 0;\n r2.<init>();\t Catch:{ all -> 0x000f }\n r0.execute(r2);\t Catch:{ all -> 0x000f }\n L_0x0031:\n monitor-exit(r1);\t Catch:{ all -> 0x000f }\n goto L_0x0017;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.actionbarsherlock.widget.ActivityChooserModel.persistHistoricalData():void\");\n }", "protected void restoreLastState() {\n\t\tInteger ii = Accessors.INT_ACCESSOR.get(\"numberOfFiles\");\n\t\tif(ii == null)\n\t\t\tii = 0;\n\t\tint jj = 0;\n\t\t\n\t\tFile file;\n\t\twhile(jj < ii) {\n\t\t\tfile = new File(Preference.PREFERENCES_NODE.get(\"editSession\" + ++jj, \"\"));\n\t\t\topen(file);\n\t\t}\n\t}", "void reinitialize() throws LoggedException;", "public void rewind() throws DbException, TransactionAbortedException;", "public final void rewind() {\n branch = 0;\n }", "@Override\n\t\tpublic void rewind() throws DbException, TransactionAbortedException {\n\t\t\tclose();\n\t\t\topen();\n\t\t}", "private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }", "public void resetAndTruncate()\n {\n rowIndexFile.resetAndTruncate(riMark);\n partitionIndexFile.resetAndTruncate(piMark);\n }", "private void startFresh() throws JournalException {\n try {\n this.log = this.node.getWriter(this.filename, false);\n } catch (IOException e) {\n throw new JournalException(\"Failed to create initial log file.\");\n }\n }", "public void reset () {\n lastSave = count;\n count = 0;\n }", "public long fastForwardDataBase() throws IOException {\n long zxid = snapLog.fastForwardFromEdits(dataTree, sessionsWithTimeouts, commitProposalPlaybackListener);\n initialized = true;\n return zxid;\n }", "public void rewind() throws DbException, TransactionAbortedException {\n\t\tclose();\n\t\topen();\n\t}", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "protected void reinitialize() {\n \t\t\tfStart= fEnd= -1;\n \t\t\tfText= fPreservedText= null;\n \t\t\tfUndoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t\tfRedoModificationStamp= IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP;\n \t\t}", "@ManagedOperation(description = \"Reset and reloads the file store\")\n public synchronized void reset() throws IOException {\n synchronized (cache) {\n // trunk and clear, before we reload the store\n trunkStore();\n cache.clear();\n loadStore();\n }\n }", "public synchronized void forceRelease() {\n try {\n if (store != null) {\n store.close();\n }\n } catch (IOException e) {\n LOG.warn(\"Error closing timeline store\", e);\n }\n store = null;\n // reset offsets so next time logs are re-parsed\n for (LogInfo log : appLogs.getDetailLogs()) {\n if (log.getFilename().contains(groupId.toString())) {\n log.setOffset(0);\n }\n }\n LOG.debug(\"Cache for group {} released. \", groupId);\n }", "protected void clearWriteResume()\n\t{\n\t\tmCallingMethod = null;\n\t\tmCallingParameters = null;\n\t}", "private void rewind() {\n currentPos = markPos;\n }", "public void startLog()\n\t{\n\t\tint lastRow = m_records.size() - 1;\n\t\tif(lastRow >= 0)\n\t\t{\n\t\t\tm_records.clear();\n\t\t\tfireTableRowsDeleted(0, lastRow);\n\t\t}\n\t}", "void completeCurrentLog() throws IOException;", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "void seekToLast();", "public abstract void restore();", "public static void lost() {\n\t\tPig.alterStorage(false);\n\t}", "protected void removeOldData() {\n if (!storage.isEmpty()) {\n long timeLowerbound = storage.lastKey() - maxStorageTime;\n while (!storage.isEmpty() && storage.firstKey() < timeLowerbound) {\n storage.pollFirstEntry();\n } \n }\n }", "protected void relocateDatabaseIfNeeded() {\n File databaseDir = new File(config.dataDir(), Constants.DATABASE_DIR);\n File blocksDir = new File(databaseDir, \"block\");\n\n if (blocksDir.exists()) {\n LeveldbDatabase db = new LeveldbDatabase(blocksDir);\n byte[] header = db.get(Bytes.merge((byte) 0x00, Bytes.of(0L)));\n db.close();\n\n if (header == null || header.length < 33) {\n logger.info(\"Unable to decode genesis header. Quit relocating\");\n } else {\n String hash = Hex.encode(Arrays.copyOfRange(header, 1, 33));\n switch (hash) {\n case \"1d4fb49444a5a14dbe68f5f6109808c68e517b893c1e9bbffce9d199b5037c8e\":\n moveDatabase(databaseDir, config.databaseDir(Network.MAINNET));\n break;\n case \"abfe38563bed10ec431a4a9ad344a212ef62f6244c15795324cc06c2e8fa0f8d\":\n moveDatabase(databaseDir, config.databaseDir(Network.TESTNET));\n break;\n default:\n logger.info(\"Unable to recognize genesis hash. Quit relocating\");\n }\n }\n }\n }", "public void save(Storable storable) throws LogFile.LockException, IOException {\n // If the file has not been set, don't save.\n if (dataFile != null) {\n synchronized (dataFile) {\n // let the storable overwrite its values\n if (storable != null) {\n storable.store(properties);\n }\n if (autoStore) {\n storeProperties();\n }\n if (debug == 1) {\n System.err.println(\"save:JoinState.Join.Version=\"\n + properties.getProperty(\"JoinState.Join.Version\"));\n }\n }\n }\n }", "public synchronized void reset()\n\t{\n\t\tthis.snapshots.clear();\n\t\tthis.selfPositions.clear();\n\t}", "@Override\n\tpublic void zapBlob() throws PersistBlobException {\n\t\twriteBlob(\"\");\n\t}", "public void resetToLast() {\r\n\t\taktu = last;\r\n\t}", "@Override\n public void rollOver() {\n if (qw != null) {\n LogLog.debug(\"rolling over count=\" + ((CountingQuietWriter) qw).getCount());\n }\n LogLog.debug(\"maxBackupIndex=\" + maxBackupIndex);\n\n if (maxBackupIndex > 0) {\n deleteOldest();\n moveNext();\n\n final File newestBackupFile = new File(buildBackupFileName(fileName, 1));\n closeFile();\n\n final File basicFile = new File(fileName);\n LogLog.debug(\"Renaming file \" + basicFile + \" to \" + newestBackupFile);\n basicFile.renameTo(newestBackupFile);\n }\n\n try {\n this.setFile(fileName, false, bufferedIO, bufferSize);\n } catch (IOException e) {\n LogLog.error(\"setFile(\" + fileName + \", false) call failed.\", e);\n }\n }", "private void m145777g() {\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if (this.f119477j.f119582h) {\n nativeSetWalHook(this.f119482o);\n } else if (mo115435b(\"PRAGMA wal_autocheckpoint\", null, null) != 100) {\n mo115435b(\"PRAGMA wal_autocheckpoint=100\", null, null);\n }\n }\n }", "@Override\n public void restore() {\n }", "private void rollBackApplication() {\n //reset application data\n \t this.reset();\n\n log (\"Rolled back application data, current commit counter: \" + commitCounter);\n }", "public void clear() {\n minCommittedLog = 0;\n maxCommittedLog = 0;\n /* to be safe we just create a new\n * datatree.\n */\n dataTree.shutdownWatcher();\n dataTree = createDataTree();\n sessionsWithTimeouts.clear();\n WriteLock lock = logLock.writeLock();\n try {\n lock.lock();\n committedLog.clear();\n } finally {\n lock.unlock();\n }\n initialized = false;\n }", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "public void rewind() {\n readAllocationNode = firstAllocationNode;\n }", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "public void rewind() throws DbException, TransactionAbortedException {\n child1.rewind();\n child2.rewind();\n this.leftMap.clear();\n this.rightMap.clear();\n }", "public void clearSnapshot() throws IOException\n {\n ssProxy.clearSnapshot();\n }", "public static void prepareStoreMirror() {\n /*\n r0 = sStoreMirrorDir;\n if (r0 == 0) goto L_0x0005;\n L_0x0004:\n return;\n L_0x0005:\n r0 = com.duokan.reader.ReaderEnv.get();\n r1 = com.duokan.reader.ReaderEnv.PrivatePref.STORE;\n r2 = \"mirror_version\";\n r3 = \"\";\n r0 = r0.getPrefString(r1, r2, r3);\n r1 = android.text.TextUtils.isEmpty(r0);\n if (r1 != 0) goto L_0x00ab;\n L_0x0019:\n r0 = storeMirrorDirectory(r0);\n L_0x001d:\n r1 = new android.util.TypedValue;\t Catch:{ all -> 0x013a }\n r1.<init>();\t Catch:{ all -> 0x013a }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ all -> 0x013a }\n r2 = r2.getResources();\t Catch:{ all -> 0x013a }\n r3 = com.duokan.p024c.C0257i.raw__shared__store_mirror;\t Catch:{ all -> 0x013a }\n r4 = 0;\n r2.getValue(r3, r1, r4);\t Catch:{ all -> 0x013a }\n r1 = r1.string;\t Catch:{ all -> 0x013a }\n r1 = r1.toString();\t Catch:{ all -> 0x013a }\n r2 = \"@\";\n r1 = r1.split(r2);\t Catch:{ all -> 0x013a }\n r2 = 1;\n r1 = r1[r2];\t Catch:{ all -> 0x013a }\n r2 = java.lang.Long.parseLong(r1);\t Catch:{ all -> 0x013a }\n r4 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;\n r2 = r2 * r4;\n if (r0 == 0) goto L_0x0050;\n L_0x0048:\n r4 = r0.lastModified();\t Catch:{ all -> 0x013a }\n r1 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r1 <= 0) goto L_0x00ae;\n L_0x0050:\n r1 = new java.io.File;\t Catch:{ all -> 0x013a }\n r0 = com.duokan.reader.ReaderEnv.get();\t Catch:{ all -> 0x013a }\n r0 = r0.getStoreCacheDirectory();\t Catch:{ all -> 0x013a }\n r4 = \"buildin-mirror.tmp\";\n r1.<init>(r0, r4);\t Catch:{ all -> 0x013a }\n r4 = new java.io.File;\t Catch:{ all -> 0x013a }\n r0 = \"store.arch\";\n r4.<init>(r1, r0);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r1.mkdirs();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = new java.io.FileOutputStream;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5.<init>(r4);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r0 = com.duokan.reader.DkApp.get();\t Catch:{ all -> 0x00e6 }\n r6 = com.duokan.p024c.C0257i.raw__shared__store_mirror;\t Catch:{ all -> 0x00e6 }\n com.duokan.reader.DkPublic.extractRawResource(r0, r5, r6);\t Catch:{ all -> 0x00e6 }\n r5.flush();\t Catch:{ Throwable -> 0x014b, all -> 0x0141 }\n r5.close();\t Catch:{ Throwable -> 0x014b, all -> 0x0141 }\n L_0x0080:\n r0 = r4.getAbsolutePath();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = r1.getAbsolutePath();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n com.duokan.lib.archive.DkarchLib.extract(r0, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r0 = new java.io.File;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"cache.appcache\";\n r0.<init>(r1, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"md5\";\n r0 = com.duokan.core.sys.C0366o.m1028a(r0, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = android.text.TextUtils.isEmpty(r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n if (r5 == 0) goto L_0x00fc;\n L_0x009e:\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00ab:\n r0 = 0;\n goto L_0x001d;\n L_0x00ae:\n r1 = new java.io.File;\t Catch:{ all -> 0x013a }\n r4 = \"index.html\";\n r1.<init>(r0, r4);\t Catch:{ all -> 0x013a }\n r4 = \"utf-8\";\n r4 = com.duokan.core.io.C0336a.m769a(r1, r4);\t Catch:{ all -> 0x013a }\n if (r4 == 0) goto L_0x0050;\n L_0x00bd:\n r1 = r4.readLine();\t Catch:{ Throwable -> 0x00dd }\n L_0x00c1:\n r5 = android.text.TextUtils.isEmpty(r1);\t Catch:{ Throwable -> 0x00dd }\n if (r5 != 0) goto L_0x0050;\n L_0x00c7:\n r5 = \"duokan-version\";\n r1 = r1.contains(r5);\t Catch:{ Throwable -> 0x00dd }\n if (r1 == 0) goto L_0x00d8;\n L_0x00cf:\n sStoreMirrorDir = r0;\t Catch:{ Throwable -> 0x00dd }\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00d8:\n r1 = r4.readLine();\t Catch:{ Throwable -> 0x00dd }\n goto L_0x00c1;\n L_0x00dd:\n r0 = move-exception;\n r4.close();\t Catch:{ Throwable -> 0x00e3 }\n goto L_0x0050;\n L_0x00e3:\n r0 = move-exception;\n goto L_0x0050;\n L_0x00e6:\n r0 = move-exception;\n r5.flush();\t Catch:{ Throwable -> 0x0149, all -> 0x0141 }\n r5.close();\t Catch:{ Throwable -> 0x0149, all -> 0x0141 }\n L_0x00ed:\n throw r0;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n L_0x00ee:\n r0 = move-exception;\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n L_0x00f5:\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00fc:\n r5 = storeMirrorDirectory(r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n com.duokan.core.io.C0336a.deleteFile(r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r6 = r1.renameTo(r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n if (r6 == 0) goto L_0x0133;\n L_0x0109:\n r5.setLastModified(r2);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n sStoreMirrorDir = r5;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r3 = com.duokan.reader.ReaderEnv.PrivatePref.STORE;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"mirror_version\";\n r2.setPrefString(r3, r5, r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2.commitPrefs();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.core.diagnostic.C0328a.m757c();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r3 = com.duokan.core.diagnostic.LogLevel.EVENT;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"store\";\n r6 = \"store mirror unpacked(ver=%s)\";\n r7 = 1;\n r7 = new java.lang.Object[r7];\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r8 = 0;\n r7[r8] = r0;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2.m749a(r3, r5, r6, r7);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n L_0x0133:\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n goto L_0x00f5;\n L_0x013a:\n r0 = move-exception;\n r1 = sStoreMirrorReady;\n r1.countDown();\n throw r0;\n L_0x0141:\n r0 = move-exception;\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n throw r0;\t Catch:{ all -> 0x013a }\n L_0x0149:\n r2 = move-exception;\n goto L_0x00ed;\n L_0x014b:\n r0 = move-exception;\n goto L_0x0080;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.ui.general.web.StoreWebController.prepareStoreMirror():void\");\n }", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void checkpointRecoveryPointOffsets() {\n Table<String, TopicAndPartition, Log> recoveryPointsByDir = Utils.groupBy(this.logsByTopicPartition(), new Function2<TopicAndPartition, Log, String>() {\n @Override\n public String apply(TopicAndPartition _1, Log _2) {\n return _2.dir.getParent();\n }\n });\n for (File dir : logDirs) {\n Map<TopicAndPartition, Log> recoveryPoints = recoveryPointsByDir.row(dir.toString());\n if (recoveryPoints != null)\n this.recoveryPointCheckpoints.get(dir).write(Utils.map(recoveryPoints, new Function2<TopicAndPartition, Log, Tuple2<TopicAndPartition, Long>>() {\n @Override\n public Tuple2<TopicAndPartition, Long> apply(TopicAndPartition arg1, Log log) {\n return Tuple2.make(arg1, log.recoveryPoint);\n }\n }));\n }\n }", "public void rewind() throws IOException {\n if (closed) {\n throw new IOException(\"Stream is already closed\");\n }\n\n if (storeOutputStream != null) {\n storeOutputStream.close();\n storeOutputStream = null;\n }\n\n // Close the byte input stream or file input stream\n if (inputStream != originalInputStream) {\n inputStream.close();\n }\n\n bufferHighWaterMark = Math.max(bufferPointer, bufferHighWaterMark);\n bufferPointer = bufferHighWaterMark;\n\n if (bufferHighWaterMark > 0) {\n // If we have a buffer, then we'll read from it\n if (byteBuffer != null) {\n readingFromBuffer = true;\n inputStream = new UnsynchronizedByteArrayInputStream(byteBuffer, 0, bufferHighWaterMark);\n } else {\n // No buffer, which means we've switched to a file\n inputStream = new BufferedInputStream(new FileInputStream(storeFile));\n }\n } else {\n inputStream = originalInputStream;\n }\n }", "private void setWrite() {\n db = handler.getWritableDatabase();\n }", "void resetStore() {\n File storeFile = new File(getStoreName());\n if (storeFile.exists()) {\n storeFile.delete();\n }\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }", "public void rewind() throws DbException, TransactionAbortedException {\n\t\tthrow new UnsupportedOperationException(\"Implement this\");\n\t}", "@Override\n\tpublic void rewind() {\n\t\t\n\t}", "private synchronized void rebuildJournal() throws IOException {\n\t\tif (journalWriter != null) {\n\t\t\tjournalWriter.close();\n\t\t}\n\n\t\tWriter writer = new BufferedWriter(new FileWriter(journalFileTmp), IO_BUFFER_SIZE);\n\t\twriter.write(MAGIC);\n\t\twriter.write(\"\\n\");\n\t\twriter.write(VERSION_1);\n\t\twriter.write(\"\\n\");\n\t\twriter.write(Integer.toString(appVersion));\n\t\twriter.write(\"\\n\");\n\t\twriter.write(Integer.toString(valueCount));\n\t\twriter.write(\"\\n\");\n\t\twriter.write(\"\\n\");\n\n\t\tfor (Entry entry : lruEntries.values()) {\n\t\t\tif (entry.currentEditor != null) {\n\t\t\t\twriter.write(DIRTY + ' ' + entry.key + '\\n');\n\t\t\t} else {\n\t\t\t\twriter.write(CLEAN + ' ' + entry.key + entry.getLengths() + '\\n');\n\t\t\t}\n\t\t}\n\n\t\twriter.close();\n\t\tjournalFileTmp.renameTo(journalFile);\n\t\tjournalWriter = new BufferedWriter(new FileWriter(journalFile, true), IO_BUFFER_SIZE);\n\t}", "public void reopen(long timestamp);", "public void performRecovery();", "protected void reInitialize() {\n resetCurrent();\n incrementIterCount();\n setFirst(true);\n recoverRunningVersion();\n }", "private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }", "private void backupInternalState(Backup backup)\n {\n backup.m_offset_ = m_source_.getIndex();\n backup.m_FCDLimit_ = m_FCDLimit_;\n backup.m_FCDStart_ = m_FCDStart_;\n backup.m_isCodePointHiragana_ = m_isCodePointHiragana_;\n backup.m_bufferOffset_ = m_bufferOffset_;\n backup.m_buffer_.setLength(0);\n if (m_bufferOffset_ >= 0) {\n backup.m_buffer_.append(m_buffer_);\n }\n }", "public void load(Storable storable)/* throws LogFile.LockException */{\n if (dataFile != null) {\n // If the file has been set, synchronize on it.\n synchronized (dataFile) {\n storable.load(properties);\n }\n }\n else {\n storable.load(properties);\n }\n }", "public void resetDB()\n\t{\n\t\tshutdown();\n\t\t\n\t\tif(Files.exists(m_databaseFile))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t} catch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\t\t\n\t\tloadDatabase();\n\t\tupdateCommitNumber();\n\t\tupdateDatabase();\n\t}", "Snapshot refresh();", "@Override\n\tpublic void force() {\n\t\t\n\t\ttry (Restore restore = ComponentBoundary.push(loggerName(), this)) {\t\t\n\t\t\tstateHandler.waitToWhen(new IsSoftResetable(), new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlogger().info(\"Forcing complete.\");\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tchildStateReflector.stop();\n\t\t\t\t\t\n\t\t\t\t\tgetStateChanger().setState(ParentState.COMPLETE);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "@Override\n public void startRecord() {\n obj = null;\n arr = null;\n inArray = false;\n }", "public void truncate() {\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.deleteAll();\n\t\t\tlog.warn(\"lucene index truncated\");\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t ioEx);\t\t\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit(); \n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error truncating lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}", "void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;", "public boolean truncateLog(long zxid) throws IOException {\n clear();\n\n // truncate the log\n boolean truncated = snapLog.truncateLog(zxid);\n\n if (!truncated) {\n return false;\n }\n\n loadDataBase();\n return true;\n }", "public void resetTxnCount() {\n txnCount.set(0);\n snapLog.setTotalLogSize(0);\n }", "@Override\n public void setCurrentSnapshot(Snapshot nextSnapshot) {\n if (currentSnapshot != null && nextSnapshot.getLastIndex() <= currentSnapshot.getLastIndex()) {\n LOGGER.debug(\"Not installing snapshot that would not advance us (currentSnapshot.getLastIndex() == {}, nextSnapshot.getLastLogIndex() == {}\",\n currentSnapshot.getLastIndex(), nextSnapshot.getLastIndex());\n return;\n }\n currentSnapshot = (InMemorySnapshot) nextSnapshot;\n logStorage.installSnapshot(currentSnapshot);\n for (SnapshotInstalledListener listener : snapshotInstalledListeners) {\n listener.onSnapshotInstalled(currentSnapshot);\n }\n }", "public void restoreState(PreferencesExt store) {\n this.store = store;\n table.restoreState(store);\n }", "@Override\n public void resume() {\n Gdx.app.log(TAG, \"Resumed\");\n }", "long getLastPersistenceWrittenBytes();", "public void onRestorePendingState() {\n }", "@Override\n public void restore() {\n // Rather than copying the stored stuff back, just swap the pointers...\n int[] iTmp1 = m_iCurrentMatrices;\n m_iCurrentMatrices = m_iStoredMatrices;\n m_iStoredMatrices = iTmp1;\n\n int[] iTmp2 = m_iCurrentPartials;\n m_iCurrentPartials = m_iStoredPartials;\n m_iStoredPartials = iTmp2;\n\n// int[] iTmp3 = m_iCurrentStates;\n// m_iCurrentStates= m_iStoredStates;\n// m_iStoredStates = iTmp3;\n }", "void restoreDefaultProperties() throws StorageException, ValidationException, KeyValueStoreException;", "private void cleanUp() {\n if (rehash()) {\n // If we rehashed, we needn't clean up (clean up happens as\n // a side effect).\n return;\n }\n\n if (size == 0) {\n // No live entries == nothing to clean.\n return;\n }\n\n // Clean log(table.length) entries picking up where we left off\n // last time.\n int index = clean;\n Object[] table = this.table;\n for (int counter = table.length; counter > 0; counter >>= 1,\n index = next(index)) {\n Object k = table[index];\n\n if (k == TOMBSTONE || k == null) {\n continue; // on to next entry\n }\n\n // The table can only contain null, tombstones and references.\n @SuppressWarnings(\"unchecked\")\n Reference<ThreadLocal<?>> reference\n = (Reference<ThreadLocal<?>>) k;\n if (reference.get() == null) {\n // This thread local was reclaimed by the garbage collector.\n table[index] = TOMBSTONE;\n table[index + 1] = null;\n tombstones++;\n size--;\n }\n }\n\n // Point cursor to next index.\n clean = index;\n }", "private void restoreAndRelease() {\n try (Connection c = connection) {\n c.setAutoCommit(autoCommit);\n } catch (SQLException e) {\n throw new UncheckedSQLException(e);\n }\n }", "public void restoreState(IMemento memento) {\n\t\t\r\n\t}", "public long loadDataBase() throws IOException {\n long startTime = Time.currentElapsedTime();\n long zxid = snapLog.restore(dataTree, sessionsWithTimeouts, commitProposalPlaybackListener);\n initialized = true;\n long loadTime = Time.currentElapsedTime() - startTime;\n ServerMetrics.getMetrics().DB_INIT_TIME.add(loadTime);\n LOG.info(\"Snapshot loaded in {} ms, highest zxid is 0x{}, digest is {}\",\n loadTime, Long.toHexString(zxid), dataTree.getTreeDigest());\n return zxid;\n }", "public void resumeUpdates();", "protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }", "@Test\n public void shouldDeleteIncompleteRestores()\n throws Exception\n {\n givenStoreHasFileOfSize(PNFSID, 17);\n\n // and given the replica meta data indicates the file was\n // being restored from tape and has is supposed to have a\n // different file size,\n StorageInfo info = createStorageInfo(20);\n givenMetaDataStoreHas(PNFSID, FROM_STORE, info);\n\n // when reading the meta data record\n MetaDataRecord record = _consistentStore.get(PNFSID);\n\n // then nothing is returned\n assertThat(record, is(nullValue()));\n\n // and the replica is deleted\n assertThat(_metaDataStore.get(PNFSID), is(nullValue()));\n assertThat(_fileStore.get(PNFSID).exists(), is(false));\n\n // and the location is cleared\n verify(_pnfs).clearCacheLocation(PNFSID);\n\n // and the name space entry is not touched\n verify(_pnfs, never())\n .setFileAttributes(eq(PNFSID), Mockito.any(FileAttributes.class));\n }", "public void unReset () {\n count = lastSave;\n }", "public void backup() \r\n\t{\r\n\t\tif (lastc != ALERT) {\r\n\t\t\tholdc = thisc;\r\n\t\t\tthisc = lastc;\r\n\t\t\tlastc = ALERT;\r\n\t\t}\r\n\t}", "public void restoreState() {\n\tMachine.processor().setPageTable(pageTable);\n }", "public void restoreThreadLocalStatus() {\n\t\ttransactionInfoHolder.set(this.oldTransactionInfo);\n\t}", "@Override\n protected void handleSetBackup()\n {\n }", "@Override\n public void compact() throws IOException{\n region.compactStores();\n }", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}", "@Override\n protected void onPause() {\n super.onPause();\n\n // write to the database\n DatabaseManager db = new DatabaseManager();\n db.writeStateToDatabase();\n }", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }", "private void initializeEmptyStore() throws IOException\r\n {\r\n this.keyHash.clear();\r\n\r\n if (!dataFile.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n }" ]
[ "0.57928663", "0.55113876", "0.5467369", "0.5449811", "0.53021216", "0.528739", "0.5259035", "0.5254321", "0.52360356", "0.51760674", "0.50482404", "0.50414616", "0.50258005", "0.4994564", "0.4989678", "0.49224776", "0.4899851", "0.4888712", "0.48860225", "0.48580503", "0.4851356", "0.48379645", "0.48288235", "0.48166794", "0.4812189", "0.48049942", "0.48005214", "0.47950977", "0.47893557", "0.4786857", "0.47693294", "0.47671866", "0.47634307", "0.47620866", "0.4748286", "0.47417516", "0.4740776", "0.47348934", "0.4733717", "0.47259754", "0.47185826", "0.47176552", "0.4706402", "0.47058368", "0.4703666", "0.4703077", "0.4692623", "0.46826795", "0.46724674", "0.46460342", "0.46277037", "0.46267846", "0.46212232", "0.46203232", "0.46029776", "0.45936805", "0.4575193", "0.45702764", "0.4563307", "0.4562257", "0.45565334", "0.45400015", "0.45328894", "0.4517086", "0.44890106", "0.44873562", "0.44850743", "0.44829318", "0.44773513", "0.44765273", "0.44748065", "0.44667587", "0.4463912", "0.44609663", "0.44598767", "0.44578582", "0.44560957", "0.44504339", "0.44324648", "0.44304755", "0.4429637", "0.4429094", "0.44219893", "0.44215256", "0.4420236", "0.44113296", "0.440755", "0.4405735", "0.44051498", "0.44000548", "0.43971878", "0.43957525", "0.43918997", "0.43913728", "0.43871832", "0.4384867", "0.4384172", "0.438248", "0.43818185", "0.43782976" ]
0.5783827
1
Resolves throttling policy according to the settings.
@NotNull private PageMemoryImpl.ThrottlingPolicy resolveThrottlingPolicy() { PageMemoryImpl.ThrottlingPolicy plc = persistenceCfg.isWriteThrottlingEnabled() ? PageMemoryImpl.ThrottlingPolicy.SPEED_BASED : PageMemoryImpl.ThrottlingPolicy.CHECKPOINT_BUFFER_ONLY; if (throttlingPolicyOverride != null) { try { plc = PageMemoryImpl.ThrottlingPolicy.valueOf(throttlingPolicyOverride.toUpperCase()); } catch (IllegalArgumentException e) { log.error("Incorrect value of IGNITE_OVERRIDE_WRITE_THROTTLING_ENABLED property. " + "The default throttling policy will be used [plc=" + throttlingPolicyOverride + ", defaultPlc=" + plc + ']'); } } return plc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy subscriptionPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, subscriptionPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(subscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while retrieving Subscription level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy appPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, appPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(appPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Application level policy: \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesAdvancedGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String userName = RestApiCommonUtil.getLoggedInUsername();\n Policy[] apiPolicies = apiProvider.getPolicies(userName, PolicyConstants.POLICY_LEVEL_API);\n List<APIPolicy> policies = new ArrayList<>();\n for (Policy policy : apiPolicies) {\n policies.add((APIPolicy) policy);\n }\n AdvancedThrottlePolicyListDTO listDTO = AdvancedThrottlePolicyMappingUtil\n .fromAPIPolicyArrayToListDTO(policies.toArray(new APIPolicy[policies.size()]));\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while retrieving Advanced level policies\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesSubscriptionGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String userName = RestApiCommonUtil.getLoggedInUsername();\n Policy[] subscriptionPolicies = apiProvider.getPolicies(userName, PolicyConstants.POLICY_LEVEL_SUB);\n List<SubscriptionPolicy> policies = new ArrayList<>();\n for (Policy policy : subscriptionPolicies) {\n policies.add((SubscriptionPolicy) policy);\n }\n SubscriptionThrottlePolicyListDTO listDTO = SubscriptionThrottlePolicyMappingUtil\n .fromSubscriptionPolicyArrayToListDTO(policies.toArray(new SubscriptionPolicy[policies.size()]));\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException | ParseException e) {\n String errorMessage = \"Error while retrieving Subscription level policies\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesCustomGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String userName = RestApiCommonUtil.getLoggedInUsername();\n\n //only super tenant is allowed to access global policies/custom rules\n checkTenantDomainForCustomRules();\n\n Policy[] globalPolicies = apiProvider.getPolicies(userName, PolicyConstants.POLICY_LEVEL_GLOBAL);\n List<GlobalPolicy> policies = new ArrayList<>();\n for (Policy policy : globalPolicies) {\n policies.add((GlobalPolicy) policy);\n }\n CustomRuleListDTO listDTO = GlobalThrottlePolicyMappingUtil\n .fromGlobalPolicyArrayToListDTO(policies.toArray(new GlobalPolicy[policies.size()]));\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while retrieving Global level policies\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdGet(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy apiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, apiPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n AdvancedThrottlePolicyDTO policyDTO = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(apiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Advanced level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesApplicationGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String userName = RestApiCommonUtil.getLoggedInUsername();\n Policy[] appPolicies = apiProvider.getPolicies(userName, PolicyConstants.POLICY_LEVEL_APP);\n List<ApplicationPolicy> policies = new ArrayList<>();\n for (Policy policy : appPolicies) {\n policies.add((ApplicationPolicy) policy);\n }\n ApplicationThrottlePolicyListDTO listDTO = ApplicationThrottlePolicyMappingUtil\n .fromApplicationPolicyArrayToListDTO(policies.toArray(new ApplicationPolicy[policies.size()]));\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while retrieving Application level policies\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "public final flipsParser.throttle_return throttle() throws RecognitionException {\n flipsParser.throttle_return retval = new flipsParser.throttle_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n flipsParser.fixedThrottle_return fixedThrottle307 = null;\n\n flipsParser.relativeThrottle_return relativeThrottle308 = null;\n\n\n\n try {\n // flips.g:478:2: ( fixedThrottle | relativeThrottle )\n int alt124=2;\n alt124 = dfa124.predict(input);\n switch (alt124) {\n case 1 :\n // flips.g:478:4: fixedThrottle\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_fixedThrottle_in_throttle2586);\n fixedThrottle307=fixedThrottle();\n\n state._fsp--;\n\n adaptor.addChild(root_0, fixedThrottle307.getTree());\n\n }\n break;\n case 2 :\n // flips.g:479:4: relativeThrottle\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_relativeThrottle_in_throttle2591);\n relativeThrottle308=relativeThrottle();\n\n state._fsp--;\n\n adaptor.addChild(root_0, relativeThrottle308.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "private double throttlingProbability(Instant instantSinceEpoch) {\n if (!allRequestsMovingFunction.isSignificant()) {\n return 0;\n }\n long nowMsSinceEpoch = instantSinceEpoch.getMillis();\n long allRequestsCount = allRequestsMovingFunction.get(nowMsSinceEpoch);\n long successfulRequestsCount = successfulRequestsMovingFunction.get(nowMsSinceEpoch);\n\n double overloadMaxCount = overloadRatio * successfulRequestsCount;\n double overloadUsage = allRequestsCount - overloadMaxCount;\n\n double calcProbability = overloadUsage / (allRequestsCount + MIN_REQUESTS);\n allRequestsCountDist.update(allRequestsCount);\n successfulRequestsCountDist.update(successfulRequestsCount);\n overloadMaxCountDist.update((long) overloadMaxCount);\n overloadUsageDist.update((long) (overloadUsage * 100));\n throttleProbabilityDist.update((long) (calcProbability * 100));\n return Math.max(0, calcProbability);\n }", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdPut(String policyId, String contentType,\n SubscriptionThrottlePolicyDTO body, MessageContext messageContext) throws APIManagementException{\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //update the policy\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException | ParseException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while updating Subscription level policy: \" + body.getPolicyName();\n throw new APIManagementException(errorMessage, e);\n }\n }\n return null;\n }", "@Override\n public Response throttlingPoliciesCustomRuleIdGet(String ruleId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //only super tenant is allowed to access global policies/custom rules\n checkTenantDomainForCustomRules();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n GlobalPolicy globalPolicy = apiProvider.getGlobalPolicyByUUID(ruleId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, globalPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, log);\n }\n CustomRuleDTO policyDTO = GlobalThrottlePolicyMappingUtil.fromGlobalThrottlePolicyToDTO(globalPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, e, log);\n } else {\n String errorMessage = \"Error while retrieving Custom Rule: \" + ruleId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public final flipsParser.fixedThrottle_return fixedThrottle() throws RecognitionException {\n flipsParser.fixedThrottle_return retval = new flipsParser.fixedThrottle_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token At309=null;\n Token string_literal311=null;\n Token string_literal312=null;\n Token string_literal313=null;\n Token string_literal314=null;\n flipsParser.throttleValue_return throttleValue310 = null;\n\n\n CommonTree At309_tree=null;\n CommonTree string_literal311_tree=null;\n CommonTree string_literal312_tree=null;\n CommonTree string_literal313_tree=null;\n CommonTree string_literal314_tree=null;\n RewriteRuleTokenStream stream_223=new RewriteRuleTokenStream(adaptor,\"token 223\");\n RewriteRuleTokenStream stream_224=new RewriteRuleTokenStream(adaptor,\"token 224\");\n RewriteRuleTokenStream stream_225=new RewriteRuleTokenStream(adaptor,\"token 225\");\n RewriteRuleTokenStream stream_At=new RewriteRuleTokenStream(adaptor,\"token At\");\n RewriteRuleTokenStream stream_226=new RewriteRuleTokenStream(adaptor,\"token 226\");\n RewriteRuleSubtreeStream stream_throttleValue=new RewriteRuleSubtreeStream(adaptor,\"rule throttleValue\");\n try {\n // flips.g:483:2: ( ( At )? throttleValue ( 'pwr' | 'power' | 'thr' | 'throttle' ) -> ^( THROTTLE FIXED throttleValue ) )\n // flips.g:483:4: ( At )? throttleValue ( 'pwr' | 'power' | 'thr' | 'throttle' )\n {\n // flips.g:483:4: ( At )?\n int alt125=2;\n int LA125_0 = input.LA(1);\n\n if ( (LA125_0==At) ) {\n alt125=1;\n }\n switch (alt125) {\n case 1 :\n // flips.g:483:4: At\n {\n At309=(Token)match(input,At,FOLLOW_At_in_fixedThrottle2602); \n stream_At.add(At309);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_throttleValue_in_fixedThrottle2605);\n throttleValue310=throttleValue();\n\n state._fsp--;\n\n stream_throttleValue.add(throttleValue310.getTree());\n // flips.g:483:22: ( 'pwr' | 'power' | 'thr' | 'throttle' )\n int alt126=4;\n switch ( input.LA(1) ) {\n case 223:\n {\n alt126=1;\n }\n break;\n case 224:\n {\n alt126=2;\n }\n break;\n case 225:\n {\n alt126=3;\n }\n break;\n case 226:\n {\n alt126=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 126, 0, input);\n\n throw nvae;\n }\n\n switch (alt126) {\n case 1 :\n // flips.g:483:23: 'pwr'\n {\n string_literal311=(Token)match(input,223,FOLLOW_223_in_fixedThrottle2608); \n stream_223.add(string_literal311);\n\n\n }\n break;\n case 2 :\n // flips.g:483:29: 'power'\n {\n string_literal312=(Token)match(input,224,FOLLOW_224_in_fixedThrottle2610); \n stream_224.add(string_literal312);\n\n\n }\n break;\n case 3 :\n // flips.g:483:37: 'thr'\n {\n string_literal313=(Token)match(input,225,FOLLOW_225_in_fixedThrottle2612); \n stream_225.add(string_literal313);\n\n\n }\n break;\n case 4 :\n // flips.g:483:43: 'throttle'\n {\n string_literal314=(Token)match(input,226,FOLLOW_226_in_fixedThrottle2614); \n stream_226.add(string_literal314);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: throttleValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 484:2: -> ^( THROTTLE FIXED throttleValue )\n {\n // flips.g:484:5: ^( THROTTLE FIXED throttleValue )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(THROTTLE, \"THROTTLE\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_throttleValue.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Override\n public Response throttlingPoliciesSubscriptionPost(String contentType, SubscriptionThrottlePolicyDTO body,\n MessageContext messageContext) throws APIManagementException {\n\n RestApiAdminUtils.validateThrottlePolicyNameProperty(body.getPolicyName());\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n SubscriptionPolicy subscriptionPolicy =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyDTOToModel(body);\n //Check if there's a policy exists before adding the new policy\n try {\n Policy policyIfExists = apiProvider.getSubscriptionPolicy(username, subscriptionPolicy.getPolicyName());\n if (policyIfExists != null) {\n RestApiUtil.handleResourceAlreadyExistsError(\"Subscription Policy with name \"\n + subscriptionPolicy.getPolicyName() + \" already exists\", log);\n }\n } catch (PolicyNotFoundException ignore) {\n }\n\n // validate if permission info exists and halt the execution in case of an error\n validatePolicyPermissions(body);\n\n //Add the policy\n apiProvider.addPolicy(subscriptionPolicy);\n\n //update policy permissions\n updatePolicyPermissions(body);\n\n //retrieve the new policy and send back as the response\n SubscriptionPolicy newSubscriptionPolicy = apiProvider.getSubscriptionPolicy(username,\n body.getPolicyName());\n SubscriptionThrottlePolicyDTO policyDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyToDTO(newSubscriptionPolicy);\n\n //setting policy permissions\n setPolicyPermissionsToDTO(policyDTO);\n return Response.created(new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_POLICIES_SUBSCRIPTION + \"/\"\n + policyDTO.getPolicyId())).entity(policyDTO).build();\n } catch (ParseException e) {\n String errorMessage = \"Error while adding a Subscription level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n } catch (URISyntaxException e) {\n String errorMessage =\n \"Error while retrieving Subscription Throttle policy location : \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@Override\n public RateLimiter load(String token) {\n Map<String, Integer> customizeTenantQpsRate = trafficConfiguration.getCustomizeTenantQpsRate();\n int tenantQuota = trafficConfiguration.getDefaultTenantQpsRate();\n if (MapUtils.isNotEmpty(customizeTenantQpsRate)) {\n tenantQuota = customizeTenantQpsRate.getOrDefault(token, trafficConfiguration.getDefaultTenantQpsRate());\n }\n // use tenant default rate limit\n return RateLimiter.create(tenantQuota, 1, TimeUnit.SECONDS);\n }", "Policy _get_policy(int policy_type);", "PolicyStatsManager getStats();", "private void setPolicyPermissionsToDTO(SubscriptionThrottlePolicyDTO policyDTO) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n TierPermissionDTO addedPolicyPermission =\n (TierPermissionDTO) apiProvider.getThrottleTierPermission(policyDTO.getPolicyName());\n if (addedPolicyPermission != null) {\n SubscriptionThrottlePolicyPermissionDTO addedPolicyPermissionDTO =\n SubscriptionThrottlePolicyMappingUtil.fromSubscriptionThrottlePolicyPermissionToDTO(addedPolicyPermission);\n policyDTO.setPermissions(addedPolicyPermissionDTO);\n }\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdPut(String policyId, String contentType,\n ApplicationThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n //overridden properties\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "private static void setRTTTransmissionPolicy() {\n\n /*\n * Set the transmission policy for each of the JChord event types\n */\n TransmissionPolicyManager.setClassPolicy(Event.class.getName(),\n PolicyType.BY_VALUE, true);\n TransmissionPolicyManager.setClassPolicy(HashMap.class.getName(),\n PolicyType.BY_VALUE, true);\n\n /*\n * Set the transmission policy for KeyImpl, JChordNextHopResult and\n * SuccessorList objects\n */\n TransmissionPolicyManager.setClassPolicy(JChordNextHopResult.class\n .getName(), PolicyType.BY_VALUE, true);\n TransmissionPolicyManager.setClassPolicy(KeyImpl.class.getName(),\n PolicyType.BY_VALUE, true);\n\n// RafdaRunTime.registerCustomSerializer(SuccessorList.class,\n// new jchord_impl_SuccessorList());\n// TransmissionPolicyManager.setClassPolicy(SuccessorList.class.getName(),\n// PolicyType.BY_VALUE, true);\n \n// TransmissionPolicyManager.setReturnValuePolicy(JChordNodeImpl.class\n// .getName(), \"getSuccessorList\", PolicyType.BY_VALUE, true);\n\n /*\n * Set the transmission policy for the 'node_rep' fields of\n * JChordNodeImpl objects\n */\n String JChordNodeImplName = JChordNodeImpl.class.getName();\n TransmissionPolicyManager.setFieldToBeCached(JChordNodeImplName,\n \"hostAddress\");\n TransmissionPolicyManager.setFieldToBeCached(JChordNodeImplName, \"key\");\n }", "public String burstThrottlePolicy() {\n return this.burstThrottlePolicy;\n }", "public void throttleFilter() throws InvalidQueryException {\n }", "private void configureRateLimiterForStatusPanel() {\n if (rateLimiter == null || rateLimiterTableModel == null) {\n return;\n }\n rateLimiter.setObserver(\n limiter -> {\n if ((System.currentTimeMillis() - rateLimiterLastUpdate.get()) > 1000) {\n rateLimiterLastUpdate.set(System.currentTimeMillis());\n SwingUtilities.invokeLater(() -> rateLimiterTableModel.update(limiter));\n }\n });\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "public final flipsParser.relativeThrottle_return relativeThrottle() throws RecognitionException {\n flipsParser.relativeThrottle_return retval = new flipsParser.relativeThrottle_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal317=null;\n Token string_literal318=null;\n Token string_literal319=null;\n Token string_literal320=null;\n flipsParser.throttleValue_return throttleValue315 = null;\n\n flipsParser.fasterSlowerSpeed_return fasterSlowerSpeed316 = null;\n\n\n CommonTree string_literal317_tree=null;\n CommonTree string_literal318_tree=null;\n CommonTree string_literal319_tree=null;\n CommonTree string_literal320_tree=null;\n RewriteRuleTokenStream stream_223=new RewriteRuleTokenStream(adaptor,\"token 223\");\n RewriteRuleTokenStream stream_224=new RewriteRuleTokenStream(adaptor,\"token 224\");\n RewriteRuleTokenStream stream_225=new RewriteRuleTokenStream(adaptor,\"token 225\");\n RewriteRuleTokenStream stream_226=new RewriteRuleTokenStream(adaptor,\"token 226\");\n RewriteRuleSubtreeStream stream_throttleValue=new RewriteRuleSubtreeStream(adaptor,\"rule throttleValue\");\n RewriteRuleSubtreeStream stream_fasterSlowerSpeed=new RewriteRuleSubtreeStream(adaptor,\"rule fasterSlowerSpeed\");\n try {\n // flips.g:488:2: ( throttleValue fasterSlowerSpeed ( 'pwr' | 'power' | 'thr' | 'throttle' ) -> ^( THROTTLE RELATIVE fasterSlowerSpeed throttleValue ) )\n // flips.g:488:4: throttleValue fasterSlowerSpeed ( 'pwr' | 'power' | 'thr' | 'throttle' )\n {\n pushFollow(FOLLOW_throttleValue_in_relativeThrottle2637);\n throttleValue315=throttleValue();\n\n state._fsp--;\n\n stream_throttleValue.add(throttleValue315.getTree());\n pushFollow(FOLLOW_fasterSlowerSpeed_in_relativeThrottle2639);\n fasterSlowerSpeed316=fasterSlowerSpeed();\n\n state._fsp--;\n\n stream_fasterSlowerSpeed.add(fasterSlowerSpeed316.getTree());\n // flips.g:488:36: ( 'pwr' | 'power' | 'thr' | 'throttle' )\n int alt127=4;\n switch ( input.LA(1) ) {\n case 223:\n {\n alt127=1;\n }\n break;\n case 224:\n {\n alt127=2;\n }\n break;\n case 225:\n {\n alt127=3;\n }\n break;\n case 226:\n {\n alt127=4;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 127, 0, input);\n\n throw nvae;\n }\n\n switch (alt127) {\n case 1 :\n // flips.g:488:37: 'pwr'\n {\n string_literal317=(Token)match(input,223,FOLLOW_223_in_relativeThrottle2642); \n stream_223.add(string_literal317);\n\n\n }\n break;\n case 2 :\n // flips.g:488:43: 'power'\n {\n string_literal318=(Token)match(input,224,FOLLOW_224_in_relativeThrottle2644); \n stream_224.add(string_literal318);\n\n\n }\n break;\n case 3 :\n // flips.g:488:51: 'thr'\n {\n string_literal319=(Token)match(input,225,FOLLOW_225_in_relativeThrottle2646); \n stream_225.add(string_literal319);\n\n\n }\n break;\n case 4 :\n // flips.g:488:57: 'throttle'\n {\n string_literal320=(Token)match(input,226,FOLLOW_226_in_relativeThrottle2648); \n stream_226.add(string_literal320);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: throttleValue, fasterSlowerSpeed\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 489:2: -> ^( THROTTLE RELATIVE fasterSlowerSpeed throttleValue )\n {\n // flips.g:489:5: ^( THROTTLE RELATIVE fasterSlowerSpeed throttleValue )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(THROTTLE, \"THROTTLE\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(RELATIVE, \"RELATIVE\"));\n adaptor.addChild(root_1, stream_fasterSlowerSpeed.nextTree());\n adaptor.addChild(root_1, stream_throttleValue.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public final flipsParser.throttleValue_return throttleValue() throws RecognitionException {\n flipsParser.throttleValue_return retval = new flipsParser.throttleValue_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n flipsParser.percentValue_return percentValue321 = null;\n\n flipsParser.angularRateValue_return angularRateValue322 = null;\n\n\n RewriteRuleSubtreeStream stream_percentValue=new RewriteRuleSubtreeStream(adaptor,\"rule percentValue\");\n try {\n // flips.g:493:2: ( percentValue -> ^( SPEED percentValue ) | angularRateValue )\n int alt128=2;\n switch ( input.LA(1) ) {\n case 340:\n {\n int LA128_1 = input.LA(2);\n\n if ( ((LA128_1>=BinaryLiteral && LA128_1<=HexLiteral)) ) {\n int LA128_2 = input.LA(3);\n\n if ( (LA128_2==243||(LA128_2>=322 && LA128_2<=328)||(LA128_2>=330 && LA128_2<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_2>=338 && LA128_2<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 2, input);\n\n throw nvae;\n }\n }\n else if ( (LA128_1==FloatingPointLiteral) ) {\n int LA128_3 = input.LA(3);\n\n if ( ((LA128_3>=322 && LA128_3<=328)||(LA128_3>=330 && LA128_3<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_3>=338 && LA128_3<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 3, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 1, input);\n\n throw nvae;\n }\n }\n break;\n case BinaryLiteral:\n case OctalLiteral:\n case DecimalLiteral:\n case HexLiteral:\n {\n int LA128_2 = input.LA(2);\n\n if ( (LA128_2==243||(LA128_2>=322 && LA128_2<=328)||(LA128_2>=330 && LA128_2<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_2>=338 && LA128_2<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 2, input);\n\n throw nvae;\n }\n }\n break;\n case FloatingPointLiteral:\n {\n int LA128_3 = input.LA(2);\n\n if ( ((LA128_3>=322 && LA128_3<=328)||(LA128_3>=330 && LA128_3<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_3>=338 && LA128_3<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 3, input);\n\n throw nvae;\n }\n }\n break;\n case 341:\n {\n int LA128_4 = input.LA(2);\n\n if ( (LA128_4==FloatingPointLiteral) ) {\n int LA128_7 = input.LA(3);\n\n if ( ((LA128_7>=322 && LA128_7<=328)||(LA128_7>=330 && LA128_7<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_7>=338 && LA128_7<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 7, input);\n\n throw nvae;\n }\n }\n else if ( ((LA128_4>=BinaryLiteral && LA128_4<=HexLiteral)) ) {\n int LA128_8 = input.LA(3);\n\n if ( (LA128_8==243||(LA128_8>=322 && LA128_8<=328)||(LA128_8>=330 && LA128_8<=337)) ) {\n alt128=2;\n }\n else if ( ((LA128_8>=338 && LA128_8<=339)) ) {\n alt128=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 8, input);\n\n throw nvae;\n }\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 4, input);\n\n throw nvae;\n }\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 128, 0, input);\n\n throw nvae;\n }\n\n switch (alt128) {\n case 1 :\n // flips.g:493:4: percentValue\n {\n pushFollow(FOLLOW_percentValue_in_throttleValue2673);\n percentValue321=percentValue();\n\n state._fsp--;\n\n stream_percentValue.add(percentValue321.getTree());\n\n\n // AST REWRITE\n // elements: percentValue\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 494:2: -> ^( SPEED percentValue )\n {\n // flips.g:494:5: ^( SPEED percentValue )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(SPEED, \"SPEED\"), root_1);\n\n adaptor.addChild(root_1, stream_percentValue.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:495:4: angularRateValue\n {\n root_0 = (CommonTree)adaptor.nil();\n\n pushFollow(FOLLOW_angularRateValue_in_throttleValue2687);\n angularRateValue322=angularRateValue();\n\n state._fsp--;\n\n adaptor.addChild(root_0, angularRateValue322.getTree());\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "public void setRateLimiter(RateLimiter rateLimiter) {\n this.rateLimiter = rateLimiter;\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdPut(String policyId, String contentType,\n AdvancedThrottlePolicyDTO body, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n\n //overridden parameters\n body.setPolicyId(policyId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n apiProvider.updatePolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while updating Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public void maybeSetThrottleTimeMs(int throttleTimeMs) {\n }", "public interface RateLimiter {\n\n String rateLimiterId();\n\n boolean isRateLimited(String identity);\n\n}", "private void updatePolicyPermissions(SubscriptionThrottlePolicyDTO body) throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n SubscriptionThrottlePolicyPermissionDTO policyPermissions = body.getPermissions();\n if (policyPermissions != null) {\n if (policyPermissions.getRoles().size() > 0) {\n String roles = StringUtils.join(policyPermissions.getRoles(), \",\");\n String permissionType;\n if (policyPermissions.getPermissionType() ==\n SubscriptionThrottlePolicyPermissionDTO.PermissionTypeEnum.ALLOW) {\n permissionType = APIConstants.TIER_PERMISSION_ALLOW;\n } else {\n permissionType = APIConstants.TIER_PERMISSION_DENY;\n }\n apiProvider.updateThrottleTierPermissions(body.getPolicyName(), permissionType, roles);\n } else {\n throw new APIManagementException(ExceptionCodes.ROLES_CANNOT_BE_EMPTY);\n }\n } else {\n apiProvider.deleteTierPermissions(body.getPolicyName());\n }\n }", "public RateLimiter getRateLimiter() {\n return rateLimiter;\n }", "public Double throttleRate() {\n return this.throttleRate;\n }", "@Override\n public Response throttlingPoliciesAdvancedPost(String contentType, AdvancedThrottlePolicyDTO body,\n MessageContext messageContext) throws APIManagementException {\n\n RestApiAdminUtils.validateThrottlePolicyNameProperty(body.getPolicyName());\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String userName = RestApiCommonUtil.getLoggedInUsername();\n APIPolicy apiPolicy = AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyDTOToPolicy(body);\n\n //Check if there's a policy exists before adding the new policy\n try {\n Policy policyIfExists = apiProvider.getAPIPolicy(userName, apiPolicy.getPolicyName());\n if (policyIfExists != null) {\n RestApiUtil.handleResourceAlreadyExistsError(\"Advanced Policy with name \"\n + apiPolicy.getPolicyName() + \" already exists\", log);\n }\n } catch (PolicyNotFoundException ignore) {\n }\n //Add the policy\n apiProvider.addPolicy(apiPolicy);\n\n //retrieve the new policy and send back as the response\n APIPolicy newApiPolicy = apiProvider.getAPIPolicy(userName, body.getPolicyName());\n AdvancedThrottlePolicyDTO policyDTO =\n AdvancedThrottlePolicyMappingUtil.fromAdvancedPolicyToDTO(newApiPolicy);\n return Response.created(new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_POLICIES_ADVANCED + \"/\"\n + policyDTO.getPolicyId())).entity(policyDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while adding an Advanced level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n } catch (URISyntaxException e) {\n String errorMessage = \"Error while retrieving Advanced Throttle policy location : \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "private void refreshRateLimit() {\n\t\tfinal String METHOD_NAME = \"refreshRateLimit\";\n\t\tLOGGER.entering(CLASS_NAME, METHOD_NAME);\n\t\tfinal String rateLimitResourceUrl = \"https://api.github.com/rate_limit\";\n\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(rateLimitResourceUrl)\n\t\t\t\t.queryParam(\"client_id\", clientId).queryParam(\"client_secret\", clientSecret);\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<String> response = restTemplate.exchange(builder.toUriString(), HttpMethod.GET,\n\t\t\t\tnew HttpEntity<>(new HttpHeaders()), String.class);\n\t\tif (response.getStatusCode() != HttpStatus.OK) {\n\t\t\tthrow new RateLimitExceededException(\"Error connecting to GitHub. could not refresh rate limit\");\n\t\t}\n\t\ttry {\n\t\t\tJSONParser parser = new JSONParser();\n\t\t\tJSONObject responseObject = (JSONObject) parser.parse(response.getBody());\n\t\t\tJSONObject resources = (JSONObject) responseObject.get(\"resources\");\n\t\t\tJSONObject core = (JSONObject) resources.get(\"core\");\n\t\t\tJSONObject search = (JSONObject) resources.get(\"search\");\n\t\t\tcoreRateLimit = (Long) core.get(\"limit\");\n\t\t\tsearchRateLimit = (Long) search.get(\"limit\");\n\t\t\tLOGGER.logp(Level.INFO, CLASS_NAME, METHOD_NAME, \"Core rate limit : \" + coreRateLimit + \", search rate limit : \" + searchRateLimit);\n\t\t} catch (ParseException ex) {\n\t\t\tLOGGER.logp(Level.SEVERE, CLASS_NAME, METHOD_NAME, ex.getMessage());\n\t\t}\n\t\tLOGGER.exiting(CLASS_NAME, METHOD_NAME);\n\t}", "void requestRateLimited();", "AgentPolicyBuilder setPolicyTimeoutMs(long policyTimeoutMs);", "long throttleByteCount() {\n return parseLong(settings.get(THROTTLE_BYTE_COUNT), Long.MAX_VALUE);\n }", "@Override\n public Response throttlingPoliciesCustomRuleIdPut(String ruleId, String contentType, CustomRuleDTO body,\n MessageContext messageContext) throws APIManagementException {\n\n RestApiAdminUtils\n .validateCustomRuleRequiredProperties(body, (String) messageContext.get(Message.HTTP_REQUEST_METHOD));\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //only super tenant is allowed to access global policies/custom rules\n checkTenantDomainForCustomRules();\n\n //will give PolicyNotFoundException if there's no policy exists with UUID\n GlobalPolicy existingPolicy = apiProvider.getGlobalPolicyByUUID(ruleId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, log);\n }\n\n //overridden properties\n body.setPolicyId(ruleId);\n body.setPolicyName(existingPolicy.getPolicyName());\n\n //update the policy\n GlobalPolicy globalPolicy = GlobalThrottlePolicyMappingUtil.fromGlobalThrottlePolicyDTOToModel(body);\n apiProvider.updatePolicy(globalPolicy);\n\n //retrieve the new policy and send back as the response\n GlobalPolicy newGlobalPolicy = apiProvider.getGlobalPolicyByUUID(ruleId);\n CustomRuleDTO policyDTO = GlobalThrottlePolicyMappingUtil.fromGlobalThrottlePolicyToDTO(newGlobalPolicy);\n return Response.ok().entity(policyDTO).build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_CUSTOM_RULE, ruleId, e, log);\n } else {\n String errorMessage = \"Error while updating custom rule: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public RateLimiter getRateLimiter() {\n return rateLimiter;\n }", "public void setScalePolicy(ScalePolicy policy) {\n\n\t}", "@Override\n public Response throttlingPoliciesApplicationPost(String contentType, ApplicationThrottlePolicyDTO body,\n MessageContext messageContext) throws APIManagementException {\n\n RestApiAdminUtils.validateThrottlePolicyNameProperty(body.getPolicyName());\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n ApplicationPolicy appPolicy =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyDTOToModel(body);\n\n //Check if there's a policy exists before adding the new policy\n try {\n Policy policyIfExists = apiProvider.getApplicationPolicy(username, appPolicy.getPolicyName());\n if (policyIfExists != null) {\n RestApiUtil.handleResourceAlreadyExistsError(\"Application Policy with name \"\n + appPolicy.getPolicyName() + \" already exists\", log);\n }\n } catch (PolicyNotFoundException ignore) {\n }\n //Add the policy\n apiProvider.addPolicy(appPolicy);\n\n //retrieve the new policy and send back as the response\n ApplicationPolicy newAppPolicy = apiProvider.getApplicationPolicy(username, body.getPolicyName());\n ApplicationThrottlePolicyDTO policyDTO =\n ApplicationThrottlePolicyMappingUtil.fromApplicationThrottlePolicyToDTO(newAppPolicy);\n return Response.created(new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_POLICIES_APPLICATION + \"/\"\n + policyDTO.getPolicyId())).entity(policyDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while adding an Application level policy: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n } catch (URISyntaxException e) {\n String errorMessage =\n \"Error while retrieving Application Throttle policy location : \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "@Override\n public Sampler<?> apply(ConfigurationAdapter conf) {\n Map<String, String> items = new HashMap<String, String>();\n items.put(ProbabilitySampler.SAMPLER_FRACTION_CONF_KEY,\n conf.get(QueryServices.TRACING_PROBABILITY_THRESHOLD_ATTRIB, Double.toString(QueryServicesOptions.DEFAULT_TRACING_PROBABILITY_THRESHOLD)));\n return new ProbabilitySampler(HTraceConfiguration.fromMap(items));\n }", "public static APIPolicy createDefaultAPIPolicyWithBandwidthLimit() {\n BandwidthLimit bandwidthLimit = new BandwidthLimit(TIME_UNIT_MONTH, 1, 1000, PolicyConstants.MB);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(PolicyConstants.BANDWIDTH_TYPE);\n defaultQuotaPolicy.setLimit(bandwidthLimit);\n //set default API Policy\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n return apiPolicy;\n }", "@Override\n public Response throttlingPoliciesCustomPost(String contentType, CustomRuleDTO body, MessageContext messageContext)\n throws APIManagementException {\n\n RestApiAdminUtils\n .validateCustomRuleRequiredProperties(body, (String) messageContext.get(Message.HTTP_REQUEST_METHOD));\n\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n\n //only super tenant is allowed to access global policies/custom rules\n checkTenantDomainForCustomRules();\n\n GlobalPolicy globalPolicy = GlobalThrottlePolicyMappingUtil.fromGlobalThrottlePolicyDTOToModel(body);\n //Check if there's a policy exists before adding the new policy\n try {\n Policy policyIfExists = apiProvider.getGlobalPolicy(globalPolicy.getPolicyName());\n if (policyIfExists != null) {\n RestApiUtil.handleResourceAlreadyExistsError(\n \"Custom rule with name \" + globalPolicy.getPolicyName() + \" already exists\", log);\n }\n } catch (PolicyNotFoundException ignore) {\n }\n //Add the policy\n apiProvider.addPolicy(globalPolicy);\n\n //retrieve the new policy and send back as the response\n GlobalPolicy newGlobalPolicy = apiProvider.getGlobalPolicy(body.getPolicyName());\n CustomRuleDTO policyDTO = GlobalThrottlePolicyMappingUtil.fromGlobalThrottlePolicyToDTO(newGlobalPolicy);\n return Response.created(\n new URI(RestApiConstants.RESOURCE_PATH_THROTTLING_POLICIES_GLOBAL + \"/\" + policyDTO.getPolicyId()))\n .entity(policyDTO).build();\n } catch (APIManagementException e) {\n String errorMessage = \"Error while adding a custom rule: \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n } catch (URISyntaxException e) {\n String errorMessage = \"Error while retrieving Global Throttle policy location : \" + body.getPolicyName();\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "void rateLimitReset();", "RequestLimitCheckMiddleware(RankSyncServerPlugin rankSyncPlugin, LinkHelper linkHelper) {\n super(linkHelper);\n this.rankSyncPlugin = rankSyncPlugin;\n this.rankSyncPlugin.runTaskTimer(this.timeOuts::clear, 20 * 30, 20 * 30);\n }", "@Override\n public Response throttlingDenyPoliciesGet(String accept, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n List<BlockConditionsDTO> blockConditions = apiProvider.getBlockConditions();\n BlockingConditionListDTO listDTO =\n BlockingConditionMappingUtil.fromBlockConditionListToListDTO(blockConditions);\n return Response.ok().entity(listDTO).build();\n } catch (APIManagementException | ParseException e) {\n String errorMessage = \"Error while retrieving Block Conditions\";\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n return null;\n }", "public interface ReactiveRateLimiter {\n\n Observable<Boolean> overLimitReactive(String key);\n\n Observable<Boolean> overLimitReactive(String key, int weight);\n\n Observable<Boolean> resetLimitReactive(String key);\n}", "@Bean(name = StreamSpanReporter.POLLER)\r\n\tPollerMetadata customPoller() {\r\n\t\tPollerMetadata poller = new PollerMetadata();\r\n\t\tpoller.setMaxMessagesPerPoll(500);\r\n\t\tpoller.setTrigger(new PeriodicTrigger(5000L));\r\n\t\treturn poller;\r\n\t}", "Future<ListPoliciesResponse> listPolicies(\n ListPoliciesRequest request,\n AsyncHandler<ListPoliciesRequest, ListPoliciesResponse> handler);", "protected abstract RateLimitRule createRule(HttpMessage msg) throws URIException;", "@Override\n public Response throttlingPoliciesSubscriptionPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n SubscriptionPolicy existingPolicy = apiProvider.getSubscriptionPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_SUB)) {\n String message = \"Policy \" + policyId + \" already has subscriptions\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_SUB, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_SUBSCRIPTION_POLICY, policyId, e,\n log);\n } else {\n String errorMessage = \"Error while deleting Subscription level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "public int getPolicy(String appName, String apiName, Object... parameterType) {\n\n int policy = defaultPolicy;\n\n /** global rules */\n\n if (currentPolicy.containsKey(\"* \" + apiName)) {\n policy = currentPolicy.get(\"* \" + apiName).ctrlPolicy;\n }\n\n /** specific rules overwrites global ones */\n\n if (currentPolicy.containsKey(appName + \" \" + apiName)) {\n policy = currentPolicy.get(appName + \" \" + apiName).ctrlPolicy;\n }\n\n /** if no rules are defined, adopt default ones */\n\n return policy;\n }", "@Test\n public void addPerCallPolicy() {\n KeyVaultAccessControlAsyncClient keyVaultAccessControlAsyncClient = new KeyVaultAccessControlClientBuilder()\n .vaultUrl(vaultUrl)\n .credential(new TestUtils.TestCredential())\n .addPolicy(new TestUtils.PerCallPolicy())\n .addPolicy(new TestUtils.PerRetryPolicy())\n .buildAsyncClient();\n\n HttpPipeline pipeline = keyVaultAccessControlAsyncClient.getHttpPipeline();\n\n int retryPolicyPosition = -1, perCallPolicyPosition = -1, perRetryPolicyPosition = -1;\n\n for (int i = 0; i < pipeline.getPolicyCount(); i++) {\n if (pipeline.getPolicy(i).getClass() == RetryPolicy.class) {\n retryPolicyPosition = i;\n }\n\n if (pipeline.getPolicy(i).getClass() == TestUtils.PerCallPolicy.class) {\n perCallPolicyPosition = i;\n }\n\n if (pipeline.getPolicy(i).getClass() == TestUtils.PerRetryPolicy.class) {\n perRetryPolicyPosition = i;\n }\n }\n\n assertTrue(perCallPolicyPosition != -1);\n assertTrue(perCallPolicyPosition < retryPolicyPosition);\n assertTrue(retryPolicyPosition < perRetryPolicyPosition);\n }", "@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }", "@Override\n public RetryPolicy getRetryPolicy() {\n return super.getRetryPolicy();\n }", "public void setAdaptiveRateAlgorithm(String algorithm);", "public interface Limiter {\n public boolean needLimit(RequestContext context);\n}", "public abstract boolean isRateLimit();", "@Test\n public void testSchedulingPolicy() {\n String queueName = \"single\";\n\n FSQueueMetrics metrics = FSQueueMetrics.forQueue(ms, queueName, null, false,\n CONF);\n metrics.setSchedulingPolicy(\"drf\");\n checkSchedulingPolicy(queueName, \"drf\");\n\n // test resetting the scheduling policy\n metrics.setSchedulingPolicy(\"fair\");\n checkSchedulingPolicy(queueName, \"fair\");\n }", "@GetMapping(\"/limits\") \n\tpublic LimitConfiguration retriveLimitsFromConfigurations() \n\t{\n\t\treturn new LimitConfiguration(configuration.getMaximum(), configuration.getMaximum()); \n\t}", "public double getThrottle() {\n \treturn Math.abs(throttle.getY()) > DEADZONE ? throttle.getY() : 0;\n }", "public static Policy getServiceEffectivePolicy(Definitions wsdl, QName serviceQName) throws PolicyException {\n Service srv = wsdl.getService(serviceQName);\n if (srv == null) {\n throw new IllegalArgumentException(\"Cannot find service with qname \" + serviceQName);\n }\n \n Element srvEl = srv.getDomElement();\n Element defsEl = (Element) srvEl.getParentNode();\n \n Policy res = ConfigurationBuilder.loadPolicies(srv, defsEl);\n return res;\n }", "public PolicyBinderPage rateFunctionality(String policyNo) {\r\n\r\n RateApolicyPage rateapolicypage = new RateApolicyPage(driver);\r\n rateapolicypage.rateFunctionality(policyNo);\r\n return new PolicyBinderPage(driver);\r\n }", "long throttleByteCount() {\n return parseLong(get(THROTTLE_BYTE_COUNT), Long.MAX_VALUE);\n }", "@Override\n public void tuningPeriodic() {\n\n }", "com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy getAuthorizationPolicies(int index);", "public interface RetryPolicy {\n\n /**\n * Returns duration till the next retry attempt.\n *\n * @param nextAttemptNumber next attempt number\n * @return {@link Optional} of Duration till the next attempt,\n * or {@link Optional#empty()} if next attempt shouldn't be made\n */\n Optional<Duration> durationToNextTry(int nextAttemptNumber);\n}", "public void setLimitUsageRate(java.lang.Double limitUsageRate) {\n this.limitUsageRate = limitUsageRate;\n }", "public static CustomPolicy createDefaultCustomPolicy() {\n CustomPolicy customPolicy = new CustomPolicy(SAMPLE_CUSTOM_RULE);\n customPolicy.setKeyTemplate(\"$userId\");\n String siddhiQuery = \"FROM RequestStream SELECT userId, ( userId == '[email protected]' ) AS isEligible , \"\n + \"str:concat('[email protected]','') as throttleKey INSERT INTO EligibilityStream;\"\n + \"FROM EligibilityStream[isEligible==true]#throttler:timeBatch(1 min) SELECT throttleKey, \"\n + \"(count(userId) >= 5 as isThrottled, expiryTimeStamp group by throttleKey INSERT ALL EVENTS into \"\n + \"ResultStream;\";\n\n customPolicy.setSiddhiQuery(siddhiQuery);\n customPolicy.setDescription(\"Sample custom policy\");\n return customPolicy;\n }", "@Override\n public Response throttlingPoliciesApplicationPolicyIdDelete(String policyId, MessageContext messageContext) {\n try {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n ApplicationPolicy existingPolicy = apiProvider.getApplicationPolicyByUUID(policyId);\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_APP_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(),\n PolicyConstants.POLICY_LEVEL_APP)) {\n String message = \"Policy \" + policyId + \" already attached to an application\";\n log.error(message);\n throw new APIManagementException(message);\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_APP, existingPolicy.getPolicyName());\n return Response.ok().build();\n } catch (APIManagementException e) {\n if (RestApiUtil.isDueToResourceNotFound(e)) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_APP_POLICY, policyId, e, log);\n } else {\n String errorMessage = \"Error while deleting Application level policy : \" + policyId;\n RestApiUtil.handleInternalServerError(errorMessage, e, log);\n }\n }\n return null;\n }", "@Override\n public void replaceInstance(ThrottlePolicyProvider newTPP) {\n logger.info(\"Replacing ThrottlePolicyProvider with an instance of {}\", newTPP.getClass());\n newTPP.seedTPCLs(backingProvider.get().getAllTPCLs());\n backingProvider.set(newTPP);\n }", "public Long get_cacheparameterizedrequestsrate() throws Exception {\n\t\treturn this.cacheparameterizedrequestsrate;\n\t}", "@Deprecated\n void setEvictionPolicy(Policy policy);", "@Test\n public void testResponseThrottleTime() {\n Set<ApiKeys> authenticationKeys = EnumSet.of(ApiKeys.SASL_HANDSHAKE, ApiKeys.SASL_AUTHENTICATE);\n // Newer protocol apis include throttle time ms even for cluster actions\n Set<ApiKeys> clusterActionsWithThrottleTimeMs = EnumSet.of(ApiKeys.ALTER_PARTITION, ApiKeys.ALLOCATE_PRODUCER_IDS, ApiKeys.UPDATE_FEATURES);\n for (ApiKeys apiKey: ApiKeys.clientApis()) {\n Schema responseSchema = apiKey.messageType.responseSchemas()[apiKey.latestVersion()];\n BoundField throttleTimeField = responseSchema.get(\"throttle_time_ms\");\n if ((apiKey.clusterAction && !clusterActionsWithThrottleTimeMs.contains(apiKey))\n || authenticationKeys.contains(apiKey))\n assertNull(throttleTimeField, \"Unexpected throttle time field: \" + apiKey);\n else\n assertNotNull(throttleTimeField, \"Throttle time field missing: \" + apiKey);\n }\n }", "private RetryPolicy simpleRetryPolicy() {\n\n Map<Class<? extends Throwable>, Boolean> exceptionsMaps = new HashMap<>();\n exceptionsMaps.put(RecoverableDataAccessException.class, true);\n exceptionsMaps.put(IllegalArgumentException.class, false);\n\n SimpleRetryPolicy simpleRetryPolicy = new SimpleRetryPolicy(3, exceptionsMaps, true);\n return simpleRetryPolicy;\n }", "public TorqueSlewLimiter(final double limit) {\n this.limitAsc = limit;\n this.limitDesc = limit;\n }", "public void setPolicy(short policy) {\n\t\t_policy = policy;\n\t}", "void updatePolicyHOlder(int policyHolderId , PolicyHolder policyHolder);", "@Test\n public void testHandleRequestForGraphQLSubscriptions() {\n\n ThrottleHandler throttleHandler = new ThrottlingHandlerWrapper(timer, new ThrottleDataHolder(),\n throttleEvaluator, accessInformation);\n Axis2MessageContext messageContext = Mockito.mock(Axis2MessageContext.class);\n org.apache.axis2.context.MessageContext axis2MessageContext =\n Mockito.mock(org.apache.axis2.context.MessageContext.class);\n Mockito.when(messageContext.\n getAxis2MessageContext()).thenReturn(axis2MessageContext);\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"ws\");\n Mockito.when(messageContext.getProperty(APIConstants.GRAPHQL_SUBSCRIPTION_REQUEST)).thenReturn(true);\n Assert.assertTrue(throttleHandler.handleRequest(messageContext));\n\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"wss\");\n Assert.assertTrue(throttleHandler.handleRequest(messageContext));\n\n // clean up message context\n Mockito.when(messageContext.getProperty(APIConstants.GRAPHQL_SUBSCRIPTION_REQUEST)).thenReturn(false);\n Mockito.when(axis2MessageContext.getIncomingTransportName()).thenReturn(\"http\");\n }", "@Nonnull\r\n\tpublic static <T, U> Observable<T> throttle(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\t@Nonnull Func1<? super T, ? extends Observable<U>> durationSelector) {\r\n\t\treturn new Throttle.ByObservable<T, U>(source, durationSelector);\r\n\t}", "public void sendPolicy() throws Exception{\n\t\tIterator<ASServer> iam = manager.getASServers().values().iterator();\n\t\t\n\t\twhile(iam.hasNext()){\n\t\t\t\n\t\t\tASServer serId = iam.next();\n\t\t\tsendASPolicy(serId.currentPolicy, serId.serverId);\n\t\t\t\n\t\t}\n\t\t\n\t\t// send LB policies\n\t\t\n\t\tsendLBPolicy(currentLBPolicy, manager.props.getProperty(StatisticsManager.LBSERVER));\n\t\t\n\t}", "private void loadPolicy() {\n loadSavedGlobalSetting();\n loadDefaultPolicy();\n loadSavedSetting();\n saveSetting();\n }", "@Nonnull\n @CheckReturnValue\n public static RateLimiter directLimiter() {\n return DirectLimiter.INSTANCE;\n }", "private void processAutoScalePolicy(BMap<?, ?> scalePolicy, ImageComponent component) {\n ScalingPolicy scalingPolicy = new ScalingPolicy();\n scalingPolicy.setReplicas(component.getReplicas());\n LinkedHashMap bScalePolicy = scalePolicy.getMap();\n boolean bOverridable = false;\n if (\"AutoScalingPolicy\".equals(scalePolicy.getType().getName())) {\n // Autoscaling\n image.setAutoScaling(true);\n HPA hpa = new HPA();\n hpa.setMaxReplicas(((BInteger) bScalePolicy.get(MAX_REPLICAS)).intValue());\n hpa.setMinReplicas(((BInteger) (bScalePolicy.get(\"minReplicas\"))).intValue());\n bOverridable = ((BBoolean) bScalePolicy.get(\"overridable\")).booleanValue();\n LinkedHashMap metricsMap = ((BMap) bScalePolicy.get(\"metrics\")).getMap();\n if (metricsMap.containsKey(AUTO_SCALING_METRIC_RESOURCE_CPU)) {\n hpa.addMetric(extractMetrics(metricsMap, AUTO_SCALING_METRIC_RESOURCE_CPU));\n }\n if (metricsMap.containsKey(AUTO_SCALING_METRIC_RESOURCE_MEMORY)) {\n hpa.addMetric(extractMetrics(metricsMap, AUTO_SCALING_METRIC_RESOURCE_MEMORY));\n }\n scalingPolicy.setHpa(hpa);\n } else {\n //Zero Scaling\n image.setZeroScaling(true);\n KPA kpa = new KPA();\n kpa.setMinReplicas(0);\n if (bScalePolicy.containsKey(MAX_REPLICAS)) {\n kpa.setMaxReplicas(((BInteger) bScalePolicy.get(MAX_REPLICAS)).intValue());\n }\n if (bScalePolicy.containsKey(CONCURRENCY_TARGET)) {\n kpa.setConcurrency(((BInteger) bScalePolicy.get(CONCURRENCY_TARGET)).intValue());\n }\n scalingPolicy.setKpa(kpa);\n }\n scalingPolicy.setOverridable(bOverridable);\n component.setScalingPolicy(scalingPolicy);\n }", "public interface ApiKeyThrottlingCacheService {\n\t \n\tlong incr(String key, int by, long defaul, int expiration) throws NullPointerException;\n\tboolean isCacheAvailable();\n\tString getCacheHost();\n\tvoid setCacheHost(String cacheHost);\n\tString getCachePort();\n\tvoid setCachePort(String cachePort);\n\t\n}", "public java.lang.Double getLimitUsageRate() {\n return limitUsageRate;\n }", "@SuppressWarnings(\"unchecked\")\n @Test\n public void switchPolicy() {\n List<EquivalentAddressGroup> grpclbResolutionList =\n createResolvedServerAddresses(true, false, true);\n Attributes grpclbResolutionAttrs = Attributes.newBuilder()\n .set(GrpclbConstants.ATTR_LB_POLICY, LbPolicy.GRPCLB).build();\n deliverResolvedAddresses(grpclbResolutionList, grpclbResolutionAttrs);\n\n assertSame(LbPolicy.GRPCLB, balancer.getLbPolicy());\n assertNull(balancer.getDelegate());\n verify(helper).createOobChannel(eq(grpclbResolutionList.get(0)), eq(lbAuthority(0)));\n assertEquals(1, fakeOobChannels.size());\n ManagedChannel oobChannel = fakeOobChannels.poll();\n verify(mockLbService).balanceLoad(lbResponseObserverCaptor.capture());\n\n // Switch to PICK_FIRST\n List<EquivalentAddressGroup> pickFirstResolutionList =\n createResolvedServerAddresses(true, false, true);\n Attributes pickFirstResolutionAttrs = Attributes.newBuilder()\n .set(GrpclbConstants.ATTR_LB_POLICY, LbPolicy.PICK_FIRST).build();\n verify(pickFirstBalancerFactory, never()).newLoadBalancer(any(Helper.class));\n assertEquals(1, lbRequestObservers.size());\n StreamObserver<LoadBalanceRequest> lbRequestObserver = lbRequestObservers.poll();\n\n verify(lbRequestObserver, never()).onCompleted();\n assertFalse(oobChannel.isShutdown());\n deliverResolvedAddresses(pickFirstResolutionList, pickFirstResolutionAttrs);\n\n verify(pickFirstBalancerFactory).newLoadBalancer(same(helper));\n // Only non-LB addresses are passed to the delegate\n verify(pickFirstBalancer).handleResolvedAddressGroups(\n eq(Arrays.asList(pickFirstResolutionList.get(1))), same(pickFirstResolutionAttrs));\n assertSame(LbPolicy.PICK_FIRST, balancer.getLbPolicy());\n assertSame(pickFirstBalancer, balancer.getDelegate());\n // GRPCLB connection is closed\n verify(lbRequestObserver).onCompleted();\n assertTrue(oobChannel.isShutdown());\n\n // Switch to ROUND_ROBIN\n List<EquivalentAddressGroup> roundRobinResolutionList =\n createResolvedServerAddresses(true, false, false);\n Attributes roundRobinResolutionAttrs = Attributes.newBuilder()\n .set(GrpclbConstants.ATTR_LB_POLICY, LbPolicy.ROUND_ROBIN).build();\n verify(roundRobinBalancerFactory, never()).newLoadBalancer(any(Helper.class));\n deliverResolvedAddresses(roundRobinResolutionList, roundRobinResolutionAttrs);\n\n verify(roundRobinBalancerFactory).newLoadBalancer(same(helper));\n // Only non-LB addresses are passed to the delegate\n verify(roundRobinBalancer).handleResolvedAddressGroups(\n eq(roundRobinResolutionList.subList(1, 3)), same(roundRobinResolutionAttrs));\n assertSame(LbPolicy.ROUND_ROBIN, balancer.getLbPolicy());\n assertSame(roundRobinBalancer, balancer.getDelegate());\n\n // Special case: if all addresses are loadbalancers, use GRPCLB no matter what the NameResolver\n // says.\n grpclbResolutionList = createResolvedServerAddresses(true, true, true);\n grpclbResolutionAttrs = Attributes.newBuilder()\n .set(GrpclbConstants.ATTR_LB_POLICY, LbPolicy.PICK_FIRST).build();\n deliverResolvedAddresses(grpclbResolutionList, grpclbResolutionAttrs);\n\n assertSame(LbPolicy.GRPCLB, balancer.getLbPolicy());\n assertNull(balancer.getDelegate());\n verify(helper, times(2)).createOobChannel(eq(grpclbResolutionList.get(0)), eq(lbAuthority(0)));\n verify(helper, times(2)).createOobChannel(any(EquivalentAddressGroup.class), any(String.class));\n assertEquals(1, fakeOobChannels.size());\n oobChannel = fakeOobChannels.poll();\n verify(mockLbService, times(2)).balanceLoad(lbResponseObserverCaptor.capture());\n\n // Special case: PICK_FIRST is the default\n pickFirstResolutionList = createResolvedServerAddresses(true, false, false);\n pickFirstResolutionAttrs = Attributes.EMPTY;\n verify(pickFirstBalancerFactory).newLoadBalancer(any(Helper.class));\n assertFalse(oobChannel.isShutdown());\n deliverResolvedAddresses(pickFirstResolutionList, pickFirstResolutionAttrs);\n\n verify(pickFirstBalancerFactory, times(2)).newLoadBalancer(same(helper));\n // Only non-LB addresses are passed to the delegate\n verify(pickFirstBalancer).handleResolvedAddressGroups(\n eq(pickFirstResolutionList.subList(1, 3)), same(pickFirstResolutionAttrs));\n assertSame(LbPolicy.PICK_FIRST, balancer.getLbPolicy());\n assertSame(pickFirstBalancer, balancer.getDelegate());\n // GRPCLB connection is closed\n assertTrue(oobChannel.isShutdown());\n }", "@KafkaHandler\n @Transactional\n public void consumeMonitorPolicyEvents(MonitorPolicyEvent policyEvent) {\n log.debug(\"Processing monitor policy event: {}\", policyEvent);\n\n monitorManagement.handleMonitorPolicyEvent(policyEvent);\n }", "protected GrpcScalingPoliciesServiceStub(\n ScalingPoliciesServiceStubSettings settings,\n ClientContext clientContext,\n GrpcStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);\n\n GrpcCallSettings<ListScalingPoliciesRequest, ListScalingPoliciesResponse>\n listScalingPoliciesTransportSettings =\n GrpcCallSettings.<ListScalingPoliciesRequest, ListScalingPoliciesResponse>newBuilder()\n .setMethodDescriptor(listScalingPoliciesMethodDescriptor)\n .setParamsExtractor(\n new RequestParamsExtractor<ListScalingPoliciesRequest>() {\n @Override\n public Map<String, String> extract(ListScalingPoliciesRequest request) {\n ImmutableMap.Builder<String, String> params = ImmutableMap.builder();\n params.put(\"parent\", String.valueOf(request.getParent()));\n return params.build();\n }\n })\n .build();\n GrpcCallSettings<GetScalingPolicyRequest, ScalingPolicy> getScalingPolicyTransportSettings =\n GrpcCallSettings.<GetScalingPolicyRequest, ScalingPolicy>newBuilder()\n .setMethodDescriptor(getScalingPolicyMethodDescriptor)\n .setParamsExtractor(\n new RequestParamsExtractor<GetScalingPolicyRequest>() {\n @Override\n public Map<String, String> extract(GetScalingPolicyRequest request) {\n ImmutableMap.Builder<String, String> params = ImmutableMap.builder();\n params.put(\"name\", String.valueOf(request.getName()));\n return params.build();\n }\n })\n .build();\n GrpcCallSettings<CreateScalingPolicyRequest, Operation> createScalingPolicyTransportSettings =\n GrpcCallSettings.<CreateScalingPolicyRequest, Operation>newBuilder()\n .setMethodDescriptor(createScalingPolicyMethodDescriptor)\n .setParamsExtractor(\n new RequestParamsExtractor<CreateScalingPolicyRequest>() {\n @Override\n public Map<String, String> extract(CreateScalingPolicyRequest request) {\n ImmutableMap.Builder<String, String> params = ImmutableMap.builder();\n params.put(\"parent\", String.valueOf(request.getParent()));\n return params.build();\n }\n })\n .build();\n GrpcCallSettings<DeleteScalingPolicyRequest, Operation> deleteScalingPolicyTransportSettings =\n GrpcCallSettings.<DeleteScalingPolicyRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteScalingPolicyMethodDescriptor)\n .setParamsExtractor(\n new RequestParamsExtractor<DeleteScalingPolicyRequest>() {\n @Override\n public Map<String, String> extract(DeleteScalingPolicyRequest request) {\n ImmutableMap.Builder<String, String> params = ImmutableMap.builder();\n params.put(\"name\", String.valueOf(request.getName()));\n return params.build();\n }\n })\n .build();\n GrpcCallSettings<UpdateScalingPolicyRequest, Operation> updateScalingPolicyTransportSettings =\n GrpcCallSettings.<UpdateScalingPolicyRequest, Operation>newBuilder()\n .setMethodDescriptor(updateScalingPolicyMethodDescriptor)\n .setParamsExtractor(\n new RequestParamsExtractor<UpdateScalingPolicyRequest>() {\n @Override\n public Map<String, String> extract(UpdateScalingPolicyRequest request) {\n ImmutableMap.Builder<String, String> params = ImmutableMap.builder();\n params.put(\n \"scaling_policy.name\",\n String.valueOf(request.getScalingPolicy().getName()));\n return params.build();\n }\n })\n .build();\n\n this.listScalingPoliciesCallable =\n callableFactory.createUnaryCallable(\n listScalingPoliciesTransportSettings,\n settings.listScalingPoliciesSettings(),\n clientContext);\n this.listScalingPoliciesPagedCallable =\n callableFactory.createPagedCallable(\n listScalingPoliciesTransportSettings,\n settings.listScalingPoliciesSettings(),\n clientContext);\n this.getScalingPolicyCallable =\n callableFactory.createUnaryCallable(\n getScalingPolicyTransportSettings, settings.getScalingPolicySettings(), clientContext);\n this.createScalingPolicyCallable =\n callableFactory.createUnaryCallable(\n createScalingPolicyTransportSettings,\n settings.createScalingPolicySettings(),\n clientContext);\n this.createScalingPolicyOperationCallable =\n callableFactory.createOperationCallable(\n createScalingPolicyTransportSettings,\n settings.createScalingPolicyOperationSettings(),\n clientContext,\n this.operationsStub);\n this.deleteScalingPolicyCallable =\n callableFactory.createUnaryCallable(\n deleteScalingPolicyTransportSettings,\n settings.deleteScalingPolicySettings(),\n clientContext);\n this.deleteScalingPolicyOperationCallable =\n callableFactory.createOperationCallable(\n deleteScalingPolicyTransportSettings,\n settings.deleteScalingPolicyOperationSettings(),\n clientContext,\n this.operationsStub);\n this.updateScalingPolicyCallable =\n callableFactory.createUnaryCallable(\n updateScalingPolicyTransportSettings,\n settings.updateScalingPolicySettings(),\n clientContext);\n this.updateScalingPolicyOperationCallable =\n callableFactory.createOperationCallable(\n updateScalingPolicyTransportSettings,\n settings.updateScalingPolicyOperationSettings(),\n clientContext,\n this.operationsStub);\n\n backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }", "@Deprecated\n Policy getEvictionPolicy();", "public String getAdaptiveRateAlgorithm();", "FirewallPolicyService firewallpolicy();", "PrioritizedReactiveTask(Bot bot) {\n exchangeContext(bot);\n }", "@Override\n public Response throttlingPoliciesAdvancedPolicyIdDelete(String policyId, MessageContext messageContext)\n throws APIManagementException {\n APIProvider apiProvider = RestApiCommonUtil.getLoggedInUserProvider();\n String username = RestApiCommonUtil.getLoggedInUsername();\n\n //This will give PolicyNotFoundException if there's no policy exists with UUID\n APIPolicy existingPolicy = null;\n try {\n existingPolicy = apiProvider.getAPIPolicyByUUID(policyId);\n } catch (APIManagementException e) {\n RestApiUtil.handleResourceNotFoundError(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, e, log);\n }\n if (!RestApiAdminUtils.isPolicyAccessibleToUser(username, existingPolicy)) {\n RestApiUtil.handleAuthorizationFailure(RestApiConstants.RESOURCE_ADVANCED_POLICY, policyId, log);\n }\n if (apiProvider.hasAttachments(username, existingPolicy.getPolicyName(), PolicyConstants.POLICY_LEVEL_API)) {\n String message = \"Advanced Throttling Policy \" + existingPolicy.getPolicyName() + \": \" + policyId\n + \" already attached to API/Resource\";\n throw new APIManagementException(message, ExceptionCodes\n .from(ExceptionCodes.ALREADY_ASSIGNED_ADVANCED_POLICY_DELETE_ERROR,\n existingPolicy.getPolicyName()));\n }\n apiProvider.deletePolicy(username, PolicyConstants.POLICY_LEVEL_API, existingPolicy.getPolicyName());\n return Response.ok().build();\n }", "public static APIPolicy createDefaultAPIPolicy() {\n APIPolicy apiPolicy = new APIPolicy(SAMPLE_API_POLICY);\n apiPolicy.setUuid(UUID.randomUUID().toString());\n apiPolicy.setDisplayName(SAMPLE_API_POLICY);\n apiPolicy.setDescription(SAMPLE_API_POLICY_DESCRIPTION);\n apiPolicy.setUserLevel(APIMgtConstants.ThrottlePolicyConstants.API_LEVEL);\n QuotaPolicy defaultQuotaPolicy = new QuotaPolicy();\n defaultQuotaPolicy.setType(REQUEST_COUNT_TYPE);\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1000, 10000);\n defaultQuotaPolicy.setLimit(requestCountLimit);\n apiPolicy.setDefaultQuotaPolicy(defaultQuotaPolicy);\n apiPolicy.setPipelines(createDefaultPipelines());\n return apiPolicy;\n }", "private void refreshLimits() throws IOException, PrivilegedActionException {\n try (InputStream newInputStream = AccessController.doPrivileged(new PrivilegedExceptionAction<InputStream>() {\n @Override\n public InputStream run() throws Exception {\n return delegate.newInputStream(configPath, StandardOpenOption.READ);\n }\n })) {\n Properties properties = new Properties();\n properties.load(newInputStream);\n total = Long.parseLong(properties.getProperty(\"total\"));\n remaining = Long.parseLong(properties.getProperty(\"remaining\"));\n }\n }", "protected void localAdaptation(int messageSize){\n float prev = this.updateRate;\n if (messageSize > this.mtu) {\n this.phiBiggerCounter++;\n // reset smaller counter\n this.phiSmallerCounter = 0;\n }else if (messageSize < this.mtu){\n this.phiSmallerCounter++;\n this.phiBiggerCounter = 0;\n }\n\n // check if a counter has surpassed the threshold\n if (this.phiBiggerCounter >= this.phiBiggerMax){\n this.updateRate = this.alpha * this.updateRate;\n this.phiBiggerCounter = 0; // reset counter\n }\n if (this.phiSmallerCounter >= this.phiSmallerMax){\n this.updateRate = Math.min(this.updateRate + this.beta, mtu);\n this.phiSmallerCounter = 0; // reset counter\n }\n // in case we were not updating before and the new updateRate is > 0. Need to start updating again.\n if (prev == 0 && this.updateRate > 0){\n scheduleUpdateTimeout(Math.round(1000/this.updateRate), TimeUnit.MILLISECONDS);\n }\n }", "protected GrpcScalingPoliciesServiceStub(\n ScalingPoliciesServiceStubSettings settings, ClientContext clientContext) throws IOException {\n this(settings, clientContext, new GrpcScalingPoliciesServiceCallableFactory());\n }", "public interface PrefetchAlgorithm {\n Map<Request, Long> schedule(Collection<Request> requests, RatePredictionService ratePredictionService);\n\n void configure(Map<String, String> configuration);\n}" ]
[ "0.591083", "0.57961327", "0.5763568", "0.5747242", "0.5737264", "0.5483732", "0.5447894", "0.5309138", "0.5302609", "0.5242709", "0.52184355", "0.520119", "0.514049", "0.51020086", "0.5081573", "0.5073204", "0.5021939", "0.49523503", "0.48900878", "0.4862454", "0.4852923", "0.4846053", "0.4836358", "0.4775197", "0.47703123", "0.47506142", "0.47206724", "0.46527067", "0.4649012", "0.46465364", "0.46346754", "0.46298766", "0.46281183", "0.4624363", "0.45940298", "0.45596883", "0.455409", "0.45498085", "0.45423043", "0.45410952", "0.4536374", "0.45358598", "0.45098174", "0.45091563", "0.4486326", "0.44856974", "0.44657183", "0.44599712", "0.4459573", "0.4458602", "0.43608436", "0.43504828", "0.43489432", "0.43280187", "0.43099967", "0.43099967", "0.4308166", "0.4301131", "0.42720023", "0.427073", "0.42496523", "0.4245642", "0.42392972", "0.42341736", "0.42224818", "0.42219752", "0.42166668", "0.4216525", "0.42041376", "0.42025304", "0.4200855", "0.41726547", "0.4169775", "0.41633198", "0.41607684", "0.41392514", "0.41281587", "0.41229403", "0.4122192", "0.41147497", "0.41029274", "0.40991342", "0.40908936", "0.40802678", "0.4057511", "0.40563387", "0.40552902", "0.4052122", "0.4050112", "0.4042985", "0.40397334", "0.40340716", "0.40282348", "0.40247893", "0.40238592", "0.40136003", "0.40082622", "0.40037203", "0.40030223", "0.4000634" ]
0.7506991
0
Creates a new index rebuild future that should be completed later after exchange is done. The future has to be created before exchange is initialized to guarantee that we will capture a correct future after activation or restore completes. If there was an old future for the given ID, it will be completed.
private void prepareIndexRebuildFuture(int cacheId) { GridFutureAdapter<Void> old = idxRebuildFuts.put(cacheId, new GridFutureAdapter<>()); if (old != null) old.onDone(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private BlockingFuture setRetractingFuture(ATFarReference reference) {\n\t\t// first assign future to a local variable to avoid race conditions on writing to the outboxFuture_ variable!\n\t\tfinal BlockingFuture future = new BlockingFuture();\n\t\tsynchronized(this) { \n\t\t\t// synchronized access because different thread in the pool could\n\t\t\t// be processing retractUnsentMessages requests for different references. \n\t\t\tretractFutures_.put(reference, future);\n\t\t}\n\t\treturn future;\n\t}", "@Test\n public void testNoCheckpointAfterIndexCreation() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 0);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> idxRebFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(idxRebFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n idxRebFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(10, selectPersonByName(n.cache(cacheName)).size());\n }", "public synchronized void recreateIndex()\n throws InterruptedException, CancellationException, ExecutionException, IOException, IndexServiceException {\n // Clear index first\n clear();\n recreateService(IndexRecreateObject.Service.Groups);\n recreateService(IndexRecreateObject.Service.Acl);\n recreateService(IndexRecreateObject.Service.Themes);\n recreateService(IndexRecreateObject.Service.Series);\n recreateService(IndexRecreateObject.Service.Scheduler);\n recreateService(IndexRecreateObject.Service.Workflow);\n recreateService(IndexRecreateObject.Service.AssetManager);\n recreateService(IndexRecreateObject.Service.Comments);\n }", "@Test\n public void testPartialCheckpointNewIndexRows() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 100_000, false);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 10);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n String reason = getTestIgniteInstanceName();\n IgniteInternalFuture<Void> awaitBeforeCpBeginFut = awaitBeforeCheckpointBeginAsync(n, reason);\n IgniteInternalFuture<Void> disableCpFut = enableCheckpointsAsync(n, reason, false);\n\n awaitBeforeCpBeginFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n\n disableCpFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.sleepTime.set(0);\n\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> rebIdxFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(rebIdxFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n rebIdxFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(100_000, selectPersonByName(n.cache(cacheName)).size());\n }", "@Timed\n @Async\n Future<Integer> reindexSearchDatabase();", "FutureReservation createFutureReservation();", "@Test\n public void testGeneralFlow() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 0);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n enableCheckpointsAsync(n, getTestIgniteInstanceName(), true).get(getTestTimeout());\n\n checkNoStatus(n, cacheName);\n }", "@ManagedOperation(description = \"Starts rebuilding the index\", displayName = \"Rebuild index\")\n void start();", "private static PortfolioKey createSingleFuturePortfolio(final ToolContext toolContext, final ExternalId futureTicker, final ExternalId tradeId) {\n final List<SimplePosition> positions = new ArrayList<>();\n final ExternalId marketDataId = futureTicker;\n final long tradeQuantity = 1;\n final long positionQuantity = 1;\n final FutureSecurity security = new EnergyFutureSecurity(new Expiry(ZonedDateTime.now().plusMonths(3)), \"EXCH\", \"EXCH\", Currency.USD, 1000, \"Energy\");\n security.addExternalId(marketDataId);\n security.addExternalId(tradeId);\n final SimpleTrade trade = new SimpleTrade(security, BigDecimal.valueOf(tradeQuantity), new SimpleCounterparty(ExternalId.of(\"Test\", \"Ctpty\")), \n LocalDate.now().minusDays(7), OffsetTime.now());\n trade.addAttribute(ManageableTrade.meta().providerId().name(), tradeId.toString());\n final SimplePosition position = new SimplePosition();\n position.addAttribute(ManageableTrade.meta().providerId().name(), tradeId.toString());\n position.setSecurityLink(SimpleSecurityLink.of(security));\n position.setQuantity(BigDecimal.valueOf(positionQuantity));\n position.addTrade(trade);\n positions.add(position);\n final SimplePortfolio portfolio = new SimplePortfolio(\"Test\");\n final SimplePortfolioNode node = new SimplePortfolioNode(\"Test\");\n portfolio.getRootNode().addChildNode(node);\n node.addPositions(positions);\n return new PortfolioManager(toolContext).savePortfolio(portfolio);\n }", "@Test\n public void testErrorFlow() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n BreakBuildIndexConsumer breakBuildIdxConsumer = addBreakIdxCreateConsumer(n, idxName, 1);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n breakBuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n breakBuildIdxConsumer.finishBuildIdxFut.onDone();\n assertThrows(log, () -> createIdxFut.get(getTestTimeout()), IgniteCheckedException.class, null);\n\n checkCompletedStatus(n, cacheName);\n\n enableCheckpointsAsync(n, getTestIgniteInstanceName(), true).get(getTestTimeout());\n\n checkNoStatus(n, cacheName);\n }", "public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}", "private synchronized ListenableFuture<?> getFutureStateChange()\n {\n if (!exchangeClient.isClosed()) {\n return exchangeClient.isBlocked();\n }\n\n // otherwise, wait for the query to finish\n queryManager.recordHeartbeat(queryId);\n try {\n return queryDoneFuture(queryManager.getQueryState(queryId));\n }\n catch (NoSuchElementException e) {\n return immediateFuture(null);\n }\n }", "public void move_creation_to_other_thread() {\n ExecutorService executor = Executors.newCachedThreadPool();\n\n CompletableFuture<Void> start = new CompletableFuture<>();\n CompletableFuture<List<Long>> readIds = start.thenCompose(nil -> getUserIds());\n readIds.thenRun(() -> System.out.println(\"ids read\"));\n readIds.thenCompose(this::getUsersFromDb).thenCompose(this::sendEmails);\n\n start.completeAsync(() -> null, executor);\n executor.shutdown();\n }", "public static ExtractionServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ExtractionServiceFutureStub>() {\n @Override\n public ExtractionServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ExtractionServiceFutureStub(channel, callOptions);\n }\n };\n return ExtractionServiceFutureStub.newStub(factory, channel);\n }", "@RequestMapping(value = \"search/async/index\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\n public @ResponseBody String createIndexAsync(@RequestBody String body) {\n Map<String,Object> request = gson.fromJson(body, Map.class);\n Map<String,Object> responseMap = new HashMap<>(0);\n try {\n log.debug(\"starting index creation process in async mode\");\n ftsSearchService.createTsvectorIndexAsync(request);\n responseMap.put(Field.RESULT, \"scheduled\");\n responseMap.put(Field.MESSAGE, \"check later for index create status\");\n responseMap.put(Field.ERROR,false);\n } catch (Exception e) {\n log.error(\"failed index creation {}\",e);\n log.error(\"index create error: {}\",e.getMessage());\n responseMap.put(Field.ERROR,true);\n responseMap.put(Field.ERROR_MSG,e.getMessage());\n }\n return gson.toJson(responseMap);\n }", "<R> R transactNew(Supplier<R> work) {\n // Wrap the Work in a CommitLoggedWork so that we can give transactions a frozen view of time\n // and maintain commit logs for them.\n return transactCommitLoggedWork(new CommitLoggedWork<>(work, getClock()));\n }", "public static Result changeIndice(String newIndice) {\n\n\t\ttry {\n\t\t\tFunction<String, Boolean> chind = ( (newInd) -> (ElasticReindexer.reindexOnANewIndice(Elastic.old_index, newInd)) );\n\t\t\tParallelAPICall.createPromise(chind, newIndice);\n\t\t} catch(Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\treturn internalServerError(e.getMessage());\n\t\t}\n\n\t\treturn ok();\n\t}", "public CompletableFuture<ServerScheduledEvent> create() {\n return delegate.create();\n }", "public ScheduledFuture create() {\n this.theFuture = scheduler.scheduleAtFixedRate(\n new StationRunner(dataService, rasterManager), 0, interval, TimeUnit.MINUTES);\n log.info(\"Registered runner for updating state of sharing stations. (at interval of {})\", interval);\n return theFuture;\n }", "public static ShippingServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ShippingServiceFutureStub>() {\n @java.lang.Override\n public ShippingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ShippingServiceFutureStub(channel, callOptions);\n }\n };\n return ShippingServiceFutureStub.newStub(factory, channel);\n }", "public CompletableFuture<Void> attach(long id);", "private <T> Future<T> newFuture(final T response) {\n FutureTask<T> t = new FutureTask<T>(new Callable<T>() {\n @Override\n public T call() {\n return response;\n }\n });\n t.run();\n return t;\n }", "String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}", "@SneakyThrows\n private UniqueGbifIdTransform runAsync() {\n Consumer<ExtendedRecord> interpretIdFn = filterByGbifId();\n\n // Run async\n CompletableFuture<?>[] idFutures =\n erMap.values().stream()\n .map(v -> CompletableFuture.runAsync(() -> interpretIdFn.accept(v), executor))\n .toArray(CompletableFuture[]::new);\n CompletableFuture.allOf(idFutures).get();\n\n return this;\n }", "@Override\n public void beforeRerunningIndexCreationQuery() {\n Thread th = new Thread(() -> {\n // Assert that the size of region is now 0\n assertTrue(region.size() == 0);\n region.put(\"\" + 8, new Portfolio(8));\n });\n th.start();\n ThreadUtils.join(th, 30 * 1000);\n assertTrue(region.size() == 1);\n }", "public Builder addReault(\n int index, com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult.Builder builderForValue) {\n if (reaultBuilder_ == null) {\n ensureReaultIsMutable();\n reault_.add(index, builderForValue.build());\n onChanged();\n } else {\n reaultBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public static OrganizationServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<OrganizationServiceFutureStub>() {\n @java.lang.Override\n public OrganizationServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new OrganizationServiceFutureStub(channel, callOptions);\n }\n };\n return OrganizationServiceFutureStub.newStub(factory, channel);\n }", "public OperationFutureImpl(\n RetryingFuture<OperationSnapshot> pollingFuture,\n ApiFuture<OperationSnapshot> initialFuture,\n ApiFunction<OperationSnapshot, ResponseT> responseTransformer,\n ApiFunction<OperationSnapshot, MetadataT> metadataTransformer) {\n this.pollingFuture = checkNotNull(pollingFuture);\n this.initialFuture = checkNotNull(initialFuture);\n this.resultFuture = ApiFutures.transform(pollingFuture, responseTransformer, directExecutor());\n this.metadataTransformer = checkNotNull(metadataTransformer);\n }", "@Test\r\n\tpublic void indexOneLater() throws Exception {\n\t\tSolrInputDocument sd = new SolrInputDocument();\r\n\t\tsd.addField(\"id\", \"addone\");\r\n\t\tsd.addField(\"channelid\", \"9999\");\r\n\t\tsd.addField(\"topictree\", \"tptree\");\r\n\t\tsd.addField(\"topicid\", \"tpid\");\r\n\t\tsd.addField(\"dkeys\", \"测试\");\r\n\t\tsd.addField(\"title\", \"junit 标题\");\r\n\t\tsd.addField(\"ptime\", new Date());\r\n\t\tsd.addField(\"url\", \"/junit/test/com\");\r\n//\t\t\tSystem.out.println(doc);\r\n//\t\tbuffer.add(sd);\r\n\t\tdocIndexer.addDocumentAndCommitLater(sd, 1);\r\n\t}", "private void runLater(String table, String id, Operation r) {\n\t\tif (captureHitRatio)\n\t\t\trequestsIn.increment();\n\t\tRowInTable element = new RowInTable(table, id);\n\t\twhile(true) {\n\t\t\tStoreRequest req = new StoreRequest(element);\n\t\t\tStoreRequest tmp = writesByRows.putIfAbsent(element, req);\n\t\t\ttry {\n\t\t\t\tif (tmp == null) {\n\t\t\t\t\t// req was added ; should also be put in the delay queue\n\t\t\t\t\treq.plan();\n\t\t\t\t\tlogger.fine(\"Request planned for \" + table + ':' + id + \" on \" + System.currentTimeMillis() + \" by \" + req);\n\t\t\t\t} else {\n\t\t\t\t\t// Another thread added request for this element before us\n\t\t\t\t\treq = tmp;\n\t\t\t\t}\n\t\t\t\tr.run(req);\n\t\t\t\t// Request is planned and merged ; leaving the infinite loop\n\t\t\t\tbreak;\n\t\t\t} catch (RequestIsOutException x) {\n\t\t\t\t// We've tried to update a request that went out meanwhile\n\t\t\t}\n\t\t\t// retrying eventually\n\t\t\tThread.yield();\n\t\t}\n\t}", "public static ArtifactRegistryFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ArtifactRegistryFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ArtifactRegistryFutureStub>() {\n @java.lang.Override\n public ArtifactRegistryFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ArtifactRegistryFutureStub(channel, callOptions);\n }\n };\n return ArtifactRegistryFutureStub.newStub(factory, channel);\n }", "@Async.Schedule\n public <T> IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb);", "@NonNull\n public Trigger build() {\n JsonPredicate predicate;\n if (UAStringUtil.isEmpty(regionId)) {\n predicate = null;\n } else {\n predicate = JsonPredicate.newBuilder()\n .addMatcher(JsonMatcher.newBuilder()\n .setKey(RegionEvent.REGION_ID)\n .setValueMatcher(ValueMatcher.newValueMatcher(JsonValue.wrap(regionId)))\n .build())\n .build();\n }\n\n return new Trigger(type, goal, predicate);\n }", "OperationContinuation createOperationContinuation();", "public static RoutesFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<RoutesFutureStub>() {\n @java.lang.Override\n public RoutesFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new RoutesFutureStub(channel, callOptions);\n }\n };\n return RoutesFutureStub.newStub(factory, channel);\n }", "Builder makeTemporary(int timeout);", "private Reindex() {}", "private Reindex() {}", "private IndexerModelEvent refreshIndex(final String indexName) throws InterruptedException, KeeperException {\n try {\n IndexDefinitionImpl index = loadIndex(indexName);\n index.makeImmutable();\n final boolean isNew = !indexes.containsKey(indexName);\n indexes.put(indexName, index);\n \n return new IndexerModelEvent(isNew ? IndexerModelEventType.INDEX_ADDED : IndexerModelEventType.INDEX_UPDATED, indexName);\n \n } catch (IndexNotFoundException e) {\n indexes.remove(indexName);\n \n return new IndexerModelEvent(IndexerModelEventType.INDEX_REMOVED, indexName);\n }\n }", "public AnActionEvent createAnActionEvent(String fileName) throws TimeoutException, ExecutionException {\r\n if(fileName!=null) {\r\n myFixture.configureByFile(\"testData/traversePsi/\" + fileName);\r\n }\r\n\r\n AnAction anAction = new AnAction() {\r\n @Override\r\n public void actionPerformed(@NotNull AnActionEvent e) {\r\n // do nothing\r\n }\r\n };\r\n\r\n Promise<DataContext> contextResult = DataManager.getInstance().getDataContextFromFocusAsync();\r\n AnActionEvent anActionEvent = new AnActionEvent(null, contextResult.blockingGet(10, TimeUnit.SECONDS),\r\n \"\", anAction.getTemplatePresentation(), ActionManager.getInstance(), 0);\r\n\r\n return anActionEvent;\r\n }", "public LuceneIndexerRunnable(Long indexId, LuceneFactory luceneFactory) {\n\t\tthis.indexId = indexId;\n\t\tthis.luceneFactory = luceneFactory;\n\t\tbatchSize = Constants.getLuceneBatchsize() != null ? Constants.getLuceneBatchsize() : 500L;\n\t\tintervalSeconds = Constants.getLuceneIntervalSeconds() != null ? Constants.getLuceneIntervalSeconds() : 5L;\n\t\tcloseCloseTimeOutSeconds = Constants.getLuceneCloseTimeOutSeconds() != null ? Constants.getLuceneCloseTimeOutSeconds() : 100L;\n\t\tmaxIdleCount = closeCloseTimeOutSeconds / intervalSeconds; \n\t}", "void transactNew(Runnable work) {\n transactNew(\n () -> {\n work.run();\n return null;\n });\n }", "public Task build() {\n return new Task(moduleName, taskId, taskName, taskDeadline, isComplete);\n }", "public JsObjVal set(final String key,\n final Val<? extends JsValue> future\n ) {\n final Map<String, Val<? extends JsValue>> a = bindings.put(requireNonNull(key),\n requireNonNull(future)\n );\n return new JsObjVal(a);\n }", "public interface LightFuture<T> {\n /**\n * Returns {@code true} then task is finished.\n */\n boolean isReady();\n\n /**\n * Returns result of work.\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n T get() throws InterruptedException, LightExecutionException;\n\n /**\n * Applies mapping to result of the task to get a new task.\n * @param mapping function to get new task from the result\n * of the previous\n * @param <U> return value of new task\n * @return new task\n * @throws InterruptedException if waiting for the result to compute fails\n * @throws LightExecutionException if computation ends up with an exception\n */\n @NotNull\n <U> LightFuture<U> thenApply(Function<? super T, U> mapping) throws InterruptedException, LightExecutionException;\n}", "private int rebuild() {\n String rebuildPath = \"/graphs/hugegraph/jobs/rebuild/indexlabels\";\n String personByCity = \"personByCity\";\n Map<String, Object> params = ImmutableMap.of();\n Response r = client().put(rebuildPath, personByCity, \"\", params);\n String content = assertResponseStatus(202, r);\n return assertJsonContains(content, \"task_id\");\n }", "public static IndexType getType(final byte id) {\n final IndexType indexType = INSTANCEFORID.get(id);\n if (indexType == null) {\n throw new IllegalStateException();\n }\n return indexType;\n }", "public Callable<?> getInitializationTask()\n {\n return isBuilt() || baseCfs.isEmpty() ? null : getBuildIndexTask();\n }", "@Async.Schedule\n public <T> IgniteInternalFuture<T> chain(IgniteClosure<? super IgniteInternalFuture<R>, T> doneCb, Executor exec);", "public interface Future<T> extends AsyncResult<T> {\n\n final class Factory {\n\n public static <T> Future<T> failedFuture(String failureMessage) {\n return new FutureImpl<>(failureMessage, false);\n }\n\n public static <T> Future<T> failedFuture(Throwable t) {\n return new FutureImpl<>(t);\n }\n\n public static <T> Future<T> future() {\n return new FutureImpl<>();\n }\n\n public static <T> Future<T> succeededFuture() {\n return new FutureImpl<>((Throwable) null);\n }\n\n public static <T> Future<T> succeededFuture(T result) {\n return new FutureImpl<>(result);\n }\n }\n\n void complete();\n\n void complete(T result);\n\n void fail(String failureMessage);\n\n void fail(Throwable throwable);\n\n boolean isComplete();\n\n void setHandler(Handler<AsyncResult<T>> handler);\n}", "public Future<Void> wait(Integer id) throws DynamicCallException, ExecutionException{\n return call(\"wait\", id);\n }", "@Test\r\n\tpublic void test_basicWrap() throws InterruptedException, ExecutionException {\r\n\t\t\r\n\t\tfinal MockElasticsearchCrudServiceFactory factory = new MockElasticsearchCrudServiceFactory();\t\t\r\n\r\n\t\t// Create an index just so we can delete it (will error if already exists, so just ignore result):\r\n\r\n\t\tCompletableFuture<String> s0 = \r\n\t\t\t\tElasticsearchFutureUtils.wrap(factory.getClient().admin().indices().prepareCreate(\"index_for_wrap_test\").execute(), __ -> \"created\");\r\n\t\t\r\n\t\ttry { s0.get(); } catch (Exception e) {}\r\n\t\t\r\n\t\t// Delete it, check that the wrapper is applied: \r\n\r\n\t\tCompletableFuture<String> s1 = \r\n\t\t\t\tElasticsearchFutureUtils.wrap(factory.getClient().admin().indices().prepareDelete(\"index_for_wrap_test\").execute(), __ -> \"deleted\");\r\n\t\t\r\n\t\tassertEquals(\"deleted\", s1.get());\r\n\t\t\r\n\t\t// Now delete it again, check that is fails this time\r\n\t\t\r\n\t\tCompletableFuture<String> s2 = \r\n\t\t\t\tElasticsearchFutureUtils.wrap(factory.getClient().admin().indices().prepareDelete(\"index_for_wrap_test\").execute(), __ -> \"test2\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\ts2.get();\r\n\t\t\tfail(\"Should have thrown exception here\");\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\t// we're done!\r\n\t\t}\r\n\t\t\r\n\t}", "@Test\n public void testMultiIndexCreation() {\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(1);\n setCacheInVMs(vm0);\n vm0.invoke(helper.getCacheSerializableRunnableForReplicatedRegionCreation(regionName));\n\n ArrayList<String> names = new ArrayList<>();\n names.add(indexName);\n names.add(rindexName);\n\n ArrayList<String> exps = new ArrayList<>();\n exps.add(indexedExpression);\n exps.add(rindexedExpression);\n\n ArrayList<String> fromClauses = new ArrayList<>();\n fromClauses.add(fromClause);\n fromClauses.add(rfromClause);\n\n vm0.invoke(\n helper.getCacheSerializableRunnableForDefineIndex(regionName, names, exps, fromClauses));\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[2];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 30 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n }", "public final Nfa build() {\n accepts();\n return buildNoAccept();\n }", "@NonNull\n public Trigger build() {\n return new Trigger(type, goal, null);\n }", "protected void createIdTokenForRefreshRequest() {\n\t\tgenerateIdTokenClaims();\n\n\t\taddAtHashToIdToken();\n\n\t\taddCustomValuesToIdTokenForRefreshResponse();\n\n\t\tsignIdToken();\n\n\t\tcustomizeIdTokenSignatureForRefreshResponse();\n\n\t\tencryptIdTokenIfNecessary();\n\t}", "public AsyncResolver(String name,\n ClusterResolver<T> delegate,\n List<T> initialValues,\n int executorThreadPoolSize,\n int refreshIntervalMs) {\n this(\n name,\n delegate,\n initialValues,\n executorThreadPoolSize,\n refreshIntervalMs,\n 0\n );\n\n warmedUp.set(true);\n }", "public static DoctorServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<DoctorServiceFutureStub>() {\n @java.lang.Override\n public DoctorServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new DoctorServiceFutureStub(channel, callOptions);\n }\n };\n return DoctorServiceFutureStub.newStub(factory, channel);\n }", "public synchronized int resize(int newBytesPerId, int newBytesPerType, int newBytesPerPath)\n throws IOException {\n if (this.bytesPerId > newBytesPerId && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per id when there are entries in the index\");\n if (this.bytesPerType > newBytesPerType && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per type when there are entries in the index\");\n if (this.bytesPerPath > newBytesPerPath && this.entries > 0)\n throw new IllegalStateException(\"Cannot reduce the number of bytes per path when there are entries in the index\");\n if (this.isReadOnly)\n throw new IllegalStateException(\"This index is readonly\");\n \n int newBytesPerSlot = newBytesPerId + newBytesPerType + newBytesPerPath;\n \n logger.info(\"Resizing uri index to {} ({}) slots and {} ({}) bytes per entry\", new Object[] { slots, this.slots, newBytesPerSlot, this.bytesPerSlot });\n \n String fileName = FilenameUtils.getBaseName(idxFile.getName());\n String fileExtension = FilenameUtils.getExtension(idxFile.getName());\n String idxFilenameNew = fileName + \"_resized.\" + fileExtension;\n File idxNewFile = new File(idxFile.getParentFile(), idxFilenameNew);\n long time = System.currentTimeMillis();\n \n logger.debug(\"Creating resized index at \" + idxNewFile);\n \n // Create the new index\n RandomAccessFile idxNew = null;\n try {\n idxNew = new RandomAccessFile(idxNewFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n // Write header\n idxNew.seek(IDX_START_OF_HEADER);\n idxNew.writeInt(indexVersion);\n idxNew.writeInt(newBytesPerId);\n idxNew.writeInt(newBytesPerType);\n idxNew.writeInt(newBytesPerPath);\n idxNew.writeLong(slots);\n idxNew.writeLong(entries);\n \n // Position to read the whole content\n idx.seek(IDX_START_OF_CONTENT);\n \n // Write entries\n for (int i = 0; i < slots; i++) {\n byte[] bytes = new byte[newBytesPerSlot];\n if (i < this.slots) {\n idx.read(bytes, 0, this.bytesPerSlot);\n idxNew.write(bytes);\n } else {\n // Write an empty line\n idxNew.write(bytes);\n }\n }\n \n logger.debug(\"Removing old index at \" + idxFile);\n \n // Close and delete the old index\n idx.close();\n if (!idxFile.delete())\n throw new IOException(\"Unable to delete old index file \" + idxFile);\n \n // Close the new index, and move it into the old index' place\n logger.debug(\"Moving resized index into regular position at \" + idxFile);\n idxNew.close();\n if (!idxNewFile.renameTo(idxFile))\n throw new IOException(\"Unable to move new index file to \" + idxFile);\n \n try {\n idx = new RandomAccessFile(idxFile, \"rwd\");\n } catch (FileNotFoundException e) {\n throw new IllegalArgumentException(\"Index file \" + idxNewFile + \" cannot be created: \" + e.getMessage(), e);\n }\n \n this.bytesPerSlot = newBytesPerSlot;\n this.bytesPerId = newBytesPerId;\n this.bytesPerType = newBytesPerType;\n this.bytesPerPath = newBytesPerPath;\n \n time = System.currentTimeMillis() - time;\n logger.info(\"Uri index resized in {}\", ConfigurationUtils.toHumanReadableDuration(time));\n return newBytesPerSlot;\n }", "public boolean build(String path) {\n\n logger.info(\"build up inverted index\");\n if (!path.equals(setting.EDGE_INVERTED_INDEX) &&\n !path.equals(setting.VERTEX_INVERTED_INDEX))\n throw new IllegalStateException(\"base path got to be \"+setting.EDGE_INVERTED_INDEX+\" or \"+setting.VERTEX_INVERTED_INDEX);\n\n try (BufferedReader idBufReader = new BufferedReader(new FileReader(path + \"_id.compressed\"));\n BufferedReader trajBufReader = new BufferedReader(new FileReader(path + \"_trajId.compressed\"));\n BufferedReader posBufReader = new BufferedReader(new FileReader(path + \"_pos.compressed\"))) {\n\n //idString either be edge id or tower point id.\n String trajIdLine, posLine, idString;\n while ((idString = idBufReader.readLine()) != null) {\n\n trajIdLine = trajBufReader.readLine();\n posLine = posBufReader.readLine();\n\n String[] trajArray = trajIdLine.split(SEPARATOR_1), posArray = posLine.split(SEPARATOR_1);\n int[] trajIDs = new int[trajArray.length], posis = new int[posArray.length];\n for (int i = 0; i < trajIDs.length; i++) trajIDs[i] = Integer.parseInt(trajArray[i]);\n for (int i = 0; i < posArray.length; i++) posis[i] = Integer.parseInt(posArray[i]);\n\n\n CompressedPairs p = new CompressedPairs();\n p.trajIds = trajIDs;\n p.posis = posis;\n compressedIndex.put(Integer.valueOf(idString), p);\n }\n\n loaded = true;\n logger.info(\"inverted index build complete\");\n return true;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n logger.info(\"edge dataStructure file doesn't exist\");\n return false;\n }", "public abstract void commitLastReInitializationAsync(ContainerId containerId);", "public static ProductServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<ProductServiceFutureStub>() {\n @java.lang.Override\n public ProductServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new ProductServiceFutureStub(channel, callOptions);\n }\n };\n return ProductServiceFutureStub.newStub(factory, channel);\n }", "@Override\n public void onSuccess(List<VMResource> result) {\n newFile.setName(checkDuplicateName(result, fileName, newFile.getExtension(), 0));\n ZGCreateFileCommand createFileCommand = new ZGCreateFileCommand(editResourceService, viewHandler, dirID, newFile, null);\n createFileCommand.addCommandListener(new CommandListener() {\n\n @Override\n public void undoEvent() {\n treeGrid.deselectAllRecords();\n fileTreeNodeFactory.removeVMResource(createFileCommand.getFileId());\n fileTreeNodeFactory.refresh(editorTabSet, tree, tabRegs);\n treeGrid.sort();\n treeGrid.redraw();\n }\n\n @Override\n public void redoEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n }\n\n @Override\n public void executeEvent() {\n createCallbackFile(fileTreeNodeFactory.findTreeNode(tree, createFileCommand.getParentId()), createFileCommand.getFile(),\n createFileCommand.getFileId(), true);\n editResourceService.getFileContent(createFileCommand.getFileId(), new AsyncCallback<byte[]>() {\n\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(byte[] result) {\n BinaryResourceImpl r = new BinaryResourceImpl();\n ByteArrayInputStream bi = new ByteArrayInputStream(result);\n EPackage.Registry.INSTANCE.put(FSMPackage.eNS_URI, FSMPackage.eINSTANCE);\n\n FSMDStateMachine machine = null;\n try {\n r.load(bi, EditOptions.getDefaultLoadOptions());\n machine = (FSMDStateMachine) r.getContents().get(0);\n } catch (IOException e) {\n SC.warn(e.getMessage());\n }\n ARCState newState = ARCFactory.eINSTANCE.createARCState();\n newState.setFileId(machine.getId());\n newState.setTop(arcEditor.getStateTop());\n newState.setLeft(arcEditor.getStateLeft());\n newState.setHeight(40);\n newState.setWidth(80);\n newState.setEvalPriority(arcEditor.getMaxEvalPriority());\n\n CompoundCommand cmd = ARCEditorCommandProvider.getInstance().addState(arcEditor.getARCRoot(), newState,\n arcEditor.getARCRoot().getStates().size());\n arcEditor.getEditManager().execute(cmd.unwrap());\n arcEditor.refresh();\n }\n });\n }\n\n @Override\n public void bindEvent() {\n viewHandler.clear();\n registerRightClickEvent();\n }\n });\n CompoundCommand c = new CompoundCommand();\n c.append(createFileCommand);\n manager.execute(c.unwrap());\n }", "public static EntityServantFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new EntityServantFutureStub(channel);\n }", "public Builder setReault(\n int index, com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult.Builder builderForValue) {\n if (reaultBuilder_ == null) {\n ensureReaultIsMutable();\n reault_.set(index, builderForValue.build());\n onChanged();\n } else {\n reaultBuilder_.setMessage(index, builderForValue.build());\n }\n return this;\n }", "public TransferCompra iniciarCompra(int id){\n\t\t\n\t\t//Creamos una nueva transacción y la iniciamos.\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\t\n\t\t//Montamos los Transfer\n\t\tTransferCompra tCompra = null;\n\t\tTransferCliente tCliente = FactoriaDAO.getInstance().createDAOCliente().searchId(id);\n\t\t\n\t\t//Si existe el cliente y esta activo\n\t\tif(tCliente != null && tCliente.getActivo())\n\t\t\ttCompra = new TransferCompra((int)tCliente.getId(), 0, true);\n\t\t\n\t\t//Finalmente cerramos la transación\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\t\n\t\treturn tCompra;\n\t}", "@Async.Schedule\n public <T> IgniteInternalFuture<T> chain(IgniteOutClosure<T> doneCb, Executor exec);", "public Builder addDelivered(\n int index, WorldUps.UDeliveryMade.Builder builderForValue) {\n if (deliveredBuilder_ == null) {\n ensureDeliveredIsMutable();\n delivered_.add(index, builderForValue.build());\n onChanged();\n } else {\n deliveredBuilder_.addMessage(index, builderForValue.build());\n }\n return this;\n }", "public WorldUps.UDeliveryMade.Builder getDeliveredBuilder(\n int index) {\n return getDeliveredFieldBuilder().getBuilder(index);\n }", "public void run() {\n\t\t\t\t\tboolean b = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tb = IreportRmiClient.rmiInterfactRemote.generateIndex();\r\n\t\t\t\t\t\tif (!b) {\r\n\t\t\t\t\t\t\t// 0个索引文件\r\n\t\t\t\t\t\t\tAddedOperator.log(\"索引到0个文件..可能你的路径配置错误,请查看服务端输出信息\",\r\n\t\t\t\t\t\t\t\t\tIreportConstant.WARN_);\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tAddedOperator.log(\"新建索引成功\", IreportConstant.RIGHT_);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tAddedOperator.log(\"新建索引错误:\" + e.getMessage(),\r\n\t\t\t\t\t\t\t\tIreportConstant.ERROR_);\r\n\t\t\t\t\t\tDialogFactory.showErrorMessageDialog(jb,\r\n\t\t\t\t\t\t\t\te.getMessage(), \"新建索引错误\");\r\n\t\t\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "public DispatchRouteHistoricalEntry build() {\r\n return dispatchRouteHistoricalEntry;\r\n }", "public Builder addReault(\n int index, com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult value) {\n if (reaultBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReaultIsMutable();\n reault_.add(index, value);\n onChanged();\n } else {\n reaultBuilder_.addMessage(index, value);\n }\n return this;\n }", "@Scheduled(fixedRate = 5000)\n public void refreshAllIndex() {\n\n HashMap<String, String> dictlist = new HashMap<>();\n\n //get the file list\n try {\n dictlist = FileUtil.subFolderList(fieryConfig.getIndexpath());\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n //load all index if not contain on folder\n for (Map.Entry<String, String> e : dictlist.entrySet()) {\n String foldername = e.getKey();\n String folderpath = e.getValue();\n if (!readerList.containsKey(foldername)) {\n log.info(\"start load index foldername:\" + foldername + \" abspath:\" + folderpath);\n //open index\n boolean ret = this.openIndex(foldername, folderpath);\n\n //warning this may cause bug\n //loaded fail? clean it\n if (!ret) {\n FileUtil.deleteDir(folderpath);\n }\n }\n }\n\n\n /////////////////////\n // recycle expire index\n /////////////////////\n for (Map.Entry<String, DirectoryReader> e : readerList.entrySet()) {\n String dbname = e.getKey();\n\n try {\n Long dbtime = Long.parseLong(dbname);\n\n if (dbtime < DateTimeHepler.getBeforDay(fieryConfig.getKeepdataday())) {\n //closed all\n if (analyzerList.containsKey(dbname)) {\n analyzerList.get(dbname).close();\n analyzerList.remove(dbname);\n }\n if (directorList.containsKey(dbname)) {\n directorList.get(dbname).close();\n directorList.remove(dbname);\n }\n if (readerList.containsKey(dbname)) {\n readerList.get(dbname).close();\n readerList.remove(dbname);\n }\n\n //remove the folder\n FileUtil.deleteDir(fieryConfig.getIndexpath() + \"/\" + dbname);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n\n /////////////////////\n // refresh already loaded index\n /////////////////////\n for (Map.Entry<String, DirectoryReader> e : readerList.entrySet()) {\n\n String dbname = e.getKey();\n DirectoryReader diskReader = e.getValue();\n\n try {\n Date start = new Date();\n\n DirectoryReader tmp = DirectoryReader.openIfChanged(diskReader);\n if (tmp != null) {\n diskReader.close();\n diskReader = tmp;\n readerList.put(dbname, diskReader);\n Date end = new Date();\n log.info(\"Reload Index:\" + dbname + \" cost:\" + (end.getTime() - start.getTime()) + \" totalcount:\" + diskReader.numDocs());\n }\n\n } catch (Exception exx) {\n exx.printStackTrace();\n log.error(exx.getMessage());\n }\n }\n /////////////////////\n //refresh the all in one searcher\n /////////////////////\n\n this.reloadSearch();\n\n }", "public boolean hasFuture();", "public static MetadataServiceFutureStub newFutureStub(io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<MetadataServiceFutureStub>() {\n @java.lang.Override\n public MetadataServiceFutureStub newStub(\n io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new MetadataServiceFutureStub(channel, callOptions);\n }\n };\n return MetadataServiceFutureStub.newStub(factory, channel);\n }", "@Override\n public void execute() throws Throwable\n {\n \tlogger.debug(\"--------- Bucket Refresh \" + localNode.getNodeId() +\"--------\");\n \tfor (MId node : localNode.getRoutingTable().getAllNodes()) {\n \t\tlogger.debug(\" - \" + node.toString());\n\t\t};\n \t\n// \tHashMap<String, Integer> nodeMap = new HashMap<>();\n \t\n for (int i = 1; i < MId.ID_LENGTH; i++)\n {\n /* Construct a NodeId that is i bits away from the current node Id */\n final MId current = (localNode.getNodeId()).generateNodeIdByDistance(i);\n\n// System.nanoTime();\n /* Run the Node Lookup Operation, each in a different thread to speed up things */\n new NodeLookupOperation(localNode, current).execute();\n // System.nanoTime();\n \n// localNode.getLookupEventLoop().execute(new Runnable() {\n//\t\t\t\t@Override\n//\t\t\t\tpublic void run() {\n// try\n// {\n// }\n// catch (IOException e)\n// {\n// //System.err.println(\"Bucket Refresh Operation Failed. Msg: \" + e.getMessage());\n// } catch (Throwable e) {\n//\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t});\n }\n\t\tlogger.debug(\"--------- Bucket Refresh End --------\");\n }", "public static S3InternalServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<S3InternalServiceFutureStub>() {\n @java.lang.Override\n public S3InternalServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new S3InternalServiceFutureStub(channel, callOptions);\n }\n };\n return S3InternalServiceFutureStub.newStub(factory, channel);\n }", "@NonNull\n public Trigger build() {\n JsonPredicate predicate = null;\n if (versionMatcher != null) {\n predicate = VersionUtils.createVersionPredicate(versionMatcher);\n }\n return new Trigger(Trigger.VERSION, goal, predicate);\n }", "public int make() { return this.atomicId.incrementAndGet(); }", "@Override\n \t\t\t\tpublic void operationComplete(ChannelFuture future) throws Exception {\n \t\t\t\t\tif (future.isSuccess()) {\n \t\t\t\t\t\tdetermineNextChannelAction(channel, currentSequenceNumber + 1, follow);\n \t\t\t\t\t}\n \t\t\t\t}", "@SuppressWarnings(\"deprecation\")\n @Override\n public String execute(final TaskHandlerActionContext<ActionContext> inActionContext)\n {\n // ***START DB UPDATES****\n\n // get org id to delete.\n Long orgId = (Long) inActionContext.getActionContext().getParams();\n\n // get org DTO and parent org entity (entity needed later)..\n OrganizationModelView orgDto = orgDTOByIdMapper.execute(Collections.singletonList(orgId)).get(0);\n Organization parentOrg = orgByIdMapper.execute(new FindByIdRequest(\"Organization\", orgDto\n .getParentOrganizationId()));\n\n // move all people/personal stream activities out of org.\n MoveOrganizationPeopleResponse movePeopleResponse = movePeopleMapper.execute(new MoveOrganizationPeopleRequest(\n orgDto.getShortName(), parentOrg.getShortName()));\n\n Set<Long> movedPeopleIds = movePeopleResponse.getMovedPersonIds();\n Set<Long> movedActivityIds = movePeopleResponse.getMovedActivityIds();\n\n // get ids of people that have org as related org.\n Set<Long> relatedOrgPersonIds = relatedOrgPersonIdsMapper.execute(orgId);\n\n // delete the org.\n deleteOrgMapper.execute(orgId);\n\n // recalculate org statistics for branch where org removed.\n OrganizationHierarchyTraverser orgTraverser = orgTraverserBuilder.getOrganizationHierarchyTraverser();\n orgTraverser.traverseHierarchy(parentOrg);\n organizationMapper.updateOrganizationStatistics(orgTraverser);\n\n // ***END DB UPDATES****\n\n // queue up async tasks.\n\n // Only reindex all people that were moved out of org.\n HashSet<String> cacheKeysToRemove = new HashSet<String>();\n for (Long personId : movedPeopleIds)\n {\n inActionContext.getUserActionRequests().add(new UserActionRequest(\"indexPersonById\", null, personId));\n }\n\n // re-cache both moved people and people that had org as related org.\n Set<Long> personCacheKeysToModify = new HashSet<Long>(movedPeopleIds);\n personCacheKeysToModify.addAll(relatedOrgPersonIds);\n for (Long personId : personCacheKeysToModify)\n {\n cacheKeysToRemove.add(CacheKeys.PERSON_BY_ID + personId);\n }\n\n // queue up async tasks to reindex moved activities, add cache key for re-cache.\n for (Long activityId : movedActivityIds)\n {\n inActionContext.getUserActionRequests().add(new UserActionRequest(\"indexActivityById\", null, activityId));\n cacheKeysToRemove.add(CacheKeys.ACTIVITY_BY_ID + activityId);\n }\n\n // reindex and re-cache all orgs up tree from deleted org\n // already have parent orgs from updating stats, so use them again here to avoid more calls to datastores.\n Set<Organization> parentOrgs = orgTraverser.getOrganizations();\n for (Organization org : parentOrgs)\n {\n inActionContext.getUserActionRequests().add(\n new UserActionRequest(\"indexOrganizationById\", null, org.getId()));\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_BY_ID + org.getId());\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_BY_SHORT_NAME + org.getShortName());\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_RECURSIVE_CHILDREN + org.getId());\n }\n\n // remove cache keys for org being deleted.\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_BY_ID + orgId);\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_BY_SHORT_NAME + orgDto.getShortName());\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_RECURSIVE_CHILDREN + orgId);\n\n // remove org from search index\n inActionContext.getUserActionRequests().add(\n new UserActionRequest(\"deleteFromSearchIndexAction\", null, new DeleteFromSearchIndexRequest(\n Organization.class, Arrays.asList(orgId))));\n\n // remove org tree DTO\n cacheKeysToRemove.add(CacheKeys.ORGANIZATION_TREE_DTO);\n\n // remove all major components from cache. This is not all inclusive as the peripheral stuff will just\n // expire away and there's no real need to keep maintaining this list as cache is modified.\n inActionContext.getUserActionRequests().add(\n new UserActionRequest(\"deleteCacheKeysAction\", null, cacheKeysToRemove));\n\n return parentOrg.getShortName();\n }", "void rebuildIfNecessary();", "public IndexReadyMessage(Long harvestId, boolean indexIsOK, ChannelID to, \n ChannelID replyTo) {\n super(to, replyTo);\n ArgumentNotValid.checkNotNull(harvestId, \"Long harvestId\");\n this.harvestId = harvestId;\n this.indexOK = indexIsOK;\n }", "public static QueryFutureStub newFutureStub(\n io.grpc.Channel channel) {\n io.grpc.stub.AbstractStub.StubFactory<QueryFutureStub> factory =\n new io.grpc.stub.AbstractStub.StubFactory<QueryFutureStub>() {\n @java.lang.Override\n public QueryFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {\n return new QueryFutureStub(channel, callOptions);\n }\n };\n return QueryFutureStub.newStub(factory, channel);\n }", "@Async.Schedule\n public <T> IgniteInternalFuture<T> chain(IgniteOutClosure<T> doneCb);", "public SearchHistoryAction renew() {\r\n\t\t\r\n\t\tSearchHistoryAction action= new SearchHistoryAction(history);\r\n\t\tdispose();\r\n\t\treturn action;\r\n\t}", "public static IndexRequest syncRequest(Runnable runnable) {\n return new IndexRequest(Type.SYNC_REQUEST, -1, runnable, null, -1, -1, -1, -1, -1);\n }", "void put( long number,Future<T> t);", "public static EmployeeServiceFutureStub newFutureStub(\n io.grpc.Channel channel) {\n return new EmployeeServiceFutureStub(channel);\n }", "public void testOpenAndGetLease() throws Exception {\n final ASCIIString CELL_ID = new ASCIIString(\"testcell\");\n\n final AtomicReference<Flease> result = new AtomicReference();\n\n FleaseStage fs = new FleaseStage(cfg, \"/tmp/xtreemfs-test/\", new FleaseMessageSenderInterface() {\n\n @Override\n public void sendMessage(FleaseMessage message, InetSocketAddress recipient) {\n //ignore me\n }\n }, true, new FleaseViewChangeListenerInterface() {\n\n @Override\n public void viewIdChangeEvent(ASCIIString cellId, int viewId) {\n }\n },new FleaseStatusListener() {\n\n @Override\n public void statusChanged(ASCIIString cellId, Flease lease) {\n // System.out.println(\"state change: \"+cellId+\" owner=\"+lease.getLeaseHolder());\n synchronized (result) {\n result.set(new Flease(cellId, lease.getLeaseHolder(), lease.getLeaseTimeout_ms(),lease.getMasterEpochNumber()));\n result.notify();\n }\n }\n\n @Override\n public void leaseFailed(ASCIIString cellId, FleaseException error) {\n MasterEpochTest.fail(error.toString());\n }\n }, new MasterEpochHandlerInterface() {\n\n long masterEpochNum = 0;\n\n @Override\n public void sendMasterEpoch(FleaseMessage response, Continuation callback) {\n // System.out.println(\"sending: \"+masterEpochNum);\n response.setMasterEpochNumber(masterEpochNum);\n callback.processingFinished();\n }\n\n @Override\n public void storeMasterEpoch(FleaseMessage request, Continuation callback) {\n masterEpochNum = request.getMasterEpochNumber();\n // System.out.println(\"storing: \"+masterEpochNum);\n callback.processingFinished();\n }\n });\n\n FleaseMessage msg = new FleaseMessage(FleaseMessage.MsgType.EVENT_RESTART);\n msg.setCellId(CELL_ID);\n\n fs.startAndWait();\n\n fs.openCell(CELL_ID, new ArrayList(),true);\n\n synchronized(result) {\n if (result.get() == null)\n result.wait(1000);\n if (result.get() == null)\n fail(\"timeout!\");\n }\n\n assertEquals(result.get().getLeaseHolder(),cfg.getIdentity());\n assertEquals(result.get().getMasterEpochNumber(),1);\n\n FleaseFuture f = fs.closeCell(CELL_ID, false);\n f.get();\n\n Thread.sleep(12000);\n\n result.set(null);\n\n fs.openCell(CELL_ID, new ArrayList(), true);\n\n synchronized(result) {\n if (result.get() == null)\n result.wait(1000);\n if (result.get() == null)\n fail(\"timeout!\");\n }\n\n assertEquals(result.get().getLeaseHolder(),cfg.getIdentity());\n assertEquals(result.get().getMasterEpochNumber(),2);\n\n fs.stopAndWait();\n }", "private long acquireActiveLease() throws InterruptedException, ExecutionException {\n long leaseId = leaseClient.grant(leaseTTL).get().getID();\n logger.debug(\"LeaderSelector get leaseId:[{}] and ttl:[{}]\", leaseId, leaseTTL);\n this.leaseCloser = leaseClient.keepAlive(leaseId, new StreamObserver<LeaseKeepAliveResponse>() {\n @Override\n public void onNext(LeaseKeepAliveResponse value) {\n logger.debug(\"LeaderSelector lease keeps alive for [{}]s:\", value.getTTL());\n }\n\n @Override\n public void onError(Throwable t) {\n logger.debug(\"LeaderSelector lease renewal Exception!\", t.fillInStackTrace());\n cancelTask();\n }\n\n @Override\n public void onCompleted() {\n logger.info(\"LeaderSelector lease renewal completed! start canceling task.\");\n cancelTask();\n }\n });\n return leaseId;\n }", "public int prepare(Xid id) {\n try {\n log.debug(\"Unblocking commit\");\n l.await();\n } catch (InterruptedException e) {\n Thread.currentThread().interrupt();\n }\n return XAResource.XA_OK;\n }", "public static ViewAction waitId(final int viewId, final long millis) {\n return new ViewAction() {\n @Override\n public Matcher<View> getConstraints() {\n return isRoot();\n }\n\n @Override\n public String getDescription() {\n return \"wait for a specific view with id <\" + viewId + \"> during \" + millis + \" millis.\";\n }\n\n @Override\n public void perform(final UiController uiController, final View view) {\n uiController.loopMainThreadUntilIdle();\n final long startTime = System.currentTimeMillis();\n final long endTime = startTime + millis;\n final Matcher<View> viewMatcher = withId(viewId);\n\n do {\n for (View child : TreeIterables.breadthFirstViewTraversal(view)) {\n // found view with required ID\n if (viewMatcher.matches(child)) {\n return;\n }\n }\n\n uiController.loopMainThreadForAtLeast(50);\n }\n while (System.currentTimeMillis() < endTime);\n\n // timeout happens\n throw new PerformException.Builder()\n .withActionDescription(this.getDescription())\n .withViewDescription(HumanReadables.describe(view))\n .withCause(new TimeoutException())\n .build();\n }\n };\n }", "Future<T> then(Runnable result);", "public ThreadSafeInvertedIndex() {\n\t\tsuper();\n\t\tthis.lock = new ReadWriteLock();\n\t}", "public Action(long id) {\n this(id, \"\");\n }", "public final CompletableFuture<CreateResponse> create(\n\t\t\tFunction<CreateRequest.Builder, ObjectBuilder<CreateRequest>> fn) throws IOException {\n\t\treturn create(fn.apply(new CreateRequest.Builder()).build());\n\t}", "public Uri buildDocumentUriUsingTreeCached(Uri treeUri, String documentId) {\n return new Uri.Builder().scheme(ContentResolver.SCHEME_CONTENT)\n .authority(treeUri.getAuthority()).appendPath(DOCPROVIDER_PATH_TREE) // Risky; this value is supposed to be hidden\n .appendPath(getTreeDocumentIdCached(treeUri)).appendPath(DOCPROVIDER_PATH_DOCUMENT) // Risky; this value is supposed to be hidden\n .appendPath(documentId).build();\n }", "private Node selectAndExpandNewNode() {\n // Start at the root\n Node node = root;\n\n // Iterate down the tree until reaching a goal state\n while (node.getState().getPos() < problemSpec.getN()) {\n // Get the best action from the current node using UCT\n Action action = selectBestAction(node);\n\n // Simulate a single action\n FromStateSimulator FSS = new FromStateSimulator(problemSpec);\n FSS.setStartState(node.getState(), stepsDone + node.getStepsFromRoot());\n FSS.step(action);\n State newState = FSS.getCurrentState();\n\n // Get the node representing the outcome of the transition\n Node child = node.childWithStateAction(newState, action);\n\n // If this outcome node has not been added to the tree, add it\n if (child == null) {\n Node newNode = new Node(newState, FSS.getSteps());\n newNode.setParentNodeAndAction(node, action);\n node.addChildNode(newNode);\n\n // Return this new node\n return newNode;\n }\n\n // Now repeat the process using this child node\n node = child;\n }\n\n return node;\n }", "protected HttpJsonEventarcStub(\n EventarcStubSettings settings,\n ClientContext clientContext,\n HttpJsonStubCallableFactory callableFactory)\n throws IOException {\n this.callableFactory = callableFactory;\n this.httpJsonOperationsStub =\n HttpJsonOperationsStub.create(\n clientContext,\n callableFactory,\n typeRegistry,\n ImmutableMap.<String, HttpRule>builder()\n .put(\n \"google.longrunning.Operations.CancelOperation\",\n HttpRule.newBuilder()\n .setPost(\"/v1/{name=projects/*/locations/*/operations/*}:cancel\")\n .build())\n .put(\n \"google.longrunning.Operations.DeleteOperation\",\n HttpRule.newBuilder()\n .setDelete(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.GetOperation\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*/operations/*}\")\n .build())\n .put(\n \"google.longrunning.Operations.ListOperations\",\n HttpRule.newBuilder()\n .setGet(\"/v1/{name=projects/*/locations/*}/operations\")\n .build())\n .build());\n\n HttpJsonCallSettings<GetTriggerRequest, Trigger> getTriggerTransportSettings =\n HttpJsonCallSettings.<GetTriggerRequest, Trigger>newBuilder()\n .setMethodDescriptor(getTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListTriggersRequest, ListTriggersResponse> listTriggersTransportSettings =\n HttpJsonCallSettings.<ListTriggersRequest, ListTriggersResponse>newBuilder()\n .setMethodDescriptor(listTriggersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateTriggerRequest, Operation> createTriggerTransportSettings =\n HttpJsonCallSettings.<CreateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(createTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateTriggerRequest, Operation> updateTriggerTransportSettings =\n HttpJsonCallSettings.<UpdateTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(updateTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"trigger.name\", String.valueOf(request.getTrigger().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteTriggerRequest, Operation> deleteTriggerTransportSettings =\n HttpJsonCallSettings.<DeleteTriggerRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteTriggerMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelRequest, Channel> getChannelTransportSettings =\n HttpJsonCallSettings.<GetChannelRequest, Channel>newBuilder()\n .setMethodDescriptor(getChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelsRequest, ListChannelsResponse> listChannelsTransportSettings =\n HttpJsonCallSettings.<ListChannelsRequest, ListChannelsResponse>newBuilder()\n .setMethodDescriptor(listChannelsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelRequest, Operation> createChannelTransportSettings =\n HttpJsonCallSettings.<CreateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateChannelRequest, Operation> updateChannelTransportSettings =\n HttpJsonCallSettings.<UpdateChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(updateChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"channel.name\", String.valueOf(request.getChannel().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelRequest, Operation> deleteChannelTransportSettings =\n HttpJsonCallSettings.<DeleteChannelRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetProviderRequest, Provider> getProviderTransportSettings =\n HttpJsonCallSettings.<GetProviderRequest, Provider>newBuilder()\n .setMethodDescriptor(getProviderMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListProvidersRequest, ListProvidersResponse>\n listProvidersTransportSettings =\n HttpJsonCallSettings.<ListProvidersRequest, ListProvidersResponse>newBuilder()\n .setMethodDescriptor(listProvidersMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetChannelConnectionRequest, ChannelConnection>\n getChannelConnectionTransportSettings =\n HttpJsonCallSettings.<GetChannelConnectionRequest, ChannelConnection>newBuilder()\n .setMethodDescriptor(getChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListChannelConnectionsRequest, ListChannelConnectionsResponse>\n listChannelConnectionsTransportSettings =\n HttpJsonCallSettings\n .<ListChannelConnectionsRequest, ListChannelConnectionsResponse>newBuilder()\n .setMethodDescriptor(listChannelConnectionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<CreateChannelConnectionRequest, Operation>\n createChannelConnectionTransportSettings =\n HttpJsonCallSettings.<CreateChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(createChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"parent\", String.valueOf(request.getParent()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<DeleteChannelConnectionRequest, Operation>\n deleteChannelConnectionTransportSettings =\n HttpJsonCallSettings.<DeleteChannelConnectionRequest, Operation>newBuilder()\n .setMethodDescriptor(deleteChannelConnectionMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetGoogleChannelConfigRequest, GoogleChannelConfig>\n getGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<GetGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(getGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>\n updateGoogleChannelConfigTransportSettings =\n HttpJsonCallSettings.<UpdateGoogleChannelConfigRequest, GoogleChannelConfig>newBuilder()\n .setMethodDescriptor(updateGoogleChannelConfigMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\n \"google_channel_config.name\",\n String.valueOf(request.getGoogleChannelConfig().getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<ListLocationsRequest, ListLocationsResponse>\n listLocationsTransportSettings =\n HttpJsonCallSettings.<ListLocationsRequest, ListLocationsResponse>newBuilder()\n .setMethodDescriptor(listLocationsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetLocationRequest, Location> getLocationTransportSettings =\n HttpJsonCallSettings.<GetLocationRequest, Location>newBuilder()\n .setMethodDescriptor(getLocationMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"name\", String.valueOf(request.getName()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<SetIamPolicyRequest, Policy> setIamPolicyTransportSettings =\n HttpJsonCallSettings.<SetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(setIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<GetIamPolicyRequest, Policy> getIamPolicyTransportSettings =\n HttpJsonCallSettings.<GetIamPolicyRequest, Policy>newBuilder()\n .setMethodDescriptor(getIamPolicyMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n HttpJsonCallSettings<TestIamPermissionsRequest, TestIamPermissionsResponse>\n testIamPermissionsTransportSettings =\n HttpJsonCallSettings.<TestIamPermissionsRequest, TestIamPermissionsResponse>newBuilder()\n .setMethodDescriptor(testIamPermissionsMethodDescriptor)\n .setTypeRegistry(typeRegistry)\n .setParamsExtractor(\n request -> {\n RequestParamsBuilder builder = RequestParamsBuilder.create();\n builder.add(\"resource\", String.valueOf(request.getResource()));\n return builder.build();\n })\n .build();\n\n this.getTriggerCallable =\n callableFactory.createUnaryCallable(\n getTriggerTransportSettings, settings.getTriggerSettings(), clientContext);\n this.listTriggersCallable =\n callableFactory.createUnaryCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.listTriggersPagedCallable =\n callableFactory.createPagedCallable(\n listTriggersTransportSettings, settings.listTriggersSettings(), clientContext);\n this.createTriggerCallable =\n callableFactory.createUnaryCallable(\n createTriggerTransportSettings, settings.createTriggerSettings(), clientContext);\n this.createTriggerOperationCallable =\n callableFactory.createOperationCallable(\n createTriggerTransportSettings,\n settings.createTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateTriggerCallable =\n callableFactory.createUnaryCallable(\n updateTriggerTransportSettings, settings.updateTriggerSettings(), clientContext);\n this.updateTriggerOperationCallable =\n callableFactory.createOperationCallable(\n updateTriggerTransportSettings,\n settings.updateTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteTriggerCallable =\n callableFactory.createUnaryCallable(\n deleteTriggerTransportSettings, settings.deleteTriggerSettings(), clientContext);\n this.deleteTriggerOperationCallable =\n callableFactory.createOperationCallable(\n deleteTriggerTransportSettings,\n settings.deleteTriggerOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getChannelCallable =\n callableFactory.createUnaryCallable(\n getChannelTransportSettings, settings.getChannelSettings(), clientContext);\n this.listChannelsCallable =\n callableFactory.createUnaryCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.listChannelsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelsTransportSettings, settings.listChannelsSettings(), clientContext);\n this.createChannelCallable =\n callableFactory.createUnaryCallable(\n createChannelTransportSettings, settings.createChannelSettings(), clientContext);\n this.createChannelOperationCallable =\n callableFactory.createOperationCallable(\n createChannelTransportSettings,\n settings.createChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.updateChannelCallable =\n callableFactory.createUnaryCallable(\n updateChannelTransportSettings, settings.updateChannelSettings(), clientContext);\n this.updateChannelOperationCallable =\n callableFactory.createOperationCallable(\n updateChannelTransportSettings,\n settings.updateChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelCallable =\n callableFactory.createUnaryCallable(\n deleteChannelTransportSettings, settings.deleteChannelSettings(), clientContext);\n this.deleteChannelOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelTransportSettings,\n settings.deleteChannelOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getProviderCallable =\n callableFactory.createUnaryCallable(\n getProviderTransportSettings, settings.getProviderSettings(), clientContext);\n this.listProvidersCallable =\n callableFactory.createUnaryCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.listProvidersPagedCallable =\n callableFactory.createPagedCallable(\n listProvidersTransportSettings, settings.listProvidersSettings(), clientContext);\n this.getChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n getChannelConnectionTransportSettings,\n settings.getChannelConnectionSettings(),\n clientContext);\n this.listChannelConnectionsCallable =\n callableFactory.createUnaryCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.listChannelConnectionsPagedCallable =\n callableFactory.createPagedCallable(\n listChannelConnectionsTransportSettings,\n settings.listChannelConnectionsSettings(),\n clientContext);\n this.createChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionSettings(),\n clientContext);\n this.createChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n createChannelConnectionTransportSettings,\n settings.createChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.deleteChannelConnectionCallable =\n callableFactory.createUnaryCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionSettings(),\n clientContext);\n this.deleteChannelConnectionOperationCallable =\n callableFactory.createOperationCallable(\n deleteChannelConnectionTransportSettings,\n settings.deleteChannelConnectionOperationSettings(),\n clientContext,\n httpJsonOperationsStub);\n this.getGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n getGoogleChannelConfigTransportSettings,\n settings.getGoogleChannelConfigSettings(),\n clientContext);\n this.updateGoogleChannelConfigCallable =\n callableFactory.createUnaryCallable(\n updateGoogleChannelConfigTransportSettings,\n settings.updateGoogleChannelConfigSettings(),\n clientContext);\n this.listLocationsCallable =\n callableFactory.createUnaryCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.listLocationsPagedCallable =\n callableFactory.createPagedCallable(\n listLocationsTransportSettings, settings.listLocationsSettings(), clientContext);\n this.getLocationCallable =\n callableFactory.createUnaryCallable(\n getLocationTransportSettings, settings.getLocationSettings(), clientContext);\n this.setIamPolicyCallable =\n callableFactory.createUnaryCallable(\n setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext);\n this.getIamPolicyCallable =\n callableFactory.createUnaryCallable(\n getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext);\n this.testIamPermissionsCallable =\n callableFactory.createUnaryCallable(\n testIamPermissionsTransportSettings,\n settings.testIamPermissionsSettings(),\n clientContext);\n\n this.backgroundResources =\n new BackgroundResourceAggregation(clientContext.getBackgroundResources());\n }" ]
[ "0.50605434", "0.50461787", "0.4861024", "0.47546017", "0.46654776", "0.46082425", "0.44956034", "0.44794568", "0.44740105", "0.44683364", "0.44674215", "0.44656283", "0.43495214", "0.4306067", "0.42660484", "0.4265075", "0.42486686", "0.42339644", "0.42117074", "0.41716892", "0.41714033", "0.41399875", "0.41250297", "0.4087635", "0.40779537", "0.4077435", "0.40682983", "0.4065091", "0.40556994", "0.40409496", "0.40203023", "0.4014481", "0.40118426", "0.4008028", "0.40070257", "0.40026745", "0.40009752", "0.40009752", "0.3996711", "0.39946", "0.39731804", "0.39712593", "0.39690298", "0.39680618", "0.39672452", "0.39572355", "0.39492112", "0.39478898", "0.39427105", "0.39251742", "0.39115274", "0.39075643", "0.39069468", "0.39005217", "0.3896774", "0.38902542", "0.38851658", "0.38756415", "0.38753563", "0.38638484", "0.38620216", "0.38509825", "0.38462394", "0.38431746", "0.3842016", "0.38345212", "0.3833832", "0.38326338", "0.38293278", "0.3828312", "0.3827743", "0.38250217", "0.38167238", "0.38134506", "0.37983543", "0.37980622", "0.37977424", "0.37974083", "0.37903664", "0.37803435", "0.37791446", "0.37777117", "0.3773621", "0.3770608", "0.37628305", "0.37620232", "0.37583128", "0.3756396", "0.37510788", "0.3747377", "0.37442407", "0.37417626", "0.37381178", "0.3732754", "0.37313285", "0.3731221", "0.37304002", "0.37249005", "0.3721559", "0.37164828" ]
0.65369755
0
Gets the checkpoint read lock. While this lock is held, checkpoint thread will not acquireSnapshotWorker memory state.
@Override public void checkpointReadLock() { if (checkpointLock.writeLock().isHeldByCurrentThread()) return; long timeout = checkpointReadLockTimeout; long start = U.currentTimeMillis(); boolean interruped = false; try { for (; ; ) { try { if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout) failCheckpointReadLock(); try { if (timeout > 0) { if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start), TimeUnit.MILLISECONDS)) failCheckpointReadLock(); } else checkpointLock.readLock().lock(); } catch (InterruptedException e) { interruped = true; continue; } if (stopping) { checkpointLock.readLock().unlock(); throw new IgniteException(new NodeStoppingException("Failed to perform cache update: node is stopping.")); } if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null) break; else { checkpointLock.readLock().unlock(); if (timeout > 0 && U.currentTimeMillis() - start >= timeout) failCheckpointReadLock(); try { checkpointer.wakeupForCheckpoint(0, "too many dirty pages").cpBeginFut .getUninterruptibly(); } catch (IgniteFutureTimeoutCheckedException e) { failCheckpointReadLock(); } catch (IgniteCheckedException e) { throw new IgniteException("Failed to wait for checkpoint begin.", e); } } } catch (CheckpointReadLockTimeoutException e) { log.error(e.getMessage(), e); timeout = 0; } } } finally { if (interruped) Thread.currentThread().interrupt(); } if (ASSERTION_ENABLED) CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SimpleLock readLock() {\n\n\t\treturn readerLock;\n\t}", "@Override public long checkpointReadLockTimeout() {\n return checkpointReadLockTimeout;\n }", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public void checkReadLock() {\r\n return;\r\n }", "public void acquireReadLock() {\r\n return;\r\n }", "public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }", "private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public Lock getLock();", "public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "public Lock getLock() {\n return lock;\n }", "protected final void lockRead() {\n m_lock.readLock().lock();\n }", "public Object getLock() {\n return dataLock;\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "@ReturnsLock(\"RW\")\n public ReadWriteLock getLock() {\n return rwLock;\n }", "@Override\n\tpublic Lock getLock() {\n\t\treturn this.lock;\n\t}", "protected synchronized Lock acquireLock() {\n\t\tacquireReadLock();\n\t\treturn new Lock();\n\t}", "void acquireReadLock(E key);", "public synchronized long getCheckpoint() {\n return globalCheckpoint;\n }", "void acquireReadLock() throws InterruptedException;", "PLock getLock() {\n return getTextBuffer().getLock();\n }", "final Object getDelegateLock() {\n return getTarget().getTreeLock();\n }", "public abstract ReentrantLock getLock();", "public @NotNull ReentrantLock getLock() {\n return lock;\n }", "private Object metricLock() {\n return metricLock;\n }", "long tryReadLock(long timeout) throws InterruptedException;", "@Override\r\n\tpublic ReadWriteLock getReadWriteLock() {\n\t\treturn null;\r\n\t}", "public IgniteThread checkpointerThread() {\n return checkpointerThread;\n }", "public Boolean getLocked() throws NotLoadedException {\n return locked.getValue();\n }", "LockStorage getLockStorage();", "public ReadWriteLock getReadWriteLock() {\n\t\treturn rwLock;\n\t}", "public boolean acquireReadLockNoWait() {\r\n return true;\r\n }", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "public Integer getLockFlag() {\n return lockFlag;\n }", "void acquireFeedPolicyReadLock(LockList locks, DataverseName dataverseName, String feedPolicyName)\n throws AlgebricksException;", "public java.lang.String getLocalLock() {\r\n return localLock;\r\n }", "public final OpLockDetails getOpLock() {\n\t\treturn m_oplock;\n\t}", "final Object getLockObject() {\n return timeManager;\n }", "public ReadWriteLockObjectHolder() {\n\t\tthis(new ReentrantReadWriteLock());\n\t}", "@Override public void checkpointReadLockTimeout(long val) {\n checkpointReadLockTimeout = val;\n }", "public LockManager getLockManager(SrvSession sess, TreeConnection tree) {\n \n // Return the file state lock manager\n \n return _lockManager;\n }", "public final long lock() {\n explicitlyLocked = true;\n return byteBase.longLockPointer();\n }", "public ReentrantReadWriteLock getStateLock() {\n return stateLock;\n }", "void acquireDataverseReadLock(LockList locks, DataverseName dataverseName) throws AlgebricksException;", "Lock getLock(String lockName);", "public boolean GetIsLock()\n {\n return this._lock;\n }", "void getLock(QName lockQName, String lockToken, long timeToLive);", "public Lock getUndoNxtLock() {\n if (nlocks == 0)\n return null;\n return locks[nlocks - 1];\n }", "public JournalReader read() {\n return new JournalReader(this);\n }", "public Long getLockNum() {\n return lockNum;\n }", "public java.lang.String getXlock () {\n\t\treturn xlock;\n\t}", "public Checkpoint lastCheckpoint(){\n if(!checkpointRecordFile.exists()){\n return null;\n }\n return lastCheckpoint(rootDir);\n }", "private static LockState pollReadLock(DeltaLink dLink, Id datasourceId, LockState lockState) {\n int totalAttempts = 0;\n int sameTickAttempts = 0;\n\n for(;;) {\n Id lockSession = lockState.session;\n long ticks = lockState.ticks;\n sameTickAttempts++;\n totalAttempts++;\n if ( sameTickAttempts > LOCK_SAME_TICKS_RETRIES ) {\n DEV(\"{%d} Lock not advancing - end polling\", totalAttempts);\n return lockState;\n }\n Lib.sleep(LOCK_POLL_WAIT_MS);\n DEV(\"{%d} ticks=%s\", totalAttempts, ticks);\n LockState state2 = dLink.readLock(datasourceId);\n if ( LockState.isFree(state2) ) {\n // Lock became free.\n DEV(\"Poll lock attempt=%d - lock became free\", sameTickAttempts);\n return LockState.UNLOCKED;\n }\n\n DEV(\"{%d} lock state %s\", totalAttempts, state2);\n Id sessionToken2 = state2.session;\n long ticks2 = state2.ticks;\n\n if ( ! Objects.equals(lockSession, sessionToken2) ) {\n // Lock session id changed.\n DEV(\"{%d} owner changed to %s\", totalAttempts, sessionToken2);\n return state2;\n }\n if ( ticks2 > ticks ) {\n DEV(\"{%d} ticks advanced %d\", totalAttempts, ticks2);\n lockState = state2;\n sameTickAttempts = 0;\n } else\n DEV(\"{%d} ticks did not advance\", totalAttempts);\n // And loop.\n }\n }", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "public long getLockStatus() {\r\n return lockStatus;\r\n }", "public Serializable jvnLockRead(int joi) throws JvnException {\n\t \tSerializable object = null;\n\t\ttry {\n\t\t\tobject = this.jRCoordonator.jvnLockRead(joi, js);\n\t\t} catch (RemoteException e) {\n\t\t\tSystem.out.println(\"Error jvnLockRead : \" + e.getMessage());\n\t\t}\n\t\treturn object;\n\t}", "public Lock delegate() {\n return this.delegate;\n }", "private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException {\n String msg = \"Checkpoint read lock acquisition has been timed out.\";\n\n IgniteException e = new IgniteException(msg);\n\n if (cctx.kernalContext().failure().process(new FailureContext(SYSTEM_CRITICAL_OPERATION_TIMEOUT, e)))\n throw e;\n\n throw new CheckpointReadLockTimeoutException(msg);\n }", "public synchronized DataSnapshot getSnapshot() {\n if (!initialSnapshotReceived) {\n try {\n wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n return snapshot;\n }", "static Lock createLock() {\n return new /*Prio*/Lock();\n }", "private Lock getLock(int tid, int varIndex) {\n if (_lockTable.containsKey(varIndex)) {\n List<Lock> lockList = _lockTable.get(varIndex);\n for (Lock lc : lockList) {\n if (lc.getTranId() == tid) {\n return lc;\n }\n }\n }\n return null;\n }", "protected RowLock getReadLockType() \n {\n\t\treturn(RowLock.RS3);\n }", "public ReentrantReadWriteLock getLogLock() {\n return logLock;\n }", "@Test\n @Ignore(\"This is only applicable to Neo4j 2.0.0-M03 and below where transactions \" +\n \"were not mandatory for reading\")\n public void defaultReadingIsReadCommitted() throws Exception {\n assertNameAndAgeViaLookup(john.getId(), \"John\", 34, \"John\");\n\n // Do the update in a separate Thread and ensure its actually updated\n doUpdateInSeparateThread(new PersonUpdater(\"John\", 44));\n\n // Now, back in our thread, ensure we read the commited value\n assertNameAndAgeViaLookup(john.getId(), \"John\", 44, \"John\");\n }", "public static StateChangeMonitor getInstance() {\n\t\tsynchronized (classLock) {\n\t\t\tif (monitor == null) {\n\t\t\t\tmonitor = new StateChangeMonitor();\n\t\t\t}\n\t\t\treturn monitor;\n\t\t}\n\t}", "protected final Object getTreeLock() {\n return Component.LOCK;\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tif (wl != null && !wl.isHeld())\r\n\t\t\twl.acquire();\r\n\t}", "public Lock getLoginInitLock()\n {\n return loginInitLock;\n }", "void acquireMergePolicyReadLock(LockList locks, String mergePolicyName) throws AlgebricksException;", "public long currentReadBytes()\r\n/* 209: */ {\r\n/* 210:398 */ return this.currentReadBytes.get();\r\n/* 211: */ }", "public boolean isLock() {\n return isLock;\n }", "Thread getLocker();", "public Object getHierarchyLock() {\n return hierarchyLock;\n }", "public long readLong() {\n while (isEmpty()) {\n }\n Timing.waitSyncLocal();\n readEnable.setNow(1);\n Timing.waitClockLocal();\n return (readData.getLong());\n }", "public AcquireStorageAccountLock acquireStorageAccountLock() {\n return this.acquireStorageAccountLock;\n }", "Lock getLockByKey(String key);", "private Reader getCurrentReader(){\r\n\t\tif (currentReader == null && readerQueueIndex < readerQueue.size()){\r\n\t\t\tsynchronized(readerQueue){\r\n\t\t\t\t// reader queue index is advanced only by the nextReader()\r\n\t\t\t\t// method. Don't do it here.\r\n\t\t\t\tcurrentReader = readerQueue.get(readerQueueIndex);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn currentReader;\r\n\t}", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Test\n public void writeTryReadLockTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int readThreadNum = 1;\n final CountDownLatch countDownLatch = new CountDownLatch(1);\n final List<Integer> result = new ArrayList<Integer>();\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n result.add(testUse.getCountInReadTryLock(2000));\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n countDownLatch.await();\n Assert.assertEquals(1000, result.get(0).intValue());\n }", "final long internalLongLock() {\n return byteBase.longLockPointer();\n }", "public CacheKey acquireReadLockOnCacheKeyNoWait(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n cacheKey.acquireReadLock();\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n return cacheKey;\n }\n }\n\n //find the key in the hashtable, lock the object\n if (key != null) {\n //couldn't acquire the key so do not return it\n if (!key.acquireReadLockNoWait()) {\n key = null;\n }\n }\n\n return key;\n }", "@NotNull private GridCacheDatabaseSharedManager.CheckpointProgress updateCurrentCheckpointProgress() {\n final CheckpointProgress curr;\n\n synchronized (this) {\n curr = scheduledCp;\n\n curr.state(LOCK_TAKEN);\n\n if (curr.reason == null)\n curr.reason = \"timeout\";\n\n // It is important that we assign a new progress object before checkpoint mark in page memory.\n scheduledCp = new CheckpointProgress(checkpointFreq);\n\n curCpProgress = curr;\n }\n return curr;\n }", "public long getReadPointer();", "private Object getLockObject(IAnnotationModel annotationModel) {\n if (annotationModel instanceof ISynchronizable) {\n Object lock = ((ISynchronizable) annotationModel).getLockObject();\n if (lock != null) {\n return lock;\n }\n }\n return annotationModel;\n }", "public @Bool boolean getLocked()\n\t\tthrows PropertyNotPresentException;", "public ComputationGraph loadCheckpointCG(Checkpoint checkpoint){\n return loadCheckpointCG(checkpoint.getCheckpointNum());\n }", "void acquireDatasetReadLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;", "void acquireActiveEntityReadLock(LockList locks, DataverseName dataverseName, String entityName)\n throws AlgebricksException;", "public boolean readerTryLock() {\n\t\t// TODO\n\t\t/*\n\t\t * There is nothing stated saying that a thread cannot \n\t\t * try to take the lock multiple times\n\t\t */\n\t\tfinal Thread current = Thread.currentThread();\n\t\tHolders old = null;\n\t\tReaderList newHolder = null;\n\t\t// if lock is null or if instance is not a writer\n\t\tdo {\n\t\t\told = holders.get();\n\t\t\tif (old == null) {\n\t\t\t\tnewHolder = new ReaderList(current, null);\n\t\t\t} else if(old instanceof ReaderList){\n\t\t\t\ttry {\n\t\t\t\t\told = (ReaderList) holders.get();\n\t\t\t\t\tnewHolder = new ReaderList(current, (ReaderList) old);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} while (!holders.compareAndSet(old, newHolder));\n\t\treturn true;\n\t}", "public Object get() {\n while(isLocked() ) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n \n Object retVal = getHead();\n LAST_READ_TIME = now();\n return retVal;\n }", "@Test\n public void readTryLockShareTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final CountDownLatch countDownLatch = new CountDownLatch(5);\n final List<Integer> result = new ArrayList<Integer>();\n for (int i = 0; i < 5; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Integer r = testUse.getCountInReadTryLock(2000);\n if(r!=null){\n result.add(r);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(5, result.size());\n }", "public AsyncLock getLockFor(long timestamp) {\n return new ImmutableTimestampLock(timestamp, this);\n }", "public CheckInOut getCheck() {\n\t\treturn check;\n\t}", "LockState checkLock(long extLockId) throws LockException {\n try {\n return txnManager.getMS().checkLock(extLockId).getState();\n } catch (TException e) {\n throw new LockException(ErrorMsg.METASTORE_COMMUNICATION_FAILED.getMsg(),\n e);\n }\n }", "private Integer getLockFromId(long lockId)\n throws IOException {\n if(lockId == -1L) {\n return null;\n }\n String lockName = String.valueOf(lockId);\n Integer rl = null;\n synchronized(rowlocks) {\n rl = rowlocks.get(lockName);\n }\n if(rl == null) {\n throw new IOException(\"Invalid row lock\");\n }\n this.leases.renewLease(lockName);\n return rl;\n }", "public CacheKey acquireReadLockOnCacheKey(Vector primaryKey) {\n //check if the key is already in the hashtable\n CacheKey key = null;\n\n //cache key should not be changed in other threads during the lock acquire operation\n synchronized (this) {\n key = getCacheKey(primaryKey);\n if (key == null) {\n //create a chachKey and lock the object\n CacheKey cacheKey = createCacheKey(primaryKey, null, null);\n\n //lets create one but not put it in the cache, as we are only reading\n // should not be writing to the identitymap\n cacheKey.acquireReadLock();\n return cacheKey;\n }\n }\n\n key.acquireReadLock();\n\n return key;\n }", "public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }", "void releaseReadLock();" ]
[ "0.6523358", "0.64132255", "0.63794565", "0.6119223", "0.5996215", "0.5879751", "0.5788393", "0.5783199", "0.5675285", "0.567332", "0.56590474", "0.56535316", "0.5653309", "0.5630198", "0.5574469", "0.5554752", "0.5512995", "0.5512226", "0.5462488", "0.5443309", "0.54396486", "0.53728807", "0.5369006", "0.52966976", "0.5294538", "0.5287775", "0.52834874", "0.5282045", "0.52587074", "0.521981", "0.5196802", "0.51876277", "0.51694584", "0.51002866", "0.51002866", "0.51002866", "0.5096432", "0.5026596", "0.50098056", "0.500508", "0.49938866", "0.49710134", "0.49700537", "0.49550307", "0.49505344", "0.49189693", "0.4916231", "0.48930892", "0.48924008", "0.48757148", "0.487293", "0.48424602", "0.48105544", "0.47993153", "0.47919068", "0.4786958", "0.47615072", "0.47541863", "0.47397614", "0.47341672", "0.47220898", "0.4719159", "0.47100356", "0.47015968", "0.47006917", "0.4693561", "0.46931005", "0.46726117", "0.46667323", "0.46619967", "0.46474814", "0.46399635", "0.46311247", "0.46274886", "0.46202874", "0.46195865", "0.46160987", "0.46114576", "0.45925638", "0.4587963", "0.45789284", "0.4578211", "0.45760158", "0.45670804", "0.45590454", "0.45537004", "0.455167", "0.45516437", "0.4539627", "0.45381394", "0.45331615", "0.45162222", "0.45132202", "0.4507445", "0.45040902", "0.4503326", "0.45026287", "0.44963306", "0.4495925", "0.44939616" ]
0.7308686
0
Invokes critical failure processing. Always throws.
private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException { String msg = "Checkpoint read lock acquisition has been timed out."; IgniteException e = new IgniteException(msg); if (cctx.kernalContext().failure().process(new FailureContext(SYSTEM_CRITICAL_OPERATION_TIMEOUT, e))) throw e; throw new CheckpointReadLockTimeoutException(msg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean processFailure(Throwable t);", "@Override\n\t\t\t\tpublic void doFail() {\n\t\t\t\t}", "@NonBlocking\n void error(Throwable throwable);", "public void threadFail(Throwable e) {\n failure = e;\n resume(mainThread);\n }", "protected abstract void executeActionsIfError();", "void failed (Exception e);", "public void execute()\n/* */ throws Pausable, Exception\n/* */ {\n/* 378 */ errNotWoven(this);\n/* */ }", "@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }", "public void fail() {\n _siteStatus = false;\n _lockTable.clear();\n _accessedTransactions.clear();\n _uncommitDataMap.clear();\n _lastFailTime = _tm.getCurrentTime();\n }", "@Test\n @ConditionalIgnoreRule.ConditionalIgnore(condition = RunningOnGithubAction.class)\n public void testFailure() throws Exception {\n ExecutorService executorService = Executors.newFixedThreadPool(1);\n try {\n Future<?> future =\n executorService.submit(\n () -> {\n try {\n submitQuery(false, 0);\n } catch (SQLException e) {\n throw new RuntimeSQLException(\"SQLException\", e);\n } catch (InterruptedException e) {\n throw new IllegalStateException(\"task interrupted\", e);\n }\n });\n executorService.shutdown();\n future.get();\n fail(\"should fail and raise an exception\");\n } catch (ExecutionException ex) {\n Throwable rootCause = ex.getCause();\n assertThat(\"Runtime Exception\", rootCause, instanceOf(RuntimeSQLException.class));\n\n rootCause = rootCause.getCause();\n\n assertThat(\"Root cause class\", rootCause, instanceOf(SnowflakeSQLException.class));\n assertThat(\"Error code\", ((SnowflakeSQLException) rootCause).getErrorCode(), equalTo(390114));\n }\n }", "public void onFailure(WorkContainer<K, V> wc) {\n wc.fail(clock);\n putBack(wc);\n }", "public abstract void onFailure(FailureCode code, Throwable ex);", "private void failWithException(final CronetException exception) {\n postTaskToExecutor(new Runnable() {\n @Override\n public void run() {\n failWithExceptionOnExecutor(exception);\n }\n });\n }", "@Override\n public void testTaskManagerFailure(\n TestEnvironment testEnv,\n ExternalContext<RowData> externalContext,\n ClusterControllable controller)\n throws Exception {\n }", "@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}", "@Override\n\tpublic void coreProblemExecution() {\n\t\t\n\t}", "public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }", "public void fail() {\r\n\t\tcontestantIt.currentC().updatePoints(-FAIL);\r\n\t}", "void markFailed(Execution execution, Throwable cause);", "public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}", "public void onFailure(Throwable caught) {\n\t\t\t\tcaught.printStackTrace();\n\t\t\t\tSystem.out.println(\"Remote Procedure Call - Failure\");\n\t\t\t\tPlanner.hideActivityIndicator();\n\t\t\t}", "public boolean tryFailure(Throwable cause)\r\n/* 341: */ {\r\n/* 342:424 */ if (setFailure0(cause))\r\n/* 343: */ {\r\n/* 344:425 */ notifyListeners();\r\n/* 345:426 */ return true;\r\n/* 346: */ }\r\n/* 347:428 */ return false;\r\n/* 348: */ }", "public void onFailure(Exception t);", "private static void testFail() throws Throwable {\n Scheduler userInt = SchedulerTHelper.getSchedulerInterface();\n\n for (int i = 0; i < jobs_fail; i++) {\n String job_path = new File(jobs_path.toURI()).getAbsolutePath() + \"/flow_fail_\" + (i + 1) +\n \".xml\";\n\n Exception exc = null;\n JobId job = null;\n try {\n job = userInt.submit(JobFactory.getFactory().createJob(job_path));\n } catch (Exception e) {\n exc = e;\n }\n Assert\n .assertTrue(\"Job \" + job_path + \" was supposed to be rejected but was created\",\n job == null);\n Assert.assertTrue(exc != null);\n }\n SchedulerTHelper.log(jobs_fail + \" invalid jobs successfully rejected\");\n }", "public void markAsFailed() {\n \n \t\texecutionStateChanged(ExecutionState.FAILED, \"Execution thread died unexpectedly\");\n \t}", "void onFailure(Throwable error);", "public void onFailure(Throwable caught) {\n\t\t\t\t\t}", "@Override\r\n\tpublic void onFail() {\n\t\tif(bSendStatus)\r\n\t\t\tnativeadstatus(E_ONFAIL);\r\n\t}", "private void rethrowIfFailed()\r\n/* 198: */ {\r\n/* 199:232 */ Throwable cause = cause();\r\n/* 200:233 */ if (cause == null) {\r\n/* 201:234 */ return;\r\n/* 202: */ }\r\n/* 203:237 */ PlatformDependent.throwException(cause);\r\n/* 204: */ }", "public void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}", "public void onFailure(Throwable arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\texecutable.feedbackExecutionError();\r\n\t\t\t\t\t}", "protected void handleProcessingException(Exception e) throws NbaBaseException {\n unLockItems();\n if (e instanceof NbaBaseException) {\n NbaBaseException eb = (NbaBaseException) e;\n if (eb.isFatal() || eb instanceof NbaLockedException) {\n throw eb;\n }\n }\n if (result == null) {\n setWork(getOrigWorkItem());\n addComment(e.getMessage());\n changeStatus(getHostErrorStatus());\n setResult(new NbaAutomatedProcessResult(NbaAutomatedProcessResult.FAILED, getHostErrorStatus(), getHostErrorStatus()));\n }\n try {\n doUpdateWorkItem();\n } catch (NbaBaseException e1) {\n e1.forceFatalExceptionType();\n throw e1;\n }\n }", "protected void failed()\r\n {\r\n //overwrite\r\n }", "public void onFailure(Throwable caught) {\n\r\n\t\t\t}", "public void onFailure();", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onFail(int code) {\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void finishFailure(Exception cause) {\n\t\tSystem.err.println(\"finishFailure\");\n\n\t}", "@Override\n\tpublic void fail(Throwable t) {\n\t}", "@Override\n\tpublic void failed(Throwable arg0, Void arg1) {\n\t}", "@Override\n\tpublic void failed(Throwable arg0, Void arg1) {\n\t}", "void failure(ServiceExecutionEvent e) {\n\n }", "private void failWithExceptionOnExecutor(CronetException e) {\n mException = e;\n // Do not call into mCallback if request is complete.\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n mReadState = mWriteState = State.ERROR;\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onFailed(this, mResponseInfo, e);\n } catch (Exception failException) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception notifying of failed request\",\n failException);\n }\n mInflightDoneCallbackCount.decrement();\n }", "void Crash(T ex) throws T;", "public void onFailure(Throwable caught) {\n\t\t\t}", "private void failure(PackageMessage pkgMsg, long offset, Exception e) throws DistributionException {\n distributionMetricsService.getFailedPackageImports().mark();\n\n String pubAgentName = pkgMsg.getPubAgentName();\n int retries = packageRetries.get(pubAgentName);\n boolean giveUp = errorQueueEnabled && retries >= config.getMaxRetries();\n String retriesSt = errorQueueEnabled ? Integer.toString(config.getMaxRetries()) : \"infinite\";\n String action = giveUp ? \"skip the package\" : \"retry later\";\n String msg = format(\"Failed attempt (%s/%s) to import the distribution package %s at offset=%d because of '%s', the importer will %s\", retries, retriesSt, pkgMsg, offset, e.getMessage(), action);\n try {\n LogMessage logMessage = getLogMessage(pubAgentName, msg, e);\n logSender.accept(logMessage);\n } catch (Exception e2) {\n log.warn(\"Error sending log message\", e2);\n }; \n if (giveUp) {\n log.warn(msg, e);\n removeFailedPackage(pkgMsg, offset);\n distributionMetricsService.getPermanentImportErrors().increment();\n } else {\n packageRetries.increase(pubAgentName);\n throw new DistributionException(msg, e);\n }\n }", "@Override\n \t\t\tpublic void onFailure(Throwable arg0) {\n \t\t\t\tSystem.err.println(\"***failure:\" + arg0);\n \n \t\t\t}", "public final void fail(Throwable t) {\n Exceptions.throwIfFatal(t);\n this.s.dispose();\n onError(t);\n }", "public interface RoutineException {}", "public void onTryFails(int currentRetryCount, Exception e) {}", "@Override\n public void onUnrecoverableError(final Throwable caught, final String errorCode) {\n Scheduler.get().scheduleDeferred(new ScheduledCommand() {\n @Override\n public void execute() {\n try {\n selectError(caught, errorCode);\n } catch (Throwable e) {\n }\n }\n });\n\n }", "@Override\r\n\tpublic void handleFireException(Actor a, ProcessingException e) throws IllegalActionException {\n\t\tif(!ExceptionUtil.isSeverityFatal(e.getSeverity())){\r\n\t\t\tif(nbRetry < totalnbRetry){\r\n\t\t\t\tExecutionTracerService.trace(a, e.getMessage());\r\n\t\t\t\tExecutionTracerService.trace(a, \"!!!ERROR occured - Retrying step!!!\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep((long)(pausingTime*1000));\r\n\t\t\t\t} catch (InterruptedException e1) {\r\n\t\t\t\t\t// not important\r\n\t\t\t\t}\r\n\t\t\t\tnbRetry ++;\r\n\t\t\t\t //((Director) getContainer()).reportError(e);\r\n\t\t\t\ta.fire();\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\tExecutionTracerService.trace(a, \"!!!All retries failed!!!\");\r\n\t\t\t\tnbRetry = 0;\r\n\t\t\t\t//CompositeActor model = (CompositeActor) ((Director) getContainer()).getContainer();\r\n\t\t\t\t//model.getManager().waitForCompletion();\r\n\t\t\t\t//model.getManager().stop();\r\n\t\t\t\tsuper.handleFireException(a, e);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tsuper.handleFireException(a, e);\r\n\t\t}\r\n\t}", "void setFailed(Throwable lastFailure);", "SendFailure() {\n super(ACLMessage.FAILURE);\n }", "public void onFailure(Throwable caught) {\n\t\t\tGWT.log(\"Error changing status\", caught);\t\n\t\t}", "@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }", "void onFailure();", "void onFailure();", "void onFailure();", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "@Override\n\t public void onFailure(Throwable caught) {\n\n\t }", "@Override\n public void onFailure(Throwable t) {\n throw new RuntimeException(t);\n }", "@Override\n public void onFailure(Throwable t) {\n throw new RuntimeException(t);\n }", "private void fail(String message) {\n\t\t// we're pretty dramatic here, if a resource isn't available\n\t\t// we dump the message and exit the game\n\t\tLogger.severe(message);\n\t\tSystem.exit(0);\n\t}", "public void onFailure(Throwable caught) {\n\t\t\t\trpcResult = \"Remote Procedure Call - Failure\\n\" \n\t\t\t\t\t\t\t+ \"Error al obtener lista de items.\";\n\t\t\t\tmessagesLabel.setStyleName(\"messageErrorLabel\");\n\t\t\t\tmessagesLabel.setText(rpcResult);\n\t\t\t\tWindow.alert(rpcResult);\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void endFail() {\n\t\t\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void HttpFail(int ErrCode) {\n\n\t\t\t\t\t\t\t}", "void persistentFailure(String category);", "public void doTheFaultyThing();", "@Override\n public WorkflowStep fail() {\n this.boardChangeDetected = 0;\n QQTetris.calculationThread.cancel();\n return INITIAL_BOARD.execute(false);\n }", "private void throwsError() throws OBException {\n }", "static public void fail() {\n fail(null);\n }", "@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tgetCloudsim().log(\"WARNING: Job failed: \" + failedJob.getID());\r\n\t}", "Object proceed() throws Throwable;", "public void mo42333a(Throwable th) {\n this.f36204P.cancel();\n this.f36205a.onError(th);\n }", "public void threadFail(String reason) {\n threadFail(new AssertionError(reason));\n }", "private boolean setFailure0(Throwable cause)\r\n/* 389: */ {\r\n/* 390:475 */ if (isDone()) {\r\n/* 391:476 */ return false;\r\n/* 392: */ }\r\n/* 393:479 */ synchronized (this)\r\n/* 394: */ {\r\n/* 395:481 */ if (isDone()) {\r\n/* 396:482 */ return false;\r\n/* 397: */ }\r\n/* 398:485 */ this.result = new CauseHolder(cause, null);\r\n/* 399:486 */ if (hasWaiters()) {\r\n/* 400:487 */ notifyAll();\r\n/* 401: */ }\r\n/* 402: */ }\r\n/* 403:490 */ return true;\r\n/* 404: */ }", "@Override\n public void onFailure(Throwable t) {\n errorOut();\n }", "@Override\r\n\tpublic void onProcessFailure(ProcessFailureInfo processFailureInfo) {\n\t\t\r\n\t}", "void onFailure() {\n\t}", "public void fail(boolean hcf);", "private void fail() {\n mFails++;\n if(mFails > MAX_NUMBER_OF_FAILS) {\n gameOver();\n }\n }", "public Object proceed() throws Throwable;", "public void fail( String reason );", "public void engineFailureStatus() {\n \tthis.engineFailureActive = this.trainModelGUI.engineFailStatus();\n }", "public static void failUnexpectedToReachThis()\r\n\t{\r\n\t\tfail( \"Unexpected to hit this line, as the previous statement should thrown an exception\" ); \r\n\t}", "@Override\n protected void onFailure(Throwable e) {\n // terminate thread\n terminate(false);\n }", "@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }", "@Override\n\t\tpublic void asyncFailure(long id, Exception e)\n\t\t\t\tthrows ConnectorException {\n\t\t\t\n\t\t}", "void exceptionCaught(Throwable cause) throws Exception;", "void exceptionCaught(Throwable cause) throws Exception;", "@Override\n public void onFailure(Throwable t) {\n isSucessful.compareAndSet(true, false);\n failedMessages.put(id.getName(), t.getMessage());\n handleIfFinished(t, isSucessful.get());\n }", "public void checkError() {\n if (this.threadError != null) {\n throw new EncogError(this.threadError);\n }\n }", "public void onFailure(Throwable caught) {\n\t\t\t\trpcResult = \"Remote Procedure Call - Failure\\n\" \n\t\t\t\t\t\t\t+ \"Error al guardar item.\";\n\t\t\t\tmessagesLabel.setStyleName(\"messageErrorLabel\");\n\t\t\t\tmessagesLabel.setText(rpcResult);\n\t\t\t\tWindow.alert(rpcResult);\n\t\t\t}", "@Test\n public void executeWithFailure() {\n new SimpleCommandFailure(\"badRequest\", HystrixRuntimeException.FailureType.COMMAND_EXCEPTION).execute();\n }", "@Override\n boolean canFail() {\n return true;\n }", "public void performRecovery();", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "protected void onUnrecoverableError(I i, Throwable t)\n/* */ {\n/* 105 */ log.error(\"Unrecoverable error occurred while processing input on pipeline [{}]\", printableName(), t);\n/* */ }", "public void markAsFailed() {\n execution.setErrorReported();\n }" ]
[ "0.65236676", "0.64839196", "0.6443723", "0.6430043", "0.6358034", "0.63291323", "0.62917346", "0.6259834", "0.62206566", "0.6124485", "0.61244255", "0.61151236", "0.6087802", "0.6081895", "0.60613614", "0.60613614", "0.60185426", "0.6007208", "0.6001237", "0.5985341", "0.5985341", "0.5964724", "0.59620184", "0.5942882", "0.593869", "0.5936266", "0.59038186", "0.58984256", "0.5898369", "0.58652097", "0.5863994", "0.5862751", "0.5861099", "0.58371854", "0.58367735", "0.5805414", "0.579575", "0.5790286", "0.57814294", "0.57552695", "0.5754454", "0.5754454", "0.5753784", "0.57535255", "0.5729983", "0.572015", "0.5694862", "0.5693299", "0.5692078", "0.5690666", "0.56793135", "0.56744033", "0.56736463", "0.5673031", "0.5661755", "0.5653257", "0.56483084", "0.56433326", "0.56433326", "0.56433326", "0.56430954", "0.5641275", "0.5639196", "0.5639196", "0.5637609", "0.56309384", "0.56290185", "0.5629009", "0.562478", "0.5624131", "0.5615756", "0.5609876", "0.5608547", "0.56029963", "0.5602701", "0.5602349", "0.56022125", "0.5594034", "0.5588181", "0.55827385", "0.5579687", "0.55733734", "0.5561089", "0.55478704", "0.55441946", "0.55413806", "0.55338234", "0.5522196", "0.55151117", "0.55141276", "0.55118126", "0.55118126", "0.55096364", "0.55090094", "0.5508386", "0.5507353", "0.54986227", "0.5497918", "0.54964435", "0.5496431", "0.54841495" ]
0.0
-1
Releases the checkpoint read lock.
@Override public void checkpointReadUnlock() { if (checkpointLock.writeLock().isHeldByCurrentThread()) return; checkpointLock.readLock().unlock(); if (ASSERTION_ENABLED) CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public void releaseReadLock() {\r\n return;\r\n }", "void releaseReadLock();", "protected final void unlockRead() {\n m_lock.readLock().unlock();\n }", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\treaders--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\n\t\t}", "void releaseReadLock(E key);", "public void releaseLock() throws JedisException {\n if (fetch == true) {\n redisTemplate.delete(lockKey);\n LOGGER.info(\"release redis distribution_lock [{}] suceess \", lockKey);\n }\n }", "public void unlock() {\n try {\n if (lock != null)\n lock.release();\n if (channel != null)\n channel.close();\n }\n catch (Exception e) {\n throw new ReviewedStingException(\"An error occurred while unlocking file\", e);\n }\n }", "private void basicReleaseLock() {\n if (logger.isTraceEnabled(LogMarker.DLS_VERBOSE)) {\n logger.trace(LogMarker.DLS_VERBOSE, \"[DLockToken.basicReleaseLock] releasing ownership: {}\",\n this);\n }\n\n leaseId = -1;\n lesseeThread = null;\n leaseExpireTime = -1;\n thread = null;\n recursion = 0;\n ignoreForRecovery = false;\n\n decUsage();\n }", "void unlockRead(long stamp);", "void downgradeToReadLocks();", "public void unlock() {\n setLock.unlock(this);\n }", "void releaseLock(QName lockQName, String lockToken);", "public void removeLock(DedupFileLock lock) {\n\t\tif (SDFSLogger.isDebug())\n\t\t\tSDFSLogger.getLog().debug(\n\t\t\t\t\t\"removelock \" + df.getMetaFile().getPath());\n\t\tlock.release();\n\t\tdf.removeLock(lock);\n\t}", "@Override\n\tpublic void unLock() {\n\t\t\n\t}", "protected void unlock() {\n synchronized ( lock )\n {\n lock.notify();\n }\n }", "private static void j_unlock() {\r\n\t\tFileChannel channel = globalFileChannel;\r\n\t\tFileLock lock = globalFileLock;\r\n\t\tglobalFileChannel = null;\r\n\t\tglobalFileLock = null;\r\n\t\ttry {\r\n\t\t\tlock.release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tchannel.close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t}", "public final void release() {\n explicitlyLocked = false;\n byteBase.unlock();\n }", "private static void releaseLock(Lock lock) {\r\n\t\t// Shuts down the lock server.\r\n\t\tlock.getServer().stop();\r\n\t\t// Releases the locked resources.\r\n\t\ttry {\r\n\t\t\tlock.getLockFileLock().release();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tlock.getLockFileChannel().close();\r\n\t\t} catch (Throwable t) {\r\n\t\t\t;\r\n\t\t}\r\n\t\t// Deletes the port file.\r\n\t\tlock.getPortFile().delete();\r\n\t\t// Deletes the lock file.\r\n\t\tlock.getLockFile().delete();\r\n\t}", "@KeepForSdk\n public void release() {\n if (this.zzm.decrementAndGet() < 0) {\n Log.e(\"WakeLock\", String.valueOf(this.zze).concat(\" release without a matched acquire!\"));\n }\n String zza = zza(null);\n synchronized (this.zza) {\n if (this.zzi) {\n int i;\n Integer[] numArr = (Integer[]) this.zzj.get(zza);\n if (numArr != null) {\n if (numArr[0].intValue() == 1) {\n this.zzj.remove(zza);\n i = 1;\n } else {\n numArr[0] = Integer.valueOf(numArr[0].intValue() - 1);\n }\n }\n i = 0;\n }\n if (!this.zzi) {\n }\n }\n zza(0);\n }", "public void releaseDeferredLock() {\r\n return;\r\n }", "public void releasePingLock() {\r\n\t\tbeingPinged.set(false);\r\n\t}", "public void closeLock(){\n /*Code to send the locking signal to the physical device Gate*/\n }", "public static void unlockFile() {\n try {\n \t\n if(lock != null) {\n \t\n lock.release();\n channel.close();\n f.delete();\n \n }\n \n } catch(IOException e) {\n \t\n e.printStackTrace();\n \n }\n \n }", "protected final void unlockWrite() {\n m_lock.writeLock().unlock();\n }", "@Override\n public void unlock() {\n Preconditions.checkState(connection != null);\n checkThread();\n unlockLatency.record(() -> {\n if (locked) {\n try {\n Transaction tnx = session.beginTransaction();\n try {\n DbLockRecord record = fetch(session, false, true);\n if (record == null) {\n throw new LockException(\n String.format(\"[%s][%s][%s] Lock record not found.\",\n id().getNamespace(), id().getName(), threadId()));\n }\n if (record.isLocked() && instanceId().compareTo(record.getInstanceId()) == 0) {\n record.setLocked(false);\n record.setInstanceId(null);\n record.setTimestamp(-1);\n\n session.save(record);\n } else {\n long delta = System.currentTimeMillis() - lockedTime;\n if (delta > lockExpiryTimeout()) {\n throw new LockException(\n String.format(\"[%s][%s] Lock expired. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n locked = false;\n tnx.commit();\n } catch (Throwable t) {\n tnx.rollback();\n throw new LockException(t);\n } finally {\n locked = false;\n lockedTime = 0;\n session.clear();\n super.unlock();\n }\n } catch (Exception ex) {\n throw new LockException(ex);\n }\n } else {\n throw new LockException(\n String.format(\"[%s][%s] Lock not held by current thread. [thread=%d]\",\n id().getNamespace(), id().getName(), threadId()));\n }\n });\n }", "public void readerUnlock() throws Exception, ClassCastException {\n\t\t// TODO\n\t\tif(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock is not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tReaderList newList;\n\t\tHolders readerLock;\n\t\tdo {\n\t\t\treaderLock = holders.get(); //return the value - not the instance holders\n\t\t\tif (readerLock instanceof Writer) {\n\t\t\t\tthrow new Exception(\"Lock is not held by any reader\");\n\t\t\t}\n\t\t\tif(!((ReaderList) readerLock).contains(current)){\n\t\t\t\tthrow new Exception(\"Lock not acquired\");\n\t\t\t}\n\t\t\tnewList = ((ReaderList) readerLock).remove(current);\n\t\t} while (!holders.compareAndSet(readerLock, newList));\n\t}", "public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }", "protected final void close()\n {\n try {\n _reader.close();\n _reader = null;\n } catch ( IOException except ) { }\n }", "protected final void unlock(boolean writeLock) {\n Lock lock = writeLock ? m_lock.writeLock() : m_lock.readLock();\n lock.unlock();\n }", "public synchronized void releaseWakeLock() {\n if (wakeLock != null) {\n try {\n wakeLock.release();\n Logger.i(\"PowerLock released\");\n } catch (RuntimeException e) {\n Logger.e(\"Exception when releasing wakeup lock\", e);\n }\n }\n }", "public void releaseLock() throws LockException {\n\t\tlong[] err = new long[1];\n\t\tDpsHelper dps = null;\n\t\t\n\t\ttry {\n\t\t\tdps = DpsHelperHolder.getDpsHelper();\n\t\t\tdps.dlReleaseLock(id, err);\n\t\t} catch(Exception e) {\n\t\t\t// Either dps cannot be initialized or releaseLock went wrong.\n\t\t\t// An error code of 65534 indicates that this error occurred inside\n\t\t\t// the dps JNI glue layer and not inside the actual lock functions.\n\t\t\tthrow new LockException(65534, e.getMessage());\n\t\t}\n\t\t\n\t\tif (err[0] != 0) {\n\t\t\tthrow new LockException(dps.dlGetLastDistributedLockErrorCode(), \n\t\t\t\t\tdps.dlGetLastDistributedLockErrorString());\n\t\t}\n\t\t\n\t\treturn;\t\n\t}", "@Override\n public void unlock() {\n }", "public void unlockExclusiveAndTakeWriteLock()\n {\n long s = initiateExclusiveLockRelease();\n long n = nextSeq( s ) - EXL_MASK + CNT_UNIT;\n unconditionallySetState( n );\n }", "public void releaseLocks() {\n releaseLocksTo(null);\n }", "public void writerUnlock() throws Exception {\n\t\t// TODO\n\t\tif(holders.get() instanceof ReaderList){\n\t\t\tthrow new Exception(\"Lock was held by a reader, one should use readerUnlock()\");\n\t\t}else if(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock was not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tif(((Writer)holders.get()).thread.equals(current)){\n\t\t\tholders.compareAndSet(holders.get(), null);\n\t\t}else{\n\t\t\tthrow new Exception(\"Lock was not held by this thread \");\n\t\t}\n\t}", "private void cleanupAfterCommit(\n final FSDataInputStream inputStream,\n final TaskAttemptContext context)\n throws IOException {\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException e) {\n LOG.error(\"Could not close input stream\", e);\n throw e;\n }\n }\n cleanupResources(context);\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "public void close() throws IOException {\r\n reader.close();\r\n reader = null;\r\n }", "protected void tearDown() throws Exception {\n _reader.close();\n }", "public void disconnect() {\n if (reader != null) {\n reader.stop();\n }\n\n }", "private void finishRecovery() throws IgniteCheckedException {\n assert !cctx.kernalContext().clientNode();\n\n long time = System.currentTimeMillis();\n\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n\n try {\n for (DatabaseLifecycleListener lsnr : getDatabaseListeners(cctx.kernalContext()))\n lsnr.beforeResumeWalLogging(this);\n\n // Try to resume logging since last finished checkpoint if possible.\n if (walTail == null) {\n CheckpointStatus status = readCheckpointStatus();\n\n walTail = CheckpointStatus.NULL_PTR.equals(status.endPtr) ? null : status.endPtr;\n }\n\n cctx.wal().resumeLogging(walTail);\n\n walTail = null;\n\n // Recreate metastorage to refresh page memory state after deactivation.\n if (metaStorage == null)\n metaStorage = createMetastorage(false);\n\n notifyMetastorageReadyForReadWrite();\n\n U.log(log, \"Finish recovery performed in \" + (System.currentTimeMillis() - time) + \" ms.\");\n }\n catch (IgniteCheckedException e) {\n if (X.hasCause(e, StorageException.class, IOException.class))\n cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, e));\n\n throw e;\n }\n finally {\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }\n }", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "public void decreaseFileReaderReference(TsFileResource tsFile, boolean isClosed) {\n synchronized (this) {\n if (!isClosed && unclosedReferenceMap.containsKey(tsFile.getTsFilePath())) {\n if (unclosedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), false);\n }\n } else if (closedReferenceMap.containsKey(tsFile.getTsFilePath())\n && (closedReferenceMap.get(tsFile.getTsFilePath()).decrementAndGet() == 0)) {\n closeUnUsedReaderAndRemoveRef(tsFile.getTsFilePath(), true);\n }\n }\n tsFile.readUnlock();\n }", "final void internalRelease() {\n if(!explicitlyLocked) {\n byteBase.unlock();\n }\n }", "private PluginResult releaseWakeLock() {\n PluginResult result = null;\n\n if( this.wakeLock != null ) {\n this.wakeLock.release();\n this.wakeLock = null;\n\n result = new PluginResult(PluginResult.Status.OK, \"OK\");\n }\n else {\n result = new PluginResult(PluginResult.Status.ILLEGAL_ACCESS_EXCEPTION, \"No WakeLock active - acquire first\");\n }\n\n return result;\n }", "public void checkReadLock() {\r\n return;\r\n }", "void unlockWrite(long stamp);", "protected void releaseBuffer()\n {\n interlock.endReading();\n // System.out.println(\"endReading: 2\");\n }", "@Override\n public void close() {\n \ttry {\n \t\tif(reader != null) {\n \t\t\treader.close();\n \t\t}\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public void finalize() {\n acquire.release();\n }", "public void finalize() {\n acquire.release();\n }", "public void release() throws IOException;", "public void close() {\n\t\tkeystore = null;\n\t}", "public static void unjoinAndClose(){\n Session s = (Session)_sessionRef.get();\n if(s != null){\n s.close();\n }\n }", "public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }", "public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }", "public void unlock() {\n if(semaphore != null && semaphore.availablePermits() == 0) {\n semaphore.release();\n }\n }", "void lockReleased(String lock);", "public void unlock(){\n logger.log(Level. INFO,\"unlock() \"+lockState+\".\");\n this.lock.lock();\n logger.log(Level. INFO,\"unlock taking mutex :\"+lockState+\".\");\n switch(this.lockState){\n \t\t\tcase RLT:\n \t\t\tlockState = State.RLC;\n \t\t\tbreak;\n \t\t\tcase WLT:\n \t\t\tlockState = State.WLC;\n \t\t\tcase RLT_WLC:\n \t\t\tlockState = State.WLC;\t\n break;\n default:\n logger.log(Level.WARNING,\"Unlock with : \"+lockState+\".\");\n break;\n \t\t}\n this.available.signal();\t\n logger.log(Level.WARNING,\"SIGNAL\");\n this.lock.unlock();\n \t}", "void releaseWriteLock(E key);", "@Override\n protected void doClose() {\n FileUtil.closeSilent(this.in);\n this.recordFactory = null;\n this.geometryFactory = null;\n this.in = null;\n this.recordDefinition = null;\n this.resource = null;\n }", "@Override\n public void close() {\n if (complete.compareAndSet(false, true)) {\n rc = BKException.Code.UnexpectedConditionException;\n writeSet.recycle();\n }\n entryImpl.close();\n }", "@Override\n\tprotected void unLockNbr() {\n\t\t\n\t}", "public void unlock(CacheLock lock) throws LockFailedException {\n try {\n lock.unlock();\n\n } catch (Exception e) {\n throw new LockFailedException(String.format(\"Lock release for lock[%s] failed! Reason:[%s]\", lock, e.getMessage()), e);\n }\n }", "private void removeLockId()\n {\n MDC.remove(OutwardlyManagedFileResourceStore.LOCK_ID);\n }", "public void leaveBridge() {\n lock.unlock();\n }", "@Override\n\t\tpublic void unlock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twriters--;\n\t\t\t\tlock.notifyAll();\n\t\t\t}\n\t\t}", "private static void _releaseLock(DeltaLink dLink, Id datasourceId, Id lockSession) {\n try {\n dLink.releaseLock(datasourceId, lockSession);\n } catch (HttpException ex) {\n FmtLog.warn(LOG, \"Release lock failed: %s\", datasourceId.toString());\n }\n }", "public static void close() {\n try {\n sDiskLruCache.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void unlockBack()\n {\n m_bBackLock = false;\n }", "public void close() {\n if (this.accessFile != null) {\n try {\n this.accessFile.close();\n } catch (IOException unused) {\n }\n this.accessFile = null;\n }\n }", "private void producerShutdownSpinLock() {\n\t\twhile (!imageProducer.isTerminated()) {\n\t\t\t// spin spin\n\t\t}\n\t}", "private void cleanup(InputStream in) {\n try {\n if (reader != null)\n reader.close();\n if (in != null)\n in.close();\n reader = null;\n }\n catch (Exception ex) {\n // ignore!\n }\n }", "void checkpoint() throws IOException;", "public void releaseLock(LockedDocument lockedDoc) {\n try {\n \tservice.releaseLock(lockedDoc);\n \tmObjects.addStatusList(\"Document lock released.\");\n } catch (InvalidRequest e) {\n \tmObjects.addStatusList(\"Error saving document: \" + e.getMessage());\n \tToast.makeText(this, \"Error releasing document due to invalid request\", \n Toast.LENGTH_LONG).show();\n } catch (LockExpired e) {\n \tmObjects.addStatusList(\"Lock had already expired; release failed.\");\n \tToast.makeText(this, \"Lock expired\", Toast.LENGTH_LONG).show();\n }\n }", "void disposeLocked() {\n ArrayList<UpdateRecord> records = mRecordsByProvider.get(this.mProvider);\n records.remove(this);\n }", "private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}", "@Override\n public void close() {\n dataPageIterator = null;\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n }", "public void close() throws IOException {\n reader.close();\n }", "public static void close( Reader reader )\n {\n if ( reader != null )\n {\n try\n {\n reader.close();\n }\n catch ( IOException e )\n {\n log.error( \"Error closing reader: \" + reader, e );\n }\n }\n }", "public void cleanup() {\n this.close();\n this.delete(this.backingFileBasename + RECORDING_OUTPUT_STREAM_SUFFIX);\n this.delete(this.backingFileBasename + RECORDING_INPUT_STREAM_SUFFIX);\n }", "public synchronized void forceRelease() {\n try {\n if (store != null) {\n store.close();\n }\n } catch (IOException e) {\n LOG.warn(\"Error closing timeline store\", e);\n }\n store = null;\n // reset offsets so next time logs are re-parsed\n for (LogInfo log : appLogs.getDetailLogs()) {\n if (log.getFilename().contains(groupId.toString())) {\n log.setOffset(0);\n }\n }\n LOG.debug(\"Cache for group {} released. \", groupId);\n }", "@Test\n public void writeLockInterruptSaveTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n final Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n testUse.getCountAndSleepInReadLock(2000);\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n countDownLatch.countDown();\n }\n }\n });\n thread.start();\n Thread.sleep(1000);\n Thread.sleep(10);\n new Thread(new Runnable() {\n @Override\n public void run() {\n thread.interrupt();\n testUse.minusCountInWriteLock();\n countDownLatch.countDown();\n }\n }).start();\n countDownLatch.await();\n Assert.assertEquals(999, testUse.count);\n }", "public void unlockFlush()\n {\n long s, n;\n do\n {\n s = getState();\n if ( (s & FLS_MASK) != FLS_MASK )\n {\n throwUnmatchedUnlockFlush( s );\n }\n // We don't increment the sequence with nextSeq here, because flush locks don't invalidate readers\n n = s - FLS_MASK;\n }\n while ( !compareAndSetState( s, n ) );\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "public void finish() throws Exception {\n\t\tthis.reader.open();\n\t\tthis.reader.autoModeReset();\n\t\tthis.reader.setNotifyMode(AlienClass1Reader.OFF);\n\t\tthis.reader.close();\n\t}", "public void acquireReadLock() {\r\n return;\r\n }", "synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}", "@Override\n public void cleanup() {\n if (this.inputStream != null) {\n try {\n this.inputStream.close();\n }\n catch (IOException var1_1) {}\n }\n this.defaultFetcher.cleanup();\n }", "public void unlock() {\n int id = ThreadID.get();\n \n this.levels[id].set(0);\n\n }", "public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}", "public void release()\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }", "@Override public void checkpointReadLockTimeout(long val) {\n checkpointReadLockTimeout = val;\n }", "public void abort(int tid) {\n List<Lock> lockList = null;\n for (Integer varIndex : _lockTable.keySet()) {\n lockList = _lockTable.get(varIndex);\n int size = lockList.size();\n for (int i = size - 1; i >= 0; i--) {\n if (lockList.get(i).getTranId() == tid) {\n if (lockList.get(i).getType() == Lock.Type.WRITE) {\n _uncommitDataMap.remove(varIndex);\n }\n lockList.remove(i);\n break;\n }\n }\n }\n // remove this transaction from accessed list\n _accessedTransactions.remove(tid);\n }", "protected void leaveCriticSection(RDVariable rdv, RDThread rdt) {\n\t\t/*\n\t\t * unlock the explicit lock\n\t\t */\n\n\t\trdv.raceAvoidLock.unlock();\n\n\t\tif (DEBUG)\n\t\t\tRaceDetector.printDebug(\" explicit lock (\"\n\t\t\t\t\t+ System.identityHashCode(rdv) + \") unlocked \"\n\t\t\t\t\t+ Thread.currentThread() + \" (critic)\");\n\t}", "public void releasePin(ARTIK_PINS pin) throws IOException {\n assertPinExported(pin);\n echoToPath(BASE_PIN_UNEXPORT_PATH, getPinNumber(pin));\n }", "protected void tearDown() throws Exception {\r\n filePersistence = null;\r\n readOnlyFile.delete();\r\n }" ]
[ "0.7583303", "0.67791057", "0.6699587", "0.61044675", "0.59771276", "0.5972889", "0.5961482", "0.5863713", "0.5812012", "0.57306665", "0.5688371", "0.5563095", "0.5463182", "0.53627133", "0.52806693", "0.5269479", "0.5244069", "0.52330035", "0.52256495", "0.5221387", "0.52008873", "0.51974726", "0.5186639", "0.5159813", "0.5156899", "0.5129523", "0.5106196", "0.5096021", "0.5091175", "0.50711846", "0.50611603", "0.5058762", "0.5049166", "0.5038227", "0.501372", "0.4951735", "0.49307075", "0.49145442", "0.48907876", "0.48890102", "0.48761514", "0.48617518", "0.48450384", "0.48416743", "0.48388174", "0.4838669", "0.47971562", "0.47861502", "0.47845882", "0.47786483", "0.47760752", "0.4773064", "0.47450668", "0.47450668", "0.47422478", "0.47406766", "0.47350886", "0.47345123", "0.47313917", "0.47267878", "0.47206676", "0.47097972", "0.47077602", "0.46937245", "0.4691743", "0.4691313", "0.46736154", "0.46714014", "0.46704677", "0.46614525", "0.46568677", "0.46394122", "0.4636971", "0.4634211", "0.4630204", "0.4626631", "0.4614179", "0.46037355", "0.4588012", "0.45663372", "0.45622635", "0.45600078", "0.45579746", "0.45566586", "0.45559466", "0.45516086", "0.45503047", "0.45490292", "0.45480573", "0.45383796", "0.45354956", "0.452369", "0.45184255", "0.44981334", "0.449409", "0.44887552", "0.4477972", "0.44774362", "0.4476994", "0.4474954" ]
0.80636907
0
Loads WAL pointer from CP file
private WALPointer readPointer(File cpMarkerFile, ByteBuffer buf) throws IgniteCheckedException { buf.position(0); try (FileIO io = ioFactory.create(cpMarkerFile, READ)) { io.readFully(buf); buf.flip(); return new FileWALPointer(buf.getLong(), buf.getInt(), buf.getInt()); } catch (IOException e) { throw new IgniteCheckedException( "Failed to read checkpoint pointer from marker file: " + cpMarkerFile.getAbsolutePath(), e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void init()\n {\n try\n {\n ObjectInputStream ois = \n new ObjectInputStream(new FileInputStream(lexFile));\n lexDB = (HashMap)ois.readObject();\n ois.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"File not found: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (IOException e) {\n System.err.println(\"IO Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } catch (ClassNotFoundException e) {\n System.err.println(\"Class Not Found Exception: \" + e.toString());\n e.printStackTrace();\n System.exit(-1);\n } // catch\n }", "public static void load() {\r\n\t\tString mar = new String(readMAR().getStr());\r\n\t\tTraceINF.write(\"Read memory \"+mar);\r\n\t\tFormatstr content = new Formatstr();\r\n//\t\tSystem.out.println(\"index\"+Integer.parseInt(mar.substring(0, mar.length() - 2), 2));\r\n\t\tcontent.setStr(getBank(mar)[Integer.parseInt(mar.substring(0, mar.length() - 2), 2)]);\r\n\t\t\r\n\t\twriteMBR(content);\r\n\t\tTraceINF.write(\"Read finished.\");\r\n\t}", "public void load(Storable storable)/* throws LogFile.LockException */{\n if (dataFile != null) {\n // If the file has been set, synchronize on it.\n synchronized (dataFile) {\n storable.load(properties);\n }\n }\n else {\n storable.load(properties);\n }\n }", "public long loadDataBase() throws IOException {\n long startTime = Time.currentElapsedTime();\n long zxid = snapLog.restore(dataTree, sessionsWithTimeouts, commitProposalPlaybackListener);\n initialized = true;\n long loadTime = Time.currentElapsedTime() - startTime;\n ServerMetrics.getMetrics().DB_INIT_TIME.add(loadTime);\n LOG.info(\"Snapshot loaded in {} ms, highest zxid is 0x{}, digest is {}\",\n loadTime, Long.toHexString(zxid), dataTree.getTreeDigest());\n return zxid;\n }", "private void loadMemory() {\n try {\n File varTmpDir = new File(\"data/\" + brainLocation + \".ser\");\n if (varTmpDir.exists()) {\n FileInputStream fileIn = new FileInputStream(varTmpDir);\n ObjectInputStream in = new ObjectInputStream(fileIn);\n longTermMemory = (HashMap<String, BoardRecord>) in.readObject();\n in.close();\n fileIn.close();\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException c) {\n System.out.println(\"File not found\");\n c.printStackTrace();\n return;\n }\n\n System.out.println(\"RECALLED LONG TERM MEMORIES FROM \" + brainLocation + \": \" + longTermMemory.toString());\n }", "public void load() ;", "File getLoadLocation();", "private static void loadMemo() {\n\t\t\n\t}", "private static void loadSoFromInternalStorage(String fileName) throws UnsatisfiedLinkError {\n String path = System.getProperties().get(\"java.io.tmpdir\").toString().replace(\"/cache\", \"/files/\" + fileName);\n File file = new File(path);\n SecurityManager security = System.getSecurityManager();\n if (security != null) {\n security.checkLink(file.getAbsolutePath());\n }\n System.load(file.getAbsolutePath());\n }", "public void loadMemory(String inputFile){\n\t\tint pc = 0;\n\t\ttry{\n\t\t\tRandomAccessFile raf = new RandomAccessFile(new File(inputFile),\"rw\");\n\t\t\tString strLine;\n\t\t\tint decimalNumber;\n\t\t\twhile ((strLine = raf.readLine())!=null){\n\t\t\t\tstrLine = strLine.substring(0, 8); //get the first 8 char(hex instruction)\n\t\t\t\tdecimalNumber = new BigInteger(strLine, 16).intValue(); //decode the hex into integer\n\t\t\t\tloadInstructionInMemory(pc, decimalNumber);\n\t\t\t\tpc += 4;\n\t\t\t}\n\t\t\traf.close();\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(\"Error:\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "void massiveModeLoading( File dataPath );", "private Log() {\r\n readFile(\"Save.bin\",allLogs);\r\n readFile(\"Tag.bin\", allTags);\r\n readFile(\"Password.bin\", userInfo);\r\n }", "public DbRecord( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n Load( szFileName );\n }", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "public void load(File source);", "void load();", "void load();", "public void loadMem(final String filepath) {\r\n loadMem(new File(filepath));\r\n }", "private static void readDatabase(String path) {\n try {\n FileInputStream fileIn = new FileInputStream(path + \"/database.ser\");\n ObjectInputStream inStream = new ObjectInputStream(fileIn);\n database = (Database) inStream.readObject();\n inStream.close();\n fileIn.close();\n } catch (IOException i) {\n i.printStackTrace();\n } catch (ClassNotFoundException c) {\n c.printStackTrace();\n }\n }", "public void load() {\n\t}", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "public void onStart() {\n FileWriteAheadLogManager wal = (FileWriteAheadLogManager)ctx.cache().context().wal();\n\n if (wal == null)\n return;\n\n this.wal = wal;\n\n SegmentRouter segmentRouter = wal.getSegmentRouter();\n\n if (segmentRouter.hasArchive())\n walFolders = new File[] {segmentRouter.getWalArchiveDir(), segmentRouter.getWalWorkDir()};\n else\n walFolders = new File[] {segmentRouter.getWalWorkDir()};\n }", "public void load() {\n }", "@Override\n public void load(String keyWord, String fileName){\n FileReader loadDetails;\n String record;\n try{\n loadDetails=new FileReader(fileName);\n BufferedReader bin=new BufferedReader(loadDetails);\n while (((record=bin.readLine()) != null)){\n if ((record).contentEquals(keyWord)){\n setUsername(record);\n setPassword(bin.readLine());\n setFirstname(bin.readLine());\n setLastname(bin.readLine());\n setDoB((Date)DMY.parse(bin.readLine()));\n setContactNumber(bin.readLine());\n setEmail(bin.readLine());\n setSalary(Float.valueOf(bin.readLine()));\n setPositionStatus(bin.readLine());\n homeAddress.load(bin);\n }//end if\n }//end while\n bin.close();\n }//end try\n catch (IOException ioe){}//end catch\n catch (ParseException ex) {\n Logger.getLogger(Product.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private final void loadDictionary(String path, long startOffset, long length) {\n \tLog.e(TAG, \"loadDictionary: path=\" + path);\n mNativeDict = openNative(path, startOffset, length, TYPED_LETTER_MULTIPLIER,\n FULL_WORD_SCORE_MULTIPLIER, MAX_WORD_LENGTH, MAX_WORDS, MAX_PREDICTIONS);\n }", "public void loadState() throws IOException, ClassNotFoundException {\n\t\tFile f = new File(workingDirectory() + File.separator + id() + FILE_EXTENSION);\n\t\t\n\t\t// load client state from file\n\t\tObjectInputStream is = new ObjectInputStream(new FileInputStream(f));\n\t\tTrackerDaemon client = (TrackerDaemon) is.readObject();\n\t\tis.close();\n\t\t\n\t\t// copy attributes\n\t\tthis.peerRecord = client.peerRecord();\n\t\t\n\t}", "LineNumberTable(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException {\n this(name_index, length, (LineNumber[]) null, constant_pool);\n data = new byte[length];\n int byteReads = file.read(data);\n isInPackedState = true;\n // assert(bytesRead==length)\n }", "public void load();", "public void load();", "public static void load() {\n }", "int lcmaps_init_and_logfile(String logfile, com.sun.jna.Pointer fp,\n\t\tshort logtype);", "private static void load(){\n }", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public int loadDatabase(){\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(databaseFileName));\n String line = bufferedReader.readLine();\n while (line != null) {\n HashMap<String,String> activityString = parseStatement(line);\n System.out.println(activityString);\n Activity activity = new Activity();\n activity.create(activityString);\n allActivities.add(activity);\n line = bufferedReader.readLine();\n\n }\n }\n catch(Exception e){\n System.out.println(e);\n return -1;\n }\n\n\n //TODO: write utility to load database, including loading csv hashes into activity classes. Activity class - > needs list of accepted attr?\n\n return 0;\n }", "public abstract void load() throws IOException;", "@Override\n public String visit(ALoadStmt n) {\n String r1 = this.reg[n.f1.f0.which];\n int offset = Integer.parseInt(n.f2.f1.f0.tokenImage);\n // SPILLEDARG 起始0\n // +3 : 用于保存返回地址和上一栈帧的 fp\n Global.outputString += \"lw $\" + r1 + \", -\" + ((offset + 3) * 4)\n + \"($fp)\\n\";\n return null;\n }", "private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\n\t}", "public abstract LogPointer getPointer() throws IOException;", "public abstract LogPointer getPointer() throws IOException;", "public LogFileV2(File file) {\n try {\n if(!file.getParentFile().exists()){\n file.getParentFile().mkdirs();\n }\n this.file = file;\n this.randomAccessFile = new RandomAccessFile(file,\"rw\");\n this.fileChannel = randomAccessFile.getChannel();\n this.readMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n this.writeMap = fileChannel.map(FileChannel.MapMode.READ_WRITE,0, CommitLogV2.FILE_SIZE);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void loadDatabase(){\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(filePath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString path = info[0].trim();\n\t\t\t\tString fileID = info[1];\n\t\t\t\tInteger nOfChunks = Integer.parseInt(info[2]);\n\t\t\t\tPair<FileID, Integer> pair = new Pair<FileID, Integer>(new FileID(fileID), nOfChunks);\n\t\t\t\tPeer.fileList.put(path, pair);\n\t\t\t}\n\t\t\treader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/*\n\t\t * LOAD THE CHUNK LIST\n\t\t */\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(chunkPath))){\n\t\t\tfor(String line; (line = reader.readLine()) != null; ){\n\t\t\t\tString[] info = line.split(Pattern.quote(\"|\"));\n\t\t\t\tString fileID = info[0].trim();\n\t\t\t\tInteger chunkNo = Integer.parseInt(info[1]);\n\t\t\t\tInteger drd = Integer.parseInt(info[2]);\n\t\t\t\tInteger ard = Integer.parseInt(info[3]);\n\t\t\t\tChunkInfo ci = new ChunkInfo(fileID,chunkNo,drd,ard);\n\t\t\t\tPeer.chunks.add(ci);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void load(String indexPath, String dbPath) {\n int lineIndex = 0;\n String line = \"\";\n BatchInserter inserter = null;\n BufferedReader reader = null;\n int id;\n try {\n Map<String, String> config = new HashMap<String, String>();\n config.put(\"dbms.pagecache.memory\", \"100g\");\n if (Util.pathExist(dbPath) == false)\n throw new Exception(dbPath + \" does not exist!\");\n inserter = BatchInserters.inserter(new File(dbPath).getAbsoluteFile(), config);\n\n reader = new BufferedReader(new FileReader(new File(indexPath)));\n\n lineIndex++;\n line = reader.readLine();\n String[] strList = line.split(\",\");\n int nodeCount = Integer.parseInt(strList[0]);\n int MAX_HOP = Integer.parseInt(strList[1]);\n\n for (int i = 0; i < nodeCount; i++) {\n lineIndex++;\n id = Integer.parseInt(reader.readLine());\n long neo4j_ID = graph_pos_map_list[id];\n for (int j = 1; j <= MAX_HOP; j++) {\n lineIndex++;\n line = reader.readLine();\n strList = line.split(\":\");\n int type = Integer.parseInt(strList[0]);\n switch (type) {\n case 0:\n inserter.setNodeProperty(neo4j_ID, reachGridName + \"_\" + j, strList[1]);\n break;\n case 1:\n inserter.setNodeProperty(neo4j_ID, rmbrName + \"_\" + j, strList[1]);\n break;\n case 2:\n if (strList[1].equals(\"true\"))\n inserter.setNodeProperty(neo4j_ID, geoBName + \"_\" + j, true);\n else {\n inserter.setNodeProperty(neo4j_ID, geoBName + \"_\" + j, false);\n }\n break;\n default:\n throw new Exception(String.format(\"Vertex %d hop %d has type %d!\", id, j, type));\n }\n inserter.setNodeProperty(neo4j_ID, GeoReachTypeName + \"_\" + j, type);\n }\n }\n\n inserter.shutdown();\n\n } catch (Exception e) {\n if (reader != null)\n try {\n reader.close();\n } catch (IOException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n if (inserter != null)\n inserter.shutdown();\n Util.println(String.format(\"line %d: %s\", lineIndex, line));\n e.printStackTrace();\n System.exit(-1);\n }\n }", "protected NioWalFile getWalFile(long lsn) throws IOException, IllegalArgumentException {\n checkLsn(lsn);\n long fileLsn = WalFileUtils.fileLsn(lsn);\n\n try {\n NioWalFile walFile = this.walCache.get(fileLsn);\n if (walFile != null) {\n return walFile;\n }\n\n synchronized (this.walCache) {\n walFile = this.walCache.get(fileLsn);\n if (walFile != null) {\n return walFile;\n }\n String filename = WalFileUtils.filename(fileLsn);\n File file = new File(this.dir, filename);\n if (!file.isFile()) {\n return null;\n }\n\n NioWalFile tmp = new NioWalFile(file);\n boolean failed = true;\n try {\n this.walCache.put(fileLsn, tmp);\n ensureOpen();\n walFile = tmp;\n failed = false;\n } finally {\n if (failed) {\n IoUtils.close(tmp);\n }\n }\n }\n\n return walFile;\n } catch (IllegalStateException e) {\n ensureOpen();\n throw e;\n }\n }", "@Test\n\tpublic void loadTestPlan() {\n\t\tFileInputStream reader = null;\n\t\ttry {\n\t\t\treader = new FileInputStream(new File(JmeterBundleTests.testPlanFilename));\n\t\t\tcurrentHashTree = SaveService.loadTree(reader);\n\t\t\tassertNotNull(currentHashTree);\n\t\t\treader.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tassertNotNull(null);\n\t\t}\n\t}", "public void load(){\n Player temp;\n try{\n FileInputStream inputFile = new FileInputStream(\"./data.sec\");\n ObjectInputStream objectIn = new ObjectInputStream(inputFile);\n temp = (Player)objectIn.readObject();\n Arena.CUR_PLAYER = temp;\n objectIn.close();\n inputFile.close(); \n }\n catch(FileNotFoundException e ){\n System.err.print(\"data.sec not found\");\n }\n catch(IOException e){\n System.out.println(\"Error 201\");\n }\n catch(ClassNotFoundException e){\n System.out.println(\"Error 202\");\n }\n }", "@Nullable private CheckpointEntry parseFromFile(ByteBuffer buf, File file) throws IgniteCheckedException {\n Matcher matcher = CP_FILE_NAME_PATTERN.matcher(file.getName());\n\n if (!matcher.matches())\n return null;\n\n CheckpointEntryType type = CheckpointEntryType.valueOf(matcher.group(3));\n\n if (type != CheckpointEntryType.START)\n return null;\n\n long cpTs = Long.parseLong(matcher.group(1));\n UUID cpId = UUID.fromString(matcher.group(2));\n\n WALPointer ptr = readPointer(file, buf);\n\n return createCheckPointEntry(cpTs, ptr, cpId, null, CheckpointEntryType.START);\n }", "void load (CacheEntry entry) throws IOException;", "public synchronized void readLog() {\n MemoryCache instance = MemoryCache.getInstance();\n try (Stream<String> stream = Files.lines(Paths.get(path)).skip(instance.getSkipLine())) {\n stream.forEach(s -> {\n Result result = readEachLine(s);\n instance.putResult(result);\n instance.setSkipLine(instance.getSkipLine() + 1);\n });\n } catch (IOException e) {\n logger.error(\"error during reading file \" + e.getMessage());\n }\n }", "@Override\n\tpublic void loadData() throws FileNotFoundException {\n\t\tthis.getPromoShare();\n\t}", "public CustomerOrderDataBase(String file) {\r\n this.FILE_NAME = file;\r\n orderInfo = new ArrayList<>(4000000);\r\n console = new Scanner(System.in);\r\n try {\r\n loadFile();\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public InMemoryDictionary(File dictFile) {\n\t\t// TODO: Implement constructor\n\t}", "public void loadObjectData(String datafile) {\n\t\tProperties databaseAddData = new Properties();\n\t\ttry {\n\t\t\tdatabaseAddData.load(new FileInputStream(langFile));\n\t\t} catch (Exception e) {}\n\t\t//put values from the properties file into hashmap\n\t\tthis.properties.put(\"PROPERTY\", databaseAddData.getProperty(\"PROPERTY\"));\n\t}", "void load() {\n\t\ttry {\n\t\t\tfinal FileInputStream fis = new FileInputStream(propertyFile);\n\t\t\tfinal Properties newProperties = new Properties();\n\t\t\tnewProperties.load(fis);\n\t\t\ttimeLastRead = propertyFile.lastModified();\n\t\t\tproperties = newProperties;\n\t\t\tfis.close();\n\t\t} catch (final Exception e) {\n\t\t\tlogger.info(\"Property file \" + propertyFile + \" \" + e.getMessage());\n\t\t}\n\t}", "public void loadPersistence() {\n\t\tFile file = new File(\"data.txt\");\n\t\tif (file.length() == 0) { // no persistent data to use\n\t\t\treturn;\n\t\t}\n\t\tdeserializeFile(file);\n\t\tloadPersistentSettings();\n\t}", "public void loadFile(File p_file) throws IOException;", "public abstract void load();", "public FilesInputStreamLoad readFile() throws ArcException {\r\n\tFile dir = new File(this.archiveChargement + \".dir\");\r\n\tString fileName = ManipString.substringAfterFirst(this.idSource, \"_\");\r\n\tFile toRead = new File(dir + File.separator + ManipString.redoEntryName(fileName));\r\n\tFilesInputStreamLoad filesInputStreamLoadReturned = null;\r\n\ttry {\r\n\t\tfilesInputStreamLoadReturned = new FilesInputStreamLoad (toRead);\r\n\t} catch (IOException ioReadException) {\r\n\t\tthrow new ArcException(ioReadException, ArcExceptionMessage.FILE_READ_FAILED, toRead);\r\n\t}\r\n\treturn filesInputStreamLoadReturned;\r\n }", "public void load (File file) throws Exception;", "public static Monde loadContext(String filePath) throws IOException, ClassNotFoundException {\n\t\tFileInputStream fin = new FileInputStream(filePath);\n\t\tObjectInputStream ois = new ObjectInputStream(fin);\n\t\tMonde monde = (Monde) ois.readObject();\n\t\tois.close();\n\t\treturn monde;\n\t}", "public IndexDatabase(String index_path) {\n int k;\n long p;\n try {\n pre_file = new RandomAccessFile(index_path + \"/sorted.kmc_pre\", \"r\");\n pre_file.seek(pre_file.length() - 8);\n header_pos = read_int(pre_file);\n pre_file.seek(pre_file.length() - 8 - header_pos);\n // read the index properties \n K = read_int(pre_file);\n mode = read_int(pre_file);\n ctr_size = read_int(pre_file);\n pre_len = read_int(pre_file);\n min_count = read_int(pre_file);\n max_count = read_int(pre_file);\n kmers_num = read_long(pre_file);\n suf_len = K - pre_len;\n key = new kmer(K, pre_len, suf_len);\n System.out.println(\"Indexing \" + kmers_num + \" kmers... \");\n // load the prefix file into the memory \n pre_file.seek(4);\n int q, len = 1 << (2 * pre_len);\n prefix_ptr = new long[len];\n MappedByteBuffer pre_buff;\n for (q = 0, p = 0; p < 8; ++p) {\n pre_buff = pre_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + p * len, len);\n for (k = 0; k < len / 8; ++k, ++q) {\n prefix_ptr[q] = read_long(pre_buff);\n }\n pre_buff = null;\n }\n pre_file.close();\n // mapping suffix file into the memory\n suf_rec_size = ctr_size + suf_len / 4;\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / suf_rec_size * suf_rec_size;\n suf_parts_num = (int) ((kmers_num * suf_rec_size) % MAX_BYTE_COUNT == 0 ? (kmers_num * suf_rec_size) / MAX_BYTE_COUNT : (kmers_num * suf_rec_size) / MAX_BYTE_COUNT + 1);\n suf_parts_size = new long[suf_parts_num];\n suf_file = new RandomAccessFile(index_path + \"/sorted.kmc_suf\", \"r\");\n suf_buff = new MappedByteBuffer[suf_parts_num];\n for (k = 0; k < suf_parts_num; ++k) {\n suf_parts_size[k] = (int) (k == suf_parts_num - 1 ? (kmers_num * suf_rec_size) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n suf_buff[k] = suf_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + k * suf_parts_size[0], suf_parts_size[k]);\n }\n // mapping pointers file into the memory\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / POINTER_LENGTH * POINTER_LENGTH;\n ptr_parts_num = (int) ((kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT == 0 ? (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT : (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT + 1);\n ptr_parts_size = new long[ptr_parts_num];\n ptr_file = new RandomAccessFile(index_path + \"/pointers.db\", \"rw\");\n ptr_buff = new MappedByteBuffer[ptr_parts_num];\n for (k = 0; k < ptr_parts_num; ++k) {\n ptr_parts_size[k] = (int) (k == ptr_parts_num - 1 ? (kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n ptr_buff[k] = ptr_file.getChannel().map(FileChannel.MapMode.READ_WRITE, k * ptr_parts_size[0], ptr_parts_size[k]);\n }\n } catch (IOException e) {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }", "protected void loadStore() throws IOException {\n // auto create starting directory if needed\n if (!fileStore.exists()) {\n LOG.debug(\"Creating filestore: {}\", fileStore);\n File parent = fileStore.getParentFile();\n if (parent != null && !parent.exists()) {\n boolean mkdirsResult = parent.mkdirs();\n if (!mkdirsResult) {\n LOG.warn(\"Cannot create the filestore directory at: {}\", parent);\n }\n }\n boolean created = FileUtil.createNewFile(fileStore);\n if (!created) {\n throw new IOException(\"Cannot create filestore: \" + fileStore);\n }\n }\n\n LOG.trace(\"Loading to 1st level cache from state filestore: {}\", fileStore);\n\n cache.clear();\n try (Scanner scanner = new Scanner(fileStore, null, STORE_DELIMITER)) {\n while (scanner.hasNext()) {\n String line = scanner.next();\n int separatorIndex = line.indexOf(KEY_VALUE_DELIMITER);\n String key = line.substring(0, separatorIndex);\n String value = line.substring(separatorIndex + KEY_VALUE_DELIMITER.length());\n cache.put(key, value);\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n }\n\n LOG.debug(\"Loaded {} to the 1st level cache from state filestore: {}\", cache.size(), fileStore);\n }", "@PostConstruct\r\n public void init() {\n File database = new File(applicationProps.getGeodb());\r\n try {\r\n reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();\r\n } catch (IOException e) {\r\n log.error(\"Error reading maxmind DB, \", e);\r\n }\r\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void readMapFromFile() {\r\n\t\ttry {\r\n\t\t\tType type = new TypeToken<HashMap<String, Country>>() {}.getType();\r\n\t\t\tthis.daoMap = (HashMap<String, Country>) gson.fromJson(new FileReader(path), type);\r\n\t\t} catch (JsonSyntaxException | JsonIOException | FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public void loadReferencedType(ClassfileConstantPool cp, int index, int opcode) {\n }", "private static GeneticProgram loadCheckpoint(String arg) {\n CheckpointLoader cpl = new CheckpointLoader(arg);\n GeneticProgram gp = cpl.instantiate();\n if (gp == null) {\n System.err.println(\"Could not load checkpoint.\");\n System.exit(-1);\n }\n return gp;\n }", "private void loadStateDatabase() {\n new Thread( new Runnable() {\n public void run() {\n try {\n loadStates();\n } catch ( final IOException e ) {\n throw new RuntimeException( e );\n }\n }\n }).start();\n }", "public String getDumpLocation();", "void load(File file);", "public Load(String[] args) {\n\n\t\ttry {\n\t\t\tRandomAccessFile raf = new RandomAccessFile(new File(args[0]), \"rw\");\n\t\t\tthis.sfMap = raf.getChannel();\n\t\t\tthis.stataFile = sfMap.map(FileChannel.MapMode.READ_WRITE, 0, sfMap.size());\n\t\t\tthis.fileHeader = checkVersion(this.stataFile);\n\t\t\tif (this.release >= 113 && this.release <= 115) {\n\t\t\t\tthis.headerData = OldFormats.readHeader(stataFile, fileHeader);\n\t\t\t} else {\n\t\t\t\tthis.headerData = NewFormats.readHeader(stataFile, fileHeader);\n\t\t\t}\n\t\t\tparseHeader();\n\t\t\tif (this.release == 118) {\n\t\t\t\tthis.versionedFile = FileFormats.getVersion(this.sfMap, this.release,\n\t\t\t\t\t\tthis.endian, this.K, (Long) this.headerData.get(3),\n\t\t\t\t\t\tthis.datasetLabel, this.datasetTimeStamp, this.mapOffset);\n\t\t\t} else {\n\t\t\t\tthis.versionedFile = FileFormats.getVersion(this.sfMap, this.release,\n\t\t\t\t\t\tthis.endian, this.K, (Integer) this.headerData.get(3),\n\t\t\t\t\t\tthis.datasetLabel, this.datasetTimeStamp, this.mapOffset);\n\t\t\t}\n\t\t} catch (IOException | DtaCorrupt e) {\n\t\t\tSystem.out.println(String.valueOf(e));\n\t\t}\n\n\t}", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "public Memory(String file) {\n\t\tfor(int i=0; i < Constants.MEM_SIZE; ++i){\n\t\t\tmemory[i] = 0;\n\t\t}\n\t\tinstructions = new FileProcessor(file).fetchInstructions();\n\t}", "public GraphDB(String dbPath) {\n world = new HashMap<>();\n try {\n File inputFile = new File(dbPath);\n FileInputStream inputStream = new FileInputStream(inputFile);\n // GZIPInputStream stream = new GZIPInputStream(inputStream);\n\n SAXParserFactory factory = SAXParserFactory.newInstance();\n SAXParser saxParser = factory.newSAXParser();\n GraphBuildingHandler gbh = new GraphBuildingHandler(this);\n saxParser.parse(inputStream, gbh);\n } catch (ParserConfigurationException | SAXException | IOException e) {\n e.printStackTrace();\n }\n clean();\n }", "public void load() {\n mapdb_ = DBMaker.newFileDB(new File(\"AllPoems.db\"))\n .closeOnJvmShutdown()\n .encryptionEnable(\"password\")\n .make();\n\n // open existing an collection (or create new)\n poemIndexToPoemMap_ = mapdb_.getTreeMap(\"Poems\");\n \n constructPoems();\n }", "@Override\n\tpublic void loadNote() throws IOException {\n\n\t}", "private void loadSnapshot()\n {\n m_snapshotDoc = null;\n m_Element = null;\n m_ElementStatus = null;\n m_bOffline = false;\n try\n {\n File snapshot = new File(MainFrame.getConfig().getUserPath(),\n SNAPSHOTFILE);\n if(snapshot.exists())\n {\n DocumentBuilder db = RXFileTracker.getDocumentBuilder();\n m_snapshotDoc = db.parse(snapshot.getPath());\n m_Element = m_snapshotDoc.getDocumentElement();\n }\n }\n catch(SAXException | IOException ioe)\n {\n log.error(PSExceptionUtils.getMessageForLog(ioe));\n }\n\n }", "public void loadSave(){\n if((new File(\"data.MBM\")).exists()){\n isNew = false;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"data.MBM\"));\n String line = br.readLine();\n \n while (line != null) {\n \n if(line.contains(\"outDir\")){\n String[] result = line.split(\":\");\n outputDir = new File(result[1]);\n if(outputDir.exists() == false){\n isNew = true;\n }\n }\n else if(line.contains(\"MBMWORLD\")){\n String[] result = line.split(\":\");\n //1 = filename\n //2 = world name\n //3 = path\n //4 = date\n addWorld(new File(result[3]), result[2]);\n worlds.get(numWorlds()-1).setLastBackup(result[4]);\n }\n \n line = br.readLine();\n }\n \n br.close();\n \n } catch(IOException e){\n System.out.println(e);\n }\n }\n }", "String getIPGeolocationCityDatabaseFile();", "public void loadMaze(){\n try {\n byte savedMazeBytes[] = null;\n InputStream in = new MyDecompressorInputStream(new FileInputStream(\"savedMaze.maze\"));\n savedMazeBytes = new byte[1000012];\n in.read(savedMazeBytes);\n in.close();\n this.maze=new Maze(savedMazeBytes);\n isMazeGenerated=true;\n setChanged();\n notifyObservers();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "protected void trunkStore() {\n LOG.info(\"Trunking state filestore: {}\", fileStore);\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(fileStore);\n for (Map.Entry<String, String> entry : cache.entrySet()) {\n fos.write(entry.getKey().getBytes());\n fos.write(KEY_VALUE_DELIMITER.getBytes());\n fos.write(entry.getValue().getBytes());\n fos.write(STORE_DELIMITER.getBytes());\n }\n } catch (IOException e) {\n throw RuntimeCamelException.wrapRuntimeCamelException(e);\n } finally {\n IOHelper.close(fos, \"Trunking file state repository\", LOG);\n }\n }", "private void loadWalletFromKeystore(String password, String keyStoreFileName) {\n mCredentials = Web3jWalletHelper.onInstance(mContext).getWallet(password, walletSuffixDir, keyStoreFileName);\n SharedPref.write(WALLET_ADDRESS, mCredentials.getAddress());\n // SharedPref.write(PUBLIC_KEY, mCredentials.getEcKeyPair().getPublicKey().toString(16));\n SharedPref.write(PRIVATE_KEY, mCredentials.getEcKeyPair().getPrivateKey().toString(16));\n SharedPref.write(PUBLIC_KEY, ECDSA.getHexEncodedPoint(SharedPref.read(PRIVATE_KEY)));\n }", "@Override\n\tpublic Object load(String file) {\n\t\treturn null;\n\t}", "static <H, I> TableStore<I, X509Certificate> getTableStore(I localId, X509Certificate localCert, Serializer<I> iSerializer, X509Serializer cSerializer, InputBuffer buf) {\n MyStore<H, I> ret = new MyStore<H, I>();\n ret.put(localId, localCert);\n if (buf != null) {\n // load store from the file\n throw new RuntimeException(\"Persistent version not implemented.\");\n }\n \n return ret;\n }", "public void setCallLogsDatabaseFile(String path);", "private void loadDatabase() {\n Runnable load = new Runnable() {\n public void run() {\n try {\n boolean isSuccess = false;\n File data = Environment.getDataDirectory();\n\n String currentDbPath = \"//data//com.udacity.adcs.app.goodintents//databases//goodintents.db\";\n\n File currentDb = new File(data, currentDbPath);\n File restoreDb = getFileFromAsset(mActivity, mActivity.getExternalFilesDir(null) + \"/\", \"goodintents.db\");\n\n if (restoreDb != null ? restoreDb.exists() : false) {\n FileInputStream is = new FileInputStream(restoreDb);\n FileOutputStream os = new FileOutputStream(currentDb);\n\n FileChannel src = is.getChannel();\n FileChannel dst = os.getChannel();\n dst.transferFrom(src, 0, src.size());\n\n is.close();\n os.close();\n src.close();\n dst.close();\n isSuccess = true;\n }\n\n if (isSuccess) {\n PreferencesUtils.setBoolean(mActivity, R.string.initial_db_load_key, true);\n }\n } catch (Exception ex) {\n ex.printStackTrace();\n } finally {\n mActivity.runOnUiThread(loadDatabaseRunnable);\n }\n }\n };\n\n Thread thread = new Thread(null, load, \"loadDatabase\");\n thread.start();\n }", "private void initializeStoreFromPersistedData() throws IOException\r\n {\r\n loadKeys();\r\n\r\n if (keyHash.isEmpty())\r\n {\r\n dataFile.reset();\r\n }\r\n else\r\n {\r\n final boolean isOk = checkKeyDataConsistency(false);\r\n if (!isOk)\r\n {\r\n keyHash.clear();\r\n keyFile.reset();\r\n dataFile.reset();\r\n log.warn(\"{0}: Corruption detected. Resetting data and keys files.\", logCacheName);\r\n }\r\n else\r\n {\r\n synchronized (this)\r\n {\r\n startupSize = keyHash.size();\r\n }\r\n }\r\n }\r\n }", "private DefaultBuildContextState loadState(File stateFile) {\n try {\n ObjectInputStream is =\n new ObjectInputStream(new GZIPInputStream(new BufferedInputStream(new FileInputStream(\n stateFile))));\n try {\n return (DefaultBuildContextState) is.readObject();\n } finally {\n try {\n is.close();\n } catch (IOException e) {\n // ignore secondary exceptions\n }\n }\n } catch (FileNotFoundException e) {\n // this is expected, ignore\n } catch (Exception e) {\n log.debug(\"Could not read build state file {}\", stateFile, e);\n }\n return DefaultBuildContextState.emptyState();\n }", "public static final synchronized DatabaseReader initLookupService(String dbLocation) throws IOException {\n \n DatabaseReader ls = null;\n WeakReference<DatabaseReader> wrLs = globalLookupServices.get(dbLocation);\n if ((wrLs == null) || ((ls = wrLs.get()) == null)) {\n \n FileObject localDbLocation = null;\n\n try {\n FileObject source = KettleVFS.getFileObject(dbLocation);\n \n FileName dbVfs = source.getName();\n if (dbVfs.getScheme().equals(\"file\")) {\n localDbLocation = KettleVFS.getFileObject(source.getURL().getFile());\n } else {\n // It's remote - copy it locally\n\n if (source.exists() && source.getType().equals(FileType.FILE) && source.isReadable()) {\n\n // copy to a tmp file, that will be deleted in the end\n //\n File localDbFile = File.createTempFile(dbVfs.getBaseName(), \".\" + dbVfs.getExtension());\n localDbFile.deleteOnExit();\n FileObject localDbFileObject = KettleVFS.getFileObject(localDbFile.getAbsolutePath());\n localDbFileObject.copyFrom(source, Selectors.SELECT_SELF);\n \n // Closing references - we don't need them\n source.close();\n localDbFileObject.close();\n \n // this.log(Level.INFO, \"Successfully copied file from \" + dbLocation + \" to \" + localDbFile.getAbsolutePath());\n //localDbLocation = localDbFile.getAbsolutePath();\n localDbLocation = KettleVFS.getFileObject(localDbFileObject.getPublicURIString());\n }\n }\n } catch (Exception e) {\n throw new IOException(\"Unable to copy database file to local storage\", e);\n }\n\n // Logger.getLogger(MaxMindGeoIP.class.getName()).log(Level.INFO, \"GeoIP using database \" + localDbLocation);\n InputStream dbStream = KettleVFS.getInputStream(localDbLocation);\n ls = new DatabaseReader.Builder(dbStream).withCache(new CHMCache()).build();\n globalLookupServices.put(dbLocation, new WeakReference<DatabaseReader>(ls));\n }\n return ls;\n }", "public void load (Word word, int distance, int lookahead)\n\t\tthrows PersistenceException\n\t{\n\t\tInfo info = (Info)map.get(word);\n\t\tif (info == null || info.loaded) return;\n\t\tList list = info.list;\n\t\tint listSize = list.size();\n\t\tint pos = info.pos;\n\t\tint lastPos = Math.min(listSize, pos + lookahead + 1);\n\t\tArrayList words = new ArrayList();\n\t\tfor (int i = pos; i < lastPos; i++) {\n\t\t\tword = (Word)list.get(i);\n\t\t\tinfo = (Info)map.get(word);\n\t\t\tif (!info.loaded) {\n\t\t\t\twords.add(word);\n\t\t\t\tinfo.loaded = true;\n\t\t\t}\n\t\t}\n\t\tpm.getColocates(words, distance);\n//\t\tCollocateUtils.getColocates(pm, words, distance);\n\t}", "public MemoryStore(String filename) throws IOException {\n\t\t// create a new input stream\n\t\tFileInputStream input = new FileInputStream(filename);\n\t\t\n\t\t// create a place to store the words we read in\n\t\tbyte[] b = new byte[4];\n\t\t\n\t\t// read in the data in the given file\n\t\twhile (input.read(b) != -1) {\n\t\t\tif (memory.size() == 1027) {\n\t\t\t\tint foo = 1;\n\t\t\t}\n\t\t\t// create a word from the 4 bytes\n\t\t\tlong word = getUnsignedValue(b[0]);\n\t\t\tword += getUnsignedValue(b[1]) << 8;\n\t\t\tword += getUnsignedValue(b[2]) << 16;\n\t\t\tword += getUnsignedValue(b[3]) << 24;\n\t\t\t\n\t\t\t// add the word to our memory store\n\t\t\t//memory.add(word);\n\t\t}\n\t\tlong c;\n //00000001 00101010 01000000 00100000\n c = (((long) 0x01) << 24) + (((long) 0x2A) << 16) + (((long) 0x40) << 8) + ((long) 0x20);\n\t\tmemory.add(new Long(c));\n c = ((long) 0xFC) << 24;\n System.out.println(c);\n\t\tmemory.add(new Long(c));\n\t}", "public FileDatabase(String filename) throws IOException {\n\t\tdatabase = new File(filename);\n\t\tread();\n\t}", "public void loadMem(final File file) {\r\n TempMem.clearNamdAddresses();\r\n TempMem.setText(Input.loadFile(file));\r\n }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "public DataBase(String file) throws IOException {\n\t\tdataBase = new RandomAccessFile(file, \"rw\");\n\t\tdataBase.writeBytes(\"FEATURE_ID|FEATURE_NAME|FEATURE_CLASS|STATE_ALPHA|\"\n\t\t\t\t+ \"STATE_NUMERIC|COUNTY_NAME|COUNTY_NUMERIC|PRIMARY_LAT_DMS|PRIM_LONG_DMS|\"\n\t\t\t\t+ \"PRIM_LAT_DEC|PRIM_LONG_DEC|SOURCE_LAT_DMS|SOURCE_LONG_DMS|SOURCE_LAT_DEC|\"\n\t\t\t\t+ \"SOURCE_LONG_DEC|ELEV_IN_M|ELEV_IN_FT|MAP_NAME|DATE_CREATED|DATE_EDITED\\n\");\n\t}", "private void createDictionary() throws IOException {\r\n long start = System.currentTimeMillis();\r\n\r\n dict = new PrefixTree(); //new prefix\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/dictionary.csv\"))); //read the file\r\n\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n //System.out.println(line);\r\n addToRoot(line); //for each line add it in dictionary\r\n }\r\n\r\n System.out.println(\"Time took for making Dictionary : \" + (System.currentTimeMillis() - start) + \" ms\");\r\n }", "public Storable readStorable() throws IOException {\n Storable storable;\n String s = readString();\n\n if (s.equals(\"NULL\"))\n return null;\n\n if (s.equals(\"REF\")) {\n int ref = readInt();\n return (Storable) retrieve(ref);\n }\n\n storable = (Storable) makeInstance(s);\n map(storable);\n storable.read(this);\n return storable;\n }", "public long getFilePointer() {\n/* 141 */ return this.pointer;\n/* */ }", "public void loadFromLocalStorage() {\n\t\t\n\t}", "public DaoFileImpl(String path) {\r\n\t\tgson = new Gson();\r\n\t\tthis.path = path;\r\n\t\tthis.daoMap = new HashMap<>();\r\n\t\treadMapFromFile();\r\n\t}", "@Override\r\n\tpublic void load() {\n\t}" ]
[ "0.5530338", "0.5510207", "0.5455179", "0.54246366", "0.53415173", "0.5297622", "0.52783936", "0.52277464", "0.52057177", "0.5182871", "0.5091867", "0.5079502", "0.5045638", "0.50206923", "0.49901226", "0.49688503", "0.49688503", "0.49523365", "0.49513724", "0.49499476", "0.4927471", "0.49259683", "0.49182934", "0.49064395", "0.48996294", "0.48953843", "0.48884803", "0.48769853", "0.48769853", "0.48596996", "0.48595873", "0.48588452", "0.4856776", "0.4838913", "0.48363802", "0.47826958", "0.47775337", "0.47631648", "0.47631648", "0.47621536", "0.47517666", "0.47500524", "0.47374785", "0.47330394", "0.473188", "0.47179854", "0.47155562", "0.46988142", "0.46984538", "0.46805125", "0.46644816", "0.46594852", "0.46505564", "0.46482635", "0.4643736", "0.46419334", "0.463576", "0.46265876", "0.4619672", "0.46171427", "0.4613495", "0.46107364", "0.4607122", "0.46068132", "0.460433", "0.45871803", "0.45848507", "0.458196", "0.45775905", "0.45727023", "0.4569098", "0.45668885", "0.45630133", "0.45624363", "0.45598266", "0.45591816", "0.45585984", "0.45511103", "0.45488358", "0.45457256", "0.45435822", "0.45395368", "0.45329294", "0.45215285", "0.45202014", "0.4519941", "0.45161173", "0.45128024", "0.45107135", "0.45106372", "0.4509776", "0.4497454", "0.44922405", "0.4491702", "0.44911414", "0.44907868", "0.4489334", "0.44886306", "0.44835114", "0.4482512" ]
0.5526015
1
Calculates tail pointer for WAL at the end of logical recovery.
private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException { WALIterator it = cctx.wal().replay(from); try { while (it.hasNextX()) { IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX(); if (rec == null) break; } } finally { it.close(); } return it.lastRead().map(WALPointer::next).orElse(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getTailLocation ()\r\n {\r\n if (tailLocation == null) {\r\n computeLocations();\r\n }\r\n\r\n return tailLocation;\r\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "void seekToLast();", "public Node getTailNode();", "public String getEnd() {\n\t\t\t\t\n\t\t\t\t\tString vS = \"NONE\";\n\t\t\t\t\tSystem.out.println(vS + \" l \" + length);\n\t\t\t\t\tif (length != 0) vS = tail.getPrev().getValue();\n\t\t\t\t\tSystem.out.println(vS + \" l2 \" + length);\n\t\t\t\treturn vS;\n\t\t\t\t}", "long getLastLogIndex();", "public int peekBack() {\n if(tail == null) {\n return Integer.MIN_VALUE;\n }\n\n return tail.val;\n }", "public long getTaille() {\n return taille;\n }", "@Override\n public int tailCount() {\n return tails.size();\n }", "DataFrame<R,C> tail(int count);", "public void tailUp () {\r\n\t\ttail_mode = false;\r\n\t\tsuper.tailUp();\r\n\t}", "public void tailDown () {\r\n\t\ttail_mode = true;\r\n\t\tsuper.tailDown();\r\n\t}", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "public abstract Address getBootHeapEnd();", "public void moveToEnd() {\r\n\t\tcurr = tail;\r\n\t}", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public T getTail() {\n\t\treturn tail.value;\n\t}", "long getOldestWalAge() {\n long now = EnvironmentEdgeManager.currentTime();\n long timestamp = getOldestWalTimestamp();\n if (timestamp == Long.MAX_VALUE) {\n // If there are no wals in the queue then set the oldest wal timestamp to current time\n // so that the oldest wal age will be 0.\n timestamp = now;\n }\n long age = now - timestamp;\n return age;\n }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "private int getExclusiveBottomIndexEndOffset() {\n \n \t\tif (fTextWidget != null && !fTextWidget.isDisposed()) {\n \t\t\tint bottom= fSourceViewer.getBottomIndex();\n \t\t\tif (((fTextWidget.getTopPixel() + fTextWidget.getClientArea().height) % fTextWidget.getLineHeight()) != 0)\n \t\t\t\tbottom++;\n \t\t\ttry {\n \t\t\t\tIDocument document= fSourceViewer.getDocument();\n \n \t\t\t\tif (bottom >= document.getNumberOfLines())\n \t\t\t\t\tbottom= document.getNumberOfLines() - 1;\n \n \t\t\t\treturn document.getLineOffset(bottom) + document.getLineLength(bottom);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}\n \n \t\treturn -1;\n \t}", "T addAtTail(T t) {\n new Node<T>(t, this, this.prev);\n return this.next.getData();\n }", "public int getLast() {\n\t\treturn last;\n\t}", "private Line getLastLine() {\n\t\treturn doily.lines.get(doily.lines.size()-1);\n\t}", "int size(){\n return tail;\n }", "public Checkpoint lastCheckpoint(){\n if(!checkpointRecordFile.exists()){\n return null;\n }\n return lastCheckpoint(rootDir);\n }", "public String tail() {\n if (isEmpty() == false) {\n return head.getData();\n } else {\n return null;\n }\n }", "public ReturnKthToLast() {\n\t\thead = null;\n\t}", "public void removeEnd() {\n\t\t\tif (length != 0)\n\t\t\t\t{ \n\t\t\t ElementDPtr save = tail.getPrev();\n\t\t\t tail.setPrev(save.getPrev());\n\t\t\t save.getPrev().setNext(tail);\n\t\t\t length -= 1;\n\t\t\t System.out.println(tail.getPrev().getValue() + \" removeE \" + length);\n\t\t\t\t}\n\t\t\t\n\t\t}", "public Node getTail() {\n\t\treturn tail;\n\t}", "public Node getTail() {\n\t\treturn tail;\n\t}", "public int getLastPos ()\r\n {\r\n return (getFirstPos() + getThickness()) - 1;\r\n }", "public void setTaille(long taille) {\n this.taille = taille;\n }", "public synchronized int getLastPos() {\n PageMeta pm = pmList.get(numPages - 1);\n return pm.startPos + pm.numPairs - 1;\n }", "public Column getTail() {\n return tail != null ? tail : this;\n }", "long getLastPersistenceWrittenBytes();", "public synchronized ListNode getTail() {\n\t\treturn tail;\n\t}", "public int getLast() {\n\treturn _last;\n }", "public E getTail() {\n if (isCurrent() && tail != null) { return tail.getData(); }\n else { throw new IllegalStateException(\"There is no tail element.\"); }\n }", "public ListNode getTail()\n {\n return tail;\n }", "public int getRear() {\n if(size == 0) return -1;\n return tail.prev.val;\n}", "public NodeD getTail() {\n return tail;\n }", "public void checkpointRecoveryPointOffsets() {\n Table<String, TopicAndPartition, Log> recoveryPointsByDir = Utils.groupBy(this.logsByTopicPartition(), new Function2<TopicAndPartition, Log, String>() {\n @Override\n public String apply(TopicAndPartition _1, Log _2) {\n return _2.dir.getParent();\n }\n });\n for (File dir : logDirs) {\n Map<TopicAndPartition, Log> recoveryPoints = recoveryPointsByDir.row(dir.toString());\n if (recoveryPoints != null)\n this.recoveryPointCheckpoints.get(dir).write(Utils.map(recoveryPoints, new Function2<TopicAndPartition, Log, Tuple2<TopicAndPartition, Long>>() {\n @Override\n public Tuple2<TopicAndPartition, Long> apply(TopicAndPartition arg1, Log log) {\n return Tuple2.make(arg1, log.recoveryPoint);\n }\n }));\n }\n }", "boolean hasFinalData()\r\n/* 297: */ {\r\n/* 298:322 */ return this.tail.readIndex != this.tail.get();\r\n/* 299: */ }", "public int getLast() {\n if (size == 0)\n return NO_ELEMENT;\n else\n return endOfBlock[numberOfBlocks - 1] - 1;\n }", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "public long lastReadBytes()\r\n/* 199: */ {\r\n/* 200:384 */ return this.lastReadBytes;\r\n/* 201: */ }", "private long chunkEnd(long timestamp) { \n long end;\n \n if (timestamp > 0) {\n end = ((timestamp / chunklen) * chunklen) + chunklen - 1;\n } else {\n end = ((((timestamp + 1) / chunklen) - 1) * chunklen) + chunklen - 1;\n }\n \n return end;\n }", "public HistoryEntry getLastEntry() {\n\t\t\treturn null;\n\t\t}", "public SoNode \ngetCurPathTail() \n{\n//#ifdef DEBUG\n if (currentpath.getTail() != (SoFullPath.cast(getCurPath())).getTail()){\n SoDebugError.post(\"SoAction::getCurPathTail\\n\", \n \"Inconsistent path tail. Did you change the scene graph\\n\"+\n \"During traversal?\\n\");\n }\n//#endif /*DEBUG*/\n return(currentpath.getTail());\n}", "public long getWritePointer();", "protected int removeLast() {\n if (size > 0) {\n return heap[size--];\n }\n return null;\n }", "public int getLastOffsetForLine(int baseline) {\n TextFragmentBox box;\n List fragments = getFragmentsWithoutBorder();\n for (int i = fragments.size() - 1; i >= 0; i--) {\n box = (TextFragmentBox) fragments.get(i);\n if (baseline == box.getBaseline())\n return box.offset + box.length - 1;\n }\n return -1;\n }", "private static int endOfList(ASTNode stmtList) {\n ASTNode child = getLastChildRecursively(stmtList);\n while (child != null) {\n if (!isWhitespaceOrNewline(child)) {\n return child.getTextRange().getEndOffset();\n }\n child = child.getTreePrev();\n }\n return stmtList.getTextRange().getEndOffset();\n }", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "public int lastIndexOf(T obj) {\r\n Node<T> current = tail.previous();\r\n for (int i = size() - 1; i >= 0; i--) {\r\n if (current.getData().equals(obj)) {\r\n return i;\r\n }\r\n current = current.previous();\r\n }\r\n return -1;\r\n }", "private void createLeftOver() {\n/* 332 */ int lineLengthBytes = this.currentLastBytePos + 1;\n/* 333 */ if (lineLengthBytes > 0) {\n/* */ \n/* 335 */ this.leftOver = new byte[lineLengthBytes];\n/* 336 */ System.arraycopy(this.data, 0, this.leftOver, 0, lineLengthBytes);\n/* */ } else {\n/* 338 */ this.leftOver = null;\n/* */ } \n/* 340 */ this.currentLastBytePos = -1;\n/* */ }", "private int removeTail() {\n DNode node = tail.prev;\n removeNode(node);\n map.remove(node.key, node);\n return node.key;\n }", "public int deleteFromTail() {\n int el = tail.info;\r\n if (head == tail) // if only one node in the list;\r\n head = tail = null;\r\n else { // if more than one node in the list,\r\n IntSLLNode tmp; // find the predecessor of tail;\r\n for (tmp = head; tmp.next != tail; tmp = tmp.next);\r\n tail = tmp; // the predecessor of tail becomes tail;\r\n tail.next = null;\r\n }\r\n return el;\r\n }", "protected T removeFromTail()\n\t{\n\t\tif(tail == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = tail.getVal();\n\t\ttail = tail.getPrev();\n\t\t\n\t\tif(tail == null)\n\t\t\thead = tail;\n\t\telse\n\t\t\ttail.setNext(null);\n\t\t\n\t\treturn ret;\n\t}", "public LinkedNode tail() {\n return tail;\n }", "public abstract LogPointer getPointer() throws IOException;", "public abstract LogPointer getPointer() throws IOException;", "@Override\n\tpublic int taille() {\n\t\treturn 1;\n\t}", "protected long getLastDLRow() {\n List<String> res = dbconnector.execRead(\"SELECT id FROM DW_station_state \" +\n \"ORDER BY id DESC \" +\n \"LIMIT 1\").get(0);\n return Long.parseLong(res.get(0));\n }", "public void testMoveToEnd() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.moveToEnd();\n test1.prev();\n assertTrue(test1.getValue().inRange(9));\n }", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "@Override public WALRecord next() throws IgniteCheckedException {\n WALRecord rec = super.next();\n\n if (rec == null)\n return null;\n\n if (rec.type() == CHECKPOINT_RECORD) {\n CheckpointRecord cpRec = (CheckpointRecord)rec;\n\n // We roll memory up until we find a checkpoint start record registered in the status.\n if (F.eq(cpRec.checkpointId(), status.cpStartId)) {\n log.info(\"Found last checkpoint marker [cpId=\" + cpRec.checkpointId() +\n \", pos=\" + rec.position() + ']');\n\n needApplyBinaryUpdates = false;\n }\n else if (!F.eq(cpRec.checkpointId(), status.cpEndId))\n U.warn(log, \"Found unexpected checkpoint marker, skipping [cpId=\" + cpRec.checkpointId() +\n \", expCpId=\" + status.cpStartId + \", pos=\" + rec.position() + ']');\n }\n\n return rec;\n }", "private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }", "private SourcePosition getTreeEndLocation() {\n return lastSourcePosition;\n }", "public int getEnd() {\n switch(getType()) {\n case Insertion:\n case SNP:\n case InterDup:\n case TandemDup:\n case TransDup:\n return pos;\n default:\n return pos + maxLen() - 1;\n }\n }", "private List<? extends Object> getTail(List<? extends Object> trace) {\r\n\t\tList<Object> tail = new ArrayList<Object>(trace.size() - 1);\r\n\t\tfor (int i = 1; i < trace.size(); i++) {\r\n\t\t\ttail.add(trace.get(i));\r\n\t\t}\r\n\t\treturn tail;\r\n\t}", "private void deleteFromTail() {\n if (size == 0)\n return;\n else {\n tail = tail.pre;\n tail.next = null;\n size--;\n }\n }", "public int getLastIndex() {\n return lastIndex;\n }", "public int taille() {\n\t\treturn getSize();\n\t}", "@Nullable TokenEntry peekLastToken();", "private ListNode popTail() {\n\t ListNode tailItem = tail.prev;\n\t removeFromList(tailItem);\n\n\t return tailItem;\n\t }", "private void makeTail(LinkedEntry<K, V> e) {\n // Unlink e\n e.prv.nxt = e.nxt;\n e.nxt.prv = e.prv;\n\n // Relink e as tail\n LinkedEntry<K, V> header = this.header;\n LinkedEntry<K, V> oldTail = header.prv;\n e.nxt = header;\n e.prv = oldTail;\n oldTail.nxt = header.prv = e;\n modCount++;\n }", "public IntVector tail () {\n return tail;\n }", "org.mojolang.mojo.lang.Position getEndPosition();", "public void setTail(boolean tail) {\n this.tail = tail;\n }", "private FilePart rollOver() throws IOException {\n/* 251 */ if (this.currentLastBytePos > -1) {\n/* 252 */ throw new IllegalStateException(\"Current currentLastCharPos unexpectedly positive... last readLine() should have returned something! currentLastCharPos=\" + this.currentLastBytePos);\n/* */ }\n/* */ \n/* */ \n/* 256 */ if (this.no > 1L) {\n/* 257 */ return new FilePart(this.no - 1L, ReversedLinesFileReader.this.blockSize, this.leftOver);\n/* */ }\n/* */ \n/* 260 */ if (this.leftOver != null) {\n/* 261 */ throw new IllegalStateException(\"Unexpected leftover of the last block: leftOverOfThisFilePart=\" + new String(this.leftOver, ReversedLinesFileReader.this.encoding));\n/* */ }\n/* */ \n/* 264 */ return null;\n/* */ }", "public int obtenirTaille()\n\t{\n\t\treturn this.taille;\n\t}", "private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memAfter = runtime.totalMemory() - runtime.freeMemory();\n }\n return memAfter;\n }", "public Item deleteAtEnd() {\n \tItem returnItem = tail.item; \t\n \ttail = tail.previous;\n \thead.previous = tail;\n \tsize--;\n \treturn returnItem;\n }", "public Type show_tail() {\n \t \n \t //just return element in tail\n\t return(len != 1 ? tail.show_element(): null);\n }", "public int getLastLineLength()\n {\n return lastLineLength;\n }", "public synchronized ListNode getLast() {\n\t\tif (head == null)\n\t\t\treturn null;\n\t\tif (head.getNext() == null) {\n\t\t\treturn head;\n\t\t}\n\t\tListNode p = head.getNext();\n\t\twhile (p.getNext() != null) {\n\t\t\tp = p.getNext();\n\t\t}\n\t\treturn p;\n\t}", "public synchronized int lastEntryIndex() {\n return this.lastIndex;\n }", "private int getLastItemEntryIndex() {\n int sortedCount = this.sortedCount.get();\n int entryIndex = sortedCount == 0 ? HEAD_NODE : (sortedCount - 1) * (FIELDS) + 1;\n int nextEntryIndex = getEntryFieldInt(entryIndex, OFFSET.NEXT);\n while (nextEntryIndex != Chunk.NONE) {\n entryIndex = nextEntryIndex;\n nextEntryIndex = getEntryFieldInt(entryIndex, OFFSET.NEXT);\n }\n return entryIndex;\n }", "public static native long GetLast(long lpjFbxArrayVector2);", "protected short getLastTLVOffset(byte[] buffer, short Lc) {\n short offset = firstTLVOffset;\n short lastTLVOffset;\n do {\n lastTLVOffset = offset;\n // advance to next TLV\n offset++;\n short length = buffer[offset];\n offset = (short)(offset + length + 1);\n } while (offset < Lc);\n return lastTLVOffset;\n }", "public Long getTimestampEnd();", "private long getOldestWalTimestamp() {\n long oldestWalTimestamp = Long.MAX_VALUE;\n for (Map.Entry<String, PriorityBlockingQueue<Path>> entry : queues.entrySet()) {\n PriorityBlockingQueue<Path> queue = entry.getValue();\n Path path = queue.peek();\n // Can path ever be null ?\n if (path != null) {\n oldestWalTimestamp =\n Math.min(oldestWalTimestamp, AbstractFSWALProvider.WALStartTimeComparator.getTS(path));\n }\n }\n return oldestWalTimestamp;\n }", "public synchronized int getLastTerm() {\n if(lastEntryIndex() <= 0) return 0;\n return getEntry(lastIndex).getTerm();\n }", "private int getLastLine() {\n return lastSourcePosition.line;\n }", "public T deleteFromTail() {\n if (isEmpty()) \n return null;\n T el = tail.info;\n if (head == tail) // if only one node in the list;\n head = tail = null;\n else { // if more than one node in the list,\n SLLNode<T> tmp; // find the predecessor of tail;\n for (tmp = head; tmp.next != tail; tmp = tmp.next);\n tail = tmp; // the predecessor of tail becomes tail;\n tail.next = null;\n }\n return el;\n }" ]
[ "0.59416753", "0.5605267", "0.5502136", "0.5380571", "0.5342424", "0.5341583", "0.53154594", "0.525358", "0.5215668", "0.52046865", "0.52014816", "0.5146556", "0.51318413", "0.51289076", "0.5121569", "0.5118568", "0.5109946", "0.5088882", "0.50740427", "0.5058168", "0.5037544", "0.5035915", "0.50350064", "0.5016284", "0.5004967", "0.50007266", "0.4991733", "0.4988632", "0.49871877", "0.4984486", "0.49675772", "0.49647236", "0.49647236", "0.49643895", "0.49553007", "0.4952894", "0.49518955", "0.49465746", "0.49403307", "0.4937949", "0.4929673", "0.49276355", "0.49163318", "0.49137098", "0.48982206", "0.48977846", "0.48928744", "0.48826697", "0.48794547", "0.48768368", "0.48666868", "0.48580626", "0.48559675", "0.48550665", "0.4852323", "0.48396114", "0.4831236", "0.48238736", "0.48199168", "0.4817993", "0.48095933", "0.48074958", "0.48007086", "0.47921622", "0.47921622", "0.47843605", "0.47829533", "0.47799703", "0.47730947", "0.47729412", "0.47724032", "0.47639364", "0.47629076", "0.47604352", "0.4757868", "0.4756395", "0.47546673", "0.47503775", "0.4750218", "0.47466722", "0.4743928", "0.47396946", "0.47138694", "0.4713063", "0.46989173", "0.46912614", "0.46894625", "0.4684142", "0.46814626", "0.46784398", "0.46769765", "0.4674845", "0.46722034", "0.46690917", "0.46642405", "0.4663933", "0.4656699", "0.46552765", "0.46538192", "0.46521702" ]
0.7590609
0
Called when all partitions have been fully restored and precreated on node start. Starts checkpointing process and initiates first checkpoint.
@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException { IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), "db-checkpoint-thread", checkpointer); cpThread.start(); checkpointerThread = cpThread; CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, "node started"); if (chp != null) chp.cpBeginFut.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "void checkpoint() throws IOException;", "public void startup() {\n /* Schedule the cleanup task to delete old logs */\n if (scheduler != null) {\n logger.info(\"Starting log cleanup with a period of {} ms.\", retentionCheckMs);\n scheduler.schedule(\"kafka-log-retention\", new Runnable() {\n @Override\n public void run() {\n cleanupLogs();\n }\n }, InitialTaskDelayMs, retentionCheckMs, TimeUnit.MILLISECONDS);\n logger.info(\"Starting log flusher with a default period of {} ms.\", flushCheckMs);\n scheduler.schedule(\"kafka-log-flusher\", new Runnable() {\n @Override\n public void run() {\n flushDirtyLogs();\n }\n }, InitialTaskDelayMs, flushCheckMs, TimeUnit.MILLISECONDS);\n scheduler.schedule(\"kafka-recovery-point-checkpoint\", new Runnable() {\n @Override\n public void run() {\n checkpointRecoveryPointOffsets();\n }\n }, InitialTaskDelayMs, flushCheckpointMs, TimeUnit.MILLISECONDS);\n }\n if (cleanerConfig.enableCleaner)\n cleaner.startup();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\texecutor.execute(new Task(ReadingDataModel.Event.INIT_LOAD));\n\t\tinitBookNote();\n\t}", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "@Override\n public void onPartitionsAssigned(Collection<TopicPartition> partitions) {\n pm.onPartitionsAssigned(partitions);\n }", "public void checkpointRecoveryPointOffsets() {\n Table<String, TopicAndPartition, Log> recoveryPointsByDir = Utils.groupBy(this.logsByTopicPartition(), new Function2<TopicAndPartition, Log, String>() {\n @Override\n public String apply(TopicAndPartition _1, Log _2) {\n return _2.dir.getParent();\n }\n });\n for (File dir : logDirs) {\n Map<TopicAndPartition, Log> recoveryPoints = recoveryPointsByDir.row(dir.toString());\n if (recoveryPoints != null)\n this.recoveryPointCheckpoints.get(dir).write(Utils.map(recoveryPoints, new Function2<TopicAndPartition, Log, Tuple2<TopicAndPartition, Long>>() {\n @Override\n public Tuple2<TopicAndPartition, Long> apply(TopicAndPartition arg1, Log log) {\n return Tuple2.make(arg1, log.recoveryPoint);\n }\n }));\n }\n }", "public boolean doCheckpoint() {\n CountDownLatch latch = null;\n boolean fullCheckpoint;\n synchronized(this) { \n latch = nextCheckpointCountDownLatch;\n nextCheckpointCountDownLatch = new CountDownLatch(1);\n fullCheckpoint = this.fullCheckPoint;\n this.fullCheckPoint=false; \n } \n try {\n \n log.debug(\"Checkpoint started.\");\n RecordLocation newMark = null;\n \n ArrayList futureTasks = new ArrayList(queues.size()+topics.size());\n \n //\n // We do many partial checkpoints (fullCheckpoint==false) to move topic messages\n // to long term store as soon as possible. \n // \n // We want to avoid doing that for queue messages since removes the come in the same\n // checkpoint cycle will nullify the previous message add. Therefore, we only\n // checkpoint queues on the fullCheckpoint cycles.\n //\n if( fullCheckpoint ) { \n Iterator iterator = queues.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalMessageStore ms = (JournalMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n }\n \n Iterator iterator = topics.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalTopicMessageStore ms = (JournalTopicMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n \n try {\n for (Iterator iter = futureTasks.iterator(); iter.hasNext();) {\n FutureTask ft = (FutureTask) iter.next();\n RecordLocation mark = (RecordLocation) ft.get();\n // We only set a newMark on full checkpoints.\n if( fullCheckpoint ) {\n if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {\n newMark = mark;\n }\n }\n }\n } catch (Throwable e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n \n \n if( fullCheckpoint ) {\n try {\n if (newMark != null) {\n log.debug(\"Marking journal at: \" + newMark);\n journal.setMark(newMark, true);\n }\n }\n catch (Exception e) {\n log.error(\"Failed to mark the Journal: \" + e, e);\n }\n \n if (longTermPersistence instanceof JDBCPersistenceAdapter) {\n // We may be check pointing more often than the checkpointInterval if under high use\n // But we don't want to clean up the db that often.\n long now = System.currentTimeMillis();\n if( now > lastCleanup+checkpointInterval ) {\n lastCleanup = now;\n ((JDBCPersistenceAdapter) longTermPersistence).cleanup();\n }\n }\n }\n \n log.debug(\"Checkpoint done.\");\n }\n finally {\n latch.countDown();\n }\n synchronized(this) {\n return this.fullCheckPoint;\n } \n \n }", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "public void initializeGraphPrueba() {\n //path to checkpoit.ckpt HACER\n //To load the checkpoint, place the checkpoint files in the device and create a Tensor\n //to the path of the checkpoint prefix\n //FALTA ******\n\n // si modelo updated se usa el checkpoints que he descargado del servidor. Si no, el del movil.\n if (isModelUpdated){\n /* //NO VA BIEN:\n checkpointPrefix = Tensors.create((file_descargado).toString());\n Toast.makeText(MainActivity.this, \"Usando el modelo actualizado\", Toast.LENGTH_SHORT).show();\n\n */\n\n //A VER SI VA\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt.meta\");\n // inputCheck = getAssets().open(\"+checkpoints_name_1002-.ckpt\"); NOT FOUND\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n else {\n try {\n //Place the .pb file generated before in the assets folder and import it as a byte[] array\n // hay que poner el .meta\n inputCheck = getAssets().open(\"checkpoint_name1.ckpt.meta\");\n byte[] buffer = new byte[inputCheck.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputCheck.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n variableAuxCheck = output.toByteArray(); // array con el checkpoint\n } catch (IOException e) {\n e.printStackTrace();\n }\n checkpointPrefix = Tensors.create((variableAuxCheck).toString());\n }\n\n //checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString()); //PARA USAR EL CHECKPOINT DESCARGADO\n // checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n //Create a variable of class org.tensorflow.Graph:\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n // inputStream = getAssets().open(\"graph.pb\"); //MODELO SENCILLO //PROBAR CON GRAPH_PRUEBA QUE ES MI GRAPH DE O BYTES\n // inputStream = getAssets().open(\"graph5.pb\"); //MODELO SENCILLO\n if (isModelUpdated) { // ESTO ES ALGO TEMPORAL. NO ES BUENO\n inputStream = getAssets().open(\"graph_pesos.pb\");\n }\n else {\n inputStream = getAssets().open(\"graph5.pb\");\n }\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Place the .pb file generated before in the assets folder and import it as a byte[] array.\n // Let the array's name be graphdef.\n //Now, load the graph from the graphdef:\n graph.importGraphDef(graphDef);\n try {\n //Now, load the checkpoint by running the restore checkpoint op in the graph:\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n //Alternatively, initialize the graph by calling the init op:\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "public synchronized void start() throws Exception\n {\n\n if ( lastFlushed == NOTHING )\n {\n lastFlushed = coreState.getLastFlushed();\n }\n applierState.lastApplied = lastFlushed;\n\n log.info( format( \"Restoring last applied index to %d\", lastFlushed ) );\n sessionTracker.start();\n\n /* Considering the order in which state is flushed, the state machines will\n * always be furthest ahead and indicate the furthest possible state to\n * which we must replay to reach a consistent state. */\n long lastPossiblyApplying = max( coreState.getLastAppliedIndex(), applierState.getLastSeenCommitIndex() );\n\n if ( lastPossiblyApplying > applierState.lastApplied )\n {\n log.info( \"Applying up to: \" + lastPossiblyApplying );\n applyUpTo( lastPossiblyApplying );\n }\n\n resumeApplier( \"startup\" );\n }", "void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;", "public void checkpointStateChanged(final CheckpointState newCheckpointState) {\n \t\tthis.taskManager.checkpointStateChanged(this.environment.getJobID(), this.vertexID, newCheckpointState);\n \t}", "void checkpoint(Node node) throws RepositoryException;", "@RequiresApi(api = Build.VERSION_CODES.KITKAT)\n public void initializeGraph() {\n checkpointPrefix = Tensors.create((getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath() + \"final_model.ckpt\").toString());\n checkpointDir = getApplicationContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS).getAbsolutePath();\n graph = new Graph();\n sess = new Session(graph);\n InputStream inputStream;\n try {\n inputStream = getAssets().open(\"final_graph_hdd.pb\");\n byte[] buffer = new byte[inputStream.available()];\n int bytesRead;\n ByteArrayOutputStream output = new ByteArrayOutputStream();\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n output.write(buffer, 0, bytesRead);\n }\n graphDef = output.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n }\n graph.importGraphDef(graphDef);\n try {\n sess.runner().feed(\"save/Const\", checkpointPrefix).addTarget(\"save/restore_all\").run();\n Toast.makeText(this, \"Checkpoint Found and Loaded!\", Toast.LENGTH_SHORT).show();\n }\n catch (Exception e) {\n sess.runner().addTarget(\"init\").run();\n Log.i(\"Checkpoint: \", \"Graph Initialized\");\n }\n }", "@Override\n\tprotected void onResume() {\n\t\t\n\t\tinit();\n\t\tsuper.onResume();\n\n\t}", "@Override\n\t\t\tprotected void onResume() {\n\t\t\t\tsuper.onResume();\n\t\t\t\tmDbxAcctMgr1 = mDbxAcctMgr;\n\t\t\t\tmDatastore1 = mDatastore;\n\t\t\t\tLog.e(\"mtag\", \"main onResume\" + mDatastore1);\n\t\t\t}", "@Override\n\tpublic void startUp() {\n\t\tSystem.out.println(\"disk startup!\");\n\n\t}", "@Override\n protected void doPreSetup() throws Exception {\n broker = new EmbeddedActiveMQ();\n deleteDirectory(\"target/data\");\n port = AvailablePortFinder.getNextAvailable();\n brokerUri = \"tcp://localhost:\" + port;\n configureBroker(this.broker);\n startBroker();\n }", "@Override\n\tpublic Serializable checkpointInfo() throws Exception {\n\t\treturn null;\n\t}", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "public void setFirstPartitionId(int id)\n\t{\n\t\tthis.firstPartitionId = id;\n\t}", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tXSDK.getInstance().onResume();\r\n\t\tsuper.onResume();\r\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tinit2();\n\t}", "protected void constructPartitions( Callback c, List nodes, int level ){\n //we want to ignore the dummy node partition\n String id = getPartitionID( mCurrentDepth );\n Partition p = new Partition( nodes, id );\n p.setIndex( mCurrentDepth );\n\n p.constructPartition();\n mLogger.log( \"Partition \" + p.getID() + \" is :\" + p.getNodeIDs(),\n LogManager.DEBUG_MESSAGE_LEVEL );\n c.cbPartition( p );\n\n }", "@Override\n\tprotected void onResume() {\n\t\tSystem.out.println(\"---onResume---\");\n\t\tsuper.onResume();\n\t}", "@Override\n public void onResume() {\n \tsuper.onResume();\n \tLog.i(\"ONRESUME\", \"ONRESUME\");\n \treloadSavedState();\n }", "@Override\n public void onPartitionsLost(Collection<TopicPartition> partitions) {\n pm.onPartitionsLost(partitions);\n onPartitionsRemoved(partitions);\n }", "public void preSaveInit() {\n persistentData.clear();\n for (int i = 0; i < getNumPoints(); i++) {\n persistentData.add(getPoint(i));\n }\n }", "void beforeStart() throws PersistenceException;", "public void checkpoint(boolean sync, boolean fullCheckpoint) {\n try {\n if (journal == null )\n throw new IllegalStateException(\"Journal is closed.\");\n \n long now = System.currentTimeMillis();\n CountDownLatch latch = null;\n synchronized(this) {\n latch = nextCheckpointCountDownLatch;\n lastCheckpointRequest = now;\n if( fullCheckpoint ) {\n this.fullCheckPoint = true; \n }\n }\n \n checkpointTask.wakeup();\n \n if (sync) {\n log.debug(\"Waking for checkpoint to complete.\");\n latch.await();\n }\n }\n catch (InterruptedException e) {\n log.warn(\"Request to start checkpoint failed: \" + e, e);\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tSystem.out.println(\"onResume...\");\n\t}", "@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }", "@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }", "public void partition() \n\t{\n\t\tXPath xPath = getXPathHandler();\n\t\tNodeList parentNodes;\n\t\ttry {\n\t\t\tparentNodes = (NodeList)xPath.compile(this.getParentContainerXPath()).evaluate(this.document, XPathConstants.NODESET);\n\t\t\t\n\t\t\tlogger.info(\">>> \" + this.getPartitionType().name() + \" Partitioner: partition()\");\n\t\t\t\n\t\t\tfor (int i = 0; i < parentNodes.getLength(); i++) \n\t\t\t{ \t\n\t\t\t\tNode parentNode = (Node)parentNodes.item(i);\n\t\t\t\t\n\t\t\t\tif (parentNode instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString sParentClass = parentNode.getAttributes().getNamedItem(\"class\") != null ? parentNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t\tlogger.info(\"\\tParent Node Name=\" + parentNode.getNodeName()+\":class=\"+ sParentClass);\n\t\t\t\t\t\n\t\t\t\t\tNodeList nodeList = parentNode.getChildNodes();\n\t\t\t\t\tNode xDivNode = null;\n\t\t\t\t\t\n\t\t\t\t\tNode xIntroDivNode = this.document.createElement(\"div\");\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"class\", this.getPartitionTypeAsString());\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"title\", this.getIntroPartitionTitle());\n\t\t\t\t\t\n\t\t\t\t\tboolean first = true;\n\t\t\t\t\tboolean keepFirst = this.getKeepFirstElements();\n\t\t\t\t\tboolean hasIntroNode = false;\n\t\t\t \n\t\t\t\t\tfor (int j = 0, pCount = 0; j < nodeList.getLength(); j++) \n\t\t\t\t\t{ \t\n\t\t\t \tNode xNode = nodeList.item(j);\n\t\t\t \tif (xNode instanceof Element)\n\t\t\t \t{\n\t\t\t \t\tif (first && keepFirst)\n\t\t\t \t\t{\n\t\t\t \t\t\tif (!hasIntroNode) {\n\t\t\t\t \t\t\t((Element)xIntroDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t \t\t\t\tDomUtils.insertBefore(xIntroDivNode, xNode);\t\t \t\t\t\t\n\t\t\t\t \t\t\tj++;\n\t\t\t\t \t\t\thasIntroNode = true;\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\tString sClass = xNode.getAttributes().getNamedItem(\"class\") != null ? xNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t \tboolean isTable = xNode.getNodeName().equalsIgnoreCase(\"table\") ? true : false;\n\t\t\t\t \tString sId = isTable && xNode.getAttributes().getNamedItem(\"id\") != null ? xNode.getAttributes().getNamedItem(\"id\").getNodeValue() : \"\";\n\t\t\t\t \t\n\t\t\t\t \tif (sClass != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\tNode Name=\" + xNode.getNodeName()+\":class=\"+ sClass);\n\t\t\t\t \t\t\n\t\t\t\t \t\tboolean match = false;\n\t\t\t\t \t\tswitch ((TaskExprType)this.getAttributeMatchExpression())\n\t\t\t\t \t\t{\n\t\t\t\t \t\tcase NOT_SET:\n\t\t\t\t \t\tcase STARTS_WITH:\n\t\t\t\t \t\t\tmatch = sClass.startsWith(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\tcase CONTAINS:\n\t\t\t\t \t\t\tmatch = sClass.contains(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\t// Process the title name match condition if it exists\n\t\t\t\t \t\tString title = null;\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\ttitle = DomUtils.extractTextChildren(xNode);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameMatchCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\tif (title != null && this.getTitleNameMatchType() == TaskMatchType.EXPR)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\tswitch ((TaskExprType)this.getTitleNameMatchExprType())\n\t\t\t\t\t \t\t\t\t{\n\t\t\t\t\t \t\t\t\t\tcase STARTS_WITH:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.startsWith(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase CONTAINS:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.contains(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase NOT_SET:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tdefault:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t \t\t\t} else if (this.getTitleNameMatchType() == TaskMatchType.REGEX)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t\t \t\t\tPattern r = Pattern.compile(this.getTitleNameMatchRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tmatch = m.matches();\n\t\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\tif (first)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPartition partition = new Partition();\n\t\t\t\t \t\t\t\tpartition.setType(this.getPartitionType());\n\t\t\t\t \t\t\t\tpartition.setsId(sId);\n\t\t\t\t \t\t\t\tthis.setFirstPartition(partition);\n\t\t\t\t \t\t\t}\n\n\t\t\t\t \t\t\tfirst = false;\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameReplaceCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPattern r = Pattern.compile(this.getTitleNameReplaceRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\n\t\t\t\t\t \t\t\ttitle = m.replaceAll(this.getTitleNameReplaceWithRegexPattern());\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\txDivNode = this.document.createElement(\"div\");\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"class\", getPartitionTypeAsString());\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"title\", title);\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tDomUtils.insertBefore(xDivNode, xNode);\n\t\t\t\t \t\t\tDomUtils.removeElement((Element) xNode, false);\t \n\t\t\t\t \t\t}\n\t\t\t\t \t\telse\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t} else if (isTable && sId != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\t\\tNode Name=\" + xNode.getNodeName()+\":id=\"+ sId);\n\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t\t \t}\t \t\n\t\t\t \t}\n\t\t\t } // end for j\n\t\t\t\t} // end if parentNode\n\t\t\t} // end for i\n\t\t} catch (XPathExpressionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t\n\t}", "protected void startup() {\n\t\tsynchronized (this) {\n\t\t\tstartTime = Utilities.getTime();\n\n\t\t\t// Start sets (and their containers' maintenance threads).\n\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\tsets[i].startup();\n\t\t\t}\n\n\t\t\tproducerThreadPool.start(this, builders);\n\n\t\t\tpayerThread.start();\n\n\t\t\t// Allow shutdown\n\t\t\tshutdownMutex.release();\n\t\t}\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tSystem.gc();\n\t\tthis.init();\n\t}", "@BeforeMethod\n void setup() throws Exception {\n bkEnsemble = new LocalBookkeeperEnsemble(3, 0, () -> 0);\n bkEnsemble.start();\n // Start broker\n ServiceConfiguration config = new ServiceConfiguration();\n config.setLoadManagerClassName(ModularLoadManagerImpl.class.getName());\n config.setClusterName(\"use\");\n config.setWebServicePort(Optional.of(0));\n config.setMetadataStoreUrl(\"zk:127.0.0.1:\" + bkEnsemble.getZookeeperPort());\n\n config.setAdvertisedAddress(\"localhost\");\n config.setBrokerShutdownTimeoutMs(0L);\n config.setLoadBalancerOverrideBrokerNicSpeedGbps(Optional.of(1.0d));\n config.setBrokerServicePort(Optional.of(0));\n config.setBrokerServicePortTls(Optional.of(0));\n config.setWebServicePortTls(Optional.of(0));\n pulsar = new PulsarService(config);\n pulsar.start();\n }", "public void handle(PBFTCheckpoint checkpoint){\n\n JDSUtility.debug(\"[PBFTServer:handle(checkpoint)] s\" + getLocalServerID() + \", at time \" + getClockValue() + \", received \" + checkpoint);\n\n if(isValid(checkpoint)){\n \n long seqn = checkpoint.getSequenceNumber();\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long now = getClockValue();\n\n getCheckpointInfo().put(checkpoint);\n \n Object lpid = getLocalProcessID();\n \n CheckpointSubject cs = getDecision(checkpoint);\n \n if(getCheckpointInfo().hasEnough(seqn) && cs != null && lcwm < seqn && seqn <= hcwm){\n\n if(seqn > hcwm){\n\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", detected a stable checkpoint certificate with SEQN{\"+ seqn +\"} > HCWM{\"+ hcwm +\"}.\");\n JDSUtility.debug(\"[handle(checkpoint)] s\"+ lpid +\", at time \"+ now +\", is going to start a start transfer procedure.\");\n\n emitFetch();\n return;\n\n }//end if I've a unsynchronized state\n\n if(getCheckpointInfo().getMine(lpid, seqn) != null){ \n doCheckpoint(seqn); \n }\n \n }//end if has a decision\n \n }//end if isValid(checkpoint)\n \n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "@DISPID(40)\r\n\t// = 0x28. The runtime will prefer the VTID if present\r\n\t@VTID(39)\r\n\tboolean checkpointRestartEnabled();", "@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n System.setProperty(\"coherence.distributed.threads.min\", \"4\");\n\n AbstractFunctionalTest._startup();\n }", "@Override\n public void start() throws Exception {\n createNode();\n // Initial data load (avoid race conditions w/\"NodeCache.start(true)\")\n updateFromZkBytes(_curator.getData().forPath(_zkPath), _defaultValue);\n\n // Re-load the data and watch for changes.\n _nodeCache.getListenable().addListener(new NodeCacheListener() {\n @Override\n public void nodeChanged() throws Exception {\n ChildData childData = _nodeCache.getCurrentData();\n if (childData != null) {\n updateFromZkBytes(childData.getData(), _defaultValue);\n }\n }\n });\n _nodeCache.start();\n }", "@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}", "@Override\n\t\t\tpublic void onPartitionsAssigned(Collection<TopicPartition> partitions) {\n\t\t\t\tconsumer.seek(tp0, 123L); //for partition 0, we want to consume starting from offset 123\n\t\t\t\tconsumer.seek(tp1, 54L); //the offset number must be in Long format\n\t\t\t\tconsumer.seek(tp2, 10000L);\n\t\t\t}", "public void startMigrating();", "public void initialize(int numPartitions) {\n Preconditions.checkState(!initialized);\n Preconditions.checkArgument(numPartitions >= 1); // Numpartitions must be positive\n Preconditions.checkArgument((numPartitions & (numPartitions - 1)) == 0); // Make sure it's a power of two\n\n this.numPartitions = numPartitions;\n initialized = true;\n partitionMask = numPartitions - 1;\n bitsInMask = Integer.bitCount(partitionMask);\n }", "@Override\n public void createPartition(Partition partition) {\n \n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tLog.i(\"CONFIG\", \"onResume\");\r\n\t}", "boolean reachedBeginning(TopicPartition partition);", "public void begin(){\n\t\tfor(ParticleBatch<?> batch : batches)\n\t\t\tbatch.begin();\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tnfch.onResume();\n\t}", "@Override\n protected void onResume() {\n CTSCLog.d(TAG, \"onResume()\" + \" mInitialized = \" + mInitialized);\n super.onResume();\n\n if (!mInitialized) {\n constructListViewData();\n setupButtons();\n setupListView();\n setupTabs();\n if (mCheckCategory.equals(getString(R.string.one_button_check))) {\n AlertUserToReset();\n }\n mInitialized = true;\n CTSCLog.d(TAG, \"Initialize done\");\n } else {\n //scenario: CheckResultActivity has been resume, then user switch to do\n //some setting after which user turn back to CheckResultActivity again.\n //so here need to do checking again and call refresh() to refresh again\n doCheck();\n refresh(true, true);\n }\n }", "@Override\n public void preApplication(final MasterContext<MASTER_RESULT, WORKER_RESULT> context) {\n initialize(context.getProps());\n\n // Master election which is used here to use the same zookeeper instance.\n if(NumberFormatUtils.getInt(context.getProps().getProperty(GuaguaConstants.GUAGUA_MASTER_NUMBER),\n GuaguaConstants.DEFAULT_MASTER_NUMBER) > 1) {\n new MasterElectionCommand(context.getAppId()).execute();\n }\n new FailOverCommand(context).execute();\n\n if(context.getCurrentIteration() != GuaguaConstants.GUAGUA_INIT_STEP) {\n // if not init step, return, because of no need initialize twice for fail-over task\n return;\n }\n\n new BasicCoordinatorCommand() {\n @Override\n public void doExecute() throws KeeperException, InterruptedException {\n String appId = context.getAppId();\n int currentIteration = context.getCurrentIteration();\n final String appWorkersNode = getWorkerBaseNode(appId, currentIteration).toString();\n final int workers = context.getWorkers();\n\n new RetryCoordinatorCommand(isFixedTime(), getSleepTime()) {\n @Override\n public boolean retryExecution() throws KeeperException, InterruptedException {\n try {\n List<String> childrenExt = getZooKeeper().getChildrenExt(appWorkersNode, false, false,\n false);\n int initDoneWorkers = childrenExt.size();\n // to avoid log flood\n if(System.nanoTime() % 20 == 0) {\n LOG.info(\"workers already initialized: {}, still {} workers are not synced.\",\n initDoneWorkers, (context.getWorkers() - initDoneWorkers));\n LOG.info(\"DEBUG: left workers:{}\", notInList(childrenExt, context.getWorkers()));\n }\n return isTerminated(initDoneWorkers, workers, context.getMinWorkersRatio(),\n context.getMinWorkersTimeOut());\n } catch (KeeperException.NoNodeException e) {\n // to avoid log flood\n if(System.nanoTime() % 10 == 0) {\n LOG.warn(\"No such node:{}\", appWorkersNode);\n }\n return false;\n }\n }\n }.execute();\n\n LOG.info(\"All workers are initiliazed successfully.\");\n\n String znode = null;\n try {\n // create worker znode 1: '/_guagua/<jobId>/workers/1' to avoid re-create znode from workers\n znode = getWorkerBaseNode(context.getAppId(), context.getCurrentIteration() + 1).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n // create master init znode\n znode = getMasterBaseNode(context.getAppId()).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n znode = getCurrentMasterNode(context.getAppId(), context.getCurrentIteration()).toString();\n getZooKeeper().createExt(znode, null, Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT, false);\n } catch (KeeperException.NodeExistsException e) {\n LOG.warn(\"Node exists: {}\", znode);\n }\n }\n }.execute();\n }", "void onStart(@Observes Startup event, ApplicationLifecycle app) {\n\n\t\tif (!newstore)\n\t\t\tapp.markAsRestart();\n\t\t\n\t}", "@Override\n\tprotected void onResume() {\n\n\t\tsuper.onResume();\n\t}", "public void runResumeWorkflow() {\n\t\tassert (status == WorkflowStatus.READY\n\t\t\t\t|| status == WorkflowStatus.FINISHED || status == WorkflowStatus.ERROR);\n\n\t\tsetStatus(WorkflowStatus.INITIALIZING);\n\t}", "@Override\n public void preStart() {\n Reaper.watchWithDefaultReaper(this);\n }", "@Override\n public void preStart() {\n cluster.subscribe(getSelf(), RoleLeaderChanged.class);\n }", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\n\tpublic void startDatacenters() throws Exception {\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.v(TAG, \"onCreate\");\n\t}", "private void startJobs() {\n List<JobProfile> profileList = getJobConfDb().getAcceptedJobs();\n for (JobProfile profile : profileList) {\n LOGGER.info(\"init starting job from db {}\", profile.toJsonStr());\n addJob(new Job(profile));\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tSystem.out.println(\"onResume\");\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\n\t}", "public void setFirstPartition(Partition partition)\n\t{\n\t\tfirstPartition = partition;\n\t}", "@BeforeClass\n public void setup()\n throws Exception {\n startZk();\n startController();\n startBroker();\n startKafka();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLogUtils.d(\"onResume() is in\");\n\t}", "@BeforeSuite\n public void beforeSuite() throws Exception {\n java.util.logging.Logger topJavaLogger = java.util.logging.Logger.getLogger(\"\");\n topJavaLogger.setLevel(Level.WARNING);\n\n // Due to ZOOKEEPER-2693 fix, we need to specify whitelist for execute zk commends\n System.setProperty(\"zookeeper.4lw.commands.whitelist\", \"*\");\n System.setProperty(SystemPropertyKeys.CONTROLLER_MESSAGE_PURGE_DELAY, \"3000\");\n\n // Start in-memory ZooKeepers\n // If multi-ZooKeeper is enabled, start more ZKs. Otherwise, just set up one ZK\n int numZkToStart = 1;\n String multiZkConfig = System.getProperty(MULTI_ZK_PROPERTY_KEY);\n if (multiZkConfig != null && multiZkConfig.equalsIgnoreCase(Boolean.TRUE.toString())) {\n String numZkFromConfig = System.getProperty(NUM_ZK_PROPERTY_KEY);\n if (numZkFromConfig != null) {\n try {\n numZkToStart = Math.max(Integer.parseInt(numZkFromConfig), numZkToStart);\n } catch (Exception e) {\n Assert.fail(\"Failed to parse the number of ZKs from config!\");\n }\n } else {\n Assert.fail(\"multiZk config is set but numZk config is missing!\");\n }\n }\n\n // Start \"numZkFromConfigInt\" ZooKeepers\n for (int i = 0; i < numZkToStart; i++) {\n startZooKeeper(i);\n }\n\n // Set the references for backward-compatibility with a single ZK environment\n _zkServer = _zkServerMap.get(ZK_ADDR);\n _gZkClient = _helixZkClientMap.get(ZK_ADDR);\n _gSetupTool = _clusterSetupMap.get(ZK_ADDR);\n _baseAccessor = _baseDataAccessorMap.get(ZK_ADDR);\n\n // Clean up all JMX objects\n for (ObjectName mbean : _server.queryNames(null, null)) {\n try {\n _server.unregisterMBean(mbean);\n } catch (Exception e) {\n // OK\n }\n }\n }", "private void PopulateCheckpointList()\n {\n checkpoints.add(FindNextCheckpoint(startTile, directions = FindNextDirection(startTile)));\n \n int counter = 0;\n boolean cont = true;\n while (cont)\n {\n int[] currentDirection = FindNextDirection(checkpoints.get(counter).getTile());\n \n // Check if a next direction/checkpoint exists and end after 20 chekpoints(arbitrary).\n if(currentDirection[0] == 2 || counter == 20)\n {\n cont = false;\n }\n else\n {\n checkpoints.add(FindNextCheckpoint(checkpoints.get(counter).getTile(),\n directions = FindNextDirection(checkpoints.get(counter).getTile())));\n }\n counter++;\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\t\t\t\n\t\t\t\t\n\t}", "@Override\r\n\tpublic void onResume() {\n\t\tsuper.onResume();\r\n\t\t\r\n\t}", "@Override\n public void preStart() {\n //#subscribe\n cluster.subscribe(getSelf(), ClusterEvent.initialStateAsEvents(),\n ClusterEvent.MemberEvent.class, ClusterEvent.UnreachableMember.class);\n //#subscribe\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t}" ]
[ "0.65011626", "0.5974027", "0.58965063", "0.58953124", "0.5809548", "0.58069474", "0.57396", "0.57181996", "0.5595387", "0.55912745", "0.55906457", "0.54591817", "0.53870404", "0.5380837", "0.5375548", "0.5373701", "0.5341607", "0.5306763", "0.52463484", "0.5242529", "0.52119744", "0.52100664", "0.51994985", "0.51866937", "0.51667005", "0.51608235", "0.5152781", "0.5144881", "0.51173896", "0.5110821", "0.5105196", "0.51026464", "0.509637", "0.5090653", "0.50903773", "0.50741833", "0.50741833", "0.5066476", "0.5064865", "0.50590616", "0.504181", "0.50272226", "0.5014085", "0.50087416", "0.5005605", "0.49747583", "0.49724838", "0.49709135", "0.49606165", "0.49559015", "0.49557102", "0.4940657", "0.49216616", "0.49195123", "0.49167585", "0.49118924", "0.49051064", "0.4897982", "0.48961917", "0.4894215", "0.4892833", "0.4889794", "0.48642108", "0.48642108", "0.48642108", "0.4862485", "0.4858886", "0.48579115", "0.48569456", "0.48521537", "0.48521537", "0.48456305", "0.48451632", "0.4844262", "0.48362386", "0.4833529", "0.48297042", "0.48261756", "0.4823953", "0.48223245", "0.48223245", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.48218185", "0.4821439", "0.4821439", "0.4821439", "0.48161346", "0.48161346", "0.48161346", "0.48161346", "0.48161346", "0.48161346" ]
0.61911
1
Calculate the maximum number of concurrent tasks for apply through the striped executor.
private int semaphorePertmits(StripedExecutor exec) { // 4 task per-stripe by default. int permits = exec.stripesCount() * 4; long maxMemory = Runtime.getRuntime().maxMemory(); // Heuristic calculation part of heap size as a maximum number of concurrent tasks. int permits0 = (int)((maxMemory * 0.2) / (4096 * 2)); // May be for small heap. Get a low number of permits. if (permits0 < permits) permits = permits0; // Property for override any calculation. return getInteger(IGNITE_RECOVERY_SEMAPHORE_PERMITS, permits); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getExecutorLargestPoolSize();", "int getMaxConcurrent();", "int getExecutorMaximumPoolSize();", "long getExecutorTaskCount();", "int getMaximumPoolSize();", "int getExecutorPoolSize();", "int getMaxPoolSize();", "long getExcutorTasksInWorkQueueCount();", "private int getPoolSize() {\n\t\tint numberOfTasks = SpectralDescriptionType.values().length;\n\t\tint procs = Runtime.getRuntime().availableProcessors();\n\t\treturn numberOfTasks < procs ? numberOfTasks : procs > 1 ? procs - 1\n\t\t\t\t: 1;\n\t}", "int getExecutorCorePoolSize();", "@Override\n\tpublic int getMaxThreads() {\n\t\treturn 10;\n\t}", "public int getMaxPartitionsRunInParallel() {\n return maxThreads;\n }", "public int getMaxTasksPerNode() {\n return maxTasksPerNode;\n }", "int numberOfWorkingWorkers();", "int getExecutorActiveCount();", "@Override\r\n public int getMaxConcurrentProcessingInstances() {\r\n return 1;\r\n }", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "int getPoolSize();", "int numberOfWorkers();", "public int getExecutors() {\r\n return executors;\r\n }", "public int getMaxPoolSize(Env env) {\n return client.getMaxPoolSize();\n }", "public int currentConcurrencyLimit(int max) {\n\t\tint retVal = tool_concurrency;\n\n\t\tif (retVal <= 0) {\n\t\t\tretVal = Runtime.getRuntime().availableProcessors(); //ForkJoinPool.getCommonPoolParallelism();\n\t\t}\n\t\tif (max <= 0) {\n\t\t\treturn retVal;\n\t\t} else {\n\t\t\treturn retVal > max ? max : retVal;\n\t\t}\n\t}", "public int getMaxPoolSize() {\n return maxPoolSize;\n }", "public Object getNumExecutors() {\n return this.numExecutors;\n }", "@DefaultValue(\"20\")\n int getApiClientThreadPoolSize();", "long getExecutorCompletedTaskCount();", "int getMinPoolSize();", "public int getNumTasks() {\n return tasks.size();\n }", "int getMaxConcurrentShutdown(ClusterSpec clusterSpec);", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "public int getPoolSize() {\n return poolSize;\n }", "int getNumberOfTasksOnCriticalPath();", "int getMaxConcurrentStartup(ClusterSpec clusterSpec);", "public int getTasksSize() {\n return tasks.size();\n }", "public static int getMaxSenderThreads() {\n\t\tassert MAX_SENDER_THREADS > 0;\n\t\treturn MAX_SENDER_THREADS;\n\t}", "public static @Range(from = 2, to = Integer.MAX_VALUE) int threadAmount(@NonNull DriverEnvironment environment) {\n return environment.equals(DriverEnvironment.NODE) ? Math.max(8, Runtime.getRuntime().availableProcessors() * 2) : 4;\n }", "int getNumberOfTileDownloadThreads();", "final int getEstimatedSurplusTaskCount() {\n // The halving approximates weighting idle vs non-idle threads\n return (sp - base) - (pool.getIdleThreadCount() >>> 1);\n }", "public Long getMaxConcurrentConnection() {\n return this.MaxConcurrentConnection;\n }", "static public int getMaxAsyncPollingRetries() {\n return maxAsyncPollingRetries;\n }", "public int getNumberOfThreads() { return numberOfThreads; }", "public int getNumberOfTasks() {\n\t\treturn tasks.size();\n\t}", "private int getMaxConfiguredReplicaCount() {\n if (maxConfiguredReplicaCount > 0) {\n return maxConfiguredReplicaCount;\n } else {\n ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);\n ClientMessage response = invoke(request);\n maxConfiguredReplicaCount = PNCounterGetConfiguredReplicaCountCodec.decodeResponse(response);\n }\n return maxConfiguredReplicaCount;\n }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "public int getThreadCount() throws ResourceConfigurationException {\n return cpeFactory.getProcessingUnitThreadCount();\n }", "public static void main(String[] args) {\n ThreadPoolExecutor executor = new ThreadPoolExecutor(7, 8, 5, TimeUnit.SECONDS,\r\n new LinkedBlockingQueue<Runnable>());\r\n System.out.println(executor.getCorePoolSize());\r\n System.out.println(executor.getMaximumPoolSize());\r\n System.out.println(\"***************************\");\r\n ThreadPoolExecutor executor2 = new ThreadPoolExecutor(7, 8, 5, TimeUnit.SECONDS,\r\n new SynchronousQueue<Runnable>());\r\n System.out.println(executor2.getCorePoolSize());\r\n System.out.println(executor2.getMaximumPoolSize());\r\n\r\n// 7\r\n// 8\r\n// ***************************\r\n// 7\r\n// 8\r\n\r\n // 熟悉下api,查询线程池中保存的core线程数量为7,最大为8\r\n }", "@VisibleForTesting\n static int getInstanceThreadPoolSize() {\n return instanceThreadPoolSize;\n }", "public int getNumberOfThreads(){\n return numberOfThreads;\n }", "private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }", "public int getNumberConcurrentEmulators() {\n\t\treturn (numberConcurrentEmulators);\n\t}", "public int numberOfPendingTasks() {\n return allBatchesStream().mapToInt(Batch::getPendingCount).sum();\n }", "public int getActivePoolSize(){return activePoolSize;}", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "public int getSize() {\n return tasks.size();\n }", "public int asyncTaskCount();", "@Override\n public int getNumIdle() {\n return _pool.size();\n }", "static public int getMaxMigrationAsyncPollingRetries() {\n return maxMigrationAsyncPollingRetries;\n }", "public int getMaxAttempts(AsyncOperation op);", "public int getMaxConns() {\n return maxConns;\n }", "public Integer getThreadPoolBlockingQueueSize() {\n String tc = getConfig().getProperty(THREAD_POOL_BLOCKING_QUEUE_SIZE).getValue();\n Integer ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n if (tc != null){\n try {\n ret = Integer.valueOf(tc);\n } catch (Exception ex){\n ret = new Integer(DEFAULT_THREAD_POOL_BLOCKING_QUEUE_SIZE);\n }\n }\n return ret;\n }", "Integer backlogCapacity();", "private static void useFixedSizePool(){\n ExecutorService executor = Executors.newFixedThreadPool(10);\n\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n\n IntStream.range(0, 20).boxed().forEach(i -> {\n executor.execute(() -> {\n sleepSeconds(10);\n System.out.println(Thread.currentThread().getName() + \"[\" + i + \"]\");\n });\n });\n sleepSeconds(1);\n System.out.println(((ThreadPoolExecutor) executor).getActiveCount());\n }", "@Override\n public int getMaxJobsPerAcquisition() {\n return myMaxJobsPerAcquisition;\n }", "public int getMaxRetries() {\n\t return maxRetries.get();\n\t}", "public int getWorkerThreads() {\n return workerThreads;\n }", "public int getNumThreads() {\n return numThreads;\n }", "public int getCapacity() {\n\t\tfinal String key = ConfigNames.CHILD_THREADS.toString();\n\n\t\tif (getJson().isNull(key)) {\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn getJson().getInt(key);\n\t}", "int getMaximalIterationCount();", "protected abstract int getTaskLength();", "public int leastInterval(char[] tasks, int n) {\n \t if(tasks == null || tasks.length == 0) return 0;\n Map<Character, Integer> taskByCountMap = new HashMap<Character, Integer>();\n for(char task : tasks){\n taskByCountMap.merge(task, 1, (a, b) -> a + b );\n }\n \n Comparator<Character> cmp = (a, b) -> ( taskByCountMap.get(b) - taskByCountMap.get(a) );\n PriorityQueue<Character> maxHeap = new PriorityQueue<Character>(cmp);\n maxHeap.addAll(taskByCountMap.keySet());\n int result = 0;\n while(!maxHeap.isEmpty()){\n \t System.out.println(maxHeap.size());\n \t if(maxHeap.size() == 1 && taskByCountMap.get(maxHeap.peek()) == 1) {\n \t\t System.out.println(\"dd\");\n \t\t return result + 1;\n \t }\n \t \n // List<Character> currentTaskList = new ArrayList<Character>();\n for(int i = 0; i <= n; i++){\n \t int cnt = 0;\n \t \n if(!maxHeap.isEmpty()) {\n\t char c = maxHeap.poll();\n\t taskByCountMap.put(c, taskByCountMap.get(c) - 1);\n\t currentTaskList.add(c);\n }\n result++; \n System.out.println(\"dd dd \" + result);\n }\n \n for(char c : currentTaskList){\n if(taskByCountMap.getOrDefault(c, 0) == 0) continue; \n maxHeap.offer(c);\n }\n \n }\n return result;\n \n }", "protected short maxRetries() { return 15; }", "public Integer getNumberOfActiveRunners(){\n return numberOfActiveRunners;\n }", "private int getStartStopThreadsInternal() {\n\t\tint result = getStartStopThreads();\n\n\t\t// Positive values are unchanged\n\t\tif (result > 0) {\n\t\t\treturn result;\n\t\t}\n\n\t\t// Zero == Runtime.getRuntime().availableProcessors()\n\t\t// -ve == Runtime.getRuntime().availableProcessors() + value\n\t\t// These two are the same\n\t\tresult = Runtime.getRuntime().availableProcessors() + result;\n\t\tif (result < 1) {\n\t\t\tresult = 1;\n\t\t}\n\t\treturn result;\n\t}", "int getNumberOfTasksDeterminingBuildDuration();", "public int getRunnableCount() {\n return queue.size();\n }", "@SuppressForbidden(reason = \"to obtain default number of available processors\")\n/* */ synchronized int availableProcessors() {\n/* 65 */ if (this.availableProcessors == 0) {\n/* */ \n/* 67 */ int availableProcessors = SystemPropertyUtil.getInt(\"io.netty.availableProcessors\", \n/* */ \n/* 69 */ Runtime.getRuntime().availableProcessors());\n/* 70 */ setAvailableProcessors(availableProcessors);\n/* */ } \n/* 72 */ return this.availableProcessors;\n/* */ }", "int getMaxInstances();", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "Long getRunningCount();", "public final int getMaxIterations()\r\n\t{\r\n\t\treturn maxIterations;\r\n\t}", "@Override\n protected Long compute() {\n if (dataList.size() <= BATCHSIZE)\n return sum();\n else {\n final List<AggregateWorker> tasks = new ArrayList<>();\n int index = dataList.size();\n while (index > 0) {\n int startIndex = (index - BATCHSIZE >= 0) ? (index - BATCHSIZE) : 0;\n // System.out.println(\"Created task for \" + startIndex + \" to \" + index);\n Collection<Long> subList = dataList.subList(startIndex, index);\n final AggregateWorker task = new AggregateWorker(subList);\n task.fork();\n tasks.add(task);\n index = index - BATCHSIZE;\n }\n long result = 0;\n for (final AggregateWorker task : tasks) {\n result += task.join();\n }\n return result;\n }\n }", "public int queueSize() {\n return executor.getQueue().size();\n }", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public int getCachedTasksSize() {\n return cachedTasks.size();\n }", "public static java.lang.Long getDEFAULT_NUMBER_PARALLEL_THREADS()\n\t{\n\t\treturn (java.lang.Long)Core.getConfiguration().getConstantValue(\"ParallelExecute.DEFAULT_NUMBER_PARALLEL_THREADS\");\n\t}", "public Object getMaxConcurrentConnections() {\n return this.maxConcurrentConnections;\n }", "public int getWorkers() {\r\n return workers;\r\n }", "public int getNumOfMaxActions() {\n return numOfMaxActions;\n }", "public Object getExecutorSize() {\n return this.executorSize;\n }", "public Integer getMaxEventDrivenThreads() {\n return maxEventDrivenThreads;\n }", "int getMaxReplicaCount(Type type);", "public int getMaxCalls();", "public int getMaxRetries() {\n return maxRetries;\n }", "public int getWorkersPerServer() {\n return Integer.parseInt(getOptional(\"kylin.server.sequence-sql.workers-per-server\", \"1\"));\n }", "public int size()\n {\n return tasks.size();\n }", "public void setMAX_EXECUCOES(int MAX_EXECUCOES)\r\n {\r\n if(MAX_EXECUCOES > 0)\r\n this.MAX_EXECUCOES = MAX_EXECUCOES;\r\n }", "public int workers() {\n return workers_;\n }", "@Override\r\n\t\tpublic int getStandbyCap() {\n\t\t\treturn 2 * Runtime.getRuntime().availableProcessors();\r\n\t\t}", "public final int getNbThread() {\n return nbThread;\n }", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }" ]
[ "0.7384143", "0.73828036", "0.7306532", "0.7154485", "0.697928", "0.6957315", "0.68973976", "0.6790621", "0.67666894", "0.6745636", "0.6622435", "0.65834993", "0.65804595", "0.6566622", "0.65578145", "0.65421474", "0.64973617", "0.649401", "0.64598536", "0.6376364", "0.63567203", "0.6280994", "0.6247681", "0.620646", "0.6199286", "0.6169193", "0.61221635", "0.61148506", "0.60656077", "0.60632235", "0.604944", "0.6038756", "0.60276246", "0.60224944", "0.6012575", "0.59968334", "0.5988072", "0.5975777", "0.5953715", "0.591822", "0.591596", "0.5908916", "0.59004146", "0.5869125", "0.5854492", "0.5851502", "0.58199376", "0.57849485", "0.57681274", "0.57567483", "0.5734206", "0.5731488", "0.57126486", "0.5694899", "0.5690761", "0.56744397", "0.566786", "0.566695", "0.5636659", "0.5636056", "0.56333363", "0.5632968", "0.5616108", "0.5615098", "0.5592312", "0.55877", "0.55835927", "0.55823785", "0.5570903", "0.5568967", "0.5566466", "0.5565817", "0.5562445", "0.55581486", "0.55569685", "0.5556707", "0.55561435", "0.55150384", "0.5510872", "0.55015296", "0.54976887", "0.54864115", "0.5471935", "0.54695314", "0.54667956", "0.5456647", "0.54496783", "0.5443445", "0.5442001", "0.54417324", "0.5428917", "0.54233396", "0.5423218", "0.54215086", "0.5415187", "0.5415108", "0.54143107", "0.5399888", "0.5393016", "0.53806436" ]
0.6318095
21
Obtains PageMemory reference from cache descriptor instead of cache context.
private PageMemoryEx getPageMemoryForCacheGroup(int grpId) throws IgniteCheckedException { if (grpId == MetaStorage.METASTORAGE_CACHE_ID) return (PageMemoryEx)dataRegion(METASTORE_DATA_REGION_NAME).pageMemory(); // TODO IGNITE-7792 add generic mapping. if (grpId == TxLog.TX_LOG_CACHE_ID) return (PageMemoryEx)dataRegion(TxLog.TX_LOG_CACHE_NAME).pageMemory(); // TODO IGNITE-5075: cache descriptor can be removed. GridCacheSharedContext sharedCtx = context(); CacheGroupDescriptor desc = sharedCtx.cache().cacheGroupDescriptors().get(grpId); if (desc == null) return null; String memPlcName = desc.config().getDataRegionName(); return (PageMemoryEx)sharedCtx.database().dataRegion(memPlcName).pageMemory(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T extends Entity> EntityCache<T> getMemoryEntityCache() {\n\t\tEntityMap<T> entityMap = new MemoryEntityMap<T>();\n\t\treturn new EntityCache<T>(entityMap);\n\t}", "public MemoryCacheParams get() {\n return new MemoryCacheParams(m114359b(), 256, Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, f81939a);\n }", "public < T > T getMemory ( MemoryKey < T > memoryKey ) {\n\t\treturn extract ( handle -> handle.getMemory ( memoryKey ) );\n\t}", "public static Cache getCache(PageContext pc, int scope)\n {\n return (Cache)pc.getAttribute(Constants.JSPTAG_CACHE_KEY, scope);\n }", "public static Memory getInstance(){\n if (mem == null) mem = new Memory(4000);\n return mem;\n }", "public T getMemory() {\n try {\n if (this.memoryQueue.peek() == null && this.dynamic) {\n // Add a piece of memory\n this.memoryQueue.offer(this.allocator.allocate(this.sz));\n }\n\n return this.memoryQueue.take();\n } catch (InterruptedException e) {\n Log.msg(LogType.MANDATORY, e.getMessage());\n return null;\n }\n }", "public static synchronized HotspotMemoryMBean getHotspotMemoryMBean()\n/* */ {\n/* 312 */ if (hsMemoryMBean == null) {\n/* 313 */ hsMemoryMBean = new HotspotMemory(jvm);\n/* */ }\n/* 315 */ return hsMemoryMBean;\n/* */ }", "long getMemory();", "long getMemory();", "public static ByteArrayCache instance() {\n if (_instance == null) try {\n _instance = (ByteArrayCache) ImmortalMemory.instance().newInstance( ByteArrayCache.class);\n ZenProperties.logger.log(Logger.INFO, ByteArrayCache.class, \"instance\", \"ByteArrayCache created\");\n } catch (Exception e) {\n ZenProperties.logger.log(Logger.FATAL, ByteArrayCache.class, \"instance\", e);\n System.exit(-1);\n }\n return _instance;\n }", "public CPointer<Object> getDrawcache() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 64);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 64);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{Object.class};\n\t\treturn new CPointer<Object>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, -1), __io__blockTable);\n\t}", "public static long getMemoryCached() throws IOException, InterruptedException {\n \treturn pi4jSystemInfoConnector.getMemoryCached();\r\n }", "public static MemoryCache getInstance(MemoryCacheParams params) {\n if (instance == null) {\n instance = new MemoryCache(params);\n }\n\n return instance;\n }", "private static Cache getCacheInstance() {\r\n\t\tif( cache == null ) {\r\n\t\t\ttry {\r\n\t\t\t\tCacheFactory cf = CacheManager.getInstance().getCacheFactory();\r\n\t\t\t\tcache = cf.createCache(Collections.emptyMap());\r\n\t\t\t} catch (CacheException e) {\r\n\t\t\t\tlog.log(Level.SEVERE, \"can not initialize cache\", e);\r\n\t\t\t\tcache = null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cache;\r\n\t}", "public Cache<ImmutableBytesPtr,PMetaDataEntity> getMetaDataCache() {\n Cache<ImmutableBytesPtr,PMetaDataEntity> result = metaDataCache;\n if (result == null) {\n synchronized(this) {\n result = metaDataCache;\n if(result == null) {\n long maxTTL = config.getLong(\n QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS);\n long maxSize = config.getLongBytes(\n QueryServices.MAX_SERVER_METADATA_CACHE_SIZE_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_METADATA_CACHE_SIZE);\n metaDataCache = result = CacheBuilder.newBuilder()\n .maximumWeight(maxSize)\n .expireAfterAccess(maxTTL, TimeUnit.MILLISECONDS)\n .weigher(new Weigher<ImmutableBytesPtr, PMetaDataEntity>() {\n @Override\n public int weigh(ImmutableBytesPtr key, PMetaDataEntity table) {\n return SizedUtil.IMMUTABLE_BYTES_PTR_SIZE + key.getLength() + table.getEstimatedSize();\n }\n })\n .build();\n }\n }\n }\n return result;\n }", "private Bitmap getBitmapFromMemCache(String key) {\n return mLruCache.get(key);\n }", "public IMemory getMemory() { return memory; }", "CachedPage getCachedPage(String url);", "public MemoryCache() {\n\t\t// use 25% of available heap size\n\t\tsetLimit(Runtime.getRuntime().maxMemory() / 10);\n\t}", "public static CatalogStructure getCache() {\n return CACHE.get();\n }", "public MainMemory getMem()\n {\n return mem;\n }", "private Memory memory(Expression expression, cat.footoredo.mx.type.Type type) {\n return new Memory(asmType(type), expression);\n }", "@Nonnull\n @Deprecated\n public StoreBuilder<Raw> memory(Cache<BarCode, Observable<Raw>> memCache) {\n this.memCache = memCache;\n return this;\n }", "public MappedPage acquirePage(final long index) {\n MappedPage mpi = cache.get(index);\n if (mpi == null)\n try {\n Object lock = null;\n synchronized (mapLock) {\n if (!pageCreationLockMap.containsKey(index))\n pageCreationLockMap.put(index, new Object());\n lock = pageCreationLockMap.get(index);\n }\n synchronized (lock) { // only lock the creation of page index\n mpi = cache.get(index); // double check\n if (mpi == null) {\n RandomAccessFile raf = null;\n FileChannel channel = null;\n try {\n final String fileName = this.getFileNameByIndex(index);\n raf = new RandomAccessFile(fileName, \"rw\");\n channel = raf.getChannel();\n final MappedByteBuffer mbb = channel.map(READ_WRITE, 0, this.pageSize);\n mpi = new MappedPage(mbb, fileName, index);\n cache.put(index, mpi, ttl);\n if (logger.isDebugEnabled())\n logger.debug(\"Mapped page for \" + fileName + \" was just created and cached.\");\n }\n catch (final IOException e) {\n throw new BigQueueException(e);\n }\n finally {\n if (channel != null)\n CloseCommand.close(channel);\n if (raf != null)\n CloseCommand.close(raf);\n }\n }\n }\n }\n finally {\n synchronized (mapLock) {\n pageCreationLockMap.remove(index);\n }\n }\n else if (logger.isDebugEnabled())\n logger.debug(\"Hit mapped page \" + mpi.getPageFile() + \" in cache.\");\n\n return mpi;\n }", "public boolean isCachedMemory() {\n return false;\n }", "synchronized ByteBuffer readPage(int clusterId, int pageId, long offset, long length,\n boolean cachePage)\n throws IOException {\n pageLoads++;\n ByteBuffer cachedPage = null;\n if (mode == READMODE.MR) {\n cachedPage = pcp[clusterId].getPage(pageId);\n } else if (mode == READMODE.POINTQUERY) {\n cachedPage = pagecache.getBlock(makePageName(segId, clusterId, pageId));\n }\n if (cachedPage != null) {\n cacheHits++;\n if (reporter != null) {\n if (clusterId < 16) {\n reporter.incrCounter(SegmentCacheHitCounter.values()[clusterId], 1);\n } else {\n reporter.incrCounter(SegmentCacheHitCounter.OTHERCLUSTERS, 1);\n }\n }\n return cachedPage.duplicate();\n }\n\n /**\n * Report the related activities to M/R frameworks, so we will know\n * what happened during query processing\n */\n if (reporter != null) {\n if (clusterId < 16) {\n reporter.incrCounter(SegmentReadPageCounter.values()[clusterId], 1);\n } else {\n reporter.incrCounter(SegmentReadPageCounter.OTHERCLUSTERS, 1);\n }\n\n if (istream.getPos() - offset > 0) {\n reporter.incrCounter(SegmentPosSeekCounter.MOVEBACK, 1);\n } else {\n reporter.incrCounter(SegmentPosSeekCounter.MOVEON, 1);\n }\n }\n\n // ByteBuffer buf = ByteBuffer.allocate(longToInt(length));\n // istream.readFully(offset, buf.array());\n\n // Read the page from filesystem\n InputStream is = new BoundedRangeFileInputStream(istream, offset, length);\n ByteBuffer buf = ByteBuffer.allocate(longToInt(length));\n IOUtils.readFully(is, buf.array(), 0, buf.capacity());\n is.close();\n\n if (cachePage) {\n if (mode == READMODE.MR) {\n pcp[clusterId].cachePage(pageId, buf.duplicate());\n } else if (mode == READMODE.POINTQUERY) {\n pagecache.cacheBlock(makePageName(segId, clusterId, pageId), buf.duplicate(), true);\n }\n }\n return buf;\n }", "public static HeapMemory instance() {\n return theInstance;\n }", "public Long get_cacheerrmemalloc() throws Exception {\n\t\treturn this.cacheerrmemalloc;\n\t}", "public static synchronized OpenIDRememberMeTokenCache getCacheInstance() {\n if (rememberMeCache == null) {\n rememberMeCache = new OpenIDRememberMeTokenCache();\n }\n return rememberMeCache;\n }", "public Bitmap getBitmapFromMemCache(String data) {\n Bitmap memValue = null;\n\n memValue = mMemoryCache.get(data);\n\n if (BuildConfig.DEBUG && memValue != null) {\n Log.d(TAG, \"Memory cache hit\");\n }\n\n return memValue;\n }", "public static MainMemory getInstance(){ \n\t\treturn memory;\n\t}", "@Override\n\tpublic CacheResponse get(URI uri, String rqstMethod, Map<String, List<String>> rqstHeaders) throws IOException {\n\t\tSystem.err.println(\"enter MemoryCache.get()\");\n\t\treturn new CacheResponseImpl();\n\t}", "private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }", "public final byte[] getMemory() {\r\n return this.memory;\r\n }", "private Cache<String, String> getPOXCache() {\n CacheManager manager = Caching.getCacheManagerFactory().getCacheManager(POXSecurityHandler.POX_CACHE_MANAGER);\n Cache<String, String> cache = manager.getCache(POXSecurityHandler.POX_ENABLED);\n return cache;\n }", "@Array({161}) \n\t@Field(6) \n\tpublic Pointer<Byte > Memo() {\n\t\treturn this.io.getPointerField(this, 6);\n\t}", "@Override\n\tpublic byte[] get()\n\t{\n\t\tif (isInMemory())\n\t\t{\n\t\t\tif (cachedContent == null)\n\t\t\t{\n\t\t\t\tcachedContent = dfos.getData();\n\t\t\t}\n\t\t\treturn cachedContent;\n\t\t}\n\n\t\tFile file = dfos.getFile();\n\n\t\ttry\n\t\t{\n\t\t\treturn Files.readBytes(file);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.debug(\"failed to read content of file: \" + file.getAbsolutePath(), e);\n\t\t\treturn null;\n\t\t}\n\t}", "protected Cache cache(RequestContext ctx) {\n String serviceId = serviceId(ctx);\n if (serviceId != null) {\n return cacheManager.getCache(serviceId);\n }\n return null;\n }", "public Page readPage(PageId pid) {\n // some code goes here\n int offset = pid.pageNumber() * BufferPool.PAGE_SIZE;\n byte[] pageData = new byte[BufferPool.PAGE_SIZE];\n Page page = null;\n try {\n RandomAccessFile accessor = new RandomAccessFile(f, \"r\");\n accessor.seek(offset);\n accessor.read(pageData, 0, BufferPool.PAGE_SIZE);\n page = new HeapPage((HeapPageId) pid, pageData);\n accessor.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return page;\n }", "public int accessMemory(int id, int pageNumber)\n\t{ \n\t\treturn 0;\n\t}", "CloudCache getCache(String cacheName);", "public static LRUResourceCache getCache(String contextName) {\n LRUResourceCache lruCache = null;\n ConcurrentHashMap<String, LRUResourceCache> cacheMap = RuntimeData.getCacheMap();\n KernelProps conf = KernelProps.getInstance();\n \n if (cacheMap.containsKey(contextName)) {\n lruCache = (LRUResourceCache) cacheMap.get(contextName);\n } else {\n lruCache = new LRUResourceCache(conf.getInitialCacheSize(), conf.getCacheLoadFactor(), conf.getCacheCapacity());\n cacheMap.put(contextName, lruCache);\n }\n return lruCache;\n }", "public StackManipulation cached() {\n return new Cached(this);\n }", "public int getCacheSize();", "public static synchronized BlockCache getBlockCache(Configuration conf) {\n if (globalPageCache != null) {\n return globalPageCache;\n }\n\n float cachePercentage = conf.getFloat(SEGFILE_CACHE_SIZE_KEY, 0.0f);\n if (cachePercentage == 0L) {\n return null;\n }\n if (cachePercentage > 1.0) {\n throw new IllegalArgumentException(SEGFILE_CACHE_SIZE_KEY +\n \" must be between 0.0 and 1.0, not > 1.0\");\n }\n\n // Calculate the amount of heap to give the heap\n MemoryUsage mu = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();\n long cacheSize = (long) (mu.getMax() * cachePercentage);\n LOG.info(\"Allocating LruPageCache with maximum size \" +\n StringUtils.humanReadableInt(cacheSize));\n globalPageCache = new LruBlockCache(cacheSize,\n MastiffMapReduce.getTablePageSize(conf));\n\n return globalPageCache;\n }", "private ImageCache(Context context) {\n int memClass = ((ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryClass();\n memClass = memClass > 32 ? 32 : memClass;\n\n final int cacheSize = 1024 * 1024 * memClass / 8;\n memoryCache = new LruCache<String, Bitmap>(cacheSize) {\n protected int sizeOf(String key, Bitmap bitmap) {\n return bitmap.getRowBytes() * bitmap.getHeight();\n }\n };\n\n File cacheDir = DiskLruCache.getDiskCacheDir(context, DISK_CACHE_SUB_DIR);\n diskCache = DiskLruCache.openCache(context, cacheDir, DISK_CACHE_SIZE);\n }", "protected net.sf.ehcache.Ehcache getCache() {\n return cache;\n }", "public Map<Integer, Integer> getMemoryDataMap(){\n return dataMemory.getMemoryMap();\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "public long getCachedData(int memLoc) {\n\t\tfor (Integer memoryCheck : cacheMap.keySet()) {\n\t\t\tif(memoryCheck == memLoc){\n\t\t\t\treturn cacheMap.get(memoryCheck);\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public MemoryType getMemoryType() {\n Long __key = this.memoryTypeId;\n if (memoryType__resolvedKey == null || !memoryType__resolvedKey.equals(__key)) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n MemoryTypeDao targetDao = daoSession.getMemoryTypeDao();\n MemoryType memoryTypeNew = targetDao.load(__key);\n synchronized (this) {\n memoryType = memoryTypeNew;\n \tmemoryType__resolvedKey = __key;\n }\n }\n return memoryType;\n }", "Cache<String, YourBean> getMyCache() {\n\treturn myCache;\n }", "@Beta\npublic interface BitmapMemoryCache<K> extends MemoryCache<K, Bitmap> {\n\n /**\n * Default maximum percentage of the application memory to use when configuring a bitmap memory\n * cache.\n */\n public static final float DEFAULT_MAX_MEMORY_PERCENTAGE = 10f;\n\n}", "public interface CacheManager extends AutoCloseable {\n /**\n * @param conf the Alluxio configuration\n * @return an instance of {@link CacheManager}\n */\n static CacheManager create(AlluxioConfiguration conf) throws IOException {\n // TODO(feng): make cache manager type configurable when we introduce more implementations.\n return new NoExceptionCacheManager(LocalCacheManager.create(conf));\n }\n\n /**\n * Puts a page into the cache manager. This method is best effort. It is possible that this put\n * operation returns without page written.\n *\n * @param pageId page identifier\n * @param page page data\n * @return true if the put was successful, false otherwise\n */\n boolean put(PageId pageId, byte[] page);\n\n /**\n * Wraps the page in a channel or null if the queried page is not found in the cache or otherwise\n * unable to be read from the cache.\n *\n * @param pageId page identifier\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId);\n\n /**\n * Wraps a part of the page in a channel or null if the queried page is not found in the cache or\n * otherwise unable to be read from the cache.\n *\n * @param pageId page identifier\n * @param pageOffset offset into the page\n * @return a channel to read the page\n */\n @Nullable\n ReadableByteChannel get(PageId pageId, int pageOffset);\n\n /**\n * Deletes a page from the cache.\n *\n * @param pageId page identifier\n * @return true if the page is successfully deleted, false otherwise\n */\n boolean delete(PageId pageId);\n}", "public Memoization getMemoization() {\n Memoization m = this.m;\n if (m != null) return m;\n return this.m = new Memoization();\n }", "public static ProposalDTO getProposalFromCache(String proposalId){\n\t\tlog.info(\"In MemcacheUtil getProposalFromCache\");\n\t\tProposalDTO proposalDTO=null;\n \tString proposalKey=PROPOSAL_KEY+\"_\"+proposalId;\n \tif(memcache !=null && memcache.contains(proposalKey)){\n \t\tproposalDTO=(ProposalDTO) memcache.get(proposalKey);\n \t} \t\n \treturn proposalDTO;\n\t}", "public BitmapMemoryCache() {\r\n //use 25% of available heap size\r\n setLimit(Runtime.getRuntime().maxMemory() / 4);\r\n }", "public Page readPage(PageId pid) {\n // some code goes here\n \t\n \tHeapPage pg = null;\n \tbyte[] pageBytes = new byte[BufferPool.PAGE_SIZE];\n \t\n \ttry {\n\t \tRandomAccessFile raf = new RandomAccessFile(m_f, \"r\");\n\t \traf.seek(pid.pageNumber() * BufferPool.PAGE_SIZE);\n\t \traf.read(pageBytes, 0, BufferPool.PAGE_SIZE);\n\t \traf.close();\n\t \tpg = new HeapPage((HeapPageId) pid, pageBytes);\n \t} catch (IOException e){\n \t\te.printStackTrace();\n \t}\n \t\n \treturn pg;\n }", "@Override\n\tpublic Bitmap fetch(String key) {\n\t\treturn (Bitmap) mMemoryCache.get(key);\n\t}", "default void loadRevisionFileDataIntoMemory(AsyncCache<Integer, RevisionFileData> cache) {\n if (!cache.asMap().isEmpty()) {\n return;\n }\n\n final UberPage uberPage;\n if (exists()) {\n final Reader reader = createReader();\n final PageReference firstRef = reader.readUberPageReference();\n uberPage = (UberPage) firstRef.getPage();\n\n final var revisionNumber = uberPage.getRevisionNumber();\n final var revisionNumbers = new ArrayList<Integer>(revisionNumber);\n\n for (int i = 1; i <= revisionNumber; i++) {\n revisionNumbers.add(i);\n }\n\n cache.getAll(revisionNumbers, keys -> {\n final Map<Integer, RevisionFileData> result = new HashMap<>();\n keys.forEach(key -> result.put(key, reader.getRevisionFileData(key)));\n reader.close();\n return result;\n });\n }\n }", "@Override\n public CacheAPI getCacheAPI() {\n return null;\n }", "@Override\r\n\tprotected PreprocessedPageInfo buildPageInfo(final HttpServletRequest request,\r\n final HttpServletResponse response, final FilterChain chain)\r\n throws Exception {\n final String key = calculateKey(request);\r\n PreprocessedPageInfo pageInfo;\r\n\t\tElement element = cacheManager.get(key);\r\n\t\tif (element == null || element.getObjectValue() == null) {\r\n\t\t\tLOG.debug(\"Element is null for cache:\" + cacheManager.getTargetCacheByKey(key).getName() + \" with key \" + key);\r\n\t\t\ttry {\r\n\t\t\t\t// Page is not cached - build the response, cache it, and\r\n\t\t\t\t// send to client\r\n\t\t\t\tpageInfo = buildPage(request, response, chain);\r\n\t\t\t\tif (pageInfo.isOk()) {\r\n\t\t\t\t\tif (LOG.isDebugEnabled()) {\r\n\t\t\t\t\t\tLOG.debug(\"PageInfo ok. Adding to cache \" + cacheManager.getTargetCacheByKey(key).getName() + \" with key \" + key);\r\n\t\t\t\t\t}\r\n cacheManager.put(new Element(key, pageInfo));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (LOG.isDebugEnabled()) {\r\n\t\t\t\t\t\tLOG.debug(\"PageInfo was not ok(200). Putting null into cache \" + cacheManager.getTargetCacheByKey(key).getName()\r\n\t\t\t\t\t\t\t\t+ \" with key \" + key);\r\n\t\t\t\t\t}\r\n cacheManager.put(new Element(key, null));\r\n\t\t\t\t}\r\n\t\t\t} catch (final Throwable throwable) {\r\n\t\t\t\tLOG.error(\"Putting into cache \" + cacheManager.getTargetCacheByKey(key).getName() + \" failed with key \" + key);\r\n cacheManager.put(new Element(key, null));\r\n\t\t\t\tthrow new Exception(throwable);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tpageInfo = (PreprocessedPageInfo) element.getObjectValue();\r\n\t\t}\r\n return pageInfo;\r\n }", "public static MyRecyclerView newInstance(LruCache<String,Bitmap> mImgMemoryCache) {\r\n\r\n MyRecyclerView fragment = new MyRecyclerView();\r\n// fragment.setImgMemoryCache(mImgMemoryCache);\r\n Bundle args = new Bundle();\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "public Cache getCache(String name)\r\n/* 39: */ {\r\n/* 40:64 */ return (Cache)this.cacheMap.get(name);\r\n/* 41: */ }", "public int getMemory(int index) {\n\t\treturn memory.get(index);\n\t}", "public long memory() {\n\treturn 0;\n }", "private HashMap pc() {\n if (_pcache == null) {\n _pcache = new HashMap(13);\n }\n return _pcache;\n }", "public Node<E> getNodeFromCache() {\n if (this.cacheSize == 0) {\n return null;\n }\n Node<E> node = this.firstCachedNode;\n this.firstCachedNode = node.next;\n node.next = null;\n this.cacheSize--;\n return node;\n }", "int getCurrentCacheSize();", "public Bitmap getImageCache(Integer cacheKey)\n {\n synchronized (mLinkedHashMap)\n {\n Bitmap bitmap;\n // Get file from cache\n String file = mLinkedHashMap.get(cacheKey);\n if (file != null)\n {\n bitmap = BitmapFactory.decodeFile(file);\n Log.i(\"DiskLruCache\", \"DiskCacheHit for Image with CacheKey: \"+cacheKey.toString());\n return bitmap;\n }\n else\n {\n // Construct existing file path\n String cacheKeyStr = String.valueOf(cacheKey);\n String existingFile = createFilePath(cacheDirectory, cacheKeyStr);\n // Get the file using the constructed file path\n assert existingFile != null;\n File existFile = new File(existingFile);\n if (existFile.exists())\n {\n // If the file exists, we will store the the key in reference list\n referenceAdd(cacheKey, existingFile);\n return BitmapFactory.decodeFile(existingFile);\n }\n }\n return null;\n }//synchronized (mLinkedHashMap)\n }", "private CacheObject<K, V> getCacheObject(K key){\n return this.cache.get(key);\n }", "public Memory(int access_time) {\n\t\tthis.mem_array = new String[65536];\n\t\tthis.access_time = access_time;\n\t\tthis.fetch_cycles_left = access_time;\n\t\tthis.load_cycles_left = access_time;\n\t}", "public File getPictureFromCache() {\n if (context != null) {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n return file;\n }\n return null;\n }", "public int getMemory()\n\t{\n\t\treturn memorySize;\n\t}", "ResourceUsage getMemoryInfoByDate(Long date) {\n return daoInterface.getMemoryInfoByDate(date);\n\n }", "public Page readPage(PageId pid) { //TODO add checks for exceeding page limits, etc\n int pageNum = pid.pageno();\n int offSet = (pageNum)*BufferPool.PAGE_SIZE;\n \n long fileSize = file.length();\n //System.out.println(\"size: \" + file.length());\n InputStream iStream = null;\n \n byte[] byteWrite = new byte[BufferPool.PAGE_SIZE];\n try {\n\t\t\tiStream = new FileInputStream(file);\n\t\t\tiStream.skip(offSet);\n\t \tiStream.read(byteWrite, 0, BufferPool.PAGE_SIZE);\n\t \tiStream.close();\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\n try {\n\t\t\tHeapPage pageRead = new HeapPage((HeapPageId)pid,byteWrite);\n\t\t\treturn (Page)pageRead;\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n }", "public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }", "protected synchronized MemoryCache getExtremesLookupCache()\n {\n // Note that the extremes lookup cache does not belong to the WorldWind memory cache set, therefore it will not\n // be automatically cleared and disposed when World Wind is shutdown. However, since the extremes lookup cache\n // is a local reference to this elevation model, it will be reclaimed by the JVM garbage collector when this\n // elevation model is reclaimed by the GC.\n\n if (this.extremesLookupCache == null)\n {\n // Default cache size holds 1250 min/max pairs. This size was experimentally determined to hold enough\n // value lookups to prevent cache thrashing.\n long size = Configuration.getLongValue(AVKey.ELEVATION_EXTREMES_LOOKUP_CACHE_SIZE, 20000L);\n this.extremesLookupCache = new BasicMemoryCache((long) (0.85 * size), size);\n }\n\n return this.extremesLookupCache;\n }", "public static RequestCountForCartBundleCache getCache()\n\t{\n\t\treturn instance;\n\t}", "public Long get_cachemaxmemorykb() throws Exception {\n\t\treturn this.cachemaxmemorykb;\n\t}", "public PojoCache getPojoCache();", "public static native int getMaxCacheMem();", "@Override\n\tpublic DevApp getCache(String appKey) {\n\t\tDevApp vo = null;\n\t\tvo = (DevApp) memCached.get(AppConstant.MEMCACHE_KEY_APP + appKey);\n\t\tif (vo == null) {\n\t\t\tlog.info(\"mem.AppKey is null appId=\" + appKey);\n\t\t\tvo = developedAppDao.findByAppKey(appKey);\n\t\t\tif (vo != null) {\n\t\t\t\tmemCached.add(AppConstant.MEMCACHE_KEY_APP + appKey,getDevApp(vo.getId()),\n\t\t\t\t\t\tnew Date(AppConstant.CACHE_TIME));\n\t\t\t}\n\t\t}\n\t\treturn vo;\n\t}", "@Override\n public Object getResource(String resourceKey)\n {\n synchronized(InProcessCache.class) {\n if(!hasResource(resourceKey)) {\n return null;\n }\n\n WeakReference reference = (WeakReference)_cache.get(resourceKey);\n return reference.get();\n }\n }", "private Bitmap getBitmap(String url) {\n File file = diskCache.getData(url);\n Bitmap bitmap = decode(file);\n if (bitmap == null) {\n // If no then load it\n bitmap = loadAndCacheBitmap(file, url);\n } else {\n Log.d(\"HIHO\", \"bitmap from memory\");\n }\n\n return bitmap;\n }", "@Override\n\tpublic <T> T getAndTouch(String arg0, int arg1, long arg2)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}", "public final Expiration getMemcacheExpiration() {\n return memcacheExpiration;\n }", "public byte[] cache(byte[] contents) {\r\n\t\tif (contents == null)\r\n\t\t\treturn null;\r\n\t\tByteArray ba = new ByteArray(contents);\r\n\t\tcache.putIfAbsent(ba, ba.contents);\r\n\t\treturn cache.get(ba);\r\n\t}", "public synchronized static MetaDataCache getInstance() {\r\n if (instance == null) {\r\n instance = new MetaDataCache();\r\n }\r\n return instance;\r\n }", "public HeapCacheBuilder() {\n this.name = \"imcache-heap-cache-\" + cacheNumber.incrementAndGet();\n }", "public Map<String, String> getCache() {\n return cache;\n }", "public static Object getCache(String key) {\n\t\treturn getCache(key, null);\n\t}", "public interface ContentCache extends DataCache {\r\n String getValue(String code, Locale locale);\r\n\r\n Boolean containsLocale(Locale locale);\r\n\r\n Boolean containsCodeForLocale(String code, Locale locale);\r\n\r\n Map<String, Map<String, String>> getCachedData();\r\n}", "int getCacheSizeInMiB();", "public static Object getCache(String key) {\n return getCache(key, null);\n }", "public static Object getCache(String key) {\n return getCache(key, null);\n }", "public T get( @Nonnull final Object... args )\n {\n if ( Arez.shouldCheckApiInvariants() )\n {\n apiInvariant( this::isNotDisposed,\n () -> \"Arez-0161: MemoizeCache named '\" + _name + \"' had get() invoked when disposed.\" );\n }\n return getComputableValue( args ).get();\n }", "public static void alloc_cache_r(int request, int index_set,Memory[] memory_r, Cache[] cache_r, MCT[] mct_r){\n\t\tint replace_index=index_set*4+random_in_set_alloc_producer();\n\t\tmct_r[index_set].tag=cache_r[replace_index].address;\n\t\t\n\t\tcache_r[replace_index].address=memory_r[request].address;\n\t\tcache_r[replace_index].content=memory_r[request].content;\n\t\tcache_r[replace_index].priority=memory_r[request].priority;\n\t}", "@SuppressWarnings(\"unchecked\")\n public T get(K key) {\n synchronized (cacheMap) {\n CacheObject c = (CacheObject) cacheMap.get(key);\n\n if (c == null) {\n return null;\n } else {\n c.lastAccessed = System.currentTimeMillis();\n return c.value;\n }\n }\n }", "Map<String, String> getCachedLinks(Page page);" ]
[ "0.6499991", "0.637365", "0.6109401", "0.60014635", "0.5877919", "0.5798638", "0.5766456", "0.5765655", "0.5765655", "0.575362", "0.5690104", "0.56773835", "0.5658222", "0.5653877", "0.5638104", "0.5616952", "0.5602139", "0.5591379", "0.5480671", "0.5477815", "0.5445688", "0.54453087", "0.54425776", "0.5386198", "0.537844", "0.5368518", "0.5356635", "0.535652", "0.53232217", "0.5322969", "0.52997524", "0.52969426", "0.5292841", "0.52799505", "0.5279404", "0.52781504", "0.5273515", "0.52629244", "0.5260497", "0.5251489", "0.5231196", "0.5226776", "0.52248746", "0.5218125", "0.5210114", "0.52065563", "0.51957625", "0.5169918", "0.51694167", "0.5168628", "0.51603353", "0.51528883", "0.5150683", "0.5146321", "0.5120314", "0.5118735", "0.5117831", "0.5117358", "0.5109431", "0.50859267", "0.50853187", "0.5045636", "0.50411266", "0.50398195", "0.50356245", "0.5031842", "0.50312346", "0.50302774", "0.5014619", "0.49975008", "0.49934262", "0.4987806", "0.4986999", "0.49704447", "0.49676588", "0.49630412", "0.49615312", "0.49573597", "0.49552694", "0.49448368", "0.49430066", "0.49365762", "0.49355766", "0.49320838", "0.4930805", "0.4929526", "0.49196684", "0.49099168", "0.49093196", "0.49077594", "0.49042064", "0.4892629", "0.488935", "0.4885653", "0.48849168", "0.48849168", "0.48824012", "0.48801288", "0.48780704", "0.4875291" ]
0.7059095
0
Apply update from some iterator and with specific filters.
public void applyUpdatesOnRecovery( @Nullable WALIterator it, IgniteBiPredicate<WALPointer, WALRecord> recPredicate, IgnitePredicate<DataEntry> entryPredicate ) throws IgniteCheckedException { if (it == null) return; cctx.walState().runWithOutWAL(() -> { while (it.hasNext()) { IgniteBiTuple<WALPointer, WALRecord> next = it.next(); WALRecord rec = next.get2(); if (!recPredicate.apply(next.get1(), rec)) break; switch (rec.type()) { case MVCC_DATA_RECORD: case DATA_RECORD: checkpointReadLock(); try { DataRecord dataRec = (DataRecord)rec; for (DataEntry dataEntry : dataRec.writeEntries()) { if (entryPredicate.apply(dataEntry)) { checkpointReadLock(); try { int cacheId = dataEntry.cacheId(); GridCacheContext cacheCtx = cctx.cacheContext(cacheId); if (cacheCtx != null) applyUpdate(cacheCtx, dataEntry); else if (log != null) log.warning("Cache is not started. Updates cannot be applied " + "[cacheId=" + cacheId + ']'); } finally { checkpointReadUnlock(); } } } } catch (IgniteCheckedException e) { throw new IgniteException(e); } finally { checkpointReadUnlock(); } break; case MVCC_TX_RECORD: checkpointReadLock(); try { MvccTxRecord txRecord = (MvccTxRecord)rec; byte txState = convertToTxState(txRecord.state()); cctx.coordinators().updateState(txRecord.mvccVersion(), txState, true); } finally { checkpointReadUnlock(); } break; default: // Skip other records. } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void updateFilter();", "void filterUpdate(ServerContext context, UpdateRequest request,\n ResultHandler<Resource> handler, RequestHandler next);", "private void updateFilteredData() {\n mainApp.getFilteredData().clear();\n\n for (FilmItem p : mainApp.getFilmData()) {\n if (matchesFilter(p)) {\n \tmainApp.getFilteredData().add(p);\n }\n }\n }", "private void applyFilters() {\n Task task = new Task() {\n @Override\n public Object call() {\n long start = System.currentTimeMillis();\n System.out.println(\"Applying filters! \" + filterList.size());\n filteredRowItemList = fullCustomerRowItemList;\n for (CustomerListFilter eachFilter : filterList) {\n eachFilter.setCustomerList(filteredRowItemList);\n filteredRowItemList = eachFilter.run();\n }\n System.out.println(\"Filtering took : \" + (System.currentTimeMillis() - start) + \" ms\");\n searchResultsTable.setItems(filteredRowItemList);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n return null;\n }\n };\n task.run();\n }", "private void updateFilter(BasicOutputCollector collector) {\n if (updateFilter()){\n \tValues v = new Values();\n v.add(ImmutableList.copyOf(filter));\n \n collector.emit(\"filter\",v);\n \t\n }\n \n \n \n }", "@Override\r\n public final void update() {\r\n\r\n logger.entering(this.getClass().getName(), \"update\");\r\n\r\n setFilterMap();\r\n\r\n logger.exiting(this.getClass().getName(), \"update\");\r\n\r\n }", "public void updateAll(FlatsyCursor cursor) {\n while(cursor.next()) {\n this.operation.apply(cursor.currentObject());\n }\n }", "UpdateScanFilterResponse updateScanFilter(UpdateScanFilterRequest request) throws RevisionException;", "public void runOneIteration() {\n // Update user latent vectors\n\n //IntStream.range(0,userCount).peek(i->update_user(i)).forEach(j->{});\n\n for (int u = 0; u < userCount; u ++) {\n update_user(u);\n }\n\n // Update item latent vectors\n for (int i = 0; i < itemCount; i ++) {\n update_item(i);\n }\n }", "private void updateFilteringAndSorting() {\n log.debug(\"update filtering of adapter called\");\n if (lastUsedComparator != null) {\n sortWithoutNotify(lastUsedComparator, lastUsedAsc);\n }\n Filter filter = getFilter();\n if (filter instanceof UpdateableFilter){\n ((UpdateableFilter)filter).updateFiltering();\n }\n }", "Update withFilter(EventChannelFilter filter);", "private void updateFilters(Collection<Integer> datasetIds, String filterId) {\n selectedDatasetNumbers.clear();\n filtersSet.keySet().stream().map((keyFilterId) -> {\n DatasetPieChartFilter filter = filtersSet.get(keyFilterId);\n if (!keyFilterId.equalsIgnoreCase(filterId)) {\n filter.localUpdate(datasetIds, singlefilter);\n }\n return filter;\n }).forEachOrdered((filter) -> {\n selectedDatasetNumbers.add(filter.getSelectedDsIds().size());\n });\n\n }", "public void updateArticles(Map<String, UserArticleProgressDao> completedArticlesMap,\n List<ArticleDao> artilces, Set<String> bookMarkArticles, User user,\n List<String> mandatoryArticles) {\n filters = new HashSet<String>();\n List<UserArticleProgressDto> mandatoryArticlesDto = new ArrayList<>();\n List<UserArticleProgressDto> nonMandatoryArticles = new ArrayList<>();\n List<UserArticleProgressDto> completedArticles = new ArrayList<>();\n artilces.stream().forEach(\n a -> {\n if (!completedArticlesMap.containsKey(a.getArticle().getId())) {\n UserArticleProgressDto uap = new UserArticleProgressDto(a);\n if (bookMarkArticles.contains(a.getArticle().getId())) {\n uap.setArticleBookmarked(true);\n }\n \n uap.setUserArticleStatus(ArticleStatus.NOT_STARTED);\n filters.add(uap.getArticleTypeFormatted());\n if (a.getArticle().getArticleReccomendations().contains(user.getEmail())) {\n uap.setArticleRecommendedByUser(true);\n }\n if (mandatoryArticles.contains(a.getArticle().getId())) {\n uap.setMandatoryArticle(true);\n mandatoryArticlesDto.add(uap);\n } else {\n nonMandatoryArticles.add(uap);\n }\n } else {\n UserArticleProgressDao userArticleProgressDao = completedArticlesMap.get(a.getArticle()\n .getId());\n UserArticleProgressDto uap = new UserArticleProgressDto(userArticleProgressDao, a\n .getArticle());\n if (bookMarkArticles.contains(userArticleProgressDao.getArticleId())) {\n uap.setArticleBookmarked(true);\n }\n uap.setUserArticleStatus(userArticleProgressDao.getArticleStatus());\n incrementArticlesCompleted();\n filters.add(uap.getArticleTypeFormatted());\n if (a.getArticle().getArticleReccomendations().contains(user.getEmail())) {\n uap.setArticleRecommendedByUser(true);\n }\n if (mandatoryArticles.contains(a.getArticle().getId())) {\n uap.setMandatoryArticle(true);\n }\n completedArticles.add(uap);\n }\n });\n userArticlesProgress = new ArrayList<>();\n userArticlesProgress.addAll(mandatoryArticlesDto);\n userArticlesProgress.addAll(nonMandatoryArticles);\n userArticlesProgress.addAll(completedArticles);\n setTotalArticles(userArticlesProgress.size());\n \n }", "public static <E, F> Iterator<F> apply(Iterator<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }", "public void updateArticles(Map<String, UserArticleProgressDao> completedArticlesMap,\n List<ArticleDao> artilces, Set<String> bookMarkArticles, User user,\n List<String> mandatoryArticles, ArticlesFactory articlesFactory) {\n filters = new HashSet<String>();\n List<UserArticleProgressDto> mandatoryArticlesDto = new ArrayList<>();\n List<UserArticleProgressDto> nonMandatoryArticles = new ArrayList<>();\n List<UserArticleProgressDto> completedArticles = new ArrayList<>();\n artilces.stream().forEach(\n a -> {\n Article article = articlesFactory.getArticle(a.getArticle().getId());\n if (!completedArticlesMap.containsKey(a.getArticle().getId())) {\n UserArticleProgressDto uap = new UserArticleProgressDto(a);\n if (bookMarkArticles.contains(a.getArticle().getId())) {\n uap.setArticleBookmarked(true);\n }\n \n uap.setUserArticleStatus(ArticleStatus.NOT_STARTED);\n filters.add(uap.getArticleTypeFormatted());\n if (article.getArticleReccomendations().contains(user.getEmail())) {\n uap.setArticleRecommendedByUser(true);\n }\n if (mandatoryArticles.contains(a.getArticle().getId())) {\n uap.setMandatoryArticle(true);\n mandatoryArticlesDto.add(uap);\n } else {\n nonMandatoryArticles.add(uap);\n }\n } else {\n UserArticleProgressDao userArticleProgressDao = completedArticlesMap.get(a.getArticle()\n .getId());\n UserArticleProgressDto uap = new UserArticleProgressDto(userArticleProgressDao, a.getArticle());\n if (bookMarkArticles.contains(article.getId())) {\n uap.setArticleBookmarked(true);\n }\n uap.setUserArticleStatus(userArticleProgressDao.getArticleStatus());\n incrementArticlesCompleted();\n filters.add(uap.getArticleTypeFormatted());\n if (article.getArticleReccomendations()\n .contains(user.getEmail())) {\n uap.setArticleRecommendedByUser(true);\n }\n if (mandatoryArticles.contains(article.getId())) {\n uap.setMandatoryArticle(true);\n }\n completedArticles.add(uap);\n }\n });\n userArticlesProgress = new ArrayList<>();\n userArticlesProgress.addAll(mandatoryArticlesDto);\n userArticlesProgress.addAll(nonMandatoryArticles);\n userArticlesProgress.addAll(completedArticles);\n \n \n setTotalArticles(userArticlesProgress.size());\n \n }", "void updateDictionaryEntries(Iterator<Pair<DictionaryTerm, InvertedListPointer>> newPointers) throws IOException, InterruptedException {\n CachedIterator<Map.Entry<DictionaryTerm, DictionaryEntry>> entries\n = new CachedIteratorAdapter<Map.Entry<DictionaryTerm, DictionaryEntry>>(dictionary.entrySet().iterator());\n CachedIterator<Pair<DictionaryTerm, InvertedListPointer>> updates\n = new CachedIteratorAdapter<Pair<DictionaryTerm, InvertedListPointer>>(newPointers);\n while (entries.hasNext() && updates.hasNext()) {\n entries.next();\n DictionaryTerm updateTerm = updates.next().getFirst();\n while (entries.getCurrent().getKey().compareTo(updateTerm) < 0 && entries.hasNext()) {\n entries.next();\n }\n if (entries.getCurrent().getKey().equals(updateTerm)) { // do update\n updateDictionaryEntry(entries.getCurrent().getValue(), updates.getCurrent().getSecond());\n } else if (entries.getCurrent().getKey().compareTo(updateTerm) > 0) { // insert\n dictionary.put(updateTerm, buildDictionaryEntry(updates.getCurrent().getSecond()));\n }\n }\n while (updates.hasNext()) {\n DictionaryTerm term = updates.next().getFirst();\n dictionary.put(term, buildDictionaryEntry(updates.getCurrent().getSecond()));\n }\n if (updates instanceof Closeable) {\n ((Closeable) updates).close();\n }\n indexPhase.incrementAndGet();\n getActiveList().setIndexPhase(indexPhase.get());\n getInactiveList().setIndexPhase(indexPhase.get());\n writeOutToDisk();\n }", "public abstract void update(AbstractOrmEntity entityContainingChanges,\r\n\t Vector<String> searchCriterias) throws Exception;", "public void processUpdates() {\n List<Update> updates = getUpdates(lastId, updateLimit, timeout);\n\n lastId = updates.stream()\n .map(Update::getId)\n .max(Long::compareTo)\n .orElse(lastId-1) + 1;\n\n updates.parallelStream().forEach(this::processUpdate);\n }", "void updateAllFilteredLists(Set<String> keywords, Calendar startDate, Calendar endDate,\n Entry.State state, Entry.State state2, Search... searches);", "public <T> Collection<T> updateAll(Collection<T> entities);", "public synchronized void update() {\n\t\tcurrentIteration.clear();\n\t\tcurrentIteration.addAll(currentCalls.values());\n\t\tfor (RegisteredCall i : currentIteration) {\n\t\t\ti.update();\n\t\t}\n\t}", "int updateByPrimaryKeySelective(TSourceChannels record);", "void updateAllFilteredLists(Set<String> keywords, Calendar startDate, Calendar endDate,\n Entry.State state, Search... searches);", "public final Collector perform(Iterator<?> iterator, Collector result) {\n prePerform();\n try {\n while (iterator.hasNext()) {\n Object candidate = iterator.next();\n if (isMatch(candidate))\n if (!result.accept(candidate))\n break;\n }\n } finally {\n postPerform();\n }\n return result;\n }", "@Override\n public void updateWithObservationsFromDatastreamsOnly(SensingDevice sensingDevice,\n Collection<Datastream> datastreams) {\n\n }", "public void updateAllFilteredListToShowAllActiveEntries();", "@Override\r\n\tpublic Integer updateByPrimaryKeySelective(Filtering record) {\n\t\treturn filteringMapper.updateByPrimaryKeySelective(record);\r\n\t}", "public void applyUpdates() {\r\n synchronized (visualItemMap) {\r\n adder.execute(parentGroup);\r\n for (VisualItem3D item : visualItemMap.values()) {\r\n item.applyTransform();\r\n }\r\n }\r\n }", "public void onUpdateFilters(SearchFilter newFilter) {\n filter.setSort(newFilter.getSort());\n filter.setBegin_date(newFilter.getBegin_date());\n filter.setNewsDeskOpts(newFilter.getNewsDeskOpts());\n gvResults.clearOnScrollListeners();\n setUpRecycler();\n fetchArticles(0,true);\n }", "@Override\n\tpublic IDBRecord update(ITableDBContext context, Table table, IDBRecord record, IDBFilter filter) throws Throwable {\n\t\tthrow new Warning(\"not impl\");\n\t}", "@Override\n\tpublic List<IDBRecord> update(ITableDBContext context, Table table, List<IDBRecord> records, IDBFilter filter)\n\t\t\tthrows Throwable {\n\t\tthrow new Warning(\"not impl\");\n\t}", "@Override\n public void updateFilter(ArrayList<Position> updatePos, double time, double varience)\n {\n // Input error handling\n if(updatePos.size() != 1)\n {\n System.out.println(\"Error - updatePos size: \" + updatePos.size() + \" Exit\");\n System.exit(1);\n }\n if(varience <= 0)\n {\n System.out.println(\"Error - varience: \" + varience + \" Exit\");\n System.exit(1);\n }\n\n // Update Position\n KalmanGain_ = calculateKalmanGain(varience, posVarience_);\n double deltaTime = time - lastPosUpdateTime_;\n for(int i = 0; i < pos_.size(); ++i)\n {\n double estimatePos = pos_.get(i).getPosition() + vel_.get(i).getVelocity() * deltaTime;\n estimatePos = estimatePos + KalmanGain_ * (updatePos.get(i).getPosition() - estimatePos);\n\n\n // estimate velocity\n // only update velocity estimate if the delta time is large enough\n if((time - lastVelUpdateTime_) > 0.1)\n {\n System.out.println(\"predict velocity\");\n double estVelocity = (estimatePos - pos_.get(i).getPosition()) / deltaTime;\n vel_.get(0).setVelocity(estVelocity);\n System.out.println(\"predict velocity: \" + vel_.get(i).getVelocity());\n lastVelUpdateTime_ = time;\n }\n else{\n System.out.println(\"No velocity predition\");\n }\n pos_.get(i).setPosition(estimatePos);\n }\n // update varience\n posVarience_ = (1.0- KalmanGain_) * posVarience_;\n\n // update position\n lastPosUpdateTime_ = time;\n\n }", "private void iterateUpdate()\n\t{\n\t\tSystem.out.println(\"ITERATE\");\n\t\t\t\n\t\tfor (Organism org : simState.getOrganisms()) \n\t\t{\n\t\t\torganismViewData.resetOrganismView(org);\n\t\t}\n\t\t\n\t\tIterationResult result = simEngine.iterate();\n\t\t\n\t\t// Process born and dead organisms\n\t\taddBornModels(result.getBorn());\n\t\tremoveDeadModels(result.getLastDead());\n\t\t\n\t\trotateAnimals();\t\t\n\t}", "public static void UpdateOneByKey_Vaule(String collection_name, Document filter, Document update_value) {\r\n\t\tMongoCollection<Document> col = getCollection(collection_name);\r\n\t\tcol.updateMany(filter, new Document(\"$set\", update_value));\r\n\t}", "protected void filterUpdate(String columnId, int row) {\n filterUpdate(columnId, row, null);\n }", "public static <E, F> Iterable<F> apply(Iterable<? extends E> iter, Function<? super E, ? extends F> f) {\r\n \treturn apply(f, iter);\n }", "private boolean updateFilter() {\n \tList<Rankable> items = rankings.getRankings();\n \tHashSet<String> hashtags = new HashSet<String>();\n \t\n \tfor (Rankable item: items) {\n \thashtags.add((String)item.getObject());\n }\n \t\n \n \t\n \tfor(String word: initialWords){\n \t\thashtags.add(word);\n \t}\n \n \tif(filter.equals(hashtags)){\n \t\treturn false;\n \t} else {\n \t\tfilter = hashtags;\n \t\treturn true;\n \t}\n \n\t\t\n\t}", "@Override\n public void updateFilter(List<String> tags) {\n currentTags = tags;\n clearAllMarkers();\n String query = generateQuery(tags, 0);\n List<Event> newEvents = dbHelper.getMatchingEvents(query);\n for (Event e : newEvents) {\n addMarker(e);\n }\n\n notifyEventsInCircle();\n }", "public void runOneIteration() {\n\t\t// Update user latent vectors\n\t\tfor (int u = 0; u < userCount; u++) {\n\t\t\tupdate_user(u);\n\t\t}\n\n\t\t// Update item latent vectors\n\t\tfor (int i = 0; i < itemCount; i++) {\n\t\t\tupdate_item(i);\n\t\t}\n\t}", "private void updateFilteredData() {\n\t\tswitch (currentTabScreen) {\n\t\tcase INVENTORY:\n\t\t\tpresentationInventoryData.clear();\n\n\t\t\tfor (RecordObj record: masterInventoryData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInventoryData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\tpresentationInitialData.clear();\n\n\t\t\tfor (RecordObj record: masterInitialData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInitialData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase SEARCH:\n\t\t\tpresentationSearchData.clear();\n\n\t\t\tfor (RecordObj record: masterSearchData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationSearchData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}// End switch statement\n\t}", "public void updateFilterList() {\n filteredList.clear();\n filteredList.addAll(searchList);\n filteredList.retainAll(mediaCategoryList);\n }", "interface Update\n extends UpdateStages.WithSource,\n UpdateStages.WithDestination,\n UpdateStages.WithExpirationTimeIfNotActivatedUtc,\n UpdateStages.WithFilter,\n UpdateStages.WithPartnerTopicFriendlyDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n EventChannel apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n EventChannel apply(Context context);\n }", "private void updateAll() {\n updateAction();\n updateQueryViews();\n }", "private void runFilters() {\n \tif (currentPoint * itp < time1) {\r\n \t\t//Accelerating filter 1\r\n \t\tfilterSum1 = currentPoint / filterLength1;\r\n \t}\r\n \telse if (currentPoint >= totalPoints - filterLength2) {\r\n \t\tfilterSum1 = 0;\r\n \t}\r\n \telse if (currentPoint * itp >= timeToDeccel) {\r\n \t\t//Deccelerating filter 1\r\n \t\tfilterSum1 = (totalPoints - filterLength2 - currentPoint) / filterLength1;\r\n \t}\r\n \telse {\r\n \t\tfilterSum1 = 1;\r\n \t}\r\n \t\r\n \t//Creating filterSum2 from the sum of the last filterLength2 values of filterSum1(Boxcar filter)\r\n \tfilterSums1[currentPoint] = filterSum1;\r\n \tint filter2Start = (int) ((currentPoint > filterLength2) ? currentPoint - filterLength2 + 1 : 0);\r\n \tfilterSum2 = 0;\r\n \tfor(int i = filter2Start; i <= currentPoint; i++) {\r\n \t\tfilterSum2 += filterSums1[i];\r\n \t}\r\n \t\r\n\t}", "@Override\r\n\tpublic Integer updateByPrimaryKey(Filtering record) {\n\t\treturn filteringMapper.updateByPrimaryKey(record);\r\n\t}", "public void update(RealVector ufvs, RealVector ifvs) {\n for (RatingMatrixEntry r : ratings) {\n int idx = r.getIndex();\n double est = estimates[idx];\n est += ufvs.getEntry(r.getUserIndex()) * ifvs.getEntry(r.getItemIndex());\n if (domain != null) {\n est = domain.clampValue(est);\n }\n estimates[idx] = est;\n }\n }", "interface Filter extends Mutator {\n\n }", "@Test\n\tpublic void testResourcesForDeltaIteration() throws Exception{\n\t\tResourceSpec resource1 = new ResourceSpec(0.1, 100);\n\t\tResourceSpec resource2 = new ResourceSpec(0.2, 200);\n\t\tResourceSpec resource3 = new ResourceSpec(0.3, 300);\n\t\tResourceSpec resource4 = new ResourceSpec(0.4, 400);\n\t\tResourceSpec resource5 = new ResourceSpec(0.5, 500);\n\t\tResourceSpec resource6 = new ResourceSpec(0.6, 600);\n\n\t\tMethod opMethod = Operator.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\topMethod.setAccessible(true);\n\n\t\tMethod deltaMethod = DeltaIteration.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\tdeltaMethod.setAccessible(true);\n\n\t\tMethod sinkMethod = DataSink.class.getDeclaredMethod(\"setResources\", ResourceSpec.class);\n\t\tsinkMethod.setAccessible(true);\n\n\t\tMapFunction<Tuple2<Long, Long>, Tuple2<Long, Long>> mapFunction = new MapFunction<Tuple2<Long, Long>, Tuple2<Long, Long>>() {\n\t\t\t@Override\n\t\t\tpublic Tuple2<Long, Long> map(Tuple2<Long, Long> value) throws Exception {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t};\n\n\t\tFilterFunction<Tuple2<Long, Long>> filterFunction = new FilterFunction<Tuple2<Long, Long>>() {\n\t\t\t@Override\n\t\t\tpublic boolean filter(Tuple2<Long, Long> value) throws Exception {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\tExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();\n\n\t\tDataSet<Tuple2<Long, Long>> input = env.fromElements(new Tuple2<>(1L, 2L));\n\t\topMethod.invoke(input, resource1);\n\n\t\t// CHAIN(Map -> Filter)\n\t\tDataSet<Tuple2<Long, Long>> map = input.map(mapFunction);\n\t\topMethod.invoke(map, resource2);\n\n\t\tDeltaIteration<Tuple2<Long, Long>, Tuple2<Long, Long>> iteration = map.iterateDelta(map, 100, 0).\n\t\t\t\tregisterAggregator(\"test\", new LongSumAggregator());\n\t\tdeltaMethod.invoke(iteration, resource3);\n\n\t\tDataSet<Tuple2<Long, Long>> delta = iteration.getWorkset().map(mapFunction);\n\t\topMethod.invoke(delta, resource4);\n\n\t\tDataSet<Tuple2<Long, Long>> feedback = delta.filter(filterFunction);\n\t\topMethod.invoke(feedback, resource5);\n\n\t\tDataSink<Tuple2<Long, Long>> sink = iteration.closeWith(delta, feedback).\n\t\t\t\toutput(new DiscardingOutputFormat<Tuple2<Long, Long>>());\n\t\tsinkMethod.invoke(sink, resource6);\n\n\t\tPlan plan = env.createProgramPlan();\n\t\tOptimizer pc = new Optimizer(new Configuration());\n\t\tOptimizedPlan op = pc.compile(plan);\n\n\t\tJobGraphGenerator jgg = new JobGraphGenerator();\n\t\tJobGraph jobGraph = jgg.compileJobGraph(op);\n\n\t\tJobVertex sourceMapVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(0);\n\t\tJobVertex iterationHeadVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(1);\n\t\tJobVertex deltaVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(2);\n\t\tJobVertex iterationTailVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(3);\n\t\tJobVertex feedbackVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(4);\n\t\tJobVertex sinkVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(5);\n\t\tJobVertex iterationSyncVertex = jobGraph.getVerticesSortedTopologicallyFromSources().get(6);\n\n\t\tassertTrue(sourceMapVertex.getMinResources().equals(resource1.merge(resource2)));\n\t\tassertTrue(iterationHeadVertex.getPreferredResources().equals(resource3));\n\t\tassertTrue(deltaVertex.getMinResources().equals(resource4));\n\t\t// the iteration tail task will be scheduled in the same instance with iteration head, and currently not set resources.\n\t\tassertTrue(iterationTailVertex.getPreferredResources().equals(ResourceSpec.DEFAULT));\n\t\tassertTrue(feedbackVertex.getMinResources().equals(resource5));\n\t\tassertTrue(sinkVertex.getPreferredResources().equals(resource6));\n\t\tassertTrue(iterationSyncVertex.getMinResources().equals(resource3));\n\t}", "public void updateChamados() {\n FilterAction action = comboFilter.getValue();\n if (action != null) {\n action.execute();\n }\n }", "interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithSku,\n UpdateStages.WithOsType,\n UpdateStages.WithDiskSizeGB,\n UpdateStages.WithEncryptionSettingsCollection,\n UpdateStages.WithEncryption {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n Snapshot apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n Snapshot apply(Context context);\n }", "public void refreshDataFilter();", "Set<Modification> filterModifications(ModificationHolder modificationHolder, Set<Modification> modifications);", "void updateFilteredListsToShowAll();", "public void setIterator(Iterator iterator) {\n/* 96 */ this.iterator = iterator;\n/* */ }", "public Iterator<Map<String, Object>> iterate(Filter filter)\n\t\t\tthrows ConnectorException, UnsupportedOperationException {\n\n\t\tdebug();\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"===== Iterate ====\");\n\t\t}\n\n\t\tit = null;\n\n\t\tif (isDebug == true) {\n\t\t\tlog.debug(\"Iterator \" + filter + \">\");\n\t\t}\n\n\t\ttry {\n\t\t\t_filter = filter;\n\t\t\tit = new ArrayList<Map<String, Object>>(getObjectsMap().values())\n\t\t\t\t\t.iterator();\n\t\t} catch (Exception e) {\n\t\t\tif (isDebug == true) {\n\t\t\t\tlog.debug(\"Exception occured Interator\" + e + \">\");\n\t\t\t}\n\t\t\tthrow new ConnectorException(\"ERRO AO LER AO UTILIZAR O INTERATE\");\n\t\t}\n\n\t\treturn new PagingIterator(it);\n\n\t}", "private void updateAvailableInferenceFilters() {\n if ((radioGrpInferenceMethod != null) && (filtersProteinInference!= null)) {\n filtersProteinInference.removeAllAvailableFilter();\n\n ProteinInferenceMethod method = ProteinInferenceFactory.getProteinInferenceByName(\n radioGrpInferenceMethod.getSelection().getActionCommand());\n\n if (method != null) {\n AbstractProteinInference inference = method.createInstanceOf();\n\n for (RegisteredFilters filter : inference.getAllAvailableFilters()) {\n filtersProteinInference.addAvailableFilter(filter);\n }\n } else {\n LOGGER.error(\"Could not create inference method for \"\n + radioGrpInferenceMethod.getSelection().getActionCommand());\n }\n }\n }", "@Override\n\tpublic void filterChange() {\n\t\t\n\t}", "@Override\n\tpublic void updateAll() {\n\t\tList<Request> requests = peer.getRequests();\n\t\tfor(Request request : requests){\t\t\t\n\t\t\tupdateAccounting(request);\t\t\t\t\n\t\t}\n\t\t\n\t\t/**\n\t\t * Once the accounting for all requests of each peer was performed, \n\t\t * we now update the lastUpdatedTime of each accounting info. \n\t\t */\n\t\tfor(AccountingInfo accInfo : accountingList)\n\t\t\taccInfo.setLastUpdated(TimeManager.getInstance().getTime());\n\t\t\t\t\n\t\tfinishRequests();\n\t}", "public static <E, F> Iterable<F> apply(Function<? super E, ? extends F> f, Iterable<? extends E> iter) {\r\n \treturn new MappedIterable<E, F>(iter, f);\n }", "public abstract int update(Iterable<T> messages, QueryOption.WhereOption... whereOptions)\n throws DatabaseRequestException, DatabaseSchemaException;", "public void updateFromSearchFilters() {\n this.businessTravelReadyModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isBusinessTravelReady());\n ExploreHomesFiltersFragment.this.businessTravelAccountManager.setUsingBTRFilter(this.businessTravelReadyModel.checked());\n this.instantBookModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isInstantBookOnly());\n this.entireHomeModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.EntireHome));\n this.privateRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.SharedRoom));\n SearchMetaData homeTabMetadata = ExploreHomesFiltersFragment.this.dataController.getHomesMetadata();\n if (homeTabMetadata != null && homeTabMetadata.hasFacet()) {\n SearchFacets facets = homeTabMetadata.getFacets();\n this.entireHomeModel.show(facets.facetGreaterThanZero(C6120RoomType.EntireHome));\n this.privateRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.SharedRoom));\n }\n this.priceModel.minPrice(ExploreHomesFiltersFragment.this.searchFilters.getMinPrice()).maxPrice(ExploreHomesFiltersFragment.this.searchFilters.getMaxPrice());\n if (homeTabMetadata == null) {\n this.priceModel.histogram(null).metadata(null);\n } else {\n this.priceModel.histogram(homeTabMetadata.getPriceHistogram()).metadata(homeTabMetadata.getSearch());\n }\n this.priceButtonsModel.selection(ExploreHomesFiltersFragment.this.searchFilters.getPriceFilterSelection());\n this.bedCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBeds());\n this.bedroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBedrooms());\n this.bathroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBathrooms());\n addCategorizedAmenitiesIfNeeded();\n updateOtherAmenitiesModels();\n updateFacilitiesAmenitiesModels();\n updateHouseRulesAmenitiesModels();\n notifyModelsChanged();\n }", "abstract Integer processUpdateQuery(String collectionName, ArrayList<HashMap<String,Object>> data, boolean isNew);", "public void updateModel(Stream<Iterable> stream)\n {\n this.infos.clear();\n stream.forEach(this::getUsefulVariables);\n this.update();\n }", "public static <E, F> Iterator<F> apply(Function<? super E, ? extends F> f, Iterator<? extends E> iter) {\r\n \treturn new MappedIterator<E, F>(iter, f);\n }", "public void setActiveAndInactiveFilterItems(SearchFilter filter) {\n String filterMapKey = filter.getFilterTypeMapKey();\n Function<CommonParams, List<String>> getter = FILTER_KEYS_TO_FIELDS.get(filterMapKey);\n if (getter == null) {\n throw new RuntimeException(\"Search Filter not configured with sane map key: \" + filterMapKey);\n }\n filter.setActiveAndInactiveFilterItems(getter.apply(this));\n }", "void updateFilteredListToShowAll();", "void updateFilteredListToShowAll();", "@Test\r\n\tpublic void testUpdate() {\r\n\t\tList<E> entities = dao.findAll();\r\n\t\tE updated = supplyUpdated(entities.get(0));\r\n\t\tdao.update(entities.get(0));\r\n\t\tentities = dao.findAll();\r\n\t\tassertEquals(updated, entities.get(0));\r\n\t}", "FilterInfo setFilterActive(String filter_id, int revision) throws Exception;", "public ListIterator<Parameter<?>> getAdjustableParamsIterator();", "@Override\r\n\tpublic void visit(Design design) {\r\n\t\tif (isForward()) {\r\n\t\t\tsuper.preFilter((Visitable) design);\r\n\t\t\t// The designProp goes through all components in the\r\n\t\t\t// design module, no need to traverse the tasks\r\n\t\t\t// traverse(design);\r\n\r\n\t\t\t// NOTE! this line used to read:\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// However this FAILED TO WORK! The 'this.modified'\r\n\t\t\t// variable was NOT getting updated correctly and we were\r\n\t\t\t// iterating only 1 time. Why/how this fixes this I do\r\n\t\t\t// not know!\r\n\t\t\tboolean designModified = designProp(design);\r\n\t\t\tmodified |= designModified;\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\tsuper.postFilter((Visitable) design);\r\n\t\t} else {\r\n\t\t\tsuper.preFilter((Visitable) design);\r\n\t\t\t// The designProp goes through all components in the\r\n\t\t\t// design module, no need to traverse the tasks\r\n\r\n\t\t\t// NOTE! this line used to read:\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// However this FAILED TO WORK! The 'this.modified'\r\n\t\t\t// variable was NOT getting updated correctly and we were\r\n\t\t\t// iterating only 1 time. Why/how this fixes this I do\r\n\t\t\t// not know!\r\n\t\t\tboolean designModified = designProp(design);\r\n\t\t\tmodified |= designModified;\r\n\t\t\t// this.modified |= designProp(design);\r\n\t\t\t// traverse(design);\r\n\t\t\tsuper.postFilter((Visitable) design);\r\n\t\t}\r\n\t}", "interface Update\n extends UpdateStages.WithBranch,\n UpdateStages.WithFolderPath,\n UpdateStages.WithAutoSync,\n UpdateStages.WithPublishRunbook,\n UpdateStages.WithSecurityToken,\n UpdateStages.WithDescription {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n SourceControl apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n SourceControl apply(Context context);\n }", "@Override\n public void accept(OrcFilterContext batch) {\n }", "private void applyFilters() {\r\n\t\t// create the new filters\r\n\t\tViewerFilter[] filters = new ViewerFilter[] { new TransportStateViewFilter(IProgramStatus.PROGRAM_STATUS_PREBOOKING),\r\n\t\t\t\tnew TransportDirectnessFilter(IDirectness.TOWARDS_BRUCK), transportDateFilter, transportViewFilter };\r\n\t\t// set up the filters for the view\r\n\t\tviewerBruck.setFilters(filters);\r\n\t\tviewerGraz.setFilters(filters);\r\n\t\tviewerWien.setFilters(filters);\r\n\t\tviewerMariazell.setFilters(filters);\r\n\t\tviewerKapfenberg.setFilters(filters);\r\n\t\tviewerLeoben.setFilters(filters);\r\n\t}", "interface WithFilter {\n /**\n * Specifies the filter property: Information about the filter for the event channel..\n *\n * @param filter Information about the filter for the event channel.\n * @return the next definition stage.\n */\n Update withFilter(EventChannelFilter filter);\n }", "private void jobFilter_32_RunSubsequent() {\r\n\r\n//\t\tfinal long start = System.nanoTime();\r\n\r\n\t\tfinal boolean isGPSFilter = _imageFilterGPS == PhotoFilterGPS.WITH_GPS;\r\n\t\tfinal boolean isNoGPSFilter = _imageFilterGPS == PhotoFilterGPS.NO_GPS;\r\n\t\tfinal boolean isTourFilter = _imageFilterTour == PhotoFilterTour.WITH_TOURS;\r\n\t\tfinal boolean isNoTourFilter = _imageFilterTour == PhotoFilterTour.NO_TOURS;\r\n\r\n\t\tfinal boolean isFilterSet = isGPSFilter || isNoGPSFilter || isTourFilter || isNoTourFilter;\r\n\r\n\t\t// get current dirty counter\r\n\t\tfinal int currentDirtyCounter = _jobFilterDirtyCounter;\r\n\r\n\t\tPhoto[] newFilteredPhotos = null;\r\n\r\n\t\tif (isFilterSet) {\r\n\r\n\t\t\tfinal int numberOfPhotos = _allPhotos.length;\r\n\t\t\tfinal Photo[] tempFilteredPhotos = new Photo[numberOfPhotos];\r\n\r\n\t\t\t// filterindex is incremented when the filter contains a gallery item\r\n\t\t\tint filterIndex = 0;\r\n\t\t\tint photoIndex = 0;\r\n\r\n\t\t\t// loop: all photos\r\n\t\t\tfor (final Photo photo : _allPhotos) {\r\n\r\n\t\t\t\tif (_filterJobIsCanceled) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean isPhotoInFilterGps = false;\r\n\t\t\t\tboolean isPhotoInFilterTour = false;\r\n\r\n\t\t\t\tif (photo.isExifLoaded) {\r\n\r\n\t\t\t\t\tfinal boolean isPhotoWithGps = _isLinkPhotoDisplayed\r\n\t\t\t\t\t\t\t? photo.isLinkPhotoWithGps\r\n\t\t\t\t\t\t\t: photo.isTourPhotoWithGps;\r\n\r\n\t\t\t\t\tif (isGPSFilter) {\r\n\t\t\t\t\t\tif (isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else if (isNoGPSFilter) {\r\n\r\n\t\t\t\t\t\tif (!isPhotoWithGps) {\r\n\t\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t// no gps filter\r\n\r\n\t\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// no gps filter\r\n\r\n\t\t\t\t\tisPhotoInFilterGps = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfinal boolean isSavedInTour = photo.isSavedInTour;\r\n\r\n\t\t\t\tif (isTourFilter) {\r\n\t\t\t\t\tif (isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else if (isNoTourFilter) {\r\n\r\n\t\t\t\t\tif (!isSavedInTour) {\r\n\t\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t// no tour filter\r\n\t\t\t\t\tisPhotoInFilterTour = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (isPhotoInFilterGps && isPhotoInFilterTour) {\r\n\r\n\t\t\t\t\ttempFilteredPhotos[filterIndex] = _allPhotos[photoIndex];\r\n\r\n\t\t\t\t\tfilterIndex++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tphotoIndex++;\r\n\t\t\t}\r\n\r\n\t\t\t// remove trailing array items which are not set\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(tempFilteredPhotos, filterIndex);\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// a filter is not set, display all images but load exif data which is necessary when filtering by date\r\n\r\n\t\t\tnewFilteredPhotos = Arrays.copyOf(_allPhotos, _allPhotos.length);\r\n\t\t}\r\n\r\n\t\t// check sorting\r\n//\t\tif (_initialSorting != _currentSorting) {\r\n//\r\n//\t\t\t/*\r\n//\t\t\t * photo must be sorted because sorting is different than the initial sorting, this\r\n//\t\t\t * will sort only the filtered photo\r\n//\t\t\t */\r\n//\r\n\t\tArrays.sort(newFilteredPhotos, getCurrentComparator());\r\n//\t\t}\r\n\r\n\t\t/**\r\n\t\t * UI update must be run in a UI job because the update can be very long when many\r\n\t\t * (thousands) small images are displayed\r\n\t\t */\r\n\t\t_jobUIFilterPhoto = newFilteredPhotos;\r\n\r\n\t\tjobUIFilter_20_Schedule(0);\r\n\r\n\t\tif (_jobFilterDirtyCounter > currentDirtyCounter) {\r\n\r\n\t\t\t// filter is dirty again\r\n\r\n\t\t\tjobFilter_23_ScheduleSubsequentWithoutRunCheck();\r\n\r\n\t\t} else {\r\n\r\n\t\t\t// clear progress bar\r\n\r\n\t\t\tjobUILoading_20_Schedule();\r\n\t\t}\r\n\r\n//\t\tfinal float timeDiff = (float) (System.nanoTime() - start) / 1000000;\r\n//\t\tSystem.out.println(\"filterJob_30_RunSubsequent:\\t\" + timeDiff + \" ms\\t\"); //$NON-NLS-1$ //$NON-NLS-2$\r\n//\t\t// TODO remove SYSTEM.OUT.PRINTLN\r\n\t}", "public Iterator2Iterador(Iterator<E> iterator) {\r\n\t\tthis.iterator = iterator;\r\n\t}", "Results processFilter(FilterSpecifier filter) throws SearchServiceException;", "int updateByPrimaryKeySelective(BPBatchBean record);", "private Filter setFilters(Filter originalFilter, DateRange temporalSubset, NumberRange<?> elevationSubset, GeneralEnvelope envelopeSubset, \n Map<String, List<Object>> dimensionSubset, StructuredGridCoverage2DReader reader, DimensionDescriptor timeDimension, \n DimensionDescriptor elevationDimension, List<DimensionDescriptor> additionalDimensions) \n throws IOException {\n List<Filter> filters = new ArrayList<Filter>();\n \n // Setting temporal filter\n Filter timeFilter = temporalSubset == null && timeDimension == null ? null\n : setTimeFilter(temporalSubset, timeDimension.getStartAttribute(),\n timeDimension.getEndAttribute());\n\n // Setting elevation filter\n Filter elevationFilter = elevationSubset == null && elevationDimension == null ? null\n : setElevationFilter(elevationSubset,\n elevationDimension.getStartAttribute(),\n elevationDimension.getEndAttribute());\n\n // setting envelope filter\n Filter envelopeFilter = setEnevelopeFilter(envelopeSubset, reader);\n\n // Setting dimensional filters\n Filter additionalDimensionsFilter = setAdditionalDimensionsFilter(dimensionSubset, additionalDimensions);\n\n // Updating filters \n if(originalFilter != null) {\n filters.add(originalFilter);\n }\n if (elevationFilter != null) {\n filters.add(elevationFilter);\n }\n if (timeFilter != null) {\n filters.add(timeFilter);\n }\n if (envelopeFilter != null) {\n filters.add(envelopeFilter);\n }\n if (additionalDimensionsFilter != null) {\n filters.add(additionalDimensionsFilter);\n }\n\n // Merging all filters\n Filter finalFilter = FF.and(filters);\n return finalFilter;\n }", "interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithKind,\n UpdateStages.WithSku,\n UpdateStages.WithIdentity,\n UpdateStages.WithProperties {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n Account apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n Account apply(Context context);\n }", "public void update(String path, Expression filterExpression,\n Map<String, String> updatedColumnToValueMapping)\n throws IOException, InterruptedException, InvalidLoadOptionException {\n List<String> indexFiles = getCarbonIndexFile(path);\n Schema schema = CarbonSchemaReader.readSchema(indexFiles.get(0)).asOriginOrder();\n Field[] fields = schema.getFields();\n String[] projectionColumns = new String[fields.length + 1];\n for (int i = 0; i < fields.length; i++) {\n projectionColumns[i] = (fields[i].getFieldName());\n }\n projectionColumns[projectionColumns.length - 1] =\n CarbonCommonConstants.CARBON_IMPLICIT_COLUMN_TUPLEID;\n CarbonWriter writer =\n CarbonWriter.builder().outputPath(path)\n .withHadoopConf(configuration)\n .withCsvInput(schema)\n .writtenBy(\"CarbonIUD\")\n .build();\n CarbonReader reader =\n CarbonReader.builder(path).projection(projectionColumns)\n .withHadoopConf(configuration)\n .filter(filterExpression).build();\n RecordWriter<NullWritable, ObjectArrayWritable> deleteDeltaWriter =\n CarbonTableOutputFormat.getDeleteDeltaRecordWriter(path);\n ObjectArrayWritable writable = new ObjectArrayWritable();\n while (reader.hasNext()) {\n Object[] row = (Object[]) reader.readNextRow();\n writable.set(Arrays.copyOfRange(row, row.length - 1, row.length));\n for (Map.Entry<String, String> column : updatedColumnToValueMapping.entrySet()) {\n row[getColumnIndex(fields, column.getKey())] = column.getValue();\n }\n writer.write(Arrays.copyOfRange(row, 0, row.length - 1));\n deleteDeltaWriter.write(NullWritable.get(), writable);\n }\n deleteDeltaWriter.close(null);\n writer.close();\n reader.close();\n }", "void updateFilteredPersonList(Set<String> keywords);", "protected void zBatchUpdateForSameSourceAttribute(List<UpdateOperation> updateOperations, BatchUpdateOperation batchUpdateOperation)\r\n {\r\n UpdateOperation firstOperation = updateOperations.get(0);\r\n MithraDataObject firstData = this.getDataForUpdate(firstOperation);\r\n Object source = this.getSourceAttributeValueFromObjectGeneric(firstData);\r\n DatabaseType databaseType = this.getDatabaseTypeGenericSource(source);\r\n\r\n if (databaseType.getUpdateViaInsertAndJoinThreshold() > 0 &&\r\n databaseType.getUpdateViaInsertAndJoinThreshold() < updateOperations.size() &&\r\n this.getFinder().getVersionAttribute() == null &&\r\n !batchUpdateOperation.isIncrement() &&\r\n batchUpdateOperation.isEligibleForUpdateViaJoin())\r\n {\r\n zBatchUpdateViaInsertAndJoin(updateOperations, source, databaseType);\r\n return;\r\n }\r\n if (this.hasOptimisticLocking())\r\n {\r\n if (this.getMithraObjectPortal().getTxParticipationMode().isOptimisticLocking() && !databaseType.canCombineOptimisticWithBatchUpdates())\r\n {\r\n //we'll do single updates\r\n for(int i=0;i<updateOperations.size();i++)\r\n {\r\n UpdateOperation updateOperation = updateOperations.get(i);\r\n zUpdate(updateOperation.getMithraObject(), updateOperation.getUpdates());\r\n }\r\n\r\n return;\r\n }\r\n }\r\n\r\n List firstUpdateWrappers = firstOperation.getUpdates();\r\n StringBuilder builder = new StringBuilder(30 + firstUpdateWrappers.size() * 12);\r\n builder.append(\"update \");\r\n builder.append(this.getFullyQualifiedTableNameGenericSource(source)).append(\" set \");\r\n for (int i = 0; i < firstUpdateWrappers.size(); i++)\r\n {\r\n AttributeUpdateWrapper wrapper = (AttributeUpdateWrapper) firstUpdateWrappers.get(i);\r\n if (i > 0)\r\n {\r\n builder.append(\", \");\r\n }\r\n builder.append(wrapper.getSetAttributeSql());\r\n }\r\n\r\n builder.append(this.getSqlWhereClauseForBatchUpdateForSameSourceAttribute(firstData));\r\n String sql = builder.toString();\r\n Connection con = null;\r\n PreparedStatement stm = null;\r\n\r\n try\r\n {\r\n con = this.getConnectionForWriteGenericSource(source);\r\n TimeZone databaseTimeZone = this.getDatabaseTimeZoneGenericSource(source);\r\n\r\n if (this.getSqlLogger().isDebugEnabled())\r\n {\r\n this.logWithSource(this.getSqlLogger(), source, \"batch update of \" + updateOperations.size() + \" objects with: \" + sql);\r\n }\r\n PrintablePreparedStatement pps = null;\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps = new PrintablePreparedStatement(sql);\r\n }\r\n stm = con.prepareStatement(sql);\r\n int batchSize = databaseType.getMaxPreparedStatementBatchCount(firstOperation.getUpdates().size() +\r\n this.getMithraObjectPortal().getFinder().getPrimaryKeyAttributes().length);\r\n if (batchSize < 0)\r\n {\r\n batchSize = updateOperations.size();\r\n }\r\n\r\n int objectsInBatch = 0;\r\n int batchStart = 0;\r\n for (int u = 0; u < updateOperations.size(); u++)\r\n {\r\n UpdateOperation operation = updateOperations.get(u);\r\n MithraDataObject data = this.getDataForUpdate(operation);\r\n if (this.getBatchSqlLogger().isDebugEnabled())\r\n {\r\n pps.clearParameters();\r\n int pos = operation.setSqlParameters(pps, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(pps, pos, data, databaseTimeZone, databaseType);\r\n this.logWithSource(this.getBatchSqlLogger(), source, \"batch updating with: \" + pps.getPrintableStatement());\r\n }\r\n int pos = operation.setSqlParameters(stm, databaseTimeZone, databaseType);\r\n this.setPrimaryKeyAttributes(stm, pos, data, databaseTimeZone, databaseType);\r\n operation.setUpdated();\r\n stm.addBatch();\r\n objectsInBatch++;\r\n\r\n if (objectsInBatch == batchSize)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n objectsInBatch = 0;\r\n batchStart = u + 1;\r\n }\r\n }\r\n if (objectsInBatch > 0)\r\n {\r\n this.executeBatchForUpdateOperations(stm, updateOperations, batchStart);\r\n }\r\n stm.close();\r\n stm = null;\r\n\r\n String dbid = this.getDatabaseIdentifierGenericSource(source);\r\n getNotificationEventManager().addMithraNotificationEventForBatchUpdate(dbid, this.getFullyQualifiedFinderClassName(), MithraNotificationEvent.UPDATE, updateOperations, firstUpdateWrappers, source);\r\n }\r\n catch (SQLException e)\r\n {\r\n this.analyzeAndWrapSqlExceptionGenericSource(\"batch update failed \" + e.getMessage(), e, source, con);\r\n }\r\n finally\r\n {\r\n this.closeStatementAndConnection(con, stm);\r\n }\r\n\r\n }", "int updateByPrimaryKeySelective(Collect record);", "private void processFilter(FilteringObjective filt, boolean install,\n ApplicationId applicationId) {\n PortCriterion port;\n if (!filt.key().equals(Criteria.dummy()) &&\n filt.key().type() == Criterion.Type.IN_PORT) {\n port = (PortCriterion) filt.key();\n } else {\n log.warn(\"No key defined in filtering objective from app: {}. Not\"\n + \"processing filtering objective\", applicationId);\n fail(filt, ObjectiveError.UNKNOWN);\n return;\n }\n // convert filtering conditions for switch-intfs into flowrules\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n for (Criterion c : filt.conditions()) {\n if (c.type() == Criterion.Type.ETH_DST) {\n EthCriterion eth = (EthCriterion) c;\n FlowRule.Builder rule = processEthFiler(filt, eth, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else if (c.type() == Criterion.Type.VLAN_VID) {\n VlanIdCriterion vlan = (VlanIdCriterion) c;\n FlowRule.Builder rule = processVlanFiler(filt, vlan, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else if (c.type() == Criterion.Type.IPV4_DST) {\n IPCriterion ip = (IPCriterion) c;\n FlowRule.Builder rule = processIpFilter(filt, ip, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else {\n log.warn(\"Driver does not currently process filtering condition\"\n + \" of type: {}\", c.type());\n fail(filt, ObjectiveError.UNSUPPORTED);\n }\n }\n // apply filtering flow rules\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n pass(filt);\n log.info(\"Applied filtering rules\");\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n fail(filt, ObjectiveError.FLOWINSTALLATIONFAILED);\n log.info(\"Failed to apply filtering rules\");\n }\n }));\n }", "interface Update\n extends UpdateStages.WithTags,\n UpdateStages.WithCancelRequested,\n UpdateStages.WithState,\n UpdateStages.WithReturnAddress,\n UpdateStages.WithReturnShipping,\n UpdateStages.WithDeliveryPackage,\n UpdateStages.WithLogLevel,\n UpdateStages.WithBackupDriveManifest,\n UpdateStages.WithDriveList {\n /**\n * Executes the update request.\n *\n * @return the updated resource.\n */\n JobResponse apply();\n\n /**\n * Executes the update request.\n *\n * @param context The context to associate with this operation.\n * @return the updated resource.\n */\n JobResponse apply(Context context);\n }", "final void updateMsdtFilterMap() {\r\n\r\n logger.entering(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n\r\n String filterExpression = \"\";\r\n\t\t\r\n\t\tfor (MicroSensorDataType msdt : this.chkMsdtSelection.keySet()) {\r\n JCheckBox chkBox = this.chkMsdtSelection.get(msdt);\r\n\r\n this.msdtFilterMap.remove(msdt);\r\n\r\n if (chkBox.isSelected()) {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.FALSE);\r\n\t\t\t\t// Compile new filter property string\r\n\t\t\t\tfilterExpression += (filterExpression.length() == 0 ? \"\" : \",\") + msdt.getName();\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\tthis.msdtFilterMap.put(msdt, Boolean.TRUE);\r\n\r\n\t\t\t}\r\n }\r\n\t\t\r\n\t\t// set the new value of the filter property\r\n\t\ttry {\r\n\t\t\tthis.getModuleProperty(BLOCKER_PROPERTY).setValue(filterExpression);\r\n\t\t} catch (ModulePropertyException e) {\r\n\t\t\tlogger.log(Level.WARNING, \"The filter module is supposed to support the property \" + BLOCKER_PROPERTY);\r\n\t\t}\r\n\t\t\t\r\n\r\n logger.exiting(this.getClass().getName(), \"updateMsdtFilterMap\");\r\n }", "public void UpdateCount(String containerName, String filterName, int count) {\n\t\tFilterContainer container = this.GetContainerByName(containerName);\n\t\tif (container == null)\n\t\t\treturn;\n\t\tFilter filter = this.GetFilterByName(container, filterName);\n\t\tif (filter == null)\n\t\t\treturn;\n\t\tif (!(filter instanceof ICountable))\n\t\t\treturn;\n\t\t((ICountable)filter).SetCount(count);\n\t\tfilter.TriggerStateChanged(); // TODO execute with flag? not always..\n\t}", "public void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void processFilter(FilteringObjective filt, boolean install,\n ApplicationId applicationId) {\n // This driver only processes filtering criteria defined with switch\n // ports as the key\n PortCriterion port;\n if (!filt.key().equals(Criteria.dummy()) &&\n filt.key().type() == Criterion.Type.IN_PORT) {\n port = (PortCriterion) filt.key();\n } else {\n log.warn(\"No key defined in filtering objective from app: {}. Not\"\n + \"processing filtering objective\", applicationId);\n fail(filt, ObjectiveError.UNKNOWN);\n return;\n }\n // convert filtering conditions for switch-intfs into flowrules\n FlowRuleOperations.Builder ops = FlowRuleOperations.builder();\n for (Criterion c : filt.conditions()) {\n if (c.type() == Criterion.Type.ETH_DST) {\n EthCriterion eth = (EthCriterion) c;\n FlowRule.Builder rule = processEthFilter(filt, eth, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else if (c.type() == Criterion.Type.VLAN_VID) {\n VlanIdCriterion vlan = (VlanIdCriterion) c;\n FlowRule.Builder rule = processVlanFilter(filt, vlan, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else if (c.type() == Criterion.Type.IPV4_DST) {\n IPCriterion ip = (IPCriterion) c;\n FlowRule.Builder rule = processIpFilter(filt, ip, port);\n rule.forDevice(deviceId)\n .fromApp(applicationId);\n ops = install ? ops.add(rule.build()) : ops.remove(rule.build());\n\n } else {\n log.warn(\"Driver does not currently process filtering condition\"\n + \" of type: {}\", c.type());\n fail(filt, ObjectiveError.UNSUPPORTED);\n }\n }\n // apply filtering flow rules\n flowRuleService.apply(ops.build(new FlowRuleOperationsContext() {\n @Override\n public void onSuccess(FlowRuleOperations ops) {\n pass(filt);\n log.trace(\"HP Driver - Applied filtering rules\");\n }\n\n @Override\n public void onError(FlowRuleOperations ops) {\n fail(filt, ObjectiveError.FLOWINSTALLATIONFAILED);\n log.trace(\"HP Driver - Failed to apply filtering rules\");\n }\n }));\n }", "public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }", "void filterChanged(Filter filter);", "public abstract void update (org.apache.spark.sql.expressions.MutableAggregationBuffer buffer, org.apache.spark.sql.Row input) ;", "public interface Collection2<T> extends Collection {\n default void forEachId(Consumer<T> action, Predicate<T> filter) {\n Objects.requireNonNull(filter);\n final Iterator<T> each = iterator();\n while (each.hasNext()) {\n T element = each.next();\n if (filter.test(element)) {\n action.accept(element);\n }\n }\n }\n}", "private void addUpdateOp(Uri uri) {\n ContentProviderOperation.Builder builder =\n newUpdateCpo(uri, mIsSyncOperation, mIsYieldAllowed).withValues(mValues);\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }", "Boolean updateList(List<Customer> list);", "@Override\r\n\tpublic void updateAll() throws IOException {\n\t}", "public QueryResultBuilder<T> applyFilter(Option<QueryFilter<T>> filter, Option<Map<String, Object>> params);", "public void batchUpdateWeights() {\n\t\tObject[] keys = nextLayerNodes.keySet().toArray();\n\t\tfor (Object key : keys) {\n\t\t\tNode nextLayerNode = (Node) key;\n\t\t\t// System.out.printf(\"Updating weight from %f to %f%n\", nextLayerNodes.get(nextLayerNode), nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble oldWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tnextLayerNodes.put(nextLayerNode, nextLayerNodesUpdateMap.get(nextLayerNode));\n\t\t\tdouble newWeight = nextLayerNodes.get(nextLayerNode);\n\t\t\tdouble deltaWeight = oldWeight-newWeight;\n\t\t\tSystem.out.printf(\"Changed from %f to %f%n\", oldWeight, newWeight);\n\t\t\tif (deltaWeight > 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf (\"Increased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t} else if (deltaWeight < 0.0) {\n\t\t\t\tif (nextLayerNodesArrayList.get(0).nextLayerNodes.size() == 0) {\n\t\t\t\t\tSystem.out.print(\"Hidden Node connected to output layer \");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.print(\"Node connected to another hidden layer \");\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Decreased!! Delta weight = %.10f%n\", deltaWeight);\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.64915633", "0.6150951", "0.5804962", "0.572441", "0.57234013", "0.5629347", "0.5595263", "0.5471799", "0.54585975", "0.54580235", "0.54389894", "0.52965343", "0.5293755", "0.5292134", "0.5284817", "0.5274097", "0.52080315", "0.5185719", "0.5179105", "0.51159", "0.51148707", "0.5097188", "0.5092683", "0.5090686", "0.5088427", "0.5084812", "0.50809574", "0.50691456", "0.5051999", "0.504741", "0.5045743", "0.5031754", "0.5031188", "0.50301903", "0.50289166", "0.50165784", "0.50139046", "0.5003596", "0.5001714", "0.49813592", "0.49688303", "0.49547273", "0.4953922", "0.49466246", "0.49370995", "0.49294567", "0.49242088", "0.49187726", "0.49094585", "0.48626813", "0.4860248", "0.48386014", "0.48309866", "0.4822946", "0.48222578", "0.4821284", "0.47940117", "0.47931376", "0.47868404", "0.47782752", "0.4777131", "0.4775903", "0.476867", "0.47650465", "0.476338", "0.47590816", "0.47590816", "0.4753232", "0.47483498", "0.4745966", "0.4742997", "0.47298703", "0.47291207", "0.47203642", "0.4710399", "0.47101286", "0.4709647", "0.4703488", "0.46971548", "0.46928725", "0.4688489", "0.4688333", "0.46826872", "0.46826157", "0.46822235", "0.4666395", "0.46619284", "0.4661508", "0.46580926", "0.46569344", "0.46536544", "0.4650958", "0.4644098", "0.46422225", "0.46353853", "0.46340021", "0.46237847", "0.4619373", "0.46175256", "0.4609944" ]
0.5990736
2
Replace thread local with buffers. Thread local should provide direct buffer with one page in length.
public void setThreadBuf(final ThreadLocal<ByteBuffer> threadBuf) { this.threadBuf = threadBuf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void flushBuffer(Runnable paramRunnable) {\n/* 149 */ int i = this.buf.position();\n/* 150 */ if (i > 0 || paramRunnable != null)\n/* */ {\n/* 152 */ flushBuffer(this.buf.getAddress(), i, paramRunnable);\n/* */ }\n/* */ \n/* 155 */ this.buf.clear();\n/* */ \n/* 157 */ this.refSet.clear();\n/* */ }", "private static void buffer() {\n\t\tSystem.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n\t\tByteBuffer mBuffer=ByteBuffer.allocate(10240000);\n\t\tSystem.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n// mBuffer.clear();\n System.out.println(\"bafor\"+Runtime.getRuntime().freeMemory());\n\t}", "private final void setupLocal() {\n _topLocal = true;\n // Check for global vs local work\n if( _nlo >= 0 && _nlo < _nhi-1 ) { // Have global work?\n // Note: some top-level calls have no other global work, so\n // \"topLocal==true\" does not imply \"nlo < nhi-1\".\n int selfidx = H2O.SELF.index();\n if( _nlo < selfidx ) _nleft = remote_compute(_nlo, selfidx );\n if( selfidx+1 < _nhi ) _nrite = remote_compute(selfidx+1,_nhi);\n }\n _lo = 0; _hi = _fr.firstReadable().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n if( _fr.hasAppendables() )\n _fs = new Futures();\n init(); // Setup any user's shared local structures\n }", "private final void setupLocal0() {\n assert _profile==null;\n _fs = new Futures();\n _profile = new MRProfile(this);\n _profile._localstart = System.currentTimeMillis();\n _topLocal = true;\n // Check for global vs local work\n int selfidx = H2O.SELF.index();\n int nlo = subShift(selfidx);\n assert nlo < _nhi;\n final int nmid = (nlo+_nhi)>>>1; // Mid-point\n if( !_run_local && nlo+1 < _nhi ) { // Have global work?\n _profile._rpcLstart = System.currentTimeMillis();\n _nleft = remote_compute(nlo+1,nmid);\n _profile._rpcRstart = System.currentTimeMillis();\n _nrite = remote_compute( nmid,_nhi);\n _profile._rpcRdone = System.currentTimeMillis();\n }\n _lo = 0; _hi = _fr.anyVec().nChunks(); // Do All Chunks\n // If we have any output vectors, make a blockable Futures for them to\n // block on.\n // get the Vecs from the K/V store, to avoid racing fetches from the map calls\n _fr.vecs();\n setupLocal(); // Setup any user's shared local structures\n _profile._localdone = System.currentTimeMillis();\n }", "private final void postLocal() {\n reduce3(_nleft); // Reduce global results from neighbors.\n reduce3(_nrite);\n _profile._remoteBlkDone = System.currentTimeMillis();\n _fs.blockForPending();\n _profile._localBlkDone = System.currentTimeMillis();\n // Finally, must return all results in 'this' because that is the API -\n // what the user expects\n int nlo = subShift(H2O.SELF.index());\n int nhi = _nhi; // Save before copyOver crushes them\n if( _res == null ) _nhi=-1; // Flag for no local results *at all*\n else if( _res != this ) { // There is a local result, and its not self\n _res._profile = _profile; // Use my profile (not childs)\n copyOver(_res); // So copy into self\n }\n closeLocal();\n if( nlo==0 && nhi == H2O.CLOUD.size() ) {\n // Do any post-writing work (zap rollup fields, etc)\n _fr.reloadVecs();\n for( int i=0; i<_fr.numCols(); i++ )\n _fr.vecs()[i].postWrite();\n postGlobal();\n }\n }", "void synchronizeHostData(DataBuffer buffer);", "private void updateBlockBuffer() {\n for (Block b : blockBuffer) {\n if (++b.ttl > BLOCK_CACHE_THRESH) {\n blockBuffer.remove(b);\n }\n }\n\n prevBlockBufferSize = blockBuffer.size();\n }", "void resetLocal();", "private void postLocal() {\n reduce3(_nleft); // Reduce global results from neighbors.\n reduce3(_nrite);\n if( _fs != null ) // Block on all other pending tasks, also\n _fs.blockForPending();\n // Finally, must return all results in 'this' because that is the API -\n // what the user expects\n int nlo = _nlo, nhi = _nhi; // Save these before copyOver crushes them\n if( _res == null ) _nlo = -1; // Flag for no local results *at all*\n else if( _res != this ) // There is a local result, and its not self\n copyOver(_res); // So copy into self\n if( nlo==0 && nhi == H2O.CLOUD.size() ) // All-done on head of whole MRTask tree?\n _fr.closeAppendables(); // Final close ops on any new appendable vec\n }", "private void clearLocalBuffer() {\r\n \t\tcurrentTarget = null;\r\n \t\tcurrentTargetId = -1;\r\n \t\topenGLModelConfiguration = null;\r\n \t\tif(indicators != null) {\r\n \t\t\tindicators.clear();\r\n \t\t}\r\n \t}", "public void resetBuffer(){\n bufferSet = false;\n init();\n }", "abstract void allocateBuffers();", "void trySynchronizeHostData(DataBuffer buffer);", "public void renitialiser() \n\t{\n\t\tbuffer = new byte[Constants.PAGESIZE];\n\t\tidDeLaPage = null;\n\t\tpin_count = 0;\n\t\tflagDirty = 0;\n\t\testCharge = false;\n\t}", "public void resetBuffer() {\n\n\t}", "protected void initBuffer() throws IOException {\n if (buf != null) {\r\n Util.disposeDirectByteBuffer(buf);\r\n }\r\n // this check is overestimation:\r\n int size = bufferNumLength << Main.log2DataLength;\r\n assert (size > 0);\r\n if (Main.debug) { System.out.println(\"Allocating direct buffer of \"+bufferNumLength+\" ints.\"); }\r\n buf = ByteBuffer.allocateDirect(size).order(Main.byteOrder);\r\n buf.clear();\r\n }", "public BufferRecycler _getBufferRecycler()\n/* */ {\n/* 1495 */ if (isEnabled(Feature.USE_THREAD_LOCAL_FOR_BUFFER_RECYCLING)) {\n/* 1496 */ SoftReference<BufferRecycler> ref = (SoftReference)_recyclerRef.get();\n/* 1497 */ BufferRecycler br = ref == null ? null : (BufferRecycler)ref.get();\n/* */ \n/* 1499 */ if (br == null) {\n/* 1500 */ br = new BufferRecycler();\n/* 1501 */ _recyclerRef.set(new SoftReference(br));\n/* */ }\n/* 1503 */ return br;\n/* */ }\n/* 1505 */ return new BufferRecycler();\n/* */ }", "protected boolean test1() {\r\n\r\n System.out.print(\"\\n Starting Test 1 which is favorable to MRU ... \\n\");\r\n\r\n // we choose this number to ensure that at least one page\r\n // will have to be written during this test\r\n boolean status = PASS;\r\n \r\n int numPages = Minibase.BufferManager.getNumUnpinned()+1; //buf frames\r\n \r\n int numDiskPages = numPages*BUF_SIZE_MULTIPLIER;\r\n // System.out.print(\"numPages: buf and disk: \\n\" + numPages + \" --- \" + numDiskPages);\r\n Page pg = new Page();\r\n PageId pid;\r\n PageId pid2;\r\n PageId firstPid = new PageId();\r\n System.out.println(\" - Allocate all pages\\n\");\r\n try {\r\n firstPid = Minibase.BufferManager.newPage(pg, numDiskPages);\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not allocate \" + numDiskPages);\r\n System.err.print(\" new pages in the database.\\n\");\r\n e.printStackTrace();\r\n return false;\r\n }\r\n\r\n \r\n // unpin that first page... to simplify our loop\r\n try {\r\n Minibase.BufferManager.unpinPage(firstPid, UNPIN_CLEAN);\r\n } catch (Exception e) {\r\n System.err.print(\"*** Could not unpin the first new page.\\n\");\r\n e.printStackTrace();\r\n status = FAIL;\r\n }\r\n\r\n // now nothing is pinned; numPages in buffers and numDiskPages on disk\r\n \r\n System.out.print(\" - Pin and unpin all pages in the buffer: \\n\");\r\n pid = new PageId();\r\n pid2 = new PageId();\r\n \r\n int partBufPages = numDiskPages/OUTER_PAGE_FRACTION; \r\n\r\n for (pid.pid = firstPid.pid; status == PASS\r\n && pid.pid < firstPid.pid+partBufPages; pid.pid = pid.pid + 1) {\r\n try {\r\n Minibase.BufferManager.pinPage(pid, pg, PIN_DISKIO);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n if (status == PASS) {\r\n try {\r\n Minibase.BufferManager.unpinPage(pid, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err\r\n .print(\"*** Could not unpin dirty page \" + pid.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n }\r\n for (pid2.pid = firstPid.pid + partBufPages; status == PASS\r\n && pid2.pid < firstPid.pid+numDiskPages; pid2.pid = pid2.pid + 1) {\r\n\r\n try {\r\n Minibase.BufferManager.pinPage(pid2, pg, PIN_DISKIO);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not pin new page \" + pid2.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n if (status == PASS) {\r\n try {\r\n Minibase.BufferManager.unpinPage(pid2, UNPIN_DIRTY);\r\n } catch (Exception e) {\r\n status = FAIL;\r\n System.err.print(\"*** Could not unpin dirty page \" + pid2.pid + \"\\n\");\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n if (status == PASS){\r\n \r\n //invoke to print results\r\n Minibase.BufferManager.printBhrAndRefCount();\r\n \r\n System.out.print(\" Test 1 completed successfully.\\n\");\r\n System.out.print(\"\\n 2 hits on page 9; rest 1 hit\\n\");\r\n System.out.print(\"\\n higher values of BHR for MRU\\n\");\r\n System.out.print(\"\\n lower (and may be same) values of BHR for LRU and Clock (may be others)\\n\");\r\n System.out.print(\"\\n +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\\n\");\r\n }\r\n return status;\r\n\r\n\r\n }", "final int threadLocalCapacity()\r\n/* 149: */ {\r\n/* 150:178 */ return ((Stack)this.threadLocal.get()).elements.length;\r\n/* 151: */ }", "public synchronized void unpin(Buffer buff) {\n //=====================================CS4432-Project1=====================\n buff.unpin();\n if (!buff.isPinned()) {\n //if the buffer is now unpinned, we should re-add the buffer to the least recently\n //used linked list so that we can use it if need be\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")){\n leastRecentlyUsedArray.add(buff.getFrameNumber());\n }\n //increment the number of available\n numAvailable++;\n }\n }", "public GlBuffer allocate(final int usage, final int target, final boolean freeLocal){\n\t\t//android.util.//Log.d(TAG,\"createVBO(\"+usage+\",\"+target+\",\"+freeLocal+\")\");\n\t\tif(this.handle == UNBIND_HANDLE){\n\t\t\tfinal int[] handles = new int[1];\n\n\t\t\t//Create buffer on server\n\t\t\tGLES20.glGenBuffers(1, handles, 0);\n\t\t\tthis.handle = handles[0];\n\t\t\tthis.target = target;\n\n\t\t\tGlOperation.checkGlError(TAG, \"glGenBuffers\");\n\n\t\t\t//Bind it\n\t\t\tGLES20.glBindBuffer(target, this.handle);\n\t\t\tif(this.buffer == null){\n\t\t\t\tthis.commit(false);\n\t\t\t}\n\t\t\t//Push data into it\n\t\t\tthis.buffer.position(0);\n\t\t\tGLES20.glBufferData(target, this.size, this.buffer, usage);\n\t\t\t//Unbind it\n\t\t\tGLES20.glBindBuffer(target, UNBIND_HANDLE);\n\n\t\t\t//Check error on bind only\n\t\t\tGlOperation.checkGlError(TAG, \"glBufferData\");\n\n\t\t\t//Free local buffer is queried\n\t\t\tif(mManagedBuffer && freeLocal){\n\t\t\t\tswitch(this.datatype){\n\t\t\t\t\tcase TYPE_BYTE :\n\t\t\t\t\t\tByteBufferPool.getInstance().returnDirectBuffer((ByteBuffer)this.buffer);\n\t\t\t\t\t\tmManagedBuffer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TYPE_SHORT :\n\t\t\t\t\t\tByteBufferPool.getInstance().returnDirectBuffer((ShortBuffer)this.buffer);\n\t\t\t\t\t\tmManagedBuffer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TYPE_INT :\n\t\t\t\t\t\tByteBufferPool.getInstance().returnDirectBuffer((IntBuffer)this.buffer);\n\t\t\t\t\t\tmManagedBuffer = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tByteBufferPool.getInstance().returnDirectBuffer((FloatBuffer)this.buffer);\n\t\t\t\t\t\tmManagedBuffer = false;\n\t\t\t\t}\n\t\t\t\tthis.buffer = null;\n\t\t\t}\n\n\t\t\tmode = MODE_VBO;\n\n if(GlOperation.getVersion()[0] >= 3 && this.vertexAttribHandles != null\n && this.vertexAttribHandles.length > 0){\n GLES30.glGenVertexArrays(1, handles, 0);\n mVaoHandle = handles[0];\n GlOperation.checkGlError(TAG, \"glGenVertexArrays\");\n\n GLES30.glBindVertexArray(mVaoHandle);\n GLES20.glBindBuffer(target, this.handle);\n\n for(int index=0; index < this.vertexAttribHandles.length; index++){\n GLES20.glEnableVertexAttribArray(this.vertexAttribHandles[index]);\n GLES20.glVertexAttribPointer(this.vertexAttribHandles[index], this.chunks[index].components,\n this.chunks[index].datatype, this.chunks[index].normalized, stride, this.chunks[index].offset);\n }\n GlOperation.checkGlError(TAG, \"glVertexAttribPointer\");\n\n GLES20.glBindBuffer(target, UNBIND_HANDLE);\n GLES30.glBindVertexArray(UNBIND_HANDLE);\n\n mode = MODE_VAO;\n }\n\t\t}\n\t\telse{\n\t\t Log.w(TAG, \"multiple allocation detected !\");\n }\n\n\t\treturn this;\n\t}", "private void resetBytesFree()\r\n {\r\n this.bytesFree.set(0);\r\n }", "public synchronized Buffer pinNew(String filename, PageFormatter fmtr) {\n //=====================================CS4432-Project1=====================\n //get an empty buffer or buffer that is okay for replacement\n Buffer buff = chooseUnpinnedBuffer();\n //if we returned null, there was no available buffers, so just return null\n if (buff == null)\n return null;\n //add block to that buffer and pin it\n buff.assignToNew(filename, fmtr);\n numAvailable--;\n buff.pin();\n //associate the block with the frame number for easy access\n buffers.put(buff.block(), buff.getFrameNumber());\n return buff;\n }", "@Override\n public void resetBuffer() {\n\n }", "@Override\n\tpublic void resetBuffer() {\n\t}", "public void sync(){\n byte[] block = new byte[512];\n SysLib.int2bytes(totalBlocks, block, 0);\n SysLib.int2bytes(totalInodes, block, 4);\n SysLib.int2bytes(freeList, block, 8);\n SysLib.rawwrite(0, block);\n }", "public synchronized void flushAllPages() throws IOException {\n // some code goes here\n // not necessary for lab1\n Enumeration<PageId> it = bufferPool.pageIdxMap.keys();\n while (it.hasMoreElements()) {\n flushPage(it.nextElement());\n }\n }", "private int addBuffer( FloatBuffer directBuffer, FloatBuffer newBuffer ) {\n int oldPosition = directBuffer.position();\n if ( ( directBuffer.capacity() - oldPosition ) >= newBuffer.capacity() ) {\n directBuffer.put( newBuffer );\n } else {\n oldPosition = -1;\n }\n return oldPosition;\n }", "private void loadBuffer(ByteBuffer buffer) {\n byteBuffer = buffer.get();\n }", "public void bufferingState(){\n\t\twhile ( buffer.isBufferUnderRun() ){\n\t\t\t/** Do not leave the while loop with nothing, it will increase the CPU usage 25% */\n\t\t\ttry {Thread.sleep(1);\n\t\t\t} catch (InterruptedException ex) {}\n\t\t} \n\t}", "private void initializeBuffers(){\n if(isDiskBufferEnabled){\n this.persistenceService = PersistenceService.getService();\n this.synonymyBuffer = persistenceService.getMapDatabase(WIKIDATA_SYNONYMY_BUFFER);\n this.hypernymyBuffer = persistenceService.getMapDatabase(WIKIDATA_HYPERNYMY_BUFFER);\n this.askBuffer = persistenceService.getMapDatabase(WIKIDATA_ASK_BUFFER);\n } else {\n this.synonymyBuffer = new ConcurrentHashMap<>();\n this.hypernymyBuffer = new ConcurrentHashMap<>();\n this.askBuffer = new ConcurrentHashMap<>();\n }\n }", "public void setDirtyBlock(int localX, int localY, int localZ) {\n\t\tif (this.dirtyBlocks.size() < MaxBlocksPerUpdate) {\n\t\t\tthis.dirtyBlocks.add(packAddress(localX, localY, localZ));\n\t\t}\n\t}", "private synchronized void flushPage(PageId pid) throws IOException {\n // some code goes here\n // not necessary for lab1\n if (bufferPool.pageIdxMap.containsKey(pid)) {\n Page pg = bufferPool.pageIdxMap.get(pid);\n if (pg.isDirty() != null) {\n Database.getCatalog().getDatabaseFile(pg.getId().getTableId()).writePage(pg);\n }\n }\n\n }", "private synchronized void popBuffer() {\n IoBuffer buf = data.removeFirst();\n if(marked) {\n resetCache.push(buf);\n if(!data.isEmpty()) {\n data.getFirst().mark();\n }\n } else {\n buf.free();\n }\n }", "void flushBuffer();", "private ByteBuffer allocateFromPool(int length, boolean isFragmented) {\n return (isFragmented ? this.fragmentedBufferPool : this.unfragmentedBufferPool).get(length);\n}", "void writeCurrentBuffer();", "synchronized void unpin(ExerciseBuffer buff) {\n buff.unpin();\n if (!buff.isPinned() && (unpinnedBufferList.size() < bufferpool.length)){ // unpinnedBufferList length should not exceed the bufferpool length \n numAvailable++;\n unpinnedBufferList.add(buff); // adding to the tail\n \n }\n }", "private Buffer chooseUnpinnedBuffer() {\n //=====================================CS4432-Project1=====================\n //if we still have unused buffers, we can use these first\n if (avaliableFrames.size() != 0){\n //look up the first unused buffer, and return that\n int frame = avaliableFrames.get(0);\n avaliableFrames.remove(0);\n\n return bufferpool[frame];\n } else { //all of our buffers have been used, so we need to use a replacement policy\n //LRU replacement policy\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")){\n //if we actually have frames that we can replace than use those\n if (leastRecentlyUsedArray.size() != 0){\n //get the least recently used frame\n int frame = leastRecentlyUsedArray.get(0);\n\n //need to remove the association\n Buffer buff = bufferpool[frame];\n buffers.put(buff.block(), null);\n leastRecentlyUsedArray.remove(0);\n\n //return the buffer in this frame\n return bufferpool[frame];\n }\n //CLOCK replacement policy\n } else if (replacementPolicy.equalsIgnoreCase(\"CLOCK\")) {\n //if we have unpinned buffers is the only time we should run the replacement policy\n if (numAvailable != 0){\n while (true){ //infinite loop\n //get the current frame that clock policy is pointing to\n int frame = clockFrame;\n //increment the pointer\n if (clockFrame == maxClockFrame){\n clockFrame = 0;\n } else {\n clockFrame += 1;\n }\n\n //if the buffer at this frame is unpinned, we can use it\n if (!bufferpool[frame].isPinned()){\n //need to remove the association\n Buffer buff = bufferpool[frame];\n buffers.put(buff.block(), null);\n\n return bufferpool[frame];\n }\n //otherwise we keep going, until we find an available buffer (since we know there is at least one)\n }\n }\n } else { //we are using neither LRU nor Clock, so we'll just do a inefficient lookup to avoid returning null\n for (Buffer buff : bufferpool)\n if (!buff.isPinned()) {\n buffers.put(buff.block(), null);\n return buff;\n }\n }\n }\n\n return null;\n }", "protected final void resetBuffer() {\n buffer.reset();\n }", "Buffer copy();", "public void freeBuffer() {\n if(allocatedBufferSource.get() != null) {\n allocatedBufferSource.getAndSet(null).freeVideo(this);\n }\n }", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b, int offset, int len) {\n\t\treturn null;\r\n\t}", "public void instantCloudFlushing() {\n\t\t\tWriteRequest wr = null;\n\t\t\twhile ((wr = queue.poll()) != null) {\n\t\t\t\tsynchronized(writeMap) {\n\t\t\t\t\twriteMap.put((int) (wr.offset / blockSize), wr.buf);\n\t\t\t\t}\n\t\t\t}\n\t\t\tThread lastFlusherThread = new Thread(new CloudFlusher());\n\t\t\tlastFlusherThread.start();\n\t\t\ttry {\n\t\t\t\tlastFlusherThread.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public synchronized void freeAllBuffers() {\n\t\tIterator<Integer> iter = _bufferMap.keySet().iterator();\n\t\twhile (iter.hasNext()) {\n\t\t\tint bufNum = iter.next();\n\t\t\tsendMessage(\"/b_free\", new Object[] { bufNum });\n\t\t\titer.remove();\n\t\t}\n\t}", "public final T doAll( Frame fr, boolean run_local) { return doAll(0,fr, run_local); }", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tRandom r = new Random();\r\n\t\tint frames = 0;\r\n\t\tint fault = 0;\r\n\t\tint pointer = 0;\r\n\t\tint ref_len = 100;\r\n\t\tint buffer[];\r\n\t\tint reference[];\r\n\t\treference = new int [ref_len];\r\n\t\tint mem_layout[][];\r\n\t\t\r\n\t\t//get number of frames\r\n\t\tSystem.out.println(\"Enter number of page frames available\");\r\n\t\tframes = keyboard.nextInt();\r\n\t\t\r\n\t\t//validate number of frames is between 2 and 7\r\n\t\twhile(frames > 7 || frames < 2){\r\n\t\t\tSystem.out.println(\"Please enter a valid number\");\r\n\t\t\tframes = keyboard.nextInt();\r\n\t\t}\r\n\t\t\r\n\t\tmem_layout = new int[ref_len][frames];\r\n\t\tbuffer = new int[frames];\r\n\t\t\r\n\t\t//fill reference with pages\r\n\t\tfor(int i = 0; i < ref_len; i++)\r\n {\r\n\t\t\tint address = r.nextInt(65536);\r\n\t\t\tint page = address / 4096;\r\n reference[i] = page;\r\n }\r\n\t\t\r\n\t\tSystem.out.println();\r\n for(int i = 0; i < ref_len; i++)\r\n {\r\n int search = -1;\r\n for(int j = 0; j < frames; j++) //sets search to be equal to page if no page is available to replace and moves to next frame\r\n {\r\n if(buffer[j] == reference[i])\r\n {\r\n search = j;\r\n break;\r\n } \r\n }\r\n if(search == -1) //replaces page and increments fault \r\n {\r\n buffer[pointer] = reference[i]; \r\n fault++;\r\n pointer++;\r\n if(pointer == frames)\r\n pointer = 0;\r\n }\r\n for(int j = 0; j < frames; j++)\r\n mem_layout[i][j] = buffer[j];\r\n }\r\n System.out.println(\"Page Reference\");\r\n for(int i = 0; i < ref_len; i++){\r\n \tSystem.out.printf(\"%3d \", reference[i]);\r\n }\r\n System.out.println();\r\n System.out.println();\r\n System.out.println(\"Frames\");\r\n //output layout of frames and how they change\r\n for(int i = 0; i < frames; i++)\r\n {\r\n for(int j = 0; j < ref_len; j++)\r\n System.out.printf(\"%3d \",mem_layout[j][i]);\r\n System.out.println();\r\n }\r\n \r\n System.out.println(\"The number of Faults: \" + fault);\r\n keyboard.close();\r\n\t}", "public void flushBuffers()\n throws IOException\n {\n pool.moveToStart();\n Buffer buffer;\n while (pool.getValue() != null)\n {\n buffer = pool.remove();\n if (buffer.isDirty())\n {\n file.seek(buffer.getBlockNumber() * BLOCK_SIZE);\n file.write(buffer.readBlock());\n diskWrites++;\n }\n }\n }", "final int threadLocalSize()\r\n/* 154: */ {\r\n/* 155:182 */ return ((Stack)this.threadLocal.get()).size;\r\n/* 156: */ }", "@Override\n public void onBuffering(int percent) {\n }", "@Override\n public void loadBuffer(final Tuple3d origin, final ByteBuffer buffer) {\n this.loadGpuBuffer(origin);\n buffer.put(this.gpuBuffer);\n this.gpuBuffer.rewind();\n }", "void setBuffer(byte[] b)\n {\n buffer = b;\n }", "private void resetBuffer() {\n baos.reset();\n }", "public OneValueThread(ThreadLocal<Integer> threadLocal) {\n\t\tthis.threadLocal = threadLocal;\n\t}", "public SortingBuffer(int numberOfThreads) \r\n {\r\n this.numberOfThreads = numberOfThreads;\r\n currentValue = new int[numberOfThreads];\r\n // Use a sentinel value to initialize array\r\n Arrays.fill(currentValue, Integer.MIN_VALUE);\r\n }", "@Override\r\n\tpublic Buffer setBuffer(int pos, Buffer b) {\n\t\treturn null;\r\n\t}", "private void resetCurrentMemoryIndex() throws Exception {\n // by using the globalParameters, the memory index can startup counters etc.\n // we set the documentCount to ensure all documents are given a unique number.\n tupleFlowParameters.getJSON().set(\"documentNumberOffset\", this.globalDocumentCount);\n currentMemoryIndex = new MemoryIndex(tupleFlowParameters);\n }", "public void returnBuffer(byte[] current, boolean cdrStr)\n {\n if (current != null)\n {\n int log_curr = calcLog(current.length);\n \n if( log_curr >= MIN_CACHE)\n {\n if( log_curr > maxManagedBufferSize )\n {\n synchronized(this)\n {\n // Only cache if CDROutputStream is called, cache is enabled &\n // the new value is > than the cached value.\n if (cdrStr &&\n (time >= 0 &&\n (bufferMax == null || bufferMax.length < current.length)))\n {\n bufferMax = current;\n }\n return;\n }\n }\n \n int expected = (1 << log_curr + 1) - 1;\n if (current.length != expected)\n {\n if (logger.isWarnEnabled())\n {\n logger.warn (\"BufferManager.returnBuffer, log = \" + log_curr +\n \" got length \" +\n Integer.toHexString (current.length) +\n \" expected length \" +\n Integer.toHexString (expected));\n }\n }\n else\n {\n final Collection s = bufferPool[ log_curr-MIN_CACHE ];\n doReturnBuffer(s, current, threshold);\n }\n }\n }\n }", "private void assignBuffer(List<TupleReaderBinary> buffers, int bufferID) {\n\t\tif (readerBucketID < prevTotalBuckets && readerBucketID < numInputBuffers * currentGroup) {\n\t\t\tTupleReaderBinary readerBinary = new TupleReaderBinary(DatabaseCatalog.getInstance().getTempDirectory()\n\t\t\t\t\t+ \"/\" + instanceHashcode + \"_\" + (passNumber - 1) + \"_\" + readerBucketID);\n\t\t\treaderBinary.keyNames = ordering;\n\t\t\tbuffers.set(bufferID, readerBinary);\n\t\t\treaderBucketID++;\n\t\t} else {\n\t\t\tbuffers.set(bufferID, null);\n\t\t}\n\t}", "public void runMemoryReference(MemRef r) {\n // Analyze the reference.\n long pageNumber = pageNumber(r);\n int touchedPageCount = touchedPageCount(r);\n for(int i = 0; i < touchedPageCount; i++, pageNumber++) {\n mRefCount++;\n // Check the frame.\n PTE pte = mPageTable.get(pageNumber);\n if(pte == null || !pte.isValid()) {\n mFaultCount++;\n\n // Get the frame to use.\n int target = findTargetToReplace(r);\n if(target >= mFrameNumber) {\n System.out.println(\"findTargetToReplace() returned out-of-bounds frame\" + target );\n System.exit(1);\n }\n // Remove the existing page.\n long oldPTEPageNumber = mMemory[target];\n PTE oldPTE = mPageTable.get(oldPTEPageNumber);\n if(oldPTE != null && oldPTE.isValid()) {\n // Remove the current page.\n mRemoveCount ++;\n if(oldPTE.getMod()){\n mRewriteCount++;\n }\n mPageTable.remove(oldPTEPageNumber);\n }\n\n // Insert the the pte.\n if(pte == null) {\n mPageTable.put(pageNumber, new PTE(target));\n pte = mPageTable.get(pageNumber);\n } else {\n pte.validate(target);\n }\n\n mMemory[target] = pageNumber;\n }\n\n pte.setRef();\n if (r.isWrite()) {\n pte.setMod();\n }\n }\n\n }", "static void readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out) throws IOException {\n if (buffer.hasArray()) {\n out.write((byte[])buffer.array(), (int)(position + buffer.arrayOffset()), (int)length);\n return;\n }\n int chunkLen = Math.min((int)length, (int)8192);\n buffer.clear().position((int)position);\n if (length <= 1024 || !allocator.isDirectBufferPooled()) {\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])ByteBufUtil.threadLocalTempArray((int)chunkLen), (int)0, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n ByteBuf tmpBuf = allocator.heapBuffer((int)chunkLen);\n try {\n byte[] tmp = tmpBuf.array();\n int offset = tmpBuf.arrayOffset();\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])tmp, (int)offset, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n finally {\n tmpBuf.release();\n }\n }", "@Override\n protected void releaseBuffer() {\n }", "public void resetBuffer() {\n this.response.resetBuffer();\n }", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void run() {\n\n do {\n\n ByteBuffer byteBuffer = (ByteBuffer) slist[0];\n slist = (Object[]) slist[1];\n if (0 == bufsize) {\n if (null == slist) {\n buffer = byteBuffer;\n break;//optimization\n }\n linkedList = new LinkedList<ByteBuffer>();\n }\n bufsize += byteBuffer.limit();\n linkedList.addFirst(byteBuffer);\n\n } while (null != slist);\n\n if (null == buffer) {\n buffer = ByteBuffer.allocateDirect(bufsize);\n\n for (ByteBuffer netBuffer : linkedList) {\n buffer.put(netBuffer);\n }\n }\n\n buffer.rewind();\n System.err.println(\"MsgSize: \" + buffer.limit());\n int i = ENDL.length - 1;\n byte b1 = ENDL[i];\n do {\n ByteBuffer b = buffer.slice();\n while (b.hasRemaining() && b.get() != b1);\n b.flip();\n Integer integer = Integer.valueOf(UTF8.decode(b).toString().trim(), 0x10);\n System.err.println(\"RecordSize: \" + integer);\n buffer = ((ByteBuffer) buffer.position(b.limit())).slice();\n ByteBuffer handoff = (ByteBuffer) buffer.slice().limit(integer);\n final String trim = UTF8.decode(handoff).toString().trim();\n // System.err.println(\"RecordId: \" + trim);\n final LinkedHashMap couchChange = CouchDriver.GSON.fromJson(trim, LinkedHashMap.class);\n\n EXECUTOR_SERVICE.submit(getDocUpdateHandler(couchChange));\n buffer.position(handoff.limit() + ENDL.length);\n buffer = buffer.slice();\n } while (buffer.hasRemaining());\n }", "@Test\n\tpublic static void testNonThreadLocal() {\n\t\tExecutorService service = Executors.newCachedThreadPool();\n\n\t\tRunnable task = new Runnable() {\n\t\t\tNonThreadLocal<AtomicInteger> tlocal = new NonThreadLocal<AtomicInteger>() {\n\t\t\t\t@Override\n\t\t\t\tpublic AtomicInteger initialValue() {\n\t\t\t\t\treturn new AtomicInteger(1);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" start with value: \" + tlocal.get());\n\t\t\t\ttry {\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tint res;\n//\t\t\t\tsynchronized (\"ABC\") {\n\t\t\t\t\tres = tlocal.get().addAndGet(1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\ttlocal.set(new AtomicInteger(res));\n//\t\t\t\t}\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" ends with value: \" + res);\n\t\t\t}\n\t\t};\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tservice.submit(task);\n\t\tservice.shutdown();\n\n\t}", "public void bufferSet(boolean b){\n bufferSet = b;\n }", "synchronized void flushAll(int txnum) {\n for (Buffer buff : bufferpool)\n if (buff.isModifiedBy(txnum))\n buff.flush();\n }", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "public static void bufferTest(){\n // 获取非直接缓冲区\n ByteBuffer byteBuffer = ByteBuffer.allocate(1024);\n System.out.println(\"position = \" + byteBuffer.position());\n System.out.println(\"limit = \" + byteBuffer.limit());\n System.out.println(\"capacity = \" + byteBuffer.capacity());\n /**\n * position = 0\n * limit = 1024\n * capacity = 1024\n * **/\n // 获取直接缓冲区\n// ByteBuffer byteBuffer = ByteBuffer.allocateDirect(1024);\n// byteBuffer.put()\n String s1 = \"helloworld\";\n String s2 = \"你好世界\";\n byte[] b1 = s1.getBytes();\n byte[] b2 = s2.getBytes();\n System.out.println(Arrays.toString(b1));\n System.out.println(Arrays.toString(b2));\n System.out.println(new String());\n byteBuffer.put(b1);\n System.out.println(\"position = \" + byteBuffer.position());\n System.out.println(\"limit = \" + byteBuffer.limit());\n System.out.println(\"capacity = \" + byteBuffer.capacity());\n /**\n * position = 10\n * limit = 1024\n * capacity = 1024\n * 输出结果表示put之后只有positoin位置变了,limit和capacity没有变\n * 表明position到limit之间的数据还是可以继续put\n * **/\n byteBuffer.put(b2);\n System.out.println(\"position = \" + byteBuffer.position());\n System.out.println(\"limit = \" + byteBuffer.limit());\n System.out.println(\"capacity = \" + byteBuffer.capacity());\n /**\n * position = 22\n * limit = 1024\n * capacity = 1024\n * 输出结果表示继续put之后只有positoin位置变了,limit和capacity还是没有变\n * **/\n byteBuffer.put(100,(byte)100);\n System.out.println(\"put之后直接get=\" + byteBuffer.get(100));\n System.out.println(\"position = \" + byteBuffer.position());\n System.out.println(\"limit = \" + byteBuffer.limit());\n System.out.println(\"capacity = \" + byteBuffer.capacity());\n System.out.println(byteBuffer.get(100));\n /**\n * position = 22\n * limit = 1024\n * capacity = 1024\n * put指定下标的位置,赋值一个字节,那么position limit capacity都没有变,只是赋值了\n * **/\n byteBuffer.flip();//改变positon和limit位置\n System.out.println(\"position = \" + byteBuffer.position());\n System.out.println(\"limit = \" + byteBuffer.limit());\n System.out.println(\"capacity = \" + byteBuffer.capacity());\n /**\n * flip之后limit的值变为22,之前put的100位置的字节无法进行有效读取\n * **/\n byte[] b3 = new byte[byteBuffer.limit()];\n byteBuffer.get(b3);\n System.out.println(new String(b3));\n // 表示byteBuffer还有多少可用\n int remaining = byteBuffer.remaining();\n // 为当前limit赋值,但是如果之后调用了flip方法limit还是会赋值为position\n byteBuffer.limit(10);\n // array()获取了当前数组中所有有效字节数组,包括刚才put到下标100的那个位置\n byte[] b4 = byteBuffer.array();\n System.out.println(new String(b4));\n // 为当前position位置做标记配合reset使用\n// byteBuffer.mark();\n// // 将positoin值变为直接做过标记的mark值\n// byteBuffer.reset();\n// // 分割缓冲区\n// byteBuffer.slice();\n // clear方法重新初始化了position limit capacity和mark的值,但是没有清除数组中的数据\n byteBuffer.clear();\n b4 = byteBuffer.array();\n System.out.println(\"clear之后=\" + new String(b4));\n }", "public static void main(String[] args) {\n\r\n\t\tStringBuffer b= new StringBuffer(\"karthikeyan\");\r\n\t\tSystem.out.println(b.insert(2, \"java\"));\r\n\t\tSystem.out.println(b.reverse());\r\n\r\n\t\tSystem.out.println(\" Stringbuffer is Synchronized and threadsafe\");\r\n\r\n\r\n\t}", "public void initializeIOBuffers(){\n for(int i=0; i<outputBuffer.length; i++){\n outputBuffer[i] = new LinkedBlockingQueue();\n inputBuffer[i] = new LinkedBlockingQueue();\n }\n }", "public void initBufferStrategy() {\n // Triple-buffering\n createBufferStrategy(3);\n bufferStrategy = getBufferStrategy();\n }", "default void bufferLimit(@Nonnull ByteBuffer buffer) {\n }", "private void replaceVertexBuffer(FloatBuffer buffer)\n\t{\n\t\t\n\t\tGL30.glBindVertexArray(vaoID);\n\t\t\n\t\tGL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vboID);\n\t\tGL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, vertStorageMode);\n\t\tGL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);\t\t\n\t\t\n\t\tGL30.glBindVertexArray(0);\n\t\t\n\t\tint error = GL11.glGetError();\n\t\tif (error != GL11.GL_NO_ERROR)\n\t\t\tSystem.out.println(\"Error while replacing vertex buffers: \" + error);\n\t}", "private long newBufferAndOffset(E[] nextBuffer, long index)\r\n/* 222: */ {\r\n/* 223:475 */ this.consumerBuffer = nextBuffer;\r\n/* 224:476 */ this.consumerMask = (LinkedArrayQueueUtil.length(nextBuffer) - 2 << 1);\r\n/* 225:477 */ return LinkedArrayQueueUtil.modifiedCalcElementOffset(index, this.consumerMask);\r\n/* 226: */ }", "private E newBufferPoll(E[] nextBuffer, long index)\r\n/* 200: */ {\r\n/* 201:451 */ long offset = newBufferAndOffset(nextBuffer, index);\r\n/* 202:452 */ E n = UnsafeRefArrayAccess.lvElement(nextBuffer, offset);\r\n/* 203:453 */ if (n == null) {\r\n/* 204:455 */ throw new IllegalStateException(\"new buffer must have at least one element\");\r\n/* 205: */ }\r\n/* 206:457 */ UnsafeRefArrayAccess.soElement(nextBuffer, offset, null);\r\n/* 207:458 */ soConsumerIndex(index + 2L);\r\n/* 208:459 */ return n;\r\n/* 209: */ }", "public void clearBuffer() {\r\n\t\t_tb = new TreeBuffer();\r\n\t}", "synchronized ExerciseBuffer pinNew(String filename, PageFormatter fmtr) {\n\t ExerciseBuffer buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n Block blk=buff.assignToNew(filename, fmtr); // return the newly created block\n numAvailable--;\n buff.pin();\n \n if(bufferHashTable.containsValue(buff)){ //if value (buffer) is already exist then remove that key (blk) \n bufferHashTable.remove(blk); \n \n }\n bufferHashTable.put(blk, buff); // adding new key (blk) to HashTable\n \n return buff;\n }", "public void run() {\n int lastpage = 0xFFFFFFFF - 0xFFF;\n Page P = (Page) MAGIC.cast2Struct(lastpage);\n P.data[0] = 2;\n\n }", "void removeOrReplaceByDebugLocalRead();", "@VulkanAPIFunctionType(vulkanFunction = \"vkFlushMappedMemoryRanges\")\n void flush()\n throws VulkanException;", "public void reset() {\n _oldColorBuffer = _oldNormalBuffer = _oldVertexBuffer = _oldInterleavedBuffer = null;\n Arrays.fill(_oldTextureBuffers, null);\n }", "@Override\n\tpublic void updateMemory(Map map) {\n\t\tif(!memory.used)\n\t\t\treset(map);\n\t\tspiral();\n\t}", "public void BufferUpdates()\n {\n //Clear the dispatch list and start buffering changed entities.\n DispatchList.clear();\n bBufferingUpdates = true;\n }", "static native int jniFromBuffers(\n AtomicLong out,\n byte[] oldBuffer,\n int oldLen,\n String oldAsPath,\n byte[] newBuffer,\n int newLen,\n String newAsPath,\n long opts);", "protected void doInit()\r\n/* 131: */ {\r\n/* 132:194 */ this.tmpBuf = new byte[32];\r\n/* 133:195 */ engineReset();\r\n/* 134: */ }", "public BufMgr(int numbufs, String replacerArg) throws Exception {\n\t\t// initialization of the buffer variables\n\t\tpool = new byte[numbufs][GlobalConst.MINIBASE_PAGESIZE];\n\t\treplacer = replacerArg;\n\t\tthis.numbufs = numbufs;\n\t\tpageHashtable = new Hashtable(numbufs);\n\t\tSystemDefs.JavabaseBM = this;\n\t\tframeDescriptor = new Descriptor[numbufs];\n\t\tfor (int j = 0; j < frameDescriptor.length; j++) {\n\t\t\tframeDescriptor[j] = new Descriptor(-1);\n\t\t\tframeDescriptor[j].setDirty(false);\n\t\t}\n\t\t// checking the replacement policy\n\t\tif (replacer == \"Clock\") {\n\t\t\treplace = new Queue();\n\t\t} else\n\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\"unsupported replacement policy type\");\n\t\t// enqueue all the frames\n\t\tfor (int frameNumber = 0; frameNumber < numbufs; frameNumber++) {\n\t\t\treplace.enqueue(frameNumber);\n\t\t}\n\t}", "static native void free(long buffer);", "public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }", "public synchronized void flushPages(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for lab1|lab2\n }", "private List<Instance> flushResultBuffer() {\n\t\tList<Instance> resultBuffer = this.resultBuffer;\n\t\tthis.resultBuffer = new LinkedList<Instance>();\n\t\treturn resultBuffer;\n\t}", "private static MockFileChannel fill(MockFileChannel fc) {\n if (fc.getBackingMockBuffer() instanceof VirtualMockBuffer) {\n VirtualMockBuffer mb = (VirtualMockBuffer)fc.getBackingMockBuffer();\n mb.deleteLocalBuffer();\n } else {\n ByteBufferMockBuffer mb = (ByteBufferMockBuffer)fc.getBackingMockBuffer();\n fill(mb.getBackingByteBuffer());\n }\n return fc;\n }", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "public void resetLocals()\n {\n maxLocalSize = 0;\n localCnt = localIntCnt = localDoubleCnt = localStringCnt = localItemCnt = 0;\n locals = lastLocal = new LocalVariable(null, null, null);\n }", "public InnerPageBuffer getInnerPageBuffer(int taskId) throws ServletException {\n InnerPageBuffer innerPageBuffer = new InnerPageBuffer();\n boolean exists = false;\n Map data = (Map)dataFileNames.get(new Integer(taskId));\n if (data != null) {\n String fileName = (String)data.get(\"page\");\n if (fileName != null) {\n exists = true;\n ZipInputStream zip = null;\n try {\n File fileTmp = new File(fileName + \".$$$\");\n File file = new File(fileName);\n if ((file.exists() || fileTmp.exists()) && System.currentTimeMillis()-file.lastModified() < 129600000) { // 36 hours\n // check if a temporary file with extension \".$$$\" exists and wait up to 10 seconds\n for (int i = 0; i < 10 && fileTmp.exists(); ++i) {\n try {\n Thread.sleep(1000); // wait 1 second\n } catch (InterruptedException ex) {\n }\n }\n zip = new ZipInputStream(new FileInputStream(file));\n if (zip.getNextEntry() != null) {\n timestampOfPage = file.lastModified();\n innerPageBuffer.buffer = new BufferedInputStream(zip);\n innerPageBuffer.resource = new Object[1];\n innerPageBuffer.resource[0] = zip;\n zip = null;\n return innerPageBuffer;\n }\n }\n } catch (Throwable e) {\n innerPageBuffer.close();\n } finally {\n StreamUtils.close(zip);\n }\n }\n }\n if (!exists) {\n Connection con = null;\n Statement stmt = null;\n try {\n con = servlet.getConnection();\n stmt = con.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT data,last_update,update_interval FROM zeta.data WHERE task_id=\" + taskId\n + \" AND class_name='\" + getClass().getName() + \"' AND type='page'\");\n if (rs.next()) {\n InputStream in = rs.getBinaryStream(1);\n Timestamp t = rs.getTimestamp(2);\n /*if (in == null && t == null) { // create first time only, i.e. data or last_update is null\n rs.close();\n synchronized (this) {\n rs = stmt.executeQuery(\"SELECT last_update FROM zeta.data WHERE task_id=\" + taskId\n + \" AND class_name='\" + getClass().getName() + \"' AND type='page' AND last_update IS NULL\");\n boolean createPage = (rs.next());\n rs.close();\n if (createPage) {\n timestampOfPage = System.currentTimeMillis();\n Timestamp timestamp = new Timestamp(timestampOfPage);\n String page = createPage(taskId, con);\n byte[] buffer = page.getBytes(\"ISO-8859-1\");\n innerPageBuffer.buffer = new BufferedInputStream(new ByteArrayInputStream(buffer));\n pStmt = con.prepareStatement(\"UPDATE zeta.data SET (last_update,data)=('\" + timestamp.toString()\n + \"',?) WHERE task_id=\" + taskId + \" AND class_name='\" + getClass().getName() + \"' AND type=?\");\n pStmt.setBytes(1, buffer);\n pStmt.setString(2, \"page\");\n pStmt.execute();\n rs = stmt.executeQuery(\"SELECT last_update FROM zeta.data WHERE task_id=\" + taskId\n + \" AND class_name='\" + getClass().getName() + \"' AND type='xml'\");\n createPage = (rs.next());\n rs.close();\n if (createPage) {\n pStmt.setBytes(1, PageConverter.convertHTMLTableToXML(page, timestamp).getBytes(\"ISO-8859-1\"));\n pStmt.setString(2, \"xml\");\n pStmt.execute();\n }\n return innerPageBuffer;\n }\n }\n } else*/ if (in != null && t != null && System.currentTimeMillis()-t.getTime() < 4*rs.getInt(3)+129600000) { // 4 times of update interval plus 36 hours\n ZipInputStream zip = new ZipInputStream(in);\n if (zip.getNextEntry() != null) {\n timestampOfPage = (t == null)? System.currentTimeMillis() : t.getTime();\n innerPageBuffer.buffer = new BufferedInputStream(zip);\n innerPageBuffer.resource = new Object[3];\n innerPageBuffer.resource[0] = rs;\n innerPageBuffer.resource[1] = stmt;\n innerPageBuffer.resource[2] = con;\n stmt = null;\n con = null;\n return innerPageBuffer;\n }\n } else {\n rs.close();\n }\n } else {\n rs.close();\n }\n } catch (Throwable e) {\n innerPageBuffer.close();\n } finally {\n DatabaseUtils.close(stmt);\n DatabaseUtils.close(con);\n }\n } \n return null;\n }", "public synchronized Buffer pin(Block blk) {\n //=====================================CS4432-Project1=====================\n Buffer buff = findExistingBuffer(blk);\n if (buff == null) {\n buff = chooseUnpinnedBuffer();\n if (buff == null)\n return null;\n buff.assignToBlock(blk);\n }\n if (!buff.isPinned()) {\n //because we have the buffer pinned, that buffer is no longer available\n numAvailable--;\n\n //if we have a replacement policy of LRU, we know that this buffer is no longer valid for\n //replacement, so we can remove it from the array of frame numbers\n if (replacementPolicy.equalsIgnoreCase(\"LRU\")){\n //if we had previously added this buffer to the LRU array, we should remove\n int location = leastRecentlyUsedArray.indexOf(buff.getFrameNumber());\n if (location != -1){\n //remove it\n leastRecentlyUsedArray.remove(location);\n }\n }\n }\n //pin the block to the buffer\n buff.pin();\n return buff;\n }", "private void cleanBuffersFromCache()\n {\n synchronized (myUsedKeys)\n {\n CacheProvider cache = getCache();\n for (PolylineModelData key : myPreviouslyUsedKeys)\n {\n if (!myUsedKeys.contains(key))\n {\n cache.clearCacheAssociation(key, PolylineDataBuffered.class);\n }\n }\n\n myPreviouslyUsedKeys.clear();\n myPreviouslyUsedKeys.addAll(myUsedKeys);\n }\n }", "@Test\n\tpublic static void testThreadLocal() {\n\t\tExecutorService service = Executors.newCachedThreadPool();\n\n\t\tRunnable task = new Runnable() {\n\t\t\tThreadLocal<AtomicInteger> tlocal = new ThreadLocal<AtomicInteger>() {\n\t\t\t\t@Override\n\t\t\t\tpublic AtomicInteger initialValue() {\n\t\t\t\t\treturn new AtomicInteger(1);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tpublic void run() {\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" start with value: \" + tlocal.get());\n\t\t\t\ttry {\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttlocal.set(new AtomicInteger(tlocal.get().addAndGet(1)));\n\t\t\t\tSystem.out.println(Thread.currentThread().getName() + \" ends with value: \" + tlocal.get());\n\t\t\t}\n\t\t};\n\t\tfor (int i = 0; i < 5; i++)\n\t\t\tservice.submit(task);\n\t\tservice.shutdown();\n\t}", "public BufferPool(int numPages) {\n // some code goes here\n this.pageNum = numPages;\n this.bufferedPages = new ConcurrentHashMap<PageId, Node>();\n currentTransactions = new ConcurrentHashMap<TransactionId, Long>();\n lockManager = new LockManager();\n }" ]
[ "0.6008799", "0.5891146", "0.5855971", "0.57127136", "0.5517911", "0.5446022", "0.528782", "0.5223128", "0.5203531", "0.51986486", "0.519792", "0.513814", "0.51160794", "0.50973964", "0.5031025", "0.5014771", "0.49953544", "0.49948704", "0.4983987", "0.4961157", "0.49580574", "0.49523365", "0.49495074", "0.49347454", "0.4910846", "0.49098104", "0.49061748", "0.48996416", "0.48732832", "0.4870014", "0.48675853", "0.4865236", "0.48561183", "0.4834869", "0.47962475", "0.4791249", "0.47860804", "0.47858343", "0.47777602", "0.47629583", "0.47587007", "0.47577313", "0.47505435", "0.47500533", "0.47445437", "0.47396234", "0.47390044", "0.47311905", "0.47296995", "0.472621", "0.4722969", "0.4721042", "0.47184965", "0.47171998", "0.47089282", "0.4696021", "0.46942654", "0.46881548", "0.4672825", "0.46645802", "0.46630394", "0.4661889", "0.4661579", "0.46513817", "0.46473652", "0.4641562", "0.46387944", "0.46342388", "0.4621763", "0.46193364", "0.46116105", "0.4609493", "0.4609282", "0.45991144", "0.45883206", "0.45857295", "0.45834792", "0.45767936", "0.45603386", "0.45559996", "0.45485672", "0.4542016", "0.45397967", "0.4534032", "0.45325723", "0.45253634", "0.45197123", "0.4516724", "0.45160466", "0.45105729", "0.4501872", "0.4490737", "0.44899318", "0.44815737", "0.44788978", "0.4471489", "0.44664752", "0.4463086", "0.44514266", "0.44480607" ]
0.57808936
3
Adds given partition to checkpointer destroy queue.
public void schedulePartitionDestroy(int grpId, int partId) { Checkpointer cp = checkpointer; if (cp != null) cp.schedulePartitionDestroy(cctx.cache().cacheGroup(grpId), grpId, partId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void removePartition(Partition partition) {\n \n }", "public void destroyPartition(int nPid);", "@Override\n public void createPartition(Partition partition) {\n \n }", "public void cancelOrWaitPartitionDestroy(int grpId, int partId) throws IgniteCheckedException {\n Checkpointer cp = checkpointer;\n\n if (cp != null)\n cp.cancelOrWaitPartitionDestroy(grpId, partId);\n }", "public boolean addPartition(T spilledPartition) {\n Preconditions.checkState(initialized);\n return queue.offer(spilledPartition);\n }", "public void createPartition(int nPid);", "public void evictPartitionAsync(GridDhtLocalPartition part) {\n evictionQueue.putIfAbsent(part.id(), part);\n\n if (evictionRunning.compareAndSet(false, true)) {\n ctx.kernalContext().closure().callLocalSafe(new GPC<Boolean>() {\n @Override public Boolean call() {\n boolean locked = true;\n\n long nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n\n while (locked || !evictionQueue.isEmpty()) {\n if (!locked && !evictionRunning.compareAndSet(false, true))\n return false;\n\n try {\n for (GridDhtLocalPartition part : evictionQueue.values()) {\n // Show progress of currently evicting partitions.\n if (U.currentTimeMillis() >= nextShowProgressTime) {\n if (log.isInfoEnabled())\n log.info(\"Eviction in progress [grp=\" + grp.cacheOrGroupName()\n + \", remainingCnt=\" + evictionQueue.size() + \"]\");\n\n nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n }\n\n try {\n boolean success = part.tryClear();\n\n if (success) {\n evictionQueue.remove(part.id());\n\n if (part.state() == GridDhtPartitionState.EVICTED && part.markForDestroy())\n part.destroy();\n }\n }\n catch (Throwable ex) {\n if (ctx.kernalContext().isStopping()) {\n LT.warn(log, ex, \"Partition eviction failed (current node is stopping).\",\n false,\n true);\n\n evictionQueue.clear();\n\n return true;\n }\n else\n LT.error(log, ex, \"Partition eviction failed, this can cause grid hang.\");\n }\n }\n }\n finally {\n if (!evictionQueue.isEmpty()) {\n if (ctx.kernalContext().isStopping()) {\n evictionQueue.clear();\n\n locked = false;\n }\n else\n locked = true;\n }\n else {\n boolean res = evictionRunning.compareAndSet(true, false);\n\n assert res;\n\n locked = false;\n }\n }\n }\n\n return true;\n }\n }, /*system pool*/ true);\n }\n }", "public StrippedPartition(Object2ObjectOpenHashMap<Object, LongBigArrayBigList> partition) {\n this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();\n this.elementCount = 0;\n\n //create stripped partitions -> only use equivalence classes with size > 1.\n for (LongBigArrayBigList eqClass : partition.values()) {\n if (eqClass.size64() > 1) {\n strippedPartition.add(eqClass);\n elementCount += eqClass.size64();\n }\n }\n this.calculateError();\n }", "protected void sequence_BEGIN_END_ExecPartition_PARTITION_WITH(ISerializationContext context, ExecPartition semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "public QuickSort(Partitionable<T> part)\n {\n partAlgo = part;\n MIN_SIZE = 3;\n }", "public static synchronized void partition(SqlSession session, int datasetKey) {\n interruptIfCancelled();\n LOG.info(\"Create empty partition for dataset {}\", datasetKey);\n DatasetPartitionMapper mapper = session.getMapper(DatasetPartitionMapper.class);\n // first remove if existing\n mapper.delete(datasetKey);\n\n // then create\n mapper.create(datasetKey);\n }", "public final void rule__Partition__Group__0__Impl() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:1747:1: ( ( 'partition' ) )\n // InternalMLRegression.g:1748:1: ( 'partition' )\n {\n // InternalMLRegression.g:1748:1: ( 'partition' )\n // InternalMLRegression.g:1749:2: 'partition'\n {\n before(grammarAccess.getPartitionAccess().getPartitionKeyword_0()); \n match(input,29,FOLLOW_2); \n after(grammarAccess.getPartitionAccess().getPartitionKeyword_0()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Override\n public void processDeleteHostEventBefore(final Host host) {\n\n }", "MemoryPartition createMemoryPartition();", "public void setPartitionNumber(int part) {\n\tpartitionNumber = part;\n }", "@Override\n public void delete( int partition, List< String > key )\n {\n // guard\n {\n log.trace( \"Delete: \" + key.toString() + \"'\" );\n\n checkState();\n\n if( ! this.isopen() )\n {\n throw new VoldException( \"Tried to operate on WriteLogger while it had not been initialized yet. Open it first!\" );\n }\n }\n\n try\n {\n out.write( \"DELETE: \" + key.toString() );\n out.newLine();\n }\n catch( IOException e )\n {\n throw new VoldException( e );\n }\n }", "private int destroyEvictedPartitions() throws IgniteCheckedException {\n PartitionDestroyQueue destroyQueue = curCpProgress.destroyQueue;\n\n if (destroyQueue.pendingReqs.isEmpty())\n return 0;\n\n List<PartitionDestroyRequest> reqs = null;\n\n for (final PartitionDestroyRequest req : destroyQueue.pendingReqs.values()) {\n if (!req.beginDestroy())\n continue;\n\n final int grpId = req.grpId;\n final int partId = req.partId;\n\n CacheGroupContext grp = cctx.cache().cacheGroup(grpId);\n\n assert grp != null\n : \"Cache group is not initialized [grpId=\" + grpId + \"]\";\n assert grp.offheap() instanceof GridCacheOffheapManager\n : \"Destroying partition files when persistence is off \" + grp.offheap();\n\n final GridCacheOffheapManager offheap = (GridCacheOffheapManager) grp.offheap();\n\n Runnable destroyPartTask = () -> {\n try {\n offheap.destroyPartitionStore(grpId, partId);\n\n req.onDone(null);\n\n if (log.isDebugEnabled())\n log.debug(\"Partition file has destroyed [grpId=\" + grpId + \", partId=\" + partId + \"]\");\n }\n catch (Exception e) {\n req.onDone(new IgniteCheckedException(\n \"Partition file destroy has failed [grpId=\" + grpId + \", partId=\" + partId + \"]\", e));\n }\n };\n\n if (asyncRunner != null) {\n try {\n asyncRunner.execute(destroyPartTask);\n }\n catch (RejectedExecutionException ignore) {\n // Run the task synchronously.\n destroyPartTask.run();\n }\n }\n else\n destroyPartTask.run();\n\n if (reqs == null)\n reqs = new ArrayList<>();\n\n reqs.add(req);\n }\n\n if (reqs != null)\n for (PartitionDestroyRequest req : reqs)\n req.waitCompleted();\n\n destroyQueue.pendingReqs.clear();\n\n return reqs != null ? reqs.size() : 0;\n }", "public final void entryRulePartition() throws RecognitionException {\n try {\n // InternalMLRegression.g:304:1: ( rulePartition EOF )\n // InternalMLRegression.g:305:1: rulePartition EOF\n {\n before(grammarAccess.getPartitionRule()); \n pushFollow(FOLLOW_1);\n rulePartition();\n\n state._fsp--;\n\n after(grammarAccess.getPartitionRule()); \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "private void deleteElement(final int idx) {\r\n\t\tserializer.setRandomAccess(idx, null);\r\n\t\tif (idx < firstFree) {\r\n\t\t\tsetNextPointer(idx, firstFree);\r\n\t\t\tsetPrevPointer(idx, 0);\r\n\t\t\tfirstFree = idx;\r\n\t\t} else {\r\n\t\t\tint free = firstFree;\r\n\t\t\tint lastFree = 0;\r\n\t\t\twhile (free < idx) {\r\n\t\t\t\tlastFree = free;\r\n\t\t\t\tfree = getNextPointer(free);\r\n\t\t\t}\r\n\t\t\tsetNextPointer(lastFree, idx);\r\n\t\t\tsetNextPointer(idx, free);\r\n\t\t}\r\n\t}", "@Override\n protected void finalize() throws Throwable {\n clear();\n \n // Finally free the partition area itself\n unsafe.freeMemory(partitionAddress);\n \n super.finalize();\n }", "@Delete\n void delete(WellbeingQuestion wellbeingQuestion);", "public boolean addNode(NodeType node, PartitionType partition) {\n\n\t\tif ( node == null || partition == null )\n\t\t\treturn false;\n\n\t\tif ( partitionMap.containsKey( node ) )\n\t\t\treturn false;\n\n\t\telse if ( K == UNLIMITED_PARTITIONS || isPartition(partition) || getNumPartitions() < K ) {\n\t\t\tpartitionMap.put(node,partition);\n\t\t\treturn super.addNode(node);\n\t\t} else\n\t\t\treturn false;\n\t}", "public int modifyChkStorageForDeleteInBill(TicketStorageInBill vo);", "private void freePartitions()\n {\n partitionsNoLongerNeeded.set(null);\n\n lock.writeLock().lock();\n try {\n // Remove out references to partitions to actually free memory\n Arrays.fill(partitions, null);\n lookupSourceSupplier = null;\n closeCachedLookupSources();\n }\n finally {\n lock.writeLock().unlock();\n }\n }", "public void MarkForDeletion();", "void deleteQueue();", "public void markFinalizePartitionCounters() {\n finalizePartitionCounters = true;\n }", "int deleteByExample(AlertQueueExample example);", "public static void partition(LinkedQueue qIn, Comparable pivot, \n LinkedQueue qSmall, LinkedQueue qEquals, \n LinkedQueue qLarge) {\n // Your solution here.\n while (!qIn.isEmpty())\n {\n try\n {\n Object qItem = qIn.dequeue();\n if (((Comparable) qItem).compareTo(pivot) > 0)\n {\n qLarge.enqueue(qItem);\n }\n else if (((Comparable) qItem).compareTo(pivot) < 0)\n {\n qSmall.enqueue(qItem);\n }\n else\n {\n qEquals.enqueue(qItem);\n }\n }\n catch (QueueEmptyException e)\n {\n e.printStackTrace(); \n }\n }\n \n }", "public void markVlanHostInterface1Delete() throws JNCException {\n markLeafDelete(\"vlanHostInterface1\");\n }", "public void partition() \n\t{\n\t\tXPath xPath = getXPathHandler();\n\t\tNodeList parentNodes;\n\t\ttry {\n\t\t\tparentNodes = (NodeList)xPath.compile(this.getParentContainerXPath()).evaluate(this.document, XPathConstants.NODESET);\n\t\t\t\n\t\t\tlogger.info(\">>> \" + this.getPartitionType().name() + \" Partitioner: partition()\");\n\t\t\t\n\t\t\tfor (int i = 0; i < parentNodes.getLength(); i++) \n\t\t\t{ \t\n\t\t\t\tNode parentNode = (Node)parentNodes.item(i);\n\t\t\t\t\n\t\t\t\tif (parentNode instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString sParentClass = parentNode.getAttributes().getNamedItem(\"class\") != null ? parentNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t\tlogger.info(\"\\tParent Node Name=\" + parentNode.getNodeName()+\":class=\"+ sParentClass);\n\t\t\t\t\t\n\t\t\t\t\tNodeList nodeList = parentNode.getChildNodes();\n\t\t\t\t\tNode xDivNode = null;\n\t\t\t\t\t\n\t\t\t\t\tNode xIntroDivNode = this.document.createElement(\"div\");\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"class\", this.getPartitionTypeAsString());\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"title\", this.getIntroPartitionTitle());\n\t\t\t\t\t\n\t\t\t\t\tboolean first = true;\n\t\t\t\t\tboolean keepFirst = this.getKeepFirstElements();\n\t\t\t\t\tboolean hasIntroNode = false;\n\t\t\t \n\t\t\t\t\tfor (int j = 0, pCount = 0; j < nodeList.getLength(); j++) \n\t\t\t\t\t{ \t\n\t\t\t \tNode xNode = nodeList.item(j);\n\t\t\t \tif (xNode instanceof Element)\n\t\t\t \t{\n\t\t\t \t\tif (first && keepFirst)\n\t\t\t \t\t{\n\t\t\t \t\t\tif (!hasIntroNode) {\n\t\t\t\t \t\t\t((Element)xIntroDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t \t\t\t\tDomUtils.insertBefore(xIntroDivNode, xNode);\t\t \t\t\t\t\n\t\t\t\t \t\t\tj++;\n\t\t\t\t \t\t\thasIntroNode = true;\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\tString sClass = xNode.getAttributes().getNamedItem(\"class\") != null ? xNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t \tboolean isTable = xNode.getNodeName().equalsIgnoreCase(\"table\") ? true : false;\n\t\t\t\t \tString sId = isTable && xNode.getAttributes().getNamedItem(\"id\") != null ? xNode.getAttributes().getNamedItem(\"id\").getNodeValue() : \"\";\n\t\t\t\t \t\n\t\t\t\t \tif (sClass != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\tNode Name=\" + xNode.getNodeName()+\":class=\"+ sClass);\n\t\t\t\t \t\t\n\t\t\t\t \t\tboolean match = false;\n\t\t\t\t \t\tswitch ((TaskExprType)this.getAttributeMatchExpression())\n\t\t\t\t \t\t{\n\t\t\t\t \t\tcase NOT_SET:\n\t\t\t\t \t\tcase STARTS_WITH:\n\t\t\t\t \t\t\tmatch = sClass.startsWith(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\tcase CONTAINS:\n\t\t\t\t \t\t\tmatch = sClass.contains(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\t// Process the title name match condition if it exists\n\t\t\t\t \t\tString title = null;\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\ttitle = DomUtils.extractTextChildren(xNode);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameMatchCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\tif (title != null && this.getTitleNameMatchType() == TaskMatchType.EXPR)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\tswitch ((TaskExprType)this.getTitleNameMatchExprType())\n\t\t\t\t\t \t\t\t\t{\n\t\t\t\t\t \t\t\t\t\tcase STARTS_WITH:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.startsWith(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase CONTAINS:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.contains(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase NOT_SET:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tdefault:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t \t\t\t} else if (this.getTitleNameMatchType() == TaskMatchType.REGEX)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t\t \t\t\tPattern r = Pattern.compile(this.getTitleNameMatchRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tmatch = m.matches();\n\t\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\tif (first)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPartition partition = new Partition();\n\t\t\t\t \t\t\t\tpartition.setType(this.getPartitionType());\n\t\t\t\t \t\t\t\tpartition.setsId(sId);\n\t\t\t\t \t\t\t\tthis.setFirstPartition(partition);\n\t\t\t\t \t\t\t}\n\n\t\t\t\t \t\t\tfirst = false;\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameReplaceCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPattern r = Pattern.compile(this.getTitleNameReplaceRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\n\t\t\t\t\t \t\t\ttitle = m.replaceAll(this.getTitleNameReplaceWithRegexPattern());\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\txDivNode = this.document.createElement(\"div\");\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"class\", getPartitionTypeAsString());\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"title\", title);\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tDomUtils.insertBefore(xDivNode, xNode);\n\t\t\t\t \t\t\tDomUtils.removeElement((Element) xNode, false);\t \n\t\t\t\t \t\t}\n\t\t\t\t \t\telse\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t} else if (isTable && sId != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\t\\tNode Name=\" + xNode.getNodeName()+\":id=\"+ sId);\n\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t\t \t}\t \t\n\t\t\t \t}\n\t\t\t } // end for j\n\t\t\t\t} // end if parentNode\n\t\t\t} // end for i\n\t\t} catch (XPathExpressionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t\n\t}", "private Partition addPartition(String partitionId, String partitionDn) throws Exception {\n // Create a new partition named 'foo'.\n Partition partition =\n factory.createPartition(service.getSchemaManager(), service.getDnFactory(), partitionId, partitionDn,\n 100, service.getInstanceLayout().getPartitionsDirectory());\n service.addPartition(partition);\n return partition;\n }", "public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }", "void setHAPartition(HAPartition clusterPartition);", "private Partition addPartition(String partitionId, String partitionDn, DnFactory dnFactory) throws Exception {\n JdbmPartition partition = new JdbmPartition(service.getSchemaManager(), dnFactory);\n partition.setId(partitionId);\n partition.setPartitionPath(new File(service.getInstanceLayout().getPartitionsDirectory(), partitionId).toURI());\n partition.setSuffixDn(new Dn(service.getSchemaManager(), partitionDn));\n return partition;\n }", "private void delete() {\n\n\t}", "public final void rulePartition() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \t\n try {\n // InternalMLRegression.g:316:2: ( ( ( rule__Partition__Group__0 ) ) )\n // InternalMLRegression.g:317:2: ( ( rule__Partition__Group__0 ) )\n {\n // InternalMLRegression.g:317:2: ( ( rule__Partition__Group__0 ) )\n // InternalMLRegression.g:318:3: ( rule__Partition__Group__0 )\n {\n before(grammarAccess.getPartitionAccess().getGroup()); \n // InternalMLRegression.g:319:3: ( rule__Partition__Group__0 )\n // InternalMLRegression.g:319:4: rule__Partition__Group__0\n {\n pushFollow(FOLLOW_2);\n rule__Partition__Group__0();\n\n state._fsp--;\n\n\n }\n\n after(grammarAccess.getPartitionAccess().getGroup()); \n\n }\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void partition();", "public StrippedPartition(long numberTuples) {\n this.strippedPartition = new ObjectBigArrayBigList<LongBigArrayBigList>();\n this.elementCount = numberTuples;\n // StrippedPartition only contains partition with more than one elements.\n if (numberTuples > 1) {\n LongBigArrayBigList newEqClass = new LongBigArrayBigList();\n for (int i = 0; i < numberTuples; i++) {\n newEqClass.add(i);\n }\n this.strippedPartition.add(newEqClass);\n }\n this.calculateError();\n }", "protected void delete () {\n OleThreadRequest request = \n new OleThreadRequest(DELETE,\n 0, 0, 0, 0);\n synchronized (this) {\n messagesWaiting.add(request);\n notify();\n }\n while (!request.finished) { \n synchronized(request) {\n try {\n request.wait(POLL_FOR_RESULT_HEARTBEAT);\n }\n catch (InterruptedException e) { \n }\n } \n }\n }", "public void markVlanHostInterface2Delete() throws JNCException {\n markLeafDelete(\"vlanHostInterface2\");\n }", "void delete(String receiptHandle);", "public void clearPartitions() {\n\t\tthis.bucketIterator = null;\r\n\t\tthis.probeIterator = null;\r\n\r\n\t\tfor (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) {\r\n\t\t\tfinal BinaryHashPartition p = this.partitionsBeingBuilt.get(i);\r\n\t\t\ttry {\r\n\t\t\t\tp.clearAllMemory(this.availableMemory);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLOG.error(\"Error during partition cleanup.\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.partitionsBeingBuilt.clear();\r\n\r\n\t\t// clear the partitions that are still to be done (that have files on disk)\r\n\t\tfor (final BinaryHashPartition p : this.partitionsPending) {\r\n\t\t\tp.clearAllMemory(this.availableMemory);\r\n\t\t}\r\n\t}", "public void setPartitionId(String partitionId) {\n this.partitionId = partitionId;\n }", "@Delete\n void delete(Measurement measurement);", "protected void detachTenantPartitions(PhysicalDataModel pdm, TenantInfo tenantInfo) {\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n \n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n // collect the set of all child tables with FK relationships to\n // partitioned tables\n Set<Table> childTables = new HashSet<>();\n \n // ALTER TABLE child ALTER FOREIGN KEY fk NOT ENFORCED;\n pdm.visit(new DisableForeignKey(adapter, childTables));\n \n // ALTER TABLE parent DETACH PARTITION p0 INTO TABLE pdet;\n pdm.detachTenantPartitions(adapter, tenantInfo.getTenantSchema(), tenantInfo.getTenantId());\n \n // SET INTEGRITY FOR child OFF;\n childTables.forEach(t -> adapter.setIntegrityOff(t.getSchemaName(), t.getObjectName()));\n \n // ALTER TABLE child ALTER FOREIGN KEY fk ENFORCED;\n pdm.visit(new EnableForeignKey(adapter));\n \n // SET INTEGRITY FOR child ALL IMMEDIATE UNCHECKED;\n childTables.forEach(t -> adapter.setIntegrityUnchecked(t.getSchemaName(), t.getObjectName()));\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n \n }", "@Request(id = 26, retryable = true, response = ResponseMessageConst.STRING,\n event = EventMessageConst.EVENT_CACHEPARTITIONLOST)\n Object addPartitionLostListener(String name, boolean localOnly);", "void delete(int position) {\n\t\t\n\t\tint i;\n\t\t--position;\n\t\t\t\n\t\tif( end == 0 )\n\t\t\tSystem.out.println(\"Deletion not possible as Queue is empty\");\n\t\t\n\t\telse {\n\t\t\tfor( i=position; i<end-1; i++ ) {\n\t\t\t\ts[i]=s[i+1];\n\t\t\t}\n\t\t\tend--;\n\t\t\tSystem.out.println(\"Successful\");\n\t\t}\n\t}", "public void addPartitionedNodeAndRemoveExistingPartitions(State s, AbstractNode n) {\n maybePartitionedNodes.add(n);\n removePartitions(s, singleton(n));\n }", "public Builder withPartition(int partition) {\n this.partition = partition;\n return this;\n }", "public void addPartition(Connection c, final String prefix, final String schema, final String table, final Date lowValue, final Date highValue) throws SQLException {\n String partitionName = prefix + DateMath.format2(lowValue);\n String highValueStr = DateMath.format(highValue);\n String lowValueStr = DateMath.format(lowValue);\n \n // RTC_33190 Begin: add partition failed due to missing '' around highValueStr, and partitionName can not be used as parameter.\n // Because both partitionName and highValueStr are not gotten from user input, so there will be no sql injection risk without using ps.setString.\n final String ddl = \"ALTER TABLE \" + schema + \".\" + table \n + \" ADD PARTITION \" + partitionName + \" STARTING FROM '\" + lowValueStr + \"' INCLUSIVE ENDING AT '\" + highValueStr + \"' EXCLUSIVE\";\n \n try (Statement s = c.createStatement()) {\n s.executeUpdate(ddl);\n }\n // RTC_33190 End\n }", "boolean beforeDelete(T resource, boolean sendDataToAmazon);", "public void markForDeletion() {\n\t\tthis.mustBeDeleted = true;\n\t}", "@Override\n\tpublic void delete(Zone t) {\n\t\t\n\t}", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "public void unsetPart()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PART$2, 0);\n }\n }", "public void deleteAssociatedPart(Part part) {\n associatedParts.remove(part);\n }", "QueryPartitionClause createQueryPartitionClause();", "public void setPartParam(PartitionUpdateParam partParam) {\n this.partParam = partParam;\n }", "public interface Partitioner {\n\n Set<String> getPartitions();\n\n String getNextObjectName(String topic, String previousObject);\n\n boolean shouldReconfigure();\n\n}", "public void deleteTask(Integer tid);", "Node partition(Node l,Node h)\n {\n // set pivot as h element\n int x = h.data;\n \n // similar to i = l-1 for array implementation\n Node i = l.prev;\n \n // Similar to \"for (int j = l; j <= h- 1; j++)\"\n for(Node j=l; j!=h; j=j.next)\n {\n if(j.data <= x)\n {\n // Similar to i++ for array\n i = (i==null) ? l : i.next;\n int temp = i.data;\n i.data = j.data;\n j.data = temp;\n }\n }\n i = (i==null) ? l : i.next; // Similar to i++\n int temp = i.data;\n i.data = h.data;\n h.data = temp;\n return i;\n }", "public void proposalDeleted(long pid) throws RemoteException {\n\n\t\tlogger.create().block(\"proposalDeleted\").info().level(1).msg(\n\t\t\t\t\"Adding deleteProposal request to update queue for pid: \" + pid).send();\n\t}", "void delete(){\r\n\t\t\r\n\t}", "public void detachPartition(Connection c, final String schema, final String table, final String partitionName) throws SQLException {\n // Get exclusive access to the table so that we can do all this work together\n final String tableName = schema + \".\" + table;\n final String LOCK_TABLE = \"LOCK TABLE \" + tableName + \" IN EXCLUSIVE MODE\";\n try (Statement s = c.createStatement()) {\n s.executeUpdate(LOCK_TABLE);\n }\n\n // Make up a brand new table name we detach into. This table will later be dropped\n String tmp = UUID.randomUUID().toString().replace(\"-\", \"\");\n final String detachedName = schema + \".DRP_\" + table + \"_\" + tmp;\n\n // Now detach the partition\n final String DETACH = \"ALTER TABLE \" + tableName + \" DETACH PARTITION \" + partitionName + \" INTO \" + detachedName;\n try (Statement s = c.createStatement()) {\n s.executeUpdate(DETACH);\n }\n \n // The table detachedName will be dropped later\n }", "int delete(Subdivision subdivision);", "void notifyNewDepositSlot(int maxDim, ResourceType resourceType);", "void acknowledge(String topicName, int partition, long offset) throws IOException;", "void delete(MountPoint mountPoint);", "public void xsetPart(org.apache.xmlbeans.XmlNCName part)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNCName target = null;\n target = (org.apache.xmlbeans.XmlNCName)get_store().find_element_user(PART$2, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlNCName)get_store().add_element_user(PART$2);\n }\n target.set(part);\n }\n }", "private void maintain() {\n SoftObject obj;\n int count = 0;\n\n while ((obj = (SoftObject)queue.poll()) != null) {\n count++;\n collection.remove(obj);\n }\n\n if (count != 0) {\n // some temporary debugging fluff\n System.err.println(\"vm reclaimed \" + count + \" objects\");\n }\n }", "@Test\n public void testDestroyColocatedPartitionedRegion() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n attributeObjects = new Object[] {SEPARATOR + \"A\"};\n dataStore1.invoke(PRColocationDUnitTest.class, \"destroyPR\", attributeObjects);\n }", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "void onPairingDeleted(int errorCode);", "@Override\n\tpublic void deleteFlashcard(Flashcard f) {\n\t\t\n\t}", "protected void processDestroy()\n {\n }", "public void deleteQuestion(Question question) throws Exception {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n question.setDeleted(true);\n dbb.overwriteQuestion(question);\n dbb.commit();\n dbb.closeConnection();\n }", "Update withPartitionCount(int count);", "@Override\n public void onClick(View v) {\n ((CreateDocketActivityPart2) activity).deleteSpareParts(pos);\n }", "public void checkParticles4Destruction(){\n\t\t\tif(System.nanoTime() - creationTime > 3*Math.pow(10, 9)){\n\t\t\t\t\n\t\t\t\twhile(!particles.isEmpty()){\n\t\t\t\t\tParticle p = particles.poll();\n\t\t\t\t\tp.destroy(); \n\t\t\t\t}\n\t\t\t}\n\t}", "@Override\n\tpublic void delete(Integer deptno) {\n\t\t\n\t}", "public final EObject entryRulePartition() throws RecognitionException {\n EObject current = null;\n\n EObject iv_rulePartition = null;\n\n\n try {\n // InternalMLRegression.g:690:50: (iv_rulePartition= rulePartition EOF )\n // InternalMLRegression.g:691:2: iv_rulePartition= rulePartition EOF\n {\n newCompositeNode(grammarAccess.getPartitionRule()); \n pushFollow(FOLLOW_1);\n iv_rulePartition=rulePartition();\n\n state._fsp--;\n\n current =iv_rulePartition; \n match(input,EOF,FOLLOW_2); \n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }", "public final AstValidator.partition_clause_return partition_clause() throws RecognitionException {\n AstValidator.partition_clause_return retval = new AstValidator.partition_clause_return();\n retval.start = input.LT(1);\n\n\n CommonTree root_0 = null;\n\n CommonTree _first_0 = null;\n CommonTree _last = null;\n\n CommonTree PARTITION318=null;\n AstValidator.func_name_return func_name319 =null;\n\n\n CommonTree PARTITION318_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:501:18: ( ^( PARTITION func_name ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:501:20: ^( PARTITION func_name )\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n {\n CommonTree _save_last_1 = _last;\n CommonTree _first_1 = null;\n CommonTree root_1 = (CommonTree)adaptor.nil();\n _last = (CommonTree)input.LT(1);\n PARTITION318=(CommonTree)match(input,PARTITION,FOLLOW_PARTITION_in_partition_clause2683); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n PARTITION318_tree = (CommonTree)adaptor.dupNode(PARTITION318);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(PARTITION318_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_func_name_in_partition_clause2685);\n func_name319=func_name();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, func_name319.getTree());\n\n\n match(input, Token.UP, null); if (state.failed) return retval;\n adaptor.addChild(root_0, root_1);\n _last = _save_last_1;\n }\n\n\n if ( state.backtracking==0 ) {\n }\n }\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n }\n\n }\n\n catch(RecognitionException re) {\n throw re;\n }\n\n finally {\n \t// do for sure before leaving\n }\n return retval;\n }", "boolean partitionExists(ObjectPath tablePath, CatalogPartitionSpec partitionSpec)\n throws CatalogException;", "private static int partition(int[] array, int k) {\n final int item = array[k];\n\n swap(array, k, array.length - 1);\n k = array.length - 1;\n\n for (int i = 0; i < k; i++) {\n while (array[i] > item && k > i) {\n swap(array, i, k);\n swap(array, i, k - 1);\n k--;\n }\n }\n \n return k;\n }", "void afterDelete(T resource);", "void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;", "public void delete(LinkedList list, int start, int span) {\n\t\t\n\t}", "public void storageProduct(Product product) throws InterruptedException {\n\t\tsynchronized (this) {\r\n\t\t\tboolean producerRunning=true;\r\n\t\t\tThread currentThread=Thread.currentThread();\r\n\t\t\tif(currentThread instanceof Producer){\r\n\t\t\t\tproducerRunning=((Producer) currentThread).isRunning();\r\n\t\t\t}else{\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t//如果最后一个未被消费产品与第一个未被消费的产品的下标紧挨着,\r\n\t\t\t//则说明没有存储空间,如果没有存储空间而且生产者线程还在运行,则等待仓库释放产品。\r\n\t\t\twhile((rear+1)%CAPACITY==front&&producerRunning){\r\n\t\t\t\twait();\r\n\t\t\t\tproducerRunning=((Producer) currentThread).isRunning();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!producerRunning){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tproducts[rear]=product;\r\n\t\t\tSystem.out.println(\"Producer[\" + Thread.currentThread().getName()\r\n\t\t\t\t\t+ \"] storageProduct: \" + product);\r\n\t\t\t//将rear下标循环后移一位\r\n\t\t\trear=(rear+1)%CAPACITY;\r\n\t\t\tSystem.out.println(\"仓库中还没有被消费的产品数量:\"\r\n\t\t\t\t\t+ (rear + CAPACITY - front) % CAPACITY);\r\n\t\t\tnotify();\r\n\t\t}\r\n\t}", "private void heapify(int idx) {\r\n // TODO\r\n }", "public void handleDeleteParts()\n {\n Part partToDelete = getPartToModify();\n\n if (partToDelete != null) {\n\n // Ask user for confirmation to remove the product from part table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this part?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n inventory.deletePart(partToDelete);\n updateParts();\n }\n });\n\n } else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No part was selected!\");\n alert.setContentText(\"Please select a part to delete from the part table!\");\n alert.show();\n }\n // Unselect parts in table after part is deleted\n partTable.getSelectionModel().clearSelection();\n }", "@Override\n\tpublic void prepareResult(Partition partition) {\n\t}", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "@Override\n\tpublic void delete() {\n\n\t}", "protected abstract void postDestroy();", "void deleteDaftarhunianDtl(DaftarhunianDtl.MyCompositePK no) {\n }", "void removeTaskmonitorrecord(int i);", "@Override\n\tpublic void dropAndDestroy() {\n\n\t}", "public void deleteFromPA(IGUIBlock block) {\n Block toDelete = blockLink.getBlockFromGUIBlock(block);\n blockHandler.deleteProgram(toDelete);\n blockLink.removeBlock(block);\n }" ]
[ "0.6192666", "0.59070194", "0.58281076", "0.5491956", "0.5430238", "0.5381365", "0.51283836", "0.5036777", "0.48949382", "0.48566708", "0.48197576", "0.47427386", "0.47187233", "0.46993113", "0.46943855", "0.46882296", "0.46843696", "0.46595404", "0.4623108", "0.46043694", "0.45911208", "0.4560779", "0.4501782", "0.4493708", "0.44870964", "0.44790182", "0.44520634", "0.44467348", "0.44416773", "0.44397694", "0.44369876", "0.44295508", "0.44286674", "0.44211283", "0.44098496", "0.4392306", "0.43879107", "0.43872505", "0.4363218", "0.4361074", "0.43506113", "0.4346108", "0.4334183", "0.4322508", "0.43197915", "0.43009657", "0.4292912", "0.4257821", "0.42494208", "0.42482635", "0.4237999", "0.42311767", "0.42274484", "0.42169416", "0.42113978", "0.42113638", "0.42107153", "0.41945794", "0.41939512", "0.419118", "0.41905022", "0.4185898", "0.4180675", "0.41801125", "0.4171649", "0.4156272", "0.41398254", "0.41278383", "0.41271517", "0.41243005", "0.41216794", "0.4119819", "0.41146627", "0.41146627", "0.41134286", "0.4108779", "0.41058967", "0.41032633", "0.40996584", "0.40940866", "0.40850773", "0.40791932", "0.4078386", "0.40776557", "0.40579754", "0.4055758", "0.4051471", "0.40512478", "0.40507734", "0.40495747", "0.4048992", "0.4043509", "0.4042207", "0.40412495", "0.4039865", "0.40389076", "0.40290976", "0.4026514", "0.40263122", "0.4025907" ]
0.6106232
1
Cancels or wait for partition destroy.
public void cancelOrWaitPartitionDestroy(int grpId, int partId) throws IgniteCheckedException { Checkpointer cp = checkpointer; if (cp != null) cp.cancelOrWaitPartitionDestroy(grpId, partId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int destroyEvictedPartitions() throws IgniteCheckedException {\n PartitionDestroyQueue destroyQueue = curCpProgress.destroyQueue;\n\n if (destroyQueue.pendingReqs.isEmpty())\n return 0;\n\n List<PartitionDestroyRequest> reqs = null;\n\n for (final PartitionDestroyRequest req : destroyQueue.pendingReqs.values()) {\n if (!req.beginDestroy())\n continue;\n\n final int grpId = req.grpId;\n final int partId = req.partId;\n\n CacheGroupContext grp = cctx.cache().cacheGroup(grpId);\n\n assert grp != null\n : \"Cache group is not initialized [grpId=\" + grpId + \"]\";\n assert grp.offheap() instanceof GridCacheOffheapManager\n : \"Destroying partition files when persistence is off \" + grp.offheap();\n\n final GridCacheOffheapManager offheap = (GridCacheOffheapManager) grp.offheap();\n\n Runnable destroyPartTask = () -> {\n try {\n offheap.destroyPartitionStore(grpId, partId);\n\n req.onDone(null);\n\n if (log.isDebugEnabled())\n log.debug(\"Partition file has destroyed [grpId=\" + grpId + \", partId=\" + partId + \"]\");\n }\n catch (Exception e) {\n req.onDone(new IgniteCheckedException(\n \"Partition file destroy has failed [grpId=\" + grpId + \", partId=\" + partId + \"]\", e));\n }\n };\n\n if (asyncRunner != null) {\n try {\n asyncRunner.execute(destroyPartTask);\n }\n catch (RejectedExecutionException ignore) {\n // Run the task synchronously.\n destroyPartTask.run();\n }\n }\n else\n destroyPartTask.run();\n\n if (reqs == null)\n reqs = new ArrayList<>();\n\n reqs.add(req);\n }\n\n if (reqs != null)\n for (PartitionDestroyRequest req : reqs)\n req.waitCompleted();\n\n destroyQueue.pendingReqs.clear();\n\n return reqs != null ? reqs.size() : 0;\n }", "public void destroyPartition(int nPid);", "@PreDestroy\n public void preDestroy() {\n scheduledFuture.cancel(true);\n execService.shutdown();\n }", "public void schedulePartitionDestroy(int grpId, int partId) {\n Checkpointer cp = checkpointer;\n\n if (cp != null)\n cp.schedulePartitionDestroy(cctx.cache().cacheGroup(grpId), grpId, partId);\n }", "public void destroy() throws RemoteException {\n\t\tlog.warning(\"destroy call, enabled: \"+destroy);\n\t\tif( destroy ) {\n\t\t\tnew Thread() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry { Thread.sleep(3); } catch( InterruptedException ex ) {}\n\t\t\t\t\tlog.log(Level.INFO, \"Service Stop requested: \"+new Date() );\n\t\t\t\t\tSystem.exit(1);\n\t\t\t\t}\n\t\t\t}.start();\n\t\t} else {\n\t\t\tthrow new RemoteException( \"Service Destroy Not Enabled, Operation Ignored\" );\n\t\t}\n\t}", "protected void delete () {\n OleThreadRequest request = \n new OleThreadRequest(DELETE,\n 0, 0, 0, 0);\n synchronized (this) {\n messagesWaiting.add(request);\n notify();\n }\n while (!request.finished) { \n synchronized(request) {\n try {\n request.wait(POLL_FOR_RESULT_HEARTBEAT);\n }\n catch (InterruptedException e) { \n }\n } \n }\n }", "@Override\n public void delayDeleteReplica() {\n try {\n semaphore.acquire(1);\n } catch (InterruptedException e) {\n // ignore.\n }\n }", "public synchronized void waitForDestruction() {\n try {\n wait();\n } catch (InterruptedException ex) {\n ZenProperties.logger.log(Logger.WARN,\n getClass(), \"waitForDestruction\",\n \"WaitForDestruction for ObjectKey: Interrupted\", ex);\n }\n }", "@Override\n public void removePartition(Partition partition) {\n \n }", "@PreDestroy\r\n public void destroy() {\r\n log.info(\"Executor will be shut down\");\r\n\r\n executor.shutdown();\r\n try {\r\n if (!executor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n executor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n executor.shutdownNow();\r\n }\r\n\r\n brokerExecutor.shutdown();\r\n try {\r\n if (!brokerExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n brokerExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n brokerExecutor.shutdownNow();\r\n }\r\n\r\n logExecutor.shutdown();\r\n try {\r\n if (!logExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n logExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n logExecutor.shutdownNow();\r\n }\r\n\r\n log.info(\"Executor shutdown complete!\");\r\n }", "public void evictPartitionAsync(GridDhtLocalPartition part) {\n evictionQueue.putIfAbsent(part.id(), part);\n\n if (evictionRunning.compareAndSet(false, true)) {\n ctx.kernalContext().closure().callLocalSafe(new GPC<Boolean>() {\n @Override public Boolean call() {\n boolean locked = true;\n\n long nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n\n while (locked || !evictionQueue.isEmpty()) {\n if (!locked && !evictionRunning.compareAndSet(false, true))\n return false;\n\n try {\n for (GridDhtLocalPartition part : evictionQueue.values()) {\n // Show progress of currently evicting partitions.\n if (U.currentTimeMillis() >= nextShowProgressTime) {\n if (log.isInfoEnabled())\n log.info(\"Eviction in progress [grp=\" + grp.cacheOrGroupName()\n + \", remainingCnt=\" + evictionQueue.size() + \"]\");\n\n nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n }\n\n try {\n boolean success = part.tryClear();\n\n if (success) {\n evictionQueue.remove(part.id());\n\n if (part.state() == GridDhtPartitionState.EVICTED && part.markForDestroy())\n part.destroy();\n }\n }\n catch (Throwable ex) {\n if (ctx.kernalContext().isStopping()) {\n LT.warn(log, ex, \"Partition eviction failed (current node is stopping).\",\n false,\n true);\n\n evictionQueue.clear();\n\n return true;\n }\n else\n LT.error(log, ex, \"Partition eviction failed, this can cause grid hang.\");\n }\n }\n }\n finally {\n if (!evictionQueue.isEmpty()) {\n if (ctx.kernalContext().isStopping()) {\n evictionQueue.clear();\n\n locked = false;\n }\n else\n locked = true;\n }\n else {\n boolean res = evictionRunning.compareAndSet(true, false);\n\n assert res;\n\n locked = false;\n }\n }\n }\n\n return true;\n }\n }, /*system pool*/ true);\n }\n }", "@Override\n public CompletableFuture<Void> delete() {\n return delete(false);\n }", "protected void processDestroy()\n {\n }", "@PreDestroy\n\tpublic void destroy() {\n\t\tthis.executorService.shutdown();\n\t}", "@Override\n public CompletableFuture<Void> deleteForcefully() {\n return delete(true);\n }", "void destroy() throws CouldNotDestroyConnectionPoolException, InterruptedException;", "public void detachPartition(Connection c, final String schema, final String table, final String partitionName) throws SQLException {\n // Get exclusive access to the table so that we can do all this work together\n final String tableName = schema + \".\" + table;\n final String LOCK_TABLE = \"LOCK TABLE \" + tableName + \" IN EXCLUSIVE MODE\";\n try (Statement s = c.createStatement()) {\n s.executeUpdate(LOCK_TABLE);\n }\n\n // Make up a brand new table name we detach into. This table will later be dropped\n String tmp = UUID.randomUUID().toString().replace(\"-\", \"\");\n final String detachedName = schema + \".DRP_\" + table + \"_\" + tmp;\n\n // Now detach the partition\n final String DETACH = \"ALTER TABLE \" + tableName + \" DETACH PARTITION \" + partitionName + \" INTO \" + detachedName;\n try (Statement s = c.createStatement()) {\n s.executeUpdate(DETACH);\n }\n \n // The table detachedName will be dropped later\n }", "@Test\r\n\tpublic void testChildDestroyed() throws InterruptedException {\r\n\t\t\r\n\t\tParallelJob test = new ParallelJob();\r\n\t\ttest.setExecutorService(new NowExecutor());\r\n\r\n\t\tDestroyJob destroy = new DestroyJob();\r\n\t\t\r\n\t\ttest.setJobs(0, destroy);\r\n\t\t\r\n\t\tStateSteps steps = new StateSteps(test);\r\n\t\tsteps.startCheck(ParentState.READY, \r\n\t\t\t\tParentState.EXECUTING, ParentState.ACTIVE,\r\n\t\t\t\tParentState.COMPLETE);\r\n\t\t\r\n\t\ttest.run();\r\n\t\t\r\n\t\tsteps.checkNow();\r\n\t\t\r\n\t\tsteps.startCheck(\r\n\t\t\t\tParentState.COMPLETE, ParentState.DESTROYED);\r\n\t\t\r\n\t\ttest.destroy();\r\n\t\t\r\n\t\ttest.setJobs(0, null);\r\n\t\t\r\n\t\tdestroy.destroy();\r\n\t\t\r\n\t\tsteps.checkNow();\r\n\t\t\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n private PollerFlux<PollResult<Void>, Void> beginDeallocateAsync(\n String resourceGroupName, String vmScaleSetName, String instanceId, Context context) {\n context = this.client.mergeContext(context);\n Mono<Response<Flux<ByteBuffer>>> mono =\n deallocateWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context);\n return this\n .client\n .<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);\n }", "public void destroy() throws Exception;", "@Override\n public Void run() throws KeeperException, InterruptedException {\n if (zkClient.exists(path, true) == null) {\n LOG.error(\"Trying to delete a path (\" + path\n + \") that doesn't exist.\");\n }\n zkClient.delete(path, version);\n return null;\n }", "public void destroy() throws IOException, InterruptedException {\n LOGGER.info(\"Trading bot shutting down, will first cancel all open orders\");\n this.sessionHandler.onShutDown(this.session);\n }", "public void terminate() {\n TerminalAtomics.cancel(this, REQUESTED);\n UNSAFE.putOrderedObject(this, REMOVE, null);\n }", "public void destroy() {\n this.running = false;\n\n try {\n this.join();\n } catch (InterruptedException e) {\n RayonCore.LOGGER.error(\"Error joining \" + getName());\n e.printStackTrace();\n }\n }", "default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }", "@PreDestroy\r\n\t@Override\r\n\tpublic void terminate()\r\n\t{\r\n\t\tthis.cleanUpDone = true;\r\n\t\tthis.isRunning = false;\r\n\t\tthis.priceMap.clear();\r\n\t\tthis.priceUpdateBlockingQueue.clear();\r\n\t\tthis.executorService.shutdownNow();\r\n\t\t\r\n\t\tif(logger.isInfoEnabled())\r\n\t\t\tlogger.info(\"Termination of price service has been completed successfully.\");\r\n\t}", "public void delete() {\n Utils.inWriteLock(leaderIsrUpdateLock, () -> {\n assignedReplicaMap.clear();\n Set<Replica> inSyncReplicas = Sets.newHashSet();\n leaderReplicaIdOpt = Optional.empty();\n logManager.deleteLog(new TopicAndPartition(topic, partitionId));\n// error(String.format(\"Error deleting the log for partition <%s,%d>\", topic, partitionId), e);\n// Runtime.getRuntime().halt(1);\n return null;\n });\n }", "@Override\n\tprotected void destoryInternal() throws LifecycleException {\n\t\t\n\t}", "public void destroy() throws Exception {\n\t\t\r\n\t}", "@Override\r\n\tpublic void destroy() throws Exception {\n\t\t\r\n\t}", "public abstract void destroy() throws Exception;", "public void end_destroy(Ice.AsyncResult __iresult)\n {\n __end(__iresult, __destroy_name);\n }", "public void destroy() throws BridgeException, BrokerException;", "synchronized void destroy() {\n destroyed = true;\n }", "@Override\n public CompletableFuture<Void> doUnsubscribe(Consumer consumer) {\n CompletableFuture<Void> future = new CompletableFuture<>();\n try {\n if (dispatcher.canUnsubscribe(consumer)) {\n consumer.close();\n return delete();\n }\n future.completeExceptionally(\n new ServerMetadataException(\"Unconnected or shared consumer attempting to unsubscribe\"));\n } catch (BrokerServiceException e) {\n log.warn(\"Error removing consumer {}\", consumer);\n future.completeExceptionally(e);\n }\n return future;\n }", "void afterDelete(T resource);", "public void destroy() {\n synchronized (monitor) {\n while (!queue.isEmpty()) {\n queue.poll().node.discard();\n }\n destroyed = true;\n }\n }", "public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(\n String resourceGroupName, String vmScaleSetName, String instanceId, Context context) {\n context = this.client.mergeContext(context);\n Mono<Response<Flux<ByteBuffer>>> mono =\n deleteWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId, context);\n return this\n .client\n .<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);\n }", "@Override\n public Event delete(Ec2LaunchConfiguration oldResource) {\n return null;\n }", "@Override\n\tpublic void destroy() throws Exception {\n\t\t\n\t}", "void deactivate() throws ResourceActivatorException, InterruptedException, ExecutionException;", "public final void destroy() {\n requestExit();\n }", "public void destroyTopic(String topic) {\n\n\t}", "@FXML\n void confirm() throws IOException {\n SystemMain.tagManager.deleteTag(tagToDelete);\n parent.refresh();\n stage.close();\n }", "private CompletableFuture<Void> delete(boolean closeIfConsumersConnected) {\n CompletableFuture<Void> deleteFuture = new CompletableFuture<>();\n\n log.info(\"[{}][{}] Unsubscribing\", topicName, subName);\n\n CompletableFuture<Void> closeSubscriptionFuture = new CompletableFuture<>();\n\n if (closeIfConsumersConnected) {\n this.disconnect().thenRun(() -> {\n closeSubscriptionFuture.complete(null);\n }).exceptionally(ex -> {\n log.error(\"[{}][{}] Error disconnecting and closing subscription\", topicName, subName, ex);\n closeSubscriptionFuture.completeExceptionally(ex);\n return null;\n });\n } else {\n this.close().thenRun(() -> {\n closeSubscriptionFuture.complete(null);\n }).exceptionally(exception -> {\n log.error(\"[{}][{}] Error closing subscription\", topicName, subName, exception);\n closeSubscriptionFuture.completeExceptionally(exception);\n return null;\n });\n }\n\n // cursor close handles pending delete (ack) operations\n closeSubscriptionFuture.thenCompose(v -> topic.unsubscribe(subName)).thenAccept(v -> {\n synchronized (this) {\n (dispatcher != null ? dispatcher.close() : CompletableFuture.completedFuture(null)).thenRun(() -> {\n log.info(\"[{}][{}] Successfully deleted subscription\", topicName, subName);\n deleteFuture.complete(null);\n }).exceptionally(ex -> {\n IS_FENCED_UPDATER.set(this, FALSE);\n if (dispatcher != null) {\n dispatcher.reset();\n }\n log.error(\"[{}][{}] Error deleting subscription\", topicName, subName, ex);\n deleteFuture.completeExceptionally(ex);\n return null;\n });\n }\n }).exceptionally(exception -> {\n IS_FENCED_UPDATER.set(this, FALSE);\n log.error(\"[{}][{}] Error deleting subscription\", topicName, subName, exception);\n deleteFuture.completeExceptionally(exception);\n return null;\n });\n\n return deleteFuture;\n }", "public void handleDeleteParts()\n {\n Part partToDelete = getPartToModify();\n\n if (partToDelete != null) {\n\n // Ask user for confirmation to remove the product from part table\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation\");\n alert.setHeaderText(\"Delete Confirmation\");\n alert.setContentText(\"Are you sure you want to delete this part?\");\n ButtonType confirm = new ButtonType(\"Yes\", ButtonBar.ButtonData.YES);\n ButtonType deny = new ButtonType(\"No\", ButtonBar.ButtonData.NO);\n ButtonType cancel = new ButtonType(\"Cancel\", ButtonBar.ButtonData.CANCEL_CLOSE);\n alert.getButtonTypes().setAll(confirm, deny, cancel);\n alert.showAndWait().ifPresent(type ->{\n if (type == confirm)\n {\n inventory.deletePart(partToDelete);\n updateParts();\n }\n });\n\n } else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Input Invalid\");\n alert.setHeaderText(\"No part was selected!\");\n alert.setContentText(\"Please select a part to delete from the part table!\");\n alert.show();\n }\n // Unselect parts in table after part is deleted\n partTable.getSelectionModel().clearSelection();\n }", "public void destroy() {\n\t\ttry {\n\t\t\tdestroy(10000);\n\t\t}\n\t\tcatch(SQLException e) {}\n\t}", "public void destroy() {\n \n }", "@PreDestroy\n\tprivate void fini() throws Exception {\n\t\tListQueuesResult result = amazonSQSClient.listQueues();\n\t\tfor (String queueURL : result.getQueueUrls()) {\n\t\t\tamazonSQSClient.deleteQueue(queueURL);\n\t\t}\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public PollerFlux<PollResult<Void>, Void> beginDeallocateAsync(\n String resourceGroupName, String vmScaleSetName, String instanceId) {\n Mono<Response<Flux<ByteBuffer>>> mono =\n deallocateWithResponseAsync(resourceGroupName, vmScaleSetName, instanceId);\n return this\n .client\n .<Void, Void>getLroResult(\n mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());\n }", "@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }", "public void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteQueuedResourceMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "public void destroy() {}", "public void destroy() {}", "@Override\n\tpublic void dropAndDestroy() {\n\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n public SyncPoller<PollResult<Void>, Void> beginDeallocate(\n String resourceGroupName, String vmScaleSetName, String instanceId, Context context) {\n return beginDeallocateAsync(resourceGroupName, vmScaleSetName, instanceId, context).getSyncPoller();\n }", "private void deleteVHost(RoutingContext routingContext) {\n LOGGER.debug(\"Info: deleteVHost method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/vhost\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n String vhostId = routingContext.request().getParam(JSON_VHOST_ID);\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.deleteVHost(vhostId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Deleting vhost\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request;\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "@PreDestroy\n void destroy()\n {\n final org.apache.sshd.SshServer sshServer = this.sshServer;\n if( sshServer != null )\n {\n LOG.info( \"SSH server module is deactivating\" );\n stopSshServer( sshServer );\n }\n }", "@PreDestroy\n public void destroy() {\n System.out.println(\"kafka-flink is closing...\");\n }", "protected void end() {\n \tRobot.driveSubsystem.stopDrivingNow();\n }", "protected void attemptDeletion()\n {\n if ( this.nmsEntity != null )\n {\n this.nmsEntity.destroyHologramEntity();\n }\n // Setting all variables to null\n this.nmsEntity = null;\n this.location = null;\n }", "@Request(id = 8, retryable = false, response = ResponseMessageConst.VOID)\n void destroy(String name);", "@Override\n protected void doStop() throws StopException {\n try {\n LifecycleHelper.stopIfPossible(allocator);\n } catch (StopException e) {\n logger.error(\"[stop][stop allocator error]\", e);\n }\n if (future != null) {\n future.cancel(true);\n future = null;\n }\n super.doStop();\n }", "protected void unacknowledge() {\n\n ClientConsumer old = consumer;\n ClientSession oldSession = session;\n\n try {\n createSession();\n } catch (Exception e) {\n shutdown();\n throw new RuntimeException(e);\n\n } finally {\n try {\n old.close();\n } catch (ActiveMQException e) {\n }\n try {\n oldSession.close();\n } catch (ActiveMQException e) {\n }\n }\n }", "public void ejectTicket(){if(this.inProgress()){this.currentTicket=null;}}", "@Test\n public void constructAndStop() {\n kit.stopAsync();\n kit.awaitTerminated();\n }", "void stopOnCompletion(Thread waiting);", "public void destroy() {\n }", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(String resourceGroupName, String systemTopicName, Context context);", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void destroy()\n {\n lock.lock();\n try {\n if(isDestroyed) return;\n isDestroyed = true;\n } finally {\n lock.unlock();\n }\n for(int i=0; i<numChannel; ++i) \n {\n if(pvaClientChannelArray!=null) pvaClientChannelArray[i].destroy();\n pvaClientChannelArray[i] = null;\n }\n pvaClientChannelArray = null;\n }", "public void proposalDeleted(long pid) throws RemoteException {\n\n\t\tlogger.create().block(\"proposalDeleted\").info().level(1).msg(\n\t\t\t\t\"Adding deleteProposal request to update queue for pid: \" + pid).send();\n\t}", "private int destroyBridgeOnHost() {\n\t\t//should still run, it's safer and more resource-friendly to run even when it's non-existent\n\t\t//if (state == BridgeState.NON_EXISTENT) {\n\t\t//\tDebug.debug(\"destroyBridgeOnHost() called when subnet doesn't exist\");\n\t\t//\treturn 0;\n\t\t//}\n\t\tupdateTask.destroyCalled();\n\t\tupdateTimer.cancel();\n\n\t\tString locDestroyScript = scriptDirectory + \"/destroy_subnet.sh\";\n\t\t\n\t\tProcessBuilder pb = new ProcessBuilder(locDestroyScript, Long.toString(subnetID));\n\t\tpb.environment().put(\"SUBNWNAME\", Long.toString(subnetID));\n\t\t\n\t\tProcess p;\n\t\ttry {\n\t\t\tp = pb.start();\n\t\t\tprocessMap.put(\"destroy\", p);\n\t\t\t\n\t\t\tstate = BridgeState.NON_EXISTENT;\n\t\t\treturn 1;\n\t\t} catch (Exception e) {\n\t\t\tDebug.redDebug(\"Error with executing destroy_subnet.sh\");\n\t\t\treturn 0;\n\t\t}\n\t}", "public void destroy() throws ContextDestroyException;", "public void MarkForDeletion();", "void destroy() {\n if (this.consumerContext != null) {\n //this.consumerContext.close();\n this.consumerContext = null;\n }\n }", "private void shutdown() {\n log.info(\"Shutting down\");\n kafka.shutdown();\n zookeeper.shutdown();\n }", "@AfterClass(alwaysRun = true)\n public void forceVaultRemoval() {\n Vault vault = api().getVault(vaultName);\n if (vault != null) {\n if ((vault.properties().enableSoftDelete() != null) && vault.properties().enableSoftDelete()) {\n api().deleteVault(vaultName);\n checkState(deletedVaultStatus.create(resourceGroupName, true).apply(vaultName),\n \"vault was not deleted before timeout\");\n } else {\n return;\n }\n }\n\n DeletedVault deletedVault = api().getDeletedVault(LOCATION, vaultName);\n if (deletedVault != null) {\n api().purgeVault(LOCATION, vaultName);\n checkState(deletedVaultStatus.create(resourceGroupName, false).apply(vaultName),\n \"vault was not purged before timeout\");\n }\n }", "public void setDestroy() {\n\t\tdisparos--;\n\t\tif(disparos<=0) {\n\t\t\tdestroy=true;\n\t\t}\n\t}", "protected void dropDetachedPartitionTables(PhysicalDataModel pdm, TenantInfo tenantInfo) {\n // In a new transaction, drop any of the tables that were created by\n // the partition detach operation.\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n\n try {\n pdm.dropDetachedPartitions(adapter, tenantInfo.getTenantSchema(), tenantInfo.getTenantId());\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n \n // We can drop the tenant's tablespace only after all the table drops have been committed\n logger.info(\"Dropping tablespace for tenant \" + tenantInfo.getTenantId() + \"/\" + tenantName);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n\n try {\n // With all the objects removed, it should be safe to remove the tablespace\n pdm.dropTenantTablespace(adapter, tenantInfo.getTenantId());\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n\n // Now all the table partitions have been allocated, we can mark the tenant as dropped\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n adapter.updateTenantStatus(adminSchemaName, tenantInfo.getTenantId(), TenantStatus.DROPPED);\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n } \n }", "public void destroy() {\n }", "public void destroy() {\n }", "public void waitStop() throws InterruptedException {\n if (Thread.currentThread() == thread) {\n throw new RuntimeException(\n \"waitStop() may not be invoked from job queue (would lead to deadlock).\");\n }\n synchronized (this) {\n if (!started || stopped) {\n return;\n }\n stopped = true;\n }\n stop.await();\n }", "public void destroy() {\r\n if (isDestroyed) {\r\n return;\r\n }\r\n isDestroyed = true;\r\n IOUtil.safeDelete(fileA);\r\n IOUtil.safeDelete(fileB);\r\n }", "public void destroy() throws RemoteException {\n Thread thread = new Thread() {\n public void run() {\n //System.setProperty(\"terminatingHello\", \"true\");\n //System.err.println(\"Shutting down service\");\n //System.err.println(\"Terminating - checking activation ID\");\n\n try {\n AdmActFilterImpl.super.destroy();\n\n activatableFactory.unregister(activationAdapter.getActivationID());\n\n System.out.println(\"destroyed!\");\n\n/* while (!Activatable.inactive(id)) {\n Thread.yield();\n }\n\n ActivationSystem activationSystem = ActivationGroup.getSystem();\n\n ActivationDesc activationDesc = activationSystem.getActivationDesc(id);\n\n ActivationGroupID gid = activationDesc.getGroupID();\n\n activationSystem.unregisterGroup(gid);\n*/\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n };\n\n thread.setDaemon(false);\n thread.start();\n }", "void terminate() {\r\n\t\t\t\tif (done.compareAndSet(false, true)) {\r\n\t\t\t\t\tlatch.countDown();\r\n\t\t\t\t}\r\n\t\t\t}", "void terminate() {\r\n\t\t\t\tif (done.compareAndSet(false, true)) {\r\n\t\t\t\t\tlatch.countDown();\r\n\t\t\t\t}\r\n\t\t\t}" ]
[ "0.6571374", "0.65581405", "0.57555574", "0.563162", "0.5559715", "0.55100906", "0.5462005", "0.5415651", "0.5399048", "0.53890634", "0.5272695", "0.52325517", "0.5215394", "0.51633936", "0.50566924", "0.50404453", "0.5035524", "0.50165015", "0.49847794", "0.4958882", "0.49307367", "0.48741266", "0.48425218", "0.48381764", "0.48274004", "0.48146105", "0.4809091", "0.48068616", "0.48030043", "0.47550404", "0.47495925", "0.4739657", "0.4724498", "0.47155514", "0.47097582", "0.47002137", "0.46989068", "0.46978974", "0.4678242", "0.46674067", "0.4662197", "0.4661096", "0.46594718", "0.462574", "0.46203592", "0.46050176", "0.46024385", "0.45993212", "0.45975268", "0.45947778", "0.45914719", "0.45896146", "0.45895612", "0.45895308", "0.4587521", "0.4587521", "0.4581231", "0.4575862", "0.4575718", "0.45754316", "0.456846", "0.45662826", "0.45625994", "0.45625266", "0.4560076", "0.4555013", "0.45537692", "0.4550942", "0.45481843", "0.45478803", "0.45268798", "0.4518304", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45178133", "0.45158502", "0.4508656", "0.45080584", "0.45050806", "0.4505064", "0.45041722", "0.4500142", "0.44987002", "0.4498529", "0.44962326", "0.44866684", "0.44866684", "0.4485077", "0.44824132", "0.44803026", "0.4476455", "0.4476455" ]
0.7079282
0
Timeout for checkpoint read lock acquisition.
@Override public long checkpointReadLockTimeout() { return checkpointReadLockTimeout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public void checkpointReadLockTimeout(long val) {\n checkpointReadLockTimeout = val;\n }", "private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException {\n String msg = \"Checkpoint read lock acquisition has been timed out.\";\n\n IgniteException e = new IgniteException(msg);\n\n if (cctx.kernalContext().failure().process(new FailureContext(SYSTEM_CRITICAL_OPERATION_TIMEOUT, e)))\n throw e;\n\n throw new CheckpointReadLockTimeoutException(msg);\n }", "long tryReadLock(long timeout) throws InterruptedException;", "public long readTimeout(){\n return 0l; //TODO codavaj!!\n }", "long getTimeout();", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "@Override\n public int getTxTimeoutInMillis() {\n return Globals.lockingTimeout;\n }", "public long timeout(long timeout);", "public int getReadTimeout();", "public long GetTimeout() { return timeout; }", "int getTimeout();", "public long getTimeout() { return timeout; }", "public int getTimeout();", "public void setReadTimeout(int readTimeout){\n return; //TODO codavaj!!\n }", "private void checkTimeout() {\n/* 169 */ if (this.socket != null) {\n/* */ \n/* 171 */ long i = this.keepaliveTimeoutMs;\n/* */ \n/* 173 */ if (this.listRequests.size() > 0)\n/* */ {\n/* 175 */ i = 5000L;\n/* */ }\n/* */ \n/* 178 */ long j = System.currentTimeMillis();\n/* */ \n/* 180 */ if (j > this.timeLastActivityMs + i)\n/* */ {\n/* 182 */ terminate(new InterruptedException(\"Timeout \" + i));\n/* */ }\n/* */ } \n/* */ }", "@Override\n public void timeout(CellPath path)\n {\n retry(task, SMALL_DELAY);\n }", "public LWTRTPdu timeout() throws IncorrectTransitionException;", "@Override\n public void timeout(CellPath path) {\n retry(task, SMALL_DELAY);\n }", "int hardTimeout();", "public int getConnectionTimeout();", "public int getNortpTimeout();", "private void checkTimeout() {\n val timeout = config.getInt(\"timeout\");\n\n checkArgument(timeout >= 1000, \"timeout is less than 1000!\");\n }", "public int getTimeout() {\r\n return timeout;\r\n }", "@Override\n public void setTxTimeoutInMillis(int ms) {\n Globals.lockingTimeout = ms;\n }", "long tryWriteLockThrowOnTimeout() throws IOException;", "public int getTimeout() {\n return timeout;\n }", "@Test\n public void testTimeout() throws Exception {\n ProduceRequestResult request = new ProduceRequestResult(topicPartition);\n FutureRecordMetadata future = new FutureRecordMetadata(request, relOffset,\n RecordBatch.NO_TIMESTAMP, 0, 0, Time.SYSTEM);\n assertFalse(future.isDone(), \"Request is not completed\");\n try {\n future.get(5, TimeUnit.MILLISECONDS);\n fail(\"Should have thrown exception.\");\n } catch (TimeoutException e) { /* this is good */\n }\n\n request.set(baseOffset, RecordBatch.NO_TIMESTAMP, null);\n request.done();\n assertTrue(future.isDone());\n assertEquals(baseOffset + relOffset, future.get().offset());\n }", "void lockTimeout(String lock,int seconds);", "public int getTimeout() {\n return params.getTimeout() * 1000;\n }", "public int getInCallTimeout();", "@Override\n\tpublic long getOpTimeout() {\n\t\treturn 0;\n\t}", "public void handleTimeout();", "public void enquireTimeout(Long sessionId);", "private void blockOnLock(final int timeout) {\n synchronized (sERDLock) {\n try {\n sERDLock.wait(timeout);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "Future timeoutIn(long timeout, TimeUnit timeUnit);", "public long getTimeout() {\n return timeout;\n }", "public long getTimeout() {\n return timeout;\n }", "public long getTimeout() {\n return timeout;\n }", "void awaitNanos(final long timeout) throws InterruptedException;", "public void setCheckTimeout(long checkTimeout) {\n this.checkTimeout = checkTimeout;\n }", "protected void onTimeout() {\n }", "Integer getStartTimeout();", "public long getTimeout() {\r\n return configuration.getTimeout();\r\n }", "public E peek(long timeout, TimeUnit timeUnit) throws InterruptedException;", "public abstract void onTimeout();", "public int connectTimeout(){\n return 0; //TODO codavaj!!\n }", "@Override\n\tpublic void setOpTimeout(long arg0) {\n\n\t}", "int timeout();", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public void onTimeout();", "@Test\n public void readTryLockInTimeFailedTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final CountDownLatch countDownLatch = new CountDownLatch(2);\n final List<Integer> result = new ArrayList<Integer>();\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n testUse.minusCountAndSleepInWriteLock(2000);\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n Thread.sleep(10);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Integer r = testUse.getCountInReadTryLock(1000);\n if(r !=null){\n result.add(r);\n }\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n countDownLatch.await();\n Assert.assertEquals(0, result.size());\n }", "public native void setDefaultRetryTimeout (long retryTimeout) throws IOException,IllegalArgumentException;", "public abstract void isTimeout(long ms);", "public void setTimeout(int timeout);", "public void logReadWait()\n {\n try{\n waitLock.lock();\n while(logReadSector != -1){\n \t logReadDone.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "@Override\n public ConfigurationImpl setNetworkCheckTimeout(int timeout) {\n this.networkCheckTimeout = timeout;\n return this;\n }", "Object get(long timeout) throws RpcException;", "public int getHardwareTimeout();", "V get(long timeout, TimeUnit timeUnit) throws PromiseBrokenException, TimeoutException, InterruptedException;", "public native long getConnectionLingerTime() throws IOException,IllegalArgumentException;", "public int explicitWait(){\n\t\tString time_out = null;\n\t\ttry {\n\t\t\ttime_out = new AutomationConfigurator().getTimeOut();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tif (time_out == null){\n\t\t\treturn default_timeout;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Integer.parseInt(time_out);\n\t\t}\n\t}", "@Override\n\tpublic long getConnectTimeout() {\n\t\treturn 0;\n\t}", "long getInvalidLoginLockoutTime();", "@Test\r\n void timeoutNotExceeded() {\n assertTimeout(ofMinutes(2), () -> {\r\n // Perform task that takes less than 2 minutes.\r\n });\r\n }", "T setStartTimeout(Integer timeout);", "void setOperationTimeout(int timeout) throws RemoteException;", "void handleTimeoutTask();", "@Override\n public void timeout(CellPath path) {\n fail(task, CacheException.TIMEOUT,\n \"No reply from \" + path);\n }", "@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }", "@Override\n public int getTransactionTimeout()\n {\n if (VFSStoreResource.LOG.isDebugEnabled()) {\n VFSStoreResource.LOG.debug(\"getTransactionTimeout\");\n }\n return 0;\n }", "public void setTimeout(int timeout) {\r\n\t\tconnTimeout = timeout;\r\n\t}", "protected void pktTimeout() {}", "public TestTimeout getTimeout() {\n return timeout;\n }", "final Long getTimeoutValue()\n/* */ {\n/* 137 */ return this.timeout;\n/* */ }", "protected int maxTimeout() { return 15*1000*1000; }", "void setTimeout(long timeoutInNanos);", "public int getTimeout() {\n\t\treturn (Integer)getObject(\"timeout\");\n\t}", "@Override\n public void onVersionFileDownloadTimeout() {\n\n }", "public void onTimeout(Runnable callback)\n/* */ {\n/* 148 */ this.timeoutCallback = callback;\n/* */ }", "@Override\n default ManagerPrx ice_timeout(int t)\n {\n return (ManagerPrx)_ice_timeout(t);\n }", "public void setTimeout(double timeout){\n this.timeout = timeout;\n }", "@Override\n\tpublic void setConnectTimeout(long arg0) {\n\n\t}", "@Override\r\n public long getTimeouts()\r\n {\n return 0;\r\n }", "public long getTransactionTimeout()\n {\n return _transactionTimeout;\n }", "@Test(expected = TimeoutException.class)\n public void testConsistencyTimeOut() throws Exception {\n service.setCallsToConsistency(10);\n backoff.setMaxTries(8);\n tableAdminClient.waitForReplication(TABLE_NAME, backoff);\n }", "public int getRelativeTimeoutMillisForAttempt(AsyncOperation op, int attemptIndex);", "public WriteTimeoutException()\n {\n super();\n }", "abstract protected long getDefaultRelTimeoutMillis();", "public long remainingTime() throws IgniteTxTimeoutCheckedException;", "public Duration timeout() {\n return this.timeout;\n }", "public void setTimeout(final long timeout);", "public int getTimeout() {\r\n\t\treturn connTimeout;\r\n\t}", "public int getConnectionTimeout(Env env) {\n return client.getConnectTimeout();\n }", "public void setNortpTimeout(int seconds);", "public Integer getAcquireTimeoutMillis() {\n return pool.getAcquireTimeoutMillis();\n }", "public int receiveTimeout(){\n return 0; //TODO codavaj!!\n }", "public boolean tryAcquire(String key, String owner, long timeout, TimeUnit timeUnit);", "public static long getImageLoadingTimeout() {\n return ImageLoader.getTimeout();\n }", "public int getDefaultTimeout() {\n return defaultTimeout;\n }", "long tryWriteLock(long timeout) throws InterruptedException;" ]
[ "0.7769675", "0.73597586", "0.66802305", "0.65955114", "0.65343505", "0.6429208", "0.6332963", "0.6308087", "0.6301075", "0.6283154", "0.6226252", "0.6208478", "0.6201492", "0.6164541", "0.6109191", "0.6107884", "0.60101384", "0.5987106", "0.5903267", "0.58320355", "0.57676095", "0.5759848", "0.57490134", "0.57310706", "0.57223374", "0.56904376", "0.56894046", "0.5637682", "0.5629808", "0.5625005", "0.5622771", "0.5622519", "0.5620874", "0.561135", "0.5608018", "0.5607286", "0.5607286", "0.5607286", "0.5593172", "0.5590562", "0.55746055", "0.55620605", "0.5550493", "0.554688", "0.5541851", "0.55396336", "0.55392224", "0.55367005", "0.55270696", "0.55249214", "0.5486826", "0.54746103", "0.54739225", "0.5468564", "0.54644513", "0.5463785", "0.54619646", "0.54448366", "0.54432964", "0.544218", "0.5425723", "0.5422456", "0.54158366", "0.5408186", "0.54077166", "0.53956753", "0.5394279", "0.53915274", "0.5384036", "0.5368709", "0.53672934", "0.535204", "0.53478646", "0.5333935", "0.53287953", "0.5325613", "0.53193074", "0.53184676", "0.53069896", "0.5303876", "0.5303147", "0.5302163", "0.5293446", "0.52924126", "0.5271185", "0.52658075", "0.5261133", "0.52580124", "0.5244138", "0.52401495", "0.52399844", "0.5230255", "0.52263117", "0.5213488", "0.52109545", "0.5209531", "0.52041733", "0.52034926", "0.5203036", "0.52012503" ]
0.7936599
0
Sets timeout for checkpoint read lock acquisition.
@Override public void checkpointReadLockTimeout(long val) { checkpointReadLockTimeout = val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public long checkpointReadLockTimeout() {\n return checkpointReadLockTimeout;\n }", "public void setReadTimeout(int readTimeout){\n return; //TODO codavaj!!\n }", "T setStartTimeout(Integer timeout);", "void setOperationTimeout(int timeout) throws RemoteException;", "@Override\n public ConfigurationImpl setNetworkCheckTimeout(int timeout) {\n this.networkCheckTimeout = timeout;\n return this;\n }", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "@Override\n\tpublic void setOpTimeout(long arg0) {\n\n\t}", "public void setTimeout(double timeout){\n this.timeout = timeout;\n }", "public long timeout(long timeout);", "public void setTimeout(int timeout) {\r\n\t\tconnTimeout = timeout;\r\n\t}", "public void setTimeout(long timeout)\r\n\t{\r\n\t\tthis.timeout = timeout;\r\n\t}", "@Override\n public void setTxTimeoutInMillis(int ms) {\n Globals.lockingTimeout = ms;\n }", "public void setTimeout(int timeout) {\r\n this.timeout = timeout;\r\n }", "public void setTimeout(long timeout) {\n\t\tthis.timeout = timeout;\n\t}", "public void setTimeout(int timeout) {\n this.timeout = timeout;\n }", "public void setCheckTimeout(long checkTimeout) {\n this.checkTimeout = checkTimeout;\n }", "private void failCheckpointReadLock() throws CheckpointReadLockTimeoutException, IgniteException {\n String msg = \"Checkpoint read lock acquisition has been timed out.\";\n\n IgniteException e = new IgniteException(msg);\n\n if (cctx.kernalContext().failure().process(new FailureContext(SYSTEM_CRITICAL_OPERATION_TIMEOUT, e)))\n throw e;\n\n throw new CheckpointReadLockTimeoutException(msg);\n }", "public void setTimeout(int timeout) {\r\n\t\tthis.TIMEOUT = timeout;\r\n\t}", "public void setTimeout( int timeout ) {\n this.timeout = timeout;\n }", "public void setTimeout(org.apache.axis.types.UnsignedInt timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(Integer timeout) {\n\t\tthis.timeout = timeout;\n\t}", "void setStartTimeout(int startTimeout);", "public native void setDefaultRetryTimeout (long retryTimeout) throws IOException,IllegalArgumentException;", "@Override\n\tpublic void setConnectTimeout(long arg0) {\n\n\t}", "public void setTimeout(final long timeout);", "public void setTimeout(int timeout);", "public void setTimeout(final int timeout) {\n this.timeout = timeout;\n }", "public long getTimeout() { return timeout; }", "public void setReadTimeout(int readTimeout) {\n synchronized (globalLock) {\n if (isRunning) {\n throw new IllegalStateException(\"Cannot set read timeout while WebSocketClient is running\");\n } else if (readTimeout < 0) {\n throw new IllegalStateException(\"Read timeout must be greater or equal than zero\");\n }\n this.readTimeout = readTimeout;\n }\n }", "public void setNortpTimeout(int seconds);", "public void setTimeOut(long timeOut) {\n _timeOut = timeOut;\n }", "@Override\n public void configure(ConfigParams configParams) throws ConfigException {\n this._timeout = configParams.getAsLongWithDefault(\"options.timeout\", this._timeout);\n }", "long getTimeout();", "@Override\n public int getTxTimeoutInMillis() {\n return Globals.lockingTimeout;\n }", "private void setTimedOut() {\n\t\tthis.timedOut.set(true);\n\t}", "public native void setKeepAliveTimeout (int timeout);", "public long readTimeout(){\n return 0l; //TODO codavaj!!\n }", "public void setTimeout(int newTimeout) {\n this.timeout = newTimeout;\n }", "void setTransactionTimeout(int seconds) throws SystemException;", "public TimeoutMetadata(long timeout) {\n super(instance);\n this.expiry = System.currentTimeMillis() + timeout;\n }", "public interface SetTimeout {\n /**\n * Mark next #wait to timeoutInNanos.\n *\n * @param timeoutInNanos\n */\n void setTimeout(long timeoutInNanos);\n}", "public long GetTimeout() { return timeout; }", "public void setTimeout(long t) {\n StepTimeout = t;\n }", "void setTimeout(long timeout) {\n if(timeout < 0) {\n throw new RuntimeException(buildMessage(\"Timeout value must be positive, not \" + timeout));\n }\n this.timeout = timeout;\n }", "public void setTimeout(int _timeout) {\n if (timeout < 0)\n return;\n timeout = _timeout;\n }", "public void setTimeout(final String timeout);", "public void setHttpClientTimeout(int timeout) {\n this.connectTimeout = timeout;\n this.customized = true;\n }", "@Test\r\n public void testSetTimeout() {\r\n // Not required\r\n }", "public Builder timeout(long timeout) {\r\n configurationBuilder.timeout(timeout);\r\n return this;\r\n }", "public void setLogOnTimeout(String timeout) {\n\t\tsetProperty(LOGON_TIMEOUT_PROP, timeout);\n\t}", "long tryReadLock(long timeout) throws InterruptedException;", "public SetIdleTimeoutCommand(int timeout) {\n this.timeout = timeout;\n }", "public Locks(long timeout, TimeUnit timeoutUnit) {\n timeoutMs = timeoutUnit.toMillis(timeout);\n }", "@Override\n public void setQueryTimeout( int x ) throws SQLException {\n timeout = x;\n }", "Builder withHardTimeout(int timeout);", "public void setConnectTimeout(int connectTimeout){\n return; //TODO codavaj!!\n }", "public void setLoginTimeout(int paramLoginTimeout) {\n\tiLoginTimeout = paramLoginTimeout ;\n }", "void setTimeout(long timeoutInNanos);", "public void setQueryTimeout(long timeout) {\n queryTimeout = timeout;\n }", "@Override\n public void timeout(CellPath path)\n {\n retry(task, SMALL_DELAY);\n }", "public int getReadTimeout();", "public final synchronized void setConnectionTimeout(final int timeout) {\n HttpConnectionParams.setConnectionTimeout(params, timeout);\n }", "public native void setDefaultEnqueueTimeout (long enqueueTimeout) throws IOException,IllegalArgumentException;", "private void blockOnLock(final int timeout) {\n synchronized (sERDLock) {\n try {\n sERDLock.wait(timeout);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "public void setConnectionTimeout(double connectionTimeout) {\n this.connectionTimeout = connectionTimeout;\n saveProperties();\n }", "public void setHttpClientRequestTimeout(int timeout) {\n this.requestTimeout = timeout;\n this.customized = true;\n }", "public int getTimeout();", "@Override\n public LocalIntCacheStream timeout(long timeout, TimeUnit unit) {\n return this;\n }", "@Override\r\n\tpublic void setLoginTimeout(int arg0) throws SQLException {\n\r\n\t}", "public ClientBuilder connectTimeout(int timeout) {\n this.connectTimeout = Predicates.bigThanZero(timeout);\n return this;\n }", "public LWTRTPdu timeout() throws IncorrectTransitionException;", "@Override\n public void timeout(CellPath path) {\n retry(task, SMALL_DELAY);\n }", "protected void setTimeout() {\r\n\t\tTimeout timeout = new Timeout();\r\n\t\tt.schedule(timeout, TIMEOUT);\r\n\t}", "AgentPolicyBuilder setPolicyTimeoutMs(long policyTimeoutMs);", "public void setConnTimeout(int connTimeout)\n {\n this._connTimeout = connTimeout;\n }", "public void setTimeout(final int timeout) {\r\n clock.setTimeout(timeout);\r\n }", "public void setDefaultTimeout(int defaultTimeout) {\n this.defaultTimeout = defaultTimeout;\n }", "public HttpClient setConnectionTimeout(Env env, NumberValue timeout) {\n client.setConnectTimeout(timeout.toInt());\n return this;\n }", "void setTimeout(@Nullable Duration timeout);", "public void setTimeOut(int value) {\n this.timeOut = value;\n }", "public ConnectInfo setKexTimeout(final int kexTimeout) {\n\t\tif(kexTimeout<0) throw new IllegalArgumentException(\"The passed kexTimeout [\" + kexTimeout + \"] was invalid\");\n\t\tthis.kexTimeout = kexTimeout;\n\t\treturn this;\n\t}", "void lockTimeout(String lock,int seconds);", "AgentPolicyBuilder setParallelCallbackTimeoutMs(long timeoutMs);", "@Override\n public void setRpcHandleTimeout(int rpcHandleTimeout) {\n // This value is ignored.\n }", "public void enquireTimeout(Long sessionId);", "public void setTransactionTimeout(Period period)\n {\n _transactionTimeout = period.getPeriod();\n }", "public void setInCallTimeout(int seconds);", "int getTimeout();", "public int getTimeout() {\r\n return timeout;\r\n }", "public void setConnectionTimeout(int connectionTimeout) {\r\n this.connectionTimeout = connectionTimeout;\r\n }", "public void setTimeouts(long readTimeout, long writeTimeout) throws FTD2XXException {\n ensureFTStatus(ftd2xx.FT_SetTimeouts(ftHandle, (int) readTimeout, (int) writeTimeout));\n }", "public void setTimeout(Long value) {\r\n timeout = value;\r\n incompatibleWithSpawn |= timeout != null;\r\n }", "public void setAllSoTimeout(int timeout) throws IOException {\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif (this.get(i).getClient() != null) {\n\t\t\t\tthis.get(i).getClient().setSoTimeout(timeout);\n\t\t\t}\n\t\t}\n\t}", "public TerminalPropertiesBuilder setExpectationTimeout(final long expectationTimeout) {\n this.expectationTimeout = expectationTimeout;\n return this;\n }", "Future timeoutIn(long timeout, TimeUnit timeUnit);", "public Delete timeout(long timeout){\n\t\taddParams(\"timeout\", timeout);\n\t\treturn this;\n\t}", "public long getTimeout() {\n return timeout;\n }", "public long getTimeout() {\n return timeout;\n }" ]
[ "0.72651666", "0.6606811", "0.6595531", "0.65893", "0.6526717", "0.6282084", "0.6282084", "0.6259204", "0.6246231", "0.6235751", "0.62350434", "0.6193738", "0.61805373", "0.6175492", "0.6139582", "0.6129395", "0.6096667", "0.60956997", "0.608583", "0.607702", "0.6071517", "0.60685724", "0.6067445", "0.6001778", "0.5997037", "0.5996114", "0.58957183", "0.58639586", "0.5862326", "0.5854666", "0.58504456", "0.5813629", "0.5800118", "0.57972383", "0.5796538", "0.5794173", "0.57836205", "0.5776729", "0.5759274", "0.57561463", "0.5755564", "0.5754651", "0.5751442", "0.57484674", "0.57324547", "0.57277757", "0.5724145", "0.5723649", "0.57230115", "0.571827", "0.571332", "0.5703165", "0.5703111", "0.5680527", "0.56433755", "0.5624886", "0.5611661", "0.5609104", "0.5605361", "0.56007284", "0.55857116", "0.5580355", "0.5560148", "0.554571", "0.5538045", "0.55170476", "0.5513684", "0.55037683", "0.54954034", "0.5488392", "0.54814994", "0.5454044", "0.54517865", "0.5450392", "0.54344946", "0.54322004", "0.5422629", "0.54202265", "0.5420048", "0.5392326", "0.53860134", "0.5377126", "0.53757733", "0.5375371", "0.5360625", "0.5357121", "0.53566295", "0.53563", "0.5353475", "0.5338728", "0.53365666", "0.5334122", "0.5332389", "0.5328328", "0.53237164", "0.53236145", "0.5314651", "0.53127825", "0.5312477", "0.5312477" ]
0.8104631
0
Processes all evicted partitions scheduled for destroy.
private int destroyEvictedPartitions() throws IgniteCheckedException { PartitionDestroyQueue destroyQueue = curCpProgress.destroyQueue; if (destroyQueue.pendingReqs.isEmpty()) return 0; List<PartitionDestroyRequest> reqs = null; for (final PartitionDestroyRequest req : destroyQueue.pendingReqs.values()) { if (!req.beginDestroy()) continue; final int grpId = req.grpId; final int partId = req.partId; CacheGroupContext grp = cctx.cache().cacheGroup(grpId); assert grp != null : "Cache group is not initialized [grpId=" + grpId + "]"; assert grp.offheap() instanceof GridCacheOffheapManager : "Destroying partition files when persistence is off " + grp.offheap(); final GridCacheOffheapManager offheap = (GridCacheOffheapManager) grp.offheap(); Runnable destroyPartTask = () -> { try { offheap.destroyPartitionStore(grpId, partId); req.onDone(null); if (log.isDebugEnabled()) log.debug("Partition file has destroyed [grpId=" + grpId + ", partId=" + partId + "]"); } catch (Exception e) { req.onDone(new IgniteCheckedException( "Partition file destroy has failed [grpId=" + grpId + ", partId=" + partId + "]", e)); } }; if (asyncRunner != null) { try { asyncRunner.execute(destroyPartTask); } catch (RejectedExecutionException ignore) { // Run the task synchronously. destroyPartTask.run(); } } else destroyPartTask.run(); if (reqs == null) reqs = new ArrayList<>(); reqs.add(req); } if (reqs != null) for (PartitionDestroyRequest req : reqs) req.waitCompleted(); destroyQueue.pendingReqs.clear(); return reqs != null ? reqs.size() : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearPartitions() {\n\t\tthis.bucketIterator = null;\r\n\t\tthis.probeIterator = null;\r\n\r\n\t\tfor (int i = this.partitionsBeingBuilt.size() - 1; i >= 0; --i) {\r\n\t\t\tfinal BinaryHashPartition p = this.partitionsBeingBuilt.get(i);\r\n\t\t\ttry {\r\n\t\t\t\tp.clearAllMemory(this.availableMemory);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLOG.error(\"Error during partition cleanup.\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.partitionsBeingBuilt.clear();\r\n\r\n\t\t// clear the partitions that are still to be done (that have files on disk)\r\n\t\tfor (final BinaryHashPartition p : this.partitionsPending) {\r\n\t\t\tp.clearAllMemory(this.availableMemory);\r\n\t\t}\r\n\t}", "public void destroyPartition(int nPid);", "private void freePartitions()\n {\n partitionsNoLongerNeeded.set(null);\n\n lock.writeLock().lock();\n try {\n // Remove out references to partitions to actually free memory\n Arrays.fill(partitions, null);\n lookupSourceSupplier = null;\n closeCachedLookupSources();\n }\n finally {\n lock.writeLock().unlock();\n }\n }", "protected void dropDetachedPartitionTables(PhysicalDataModel pdm, TenantInfo tenantInfo) {\n // In a new transaction, drop any of the tables that were created by\n // the partition detach operation.\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n\n try {\n pdm.dropDetachedPartitions(adapter, tenantInfo.getTenantSchema(), tenantInfo.getTenantId());\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n \n // We can drop the tenant's tablespace only after all the table drops have been committed\n logger.info(\"Dropping tablespace for tenant \" + tenantInfo.getTenantId() + \"/\" + tenantName);\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n\n try {\n // With all the objects removed, it should be safe to remove the tablespace\n pdm.dropTenantTablespace(adapter, tenantInfo.getTenantId());\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n\n // Now all the table partitions have been allocated, we can mark the tenant as dropped\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n adapter.updateTenantStatus(adminSchemaName, tenantInfo.getTenantId(), TenantStatus.DROPPED);\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n } \n }", "@Override\n public void onPartitionsLost(Collection<TopicPartition> partitions) {\n pm.onPartitionsLost(partitions);\n onPartitionsRemoved(partitions);\n }", "protected void processDestroy()\n {\n }", "public void evictPartitionAsync(GridDhtLocalPartition part) {\n evictionQueue.putIfAbsent(part.id(), part);\n\n if (evictionRunning.compareAndSet(false, true)) {\n ctx.kernalContext().closure().callLocalSafe(new GPC<Boolean>() {\n @Override public Boolean call() {\n boolean locked = true;\n\n long nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n\n while (locked || !evictionQueue.isEmpty()) {\n if (!locked && !evictionRunning.compareAndSet(false, true))\n return false;\n\n try {\n for (GridDhtLocalPartition part : evictionQueue.values()) {\n // Show progress of currently evicting partitions.\n if (U.currentTimeMillis() >= nextShowProgressTime) {\n if (log.isInfoEnabled())\n log.info(\"Eviction in progress [grp=\" + grp.cacheOrGroupName()\n + \", remainingCnt=\" + evictionQueue.size() + \"]\");\n\n nextShowProgressTime = U.currentTimeMillis() + SHOW_EVICTION_PROGRESS_FREQ_MS;\n }\n\n try {\n boolean success = part.tryClear();\n\n if (success) {\n evictionQueue.remove(part.id());\n\n if (part.state() == GridDhtPartitionState.EVICTED && part.markForDestroy())\n part.destroy();\n }\n }\n catch (Throwable ex) {\n if (ctx.kernalContext().isStopping()) {\n LT.warn(log, ex, \"Partition eviction failed (current node is stopping).\",\n false,\n true);\n\n evictionQueue.clear();\n\n return true;\n }\n else\n LT.error(log, ex, \"Partition eviction failed, this can cause grid hang.\");\n }\n }\n }\n finally {\n if (!evictionQueue.isEmpty()) {\n if (ctx.kernalContext().isStopping()) {\n evictionQueue.clear();\n\n locked = false;\n }\n else\n locked = true;\n }\n else {\n boolean res = evictionRunning.compareAndSet(true, false);\n\n assert res;\n\n locked = false;\n }\n }\n }\n\n return true;\n }\n }, /*system pool*/ true);\n }\n }", "public synchronized void evict()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n // walk all buckets\n SafeHashMap.Entry[] aeBucket = m_aeBucket;\n int cBuckets = aeBucket.length;\n for (int iBucket = 0; iBucket < cBuckets; ++iBucket)\n {\n // walk all entries in the bucket\n Entry entry = (Entry) aeBucket[iBucket];\n while (entry != null)\n {\n if (entry.isExpired())\n {\n removeExpired(entry, true);\n }\n entry = entry.getNext();\n }\n }\n\n // schedule next flush\n scheduleFlush();\n }", "protected void dropDetachedPartitionTables() {\n\n TenantInfo tenantInfo = getTenantInfo(); \n \n FhirSchemaGenerator gen = new FhirSchemaGenerator(adminSchemaName, tenantInfo.getTenantSchema());\n PhysicalDataModel pdm = new PhysicalDataModel();\n gen.buildSchema(pdm);\n\n dropDetachedPartitionTables(pdm, tenantInfo);\n }", "protected abstract void evict();", "@Override\n public void removePartition(Partition partition) {\n \n }", "public void cleanUp() {\n if(ticker.skipCleanup()) {\n return;\n } \n \n // At this point cleanup is inevitable, so linked list traversal should\n // be performed. \n Entry<K, V> e = segment.head();\n Entry<K, V> end = segment.tail();\n \n int processed = 0;\n long createThreshold = ticker.nextTick() - createTTL;\n long accessThreshold = ticker.nextTick() - accessTTL;\n\n Object removeKey = null;\n while ((e = e.getNext()) != end && processed++ < REMOVE_DEPTH) {\n if (null != removeKey) {\n segment.remove(removeKey);\n removeKey = null;\n }\n\n // both, access and creation thresholds might trigger entry removal \n if (e.getCreationTime() <= createThreshold || e.getAccessTime() <= accessThreshold) {\n removeKey = e.getKey();\n }\n }\n\n if (null != removeKey) {\n segment.remove(removeKey);\n } \n ticker.markCleanup();\n }", "protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }", "public void evictAll()\n {\n}", "private void removeEvicted() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n removeMap.putAll(toEvictMap);\n toEvictMap.clear();\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.evictedElement(entry.getKey());\n }\n }\n }", "@PreDestroy\n\tpublic void destroy() {\n\t\tthis.executorService.shutdown();\n\t}", "private void cleanup() {\n\t\tTreeSet<CacheEntry> entries = new TreeSet<CacheEntry>(map.values());\n\t\tint i = region.getItemsToEvict();\n\t\tIterator<CacheEntry> it = entries.iterator();\n\t\twhile (it.hasNext() && i > 0) {\n\t\t\tremoveEntry(it.next());\n\t\t\ti--;\n\t\t}\n\t}", "@PreDestroy\n public void preDestroy() {\n scheduledFuture.cancel(true);\n execService.shutdown();\n }", "@DISPID(21)\n\t// = 0x15. The runtime will prefer the VTID if present\n\t@VTID(32)\n\tvoid purgeExecutions();", "@PreDestroy\r\n public void destroy() {\r\n log.info(\"Executor will be shut down\");\r\n\r\n executor.shutdown();\r\n try {\r\n if (!executor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n executor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n executor.shutdownNow();\r\n }\r\n\r\n brokerExecutor.shutdown();\r\n try {\r\n if (!brokerExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n brokerExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n brokerExecutor.shutdownNow();\r\n }\r\n\r\n logExecutor.shutdown();\r\n try {\r\n if (!logExecutor.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\r\n logExecutor.shutdownNow();\r\n }\r\n } catch (InterruptedException e) {\r\n log.error(\"Could not await termination of executor. forcing shutdown\", e);\r\n logExecutor.shutdownNow();\r\n }\r\n\r\n log.info(\"Executor shutdown complete!\");\r\n }", "void destroy() {\n \t\ttry {\r\n \t\t\tupKeep.stopRunning();\r\n \t\t} catch (InterruptedException e) {\r\n \t\t}\r\n \r\n \t\t// Kill all running processes.\r\n \t\tfor (MaximaProcess mp : pool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tpool.clear();\r\n \r\n \t\t// Kill all used processes.\r\n \t\tfor (MaximaProcess mp : usedPool) {\r\n \t\t\tmp.kill();\r\n \t\t}\r\n \t\tusedPool.clear();\r\n \t}", "void cleanUpExpiredSessions() {\n try (TarantoolClient client = clientSource.getClient()) {\n client.select(getSpace(client), SPACE_EXPIRY_INDEX, Integer.MAX_VALUE, 0, Iter.LE);\n client.setLong(System.currentTimeMillis());\n Result result = client.execute();\n Set<UUID> ids = new HashSet<>();\n while (result.next()) {\n ids.add(new UUID(result.getLong(2), result.getLong(3)));\n }\n ids.forEach(id -> deleteById(id, client));\n if (logger.isDebugEnabled()) {\n logger.debug(\"Cleaned up \" + ids.size() + \" expired sessions\");\n }\n }\n }", "protected void detachTenantPartitions(PhysicalDataModel pdm, TenantInfo tenantInfo) {\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n \n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n // collect the set of all child tables with FK relationships to\n // partitioned tables\n Set<Table> childTables = new HashSet<>();\n \n // ALTER TABLE child ALTER FOREIGN KEY fk NOT ENFORCED;\n pdm.visit(new DisableForeignKey(adapter, childTables));\n \n // ALTER TABLE parent DETACH PARTITION p0 INTO TABLE pdet;\n pdm.detachTenantPartitions(adapter, tenantInfo.getTenantSchema(), tenantInfo.getTenantId());\n \n // SET INTEGRITY FOR child OFF;\n childTables.forEach(t -> adapter.setIntegrityOff(t.getSchemaName(), t.getObjectName()));\n \n // ALTER TABLE child ALTER FOREIGN KEY fk ENFORCED;\n pdm.visit(new EnableForeignKey(adapter));\n \n // SET INTEGRITY FOR child ALL IMMEDIATE UNCHECKED;\n childTables.forEach(t -> adapter.setIntegrityUnchecked(t.getSchemaName(), t.getObjectName()));\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n \n }", "private void removeExpired() {\n Map<K,CacheableObject> removeMap = new HashMap<K,CacheableObject>(valueMap.size()/2);\n List<CacheListener<K>> tempListeners = new ArrayList<CacheListener<K>>();\n\n // Retrieve a list of everything that's to be removed\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (isExpired(entry.getValue())) {\n removeMap.put(entry.getKey(), entry.getValue());\n }\n }\n tempListeners.addAll(listeners);\n }\n\n // Remove the entries one-at-a-time, notifying the listener[s] in the process\n for (Map.Entry<K,CacheableObject> entry : removeMap.entrySet()) {\n synchronized(theLock) {\n currentCacheSize -= entry.getValue().containmentCount;\n valueMap.remove(entry.getKey());\n }\n Thread.yield();\n\n for (CacheListener<K> listener : tempListeners) {\n listener.expiredElement(entry.getKey());\n }\n }\n }", "void evictAll(int userId);", "@SuppressWarnings({\"unchecked\", \"CallToThreadYield\"})\n public void cleanup() {\n\n long now = System.currentTimeMillis();\n ArrayList<K> deleteKey;\n\n synchronized (cacheMap) {\n MapIterator itr = cacheMap.mapIterator();\n\n deleteKey = new ArrayList<>((cacheMap.size() / 2) + 1);\n K key;\n CacheObject c;\n\n while (itr.hasNext()) {\n key = (K) itr.next();\n c = (CacheObject) itr.getValue();\n\n if (c != null && (now > (timeToLive + c.lastAccessed))) {\n deleteKey.add(key);\n }\n }\n }\n\n deleteKey.stream().map((key) -> {\n synchronized (cacheMap) {\n Object remove = cacheMap.remove(key);\n }\n return key;\n }).forEachOrdered((K _item) -> {\n Thread.yield();\n });\n }", "@Override\n protected void finalize() throws Throwable {\n clear();\n \n // Finally free the partition area itself\n unsafe.freeMemory(partitionAddress);\n \n super.finalize();\n }", "synchronized void cullDeadProcesses() {\n\t\t// Removes processes that have completed and haven't been checked on\n\t\t// for maxLiveTime milliseconds.\n\t\t//long cullBefore = System.currentTimeMillis() - maxLiveTime;\n\t\t//int before = processes.size();\n\t\tIterator<Map.Entry<Long, ProcessEntry>> iter = processes.entrySet().iterator();\n\t\tint runningCount = 0;\n\t\twhile (iter.hasNext()) {\n\t\t\tMap.Entry<Long, ProcessEntry> entry = iter.next();\n\t\t\tProcessEntry pe = entry.getValue();\n\t\t\tAbstractProcess.Status status = pe.process.getStatus();\n\t\t\t// For now, we never remove \"dead\" processes to ensure the status\n\t\t\t// is maintained. So instead all this does is check to make sure\n\t\t\t// that the run count doesn't get messed up.\n\t\t\t/*if (pe.lastAccess < cullBefore && status.isDead()) {\n\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger.debug(\"Process {} last accessed {}, before cutoff of {}.\",\n\t\t\t\t\t\t\tnew Object[] { uidToString(entry.getKey()),\n\t\t\t\t\t\t\tdateFormat.format(new Date(entry.getValue().lastAccess)),\n\t\t\t\t\t\t\tdateFormat.format(new Date(cullBefore)) });\n\t\t\t\t}\n\t\t\t\tpe.process.destroy();\n\t\t\t\titer.remove();\n\t\t\t} else */\n\t\t\tif (status == AbstractProcess.Status.RUNNING) {\n\t\t\t\trunningCount++;\n\t\t\t}\n\t\t}\n\t\t//logger.info(\"Removed {} processes.\", before - processes.size());\n\t\tif (this.runningCount != runningCount) {\n\t\t\tlogger.error(\"Actual running count {} does not match stored running count of {}! This is a bug!\", runningCount, this.runningCount);\n\t\t\t// Fix this\n\t\t\tthis.runningCount = runningCount;\n\t\t\tcheckRunningProcesses();\n\t\t}\n\t}", "private void cleanSegments(ThreadContext context) {\n AtomicInteger counter = new AtomicInteger();\n List<List<Segment>> cleanSegments = getCleanSegments();\n if (!cleanSegments.isEmpty()) {\n for (List<Segment> segments : cleanSegments) {\n EntryCleaner cleaner = new EntryCleaner(manager, tree, new ThreadPoolContext(executor, manager.serializer()));\n executor.execute(() -> cleaner.clean(segments).whenComplete((result, error) -> {\n if (counter.incrementAndGet() == cleanSegments.size()) {\n if (context != null) {\n context.execute(() -> cleanFuture.complete(null));\n } else {\n cleanFuture.complete(null);\n }\n }\n }));\n }\n } else {\n cleanFuture.complete(null);\n }\n }", "@Override\n\tpublic void contextDestroyed(ServletContextEvent arg0) {\n\t\ttry {\n\t\t\tlog.info(\"Initiating shutdown of StarExec.\");\n\n\t\t\tStackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();\n\t\t\tString stackString = \"\";\n\t\t\tfor ( StackTraceElement element : stacktrace ) {\n\t\t\t\t// stackString += element.toString()+\"\\t\"+ClassLoader.findClass(element.getClassName()).getResource(\".class\")+\"\\n\";\n\t\t\t\tstackString += element.toString()+\"\\n\";\n\t\t\t}\n\t\t\tlog.debug( \"\\n\\ncontextDestroyed() stackString:\\n\"+stackString+\"\\n\" );\n\n\t\t\tlog.debug( \"\\n\\nServletContext info:\\ngetInitParameterNames(): \"+arg0.getServletContext().getInitParameterNames()+\n\t\t\t\t\t\"\\ntoString(): \"+arg0.toString()+\"\\n\" );\n\n\n\n\t\t\t// Stop the task scheduler since it freezes in an unorderly shutdown...\n\t\t\tlog.debug(\"Stopping starexec task scheduler...\");\n\t\t\ttaskScheduler.shutdown();\n\n\t\t\t// Save cached Analytics events to DB\n\t\t\tAnalytics.saveToDB();\n\n\t\t\t// Make sure to clean up database resources\n\t\t\tlog.debug(\"Releasing database connections...\");\n\t\t\tCommon.release();\n\n\t\t\tlog.debug(\"Releasing Util threadpool...\");\n\t\t\tUtil.shutdownThreadPool();\n\n\t\t\tR.BACKEND.destroyIf();\n\t\t\t// Wait for the task scheduler to finish\n\t\t\ttaskScheduler.awaitTermination(10, TimeUnit.SECONDS);\n\t\t\ttaskScheduler.shutdownNow();\n\t\t\tlog.info(\"The task scheduler reports it was \" + (taskScheduler.isTerminated() ? \"\" : \"not \") +\n\t\t\t \"terminated successfully.\");\n\t\t\tlog.info(\"StarExec successfully shutdown\");\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e.getMessage(), e);\n\t\t\tlog.error(\"StarExec unclean shutdown\");\n\t\t}\n\t}", "public static void onPauseCleanUp() {\n for(PrioritizedReactiveTask task: activeTasks) {\n task.stopTask();\n }\n }", "@Override\n protected void cleanup(Context context) throws IOException, InterruptedException {\n final int partition = context.getTaskAttemptID().getTaskID().getId();\n if (partition == 0) {\n final Map<String, String> metadata = ProcessingMetadata.config2metadata(conf, JobConfigNames.LEVEL3_METADATA_KEYS);\n final String aggregatedMetadataXml = metadataSerializer.toXml(processingGraphMetadata);\n metadata.put(JobConfigNames.PROCESSING_HISTORY, aggregatedMetadataXml);\n final Path workOutputPath = FileOutputFormat.getWorkOutputPath(context);\n ProcessingMetadata.write(workOutputPath, conf, metadata);\n }\n }", "public void schedulePartitionDestroy(int grpId, int partId) {\n Checkpointer cp = checkpointer;\n\n if (cp != null)\n cp.schedulePartitionDestroy(cctx.cache().cacheGroup(grpId), grpId, partId);\n }", "public void destroy() {\n synchronized (monitor) {\n while (!queue.isEmpty()) {\n queue.poll().node.discard();\n }\n destroyed = true;\n }\n }", "private void cleanUpRunningProcessInstances() {\n List<ProcessInstance> runningInstances = processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(PROCESS_DEFINITION_KEY).list();\n runningInstances.addAll(processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionKey(INCIDENT_PROCESS_DEFINITION).list());\n for (ProcessInstance processInstance : runningInstances) {\n processEngine.getRuntimeService().deleteProcessInstance(processInstance.getId(), \"deleted to have a clean environment for Arquillian\");\n }\n }", "@Override\n\tpublic void dropAndDestroy() {\n\n\t}", "public void checkParticles4Destruction(){\n\t\t\tif(System.nanoTime() - creationTime > 3*Math.pow(10, 9)){\n\t\t\t\t\n\t\t\t\twhile(!particles.isEmpty()){\n\t\t\t\t\tParticle p = particles.poll();\n\t\t\t\t\tp.destroy(); \n\t\t\t\t}\n\t\t\t}\n\t}", "@Override\r\n public void processRemoveAll()\r\n {\r\n final ICacheEvent<String> cacheEvent =\r\n createICacheEvent(getCacheName(), \"all\", ICacheEventLogger.REMOVEALL_EVENT);\r\n try\r\n {\r\n reset();\r\n }\r\n finally\r\n {\r\n logICacheEvent(cacheEvent);\r\n }\r\n }", "@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }", "private void reallocateUnConsumedEsnRecords() {\n\t\tesnInfoRepository\n\t\t\t\t.findAllByIsConsumed(false).stream().filter(item -> (Days\n\t\t\t\t\t\t.daysBetween(new DateTime(item.getDateClaimed()), new DateTime()).isGreaterThan(Days.days(2))))\n\t\t\t\t.forEach(item -> {\n\t\t\t\t\titem.setUserClaimed(null);\n\t\t\t\t\titem.setDateClaimed(null);\n\t\t\t\t});\n\t}", "@Test\n public void testDestroyColocatedPartitionedRegion() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n attributeObjects = new Object[] {SEPARATOR + \"A\"};\n dataStore1.invoke(PRColocationDUnitTest.class, \"destroyPR\", attributeObjects);\n }", "public void partition() \n\t{\n\t\tXPath xPath = getXPathHandler();\n\t\tNodeList parentNodes;\n\t\ttry {\n\t\t\tparentNodes = (NodeList)xPath.compile(this.getParentContainerXPath()).evaluate(this.document, XPathConstants.NODESET);\n\t\t\t\n\t\t\tlogger.info(\">>> \" + this.getPartitionType().name() + \" Partitioner: partition()\");\n\t\t\t\n\t\t\tfor (int i = 0; i < parentNodes.getLength(); i++) \n\t\t\t{ \t\n\t\t\t\tNode parentNode = (Node)parentNodes.item(i);\n\t\t\t\t\n\t\t\t\tif (parentNode instanceof Element)\n\t\t\t\t{\n\t\t\t\t\tString sParentClass = parentNode.getAttributes().getNamedItem(\"class\") != null ? parentNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t\tlogger.info(\"\\tParent Node Name=\" + parentNode.getNodeName()+\":class=\"+ sParentClass);\n\t\t\t\t\t\n\t\t\t\t\tNodeList nodeList = parentNode.getChildNodes();\n\t\t\t\t\tNode xDivNode = null;\n\t\t\t\t\t\n\t\t\t\t\tNode xIntroDivNode = this.document.createElement(\"div\");\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"class\", this.getPartitionTypeAsString());\n\t\t\t\t\t((Element)xIntroDivNode).setAttribute(\"title\", this.getIntroPartitionTitle());\n\t\t\t\t\t\n\t\t\t\t\tboolean first = true;\n\t\t\t\t\tboolean keepFirst = this.getKeepFirstElements();\n\t\t\t\t\tboolean hasIntroNode = false;\n\t\t\t \n\t\t\t\t\tfor (int j = 0, pCount = 0; j < nodeList.getLength(); j++) \n\t\t\t\t\t{ \t\n\t\t\t \tNode xNode = nodeList.item(j);\n\t\t\t \tif (xNode instanceof Element)\n\t\t\t \t{\n\t\t\t \t\tif (first && keepFirst)\n\t\t\t \t\t{\n\t\t\t \t\t\tif (!hasIntroNode) {\n\t\t\t\t \t\t\t((Element)xIntroDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t \t\t\t\tDomUtils.insertBefore(xIntroDivNode, xNode);\t\t \t\t\t\t\n\t\t\t\t \t\t\tj++;\n\t\t\t\t \t\t\thasIntroNode = true;\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t\t\n\t\t\t \t\tString sClass = xNode.getAttributes().getNamedItem(\"class\") != null ? xNode.getAttributes().getNamedItem(this.getMatchingAttributeName()).getNodeValue() : \"\";\n\t\t\t\t \tboolean isTable = xNode.getNodeName().equalsIgnoreCase(\"table\") ? true : false;\n\t\t\t\t \tString sId = isTable && xNode.getAttributes().getNamedItem(\"id\") != null ? xNode.getAttributes().getNamedItem(\"id\").getNodeValue() : \"\";\n\t\t\t\t \t\n\t\t\t\t \tif (sClass != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\tNode Name=\" + xNode.getNodeName()+\":class=\"+ sClass);\n\t\t\t\t \t\t\n\t\t\t\t \t\tboolean match = false;\n\t\t\t\t \t\tswitch ((TaskExprType)this.getAttributeMatchExpression())\n\t\t\t\t \t\t{\n\t\t\t\t \t\tcase NOT_SET:\n\t\t\t\t \t\tcase STARTS_WITH:\n\t\t\t\t \t\t\tmatch = sClass.startsWith(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\tcase CONTAINS:\n\t\t\t\t \t\t\tmatch = sClass.contains(this.getMatchingAttributeValue());\n\t\t\t\t \t\t\tbreak;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\t// Process the title name match condition if it exists\n\t\t\t\t \t\tString title = null;\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\ttitle = DomUtils.extractTextChildren(xNode);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameMatchCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\tif (title != null && this.getTitleNameMatchType() == TaskMatchType.EXPR)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t \t\t\t\tswitch ((TaskExprType)this.getTitleNameMatchExprType())\n\t\t\t\t\t \t\t\t\t{\n\t\t\t\t\t \t\t\t\t\tcase STARTS_WITH:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.startsWith(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase CONTAINS:\n\t\t\t\t\t \t\t\t\t\t\tmatch = title.contains(this.getTitleNameMatchExprValue());\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tcase NOT_SET:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t\tdefault:\n\t\t\t\t\t \t\t\t\t\t\tbreak;\n\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t \t\t\t\t\n\t\t\t\t\t \t\t\t} else if (this.getTitleNameMatchType() == TaskMatchType.REGEX)\n\t\t\t\t\t \t\t\t{\n\t\t\t\t\t\t \t\t\tPattern r = Pattern.compile(this.getTitleNameMatchRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\t\t \t\t\t\n\t\t\t\t\t\t \t\t\tmatch = m.matches();\n\t\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t\t \t\tif (match)\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\tif (first)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPartition partition = new Partition();\n\t\t\t\t \t\t\t\tpartition.setType(this.getPartitionType());\n\t\t\t\t \t\t\t\tpartition.setsId(sId);\n\t\t\t\t \t\t\t\tthis.setFirstPartition(partition);\n\t\t\t\t \t\t\t}\n\n\t\t\t\t \t\t\tfirst = false;\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tif (this.isTitleNameReplaceCondition())\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\tPattern r = Pattern.compile(this.getTitleNameReplaceRegexPattern());\t\t\t \t\t\t\n\t\t\t\t\t \t\t\tMatcher m = r.matcher(title);\t\n\t\t\t\t\t \t\t\ttitle = m.replaceAll(this.getTitleNameReplaceWithRegexPattern());\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\txDivNode = this.document.createElement(\"div\");\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"class\", getPartitionTypeAsString());\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"title\", title);\n\t\t\t\t \t\t\t((Element)xDivNode).setAttribute(\"id\", Integer.toString(++pCount));\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\tDomUtils.insertBefore(xDivNode, xNode);\n\t\t\t\t \t\t\tDomUtils.removeElement((Element) xNode, false);\t \n\t\t\t\t \t\t}\n\t\t\t\t \t\telse\n\t\t\t\t \t\t{\n\t\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t\t \t\t\t\tj--;\n\t\t\t\t \t\t\t}\n\t\t\t\t \t\t}\n\t\t\t\t \t} else if (isTable && sId != null)\n\t\t\t\t \t{\n\t\t\t\t \t\tlogger.info(\"\\t\\tNode Name=\" + xNode.getNodeName()+\":id=\"+ sId);\n\t\t\t \t\t\t// Skip over all nodes leading up to the first Heading1 node\n\t\t\t \t\t\tif (!first && xDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t \t\t\telse if (first && keepFirst && xIntroDivNode != null)\n\t\t\t \t\t\t{\n\t\t\t \t\t\t\txIntroDivNode.appendChild(xNode);\n\t\t\t \t\t\t\tj--;\n\t\t\t \t\t\t}\n\t\t\t\t \t}\t \t\n\t\t\t \t}\n\t\t\t } // end for j\n\t\t\t\t} // end if parentNode\n\t\t\t} // end for i\n\t\t} catch (XPathExpressionException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\t\n\t\t\n\t}", "@Override\n public void contextDestroyed(ServletContextEvent sce) {\n try {\n List<JobExecutionContext> currentlyExecuting = Schedule.getScheduler().getCurrentlyExecutingJobs();\n\n for (JobExecutionContext jobExecutionContext : currentlyExecuting) {\n JobKey jobKey = jobExecutionContext.getJobDetail().getKey();\n Schedule.getScheduler().interrupt(jobKey);\n Schedule.getScheduler().deleteJob(jobKey);\n }\n } catch (SchedulerException e) {\n log.error(\"Problem Clearing Job Queue\", e);\n }\n\n try {\n Schedule.getScheduler().clear();\n Schedule.getScheduler().shutdown(false);\n } catch (SchedulerException e) {\n log.error(\"Problem shutting down scheduler\", e);\n }\n\n DB.shutdown();\n\n ClassLoader cl = Thread.currentThread().getContextClassLoader();\n // Loop through all drivers\n Enumeration<Driver> drivers = DriverManager.getDrivers();\n while (drivers.hasMoreElements()) {\n Driver driver = drivers.nextElement();\n if (driver.getClass().getClassLoader() == cl) {\n // This driver was registered by the webapp's ClassLoader, so deregister it:\n try {\n log.info(String.format(\"Deregistering JDBC driver: %s\", driver));\n DriverManager.deregisterDriver(driver);\n } catch (SQLException ex) {\n log.fatal(String.format(\"Error deregistering JDBC driver: %s\", driver), ex);\n }\n } else {\n // driver was not registered by the webapp's ClassLoader and may be in use elsewhere\n log.info(String.format(\"Not deregistering JDBC driver %s as it does not belong to this webapp's ClassLoader\", driver));\n }\n }\n }", "public void destroyHazelcastResources() {\n publishers.destroy();\n subscribers.destroy();\n registerCount.destroy();\n publishersStreamingFlags.destroy();\n }", "private void fcfsScheduler(){\n\t// check for and add arriving processes\n\t// makes sure completed processes aren't added by checking remaining time\n\tif((GlobalVariables.processes.size() != 0) && (GlobalVariables.processes.get(0).getArrivalTime() == GlobalVariables.time) && GlobalVariables.processes.get(0).getRemainingTime() > 0){\n\t //add process pages to page table and disk\n\t Process p = GlobalVariables.processes.get(0);\n\t GlobalVariables.mm.addPagesToTableAndDisk(p);\n\t GlobalVariables.processes.remove(0);\n\t makeReadyFromNew(p);\n\t}\n\n\t//handling blocked processes that are ready to be unblocked\n\tif (!blockedQueue.isEmpty()){\n\t Process head = blockedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readyQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedQueue.isEmpty());\n\t}\n\n\t//handling blocked suspended processes that are ready to be unblocked\n\tif (!blockedSuspendedQueue.isEmpty()){\n\t Process head = blockedSuspendedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedSuspendedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readySuspendedQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_SUSPENDED_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked/Suspended Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedSuspendedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedSuspendedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedSuspendedQueue.isEmpty());\n\t}\n\t\n\tif (GlobalVariables.runningProcess == null && !readyQueue.isEmpty()){\n\t GlobalVariables.runningProcess = readyQueue.poll(); \n\t}\n\t// if there is a process running, run process one unit\n\t// we are letting a started process run on the same unit as it is being chosen\n\t// this assumes a low overhead as we talked about in class\n\tif (GlobalVariables.runningProcess != null){\n\t char c = GlobalVariables.runningProcess.runOneUnit();\n\n\t switch (c) {\n\t case '*':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\tblockRunningProcess();\n\t\tbreak;\n\t case '!':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\texitRunningProcess();\n\t\tbreak;\n\t default:\n\t GlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t }\n\t}\n }", "@PreDestroy\r\n\tpublic void preDestroySession() {\r\n\t\tfor (BeanStorage storage : activeViewScopes.values()) {\r\n\t\t\tstorage.destroyBeans();\r\n\t\t}\r\n\t}", "private void removeDestroyedObjects ()\n {\n Collection<Asteroid> newAsteroids = new ArrayList<>(this.game.getAsteroids().size() * 2); // Avoid reallocation and assume every asteroid spawns successors.\n this.game.getAsteroids().forEach(asteroid -> {\n if (asteroid.isDestroyed()) {\n this.increaseScore();\n newAsteroids.addAll(asteroid.getSuccessors());\n }\n });\n this.game.getAsteroids().addAll(newAsteroids);\n // Remove all asteroids that are destroyed.\n this.game.getAsteroids().removeIf(GameObject::isDestroyed);\n // Remove any bullets that are destroyed.\n this.game.getBullets().removeIf(GameObject::isDestroyed);\n }", "public static void shutdown() {\n logger.warn(\"Attempting to shut down scheduled LRU cache tasks ...\");\n scheduler.shutdown();\n try {\n if (! scheduler.awaitTermination(1000, TimeUnit.MILLISECONDS)) {\n logger.warn(\"Attempting to force shut down scheduled LRU cache tasks ...\");\n scheduler.shutdownNow();\n }\n } catch (InterruptedException e) {\n logger.warn(\"Exception shutting down tasks ... \" + e.getMessage());\n }\n }", "public void shutdown() {\n for (BucketMonitor monitor : this.monitors.values()) {\n monitor.shutdown();\n }\n }", "private void cleanUpConsumedEsnRecords() {\n\t\tesnInfoRepository.findAllByIsConsumed(true).removeIf(item -> (Days\n\t\t\t\t.daysBetween(new DateTime(item.getDateImported()), new DateTime()).isGreaterThan(Days.days(30))));\n\t}", "@PreDestroy\n public void perDestroyFn (){\n LOOGER.info(\" ==== pre destroy the bean ====> {}:\");\n }", "@Override\n public void onPartitionsAssigned(Collection<TopicPartition> partitions) {\n pm.onPartitionsAssigned(partitions);\n }", "protected void abortScheduledTasks() {\r\n\r\n\t\tfor (ParallelTask<?> task : scheduledSubtasks) {\r\n\t\t\ttask.cancel();\r\n\t\t}\r\n\r\n\t\tscheduledSubtasks.clear();\r\n\t}", "static void destroyAll()\n {\n synchronized(allSchedulers)\n {\n // destroy all registered schedulers\n Iterator iter = allSchedulers.iterator();\n while (iter.hasNext())\n {\n Scheduler scheduler = (Scheduler) iter.next();\n \n // do not call cancel() since this method modifies allSchedulers\n scheduler.destroy();\n }\n \n if (logger.isInfoEnabled())\n {\n logger.info(allSchedulers.size() + \" scheduler instances destroyed\");\n }\n \n // be sure and clear set\n allSchedulers.clear();\n \n // and set flag that scheduler service ist stopped\n schedulerServiceRunning = false;\n }\n }", "private void handleZswapdStart() {\n Trace.traceBegin(8, \"zswapd start\");\n int curBuffer = getCurBufferSize();\n Slog.i(TAG, \"handle zswapd start, current buffer: \" + curBuffer);\n if (curState == 2) {\n handler.removeMessages(7);\n handleZswapdStop();\n }\n if (curState == 0) {\n curState = 2;\n Message msg = handler.obtainMessage();\n msg.what = 7;\n handler.sendMessageDelayed(msg, (long) (reclaimDelay * 1000));\n }\n Trace.traceEnd(8);\n }", "public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}", "@PreDestroy\n public void foo()\n {\n for (int i = 0; i < 10; i++)\n {\n for (int k = 0; k < 20; i++)\n {\n }\n }\n }", "@Override\n\tpublic void evict(Object object) throws Exception {\n\t\t\n\t}", "public void markFinalizePartitionCounters() {\n finalizePartitionCounters = true;\n }", "private void handleRecoverZswapd() {\n handler.removeMessages(15);\n setTargetBuffer();\n Slog.i(TAG, \"handle recover zswapd, set target to current\");\n }", "@PreDestroy\r\n\t@Override\r\n\tpublic void terminate()\r\n\t{\r\n\t\tthis.cleanUpDone = true;\r\n\t\tthis.isRunning = false;\r\n\t\tthis.priceMap.clear();\r\n\t\tthis.priceUpdateBlockingQueue.clear();\r\n\t\tthis.executorService.shutdownNow();\r\n\t\t\r\n\t\tif(logger.isInfoEnabled())\r\n\t\t\tlogger.info(\"Termination of price service has been completed successfully.\");\r\n\t}", "private synchronized void performHouseKeeping() {\r\n\t\tSet<Map.Entry<Integer,QueueManager>> eS = queueManagers.entrySet();\r\n\t\tfor( Iterator<Map.Entry<Integer,QueueManager>> i = eS.iterator(); i.hasNext(); ) {\r\n\t\t\tMap.Entry<Integer,QueueManager> qMME = i.next();\r\n\t\t\tQueueManager qM = qMME.getValue();\r\n\t\t\tif( qM.houseKeepingAndTestForDelete() ) {\r\n\t\t\t\ti.remove();\r\n\t\t\t\tLOGGER.debug(\"Removed QueueManager with magic number \"+qM.getMagicNumber()+\" due to inactivity\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void cleanup() {\n try {\n resManager.stopVirtualNodes();\n } catch (Exception e) {\n logger.error(ITConstants.TS + \": \" + DEL_VM_ERR, e);\n }\n logger.info(\"Cleanup done\");\n }", "@PreDestroy\n\tprivate void fini() throws Exception {\n\t\tListQueuesResult result = amazonSQSClient.listQueues();\n\t\tfor (String queueURL : result.getQueueUrls()) {\n\t\t\tamazonSQSClient.deleteQueue(queueURL);\n\t\t}\n\t}", "List<CatalogPartitionSpec> listPartitions(ObjectPath tablePath)\n throws TableNotExistException, TableNotPartitionedException, CatalogException;", "@PreDestroy\n\tpublic void destroy() {\n\t cacheTree.destroy();\n\t}", "@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n addToRecycleBin(value);\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }", "public CompletableFuture<Void> unregisterEventProcessor() {\n TRACE_LOGGER.info(this.hostContext.withHost(\"Stopping event processing\"));\n\n if (this.unregistered == null) {\n // PartitionManager is created in constructor. If this object exists, then\n // this.partitionManager is not null.\n this.unregistered = this.partitionManager.stopPartitions();\n\n // If we own the executor, stop it also.\n // Owned executor is also created in constructor.\n if (this.weOwnExecutor) {\n this.unregistered = this.unregistered.thenRunAsync(() ->\n {\n // IMPORTANT: run this last stage in the default threadpool!\n // If a task running in a threadpool waits for that threadpool to terminate, it's going to wait a long time...\n\n // It is OK to call shutdown() here even if threads are still running.\n // Shutdown() causes the executor to stop accepting new tasks, but existing tasks will\n // run to completion. The pool will terminate when all existing tasks finish.\n // By this point all new tasks generated by the shutdown have been submitted.\n this.executorService.shutdown();\n\n try {\n this.executorService.awaitTermination(10, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n throw new CompletionException(e);\n }\n }, ForkJoinPool.commonPool());\n }\n }\n\n return this.unregistered;\n }", "@Override\r\n public void evict(Object object) {\n\r\n }", "private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }", "@Override\r\n public void processDispose()\r\n {\r\n final ICacheEvent<String> cacheEvent = createICacheEvent(getCacheName(), \"none\", ICacheEventLogger.DISPOSE_EVENT);\r\n try\r\n {\r\n final Thread t = new Thread(this::disposeInternal, \"IndexedDiskCache-DisposalThread\");\r\n t.start();\r\n // wait up to 60 seconds for dispose and then quit if not done.\r\n try\r\n {\r\n t.join(60 * 1000);\r\n }\r\n catch (final InterruptedException ex)\r\n {\r\n log.error(\"{0}: Interrupted while waiting for disposal thread to finish.\",\r\n logCacheName, ex);\r\n }\r\n }\r\n finally\r\n {\r\n logICacheEvent(cacheEvent);\r\n }\r\n }", "@PreDestroy\n public void destroy() {\n LOG.debug(\"destroy\");\n }", "public void cleanup() {\r\n\t\tsuper.cleanup();\r\n\t\tfor (int i = 0; i < _composites.size(); i++) {\r\n\t\t\t_composites.get(i).cleanup();\t\r\n\t\t}\r\n\t}", "public void cleanup() {\n try {\n if (processingUnits != null) {\n for (int i = 0; i < processingUnits.length; i++) {\n processingUnits[i].cleanup();\n }\n }\n\n if (dbgCtrlThread != null) {\n dbgCtrlThread.stop();\n }\n\n if (casConsumerPU != null) {\n casConsumerPU.cleanup();\n }\n casConsumerPU = null;\n\n if (collectionReader != null) {\n collectionReader.close();\n }\n collectionReader = null;\n\n if (producer != null) {\n producer.cleanup();\n }\n producer = null;\n producerResult = null;\n\n if (consumerDeployList != null) {\n consumerDeployList.clear();\n }\n consumerDeployList = null;\n\n if (analysisEngines != null) {\n analysisEngines.clear();\n }\n analysisEngines = null;\n\n if (annotatorDeployList != null) {\n annotatorDeployList.clear();\n }\n annotatorDeployList = null;\n\n if (annotatorList != null) {\n annotatorList.clear();\n }\n annotatorList = null;\n\n if (consumerList != null) {\n consumerList.clear();\n }\n consumerList = null;\n\n if (consumers != null) {\n consumers.clear();\n }\n consumers = null;\n\n processingUnits = null;\n processingUnitResults = null;\n casprocessorList = null;\n // this.enProcSt = null;\n stats = null;\n statusCbL = null;\n // this.tcas = null;\n casPool = null;\n // this.restoredProcTr = null;\n checkpointData = null;\n procTr = null;\n cpeFactory = null;\n } catch (Exception e) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_exception__FINER\",\n new Object[] { Thread.currentThread().getName(), e.getMessage() });\n\n }\n }", "@Scheduled(\n fixedDelayString = \"${entities.cleanup.rate}\"\n )\n @Transactional\n public void cleanup() {\n log.info(\"cleanup execution\");\n appSessionRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n tanRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n }", "protected synchronized void prune()\n {\n long ldtStart = Base.getSafeTimeMillis();\n int cCur = getUnits();\n int cMin = getLowUnits();\n if (cCur < cMin)\n {\n return;\n }\n\n int nType = getEvictionType();\n switch (nType)\n {\n default:\n case EVICTION_POLICY_HYBRID:\n {\n // sum the entries' units per priority\n int[] acUnits;\n while (true)\n {\n try\n {\n acUnits = new int[11];\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n int cUnits = entry.getUnits();\n try\n {\n acUnits[entry.getPriority()] += cUnits;\n }\n catch (IndexOutOfBoundsException e)\n {\n acUnits[Math.max(0, Math.min(entry.getPriority(), 10))] += cUnits;\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n int cTotal = 0;\n int nPrunePriority = 0;\n while (nPrunePriority <= 10)\n {\n cTotal += acUnits[nPrunePriority];\n if (cTotal > cMin)\n {\n break;\n }\n ++nPrunePriority;\n }\n\n // build a list of entries to discard\n Entry entryDiscardHead = null;\n Entry entryDiscardTail = null;\n\n // determine the number at the cut-off priority that must be pruned\n int cAdditional = Math.max(0, cTotal - cMin);\n\n while (cCur > cMin)\n {\n try\n {\n for (Iterator iter = entrySet().iterator(); iter.hasNext() && cCur > cMin; )\n {\n Entry entry = (Entry) iter.next();\n int nPriority = entry.getPriority();\n if (nPriority >= nPrunePriority)\n {\n int cUnits = entry.getUnits();\n if (nPriority == nPrunePriority)\n {\n if (cAdditional <= 0)\n {\n continue;\n }\n cAdditional -= cUnits;\n }\n cCur -= cUnits;\n\n // remove the entry from the map\n super.removeEntryInternal(entry);\n\n // link the entry into the list of deferred\n // removals, but without changing its \"next\"\n // reference because the iterator that we are\n // using here is counting on that \"next\" ref\n if (entryDiscardHead == null)\n {\n entryDiscardHead = entry;\n }\n else\n {\n entryDiscardTail.setNext(entry);\n }\n entryDiscardTail = entry;\n }\n }\n\n // seal the end of the linked list of entries to discard\n if (entryDiscardTail != null)\n {\n entryDiscardTail.setNext(null);\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // process the list of deferred removals\n for (Entry entryDiscard = entryDiscardHead; entryDiscard != null; )\n {\n // unlink it altogether\n Entry entryNext = entryDiscard.getNext();\n entryDiscard.setNext(null);\n\n // discard it\n removeExpired(entryDiscard, false);\n\n entryDiscard = entryNext;\n }\n }\n break;\n\n case EVICTION_POLICY_LRU:\n case EVICTION_POLICY_LFU:\n {\n boolean fLRU = (nType == EVICTION_POLICY_LRU);\n SparseArray array;\n while (true)\n {\n try\n {\n array = new SparseArray();\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n Entry entry = (Entry) iter.next();\n long lOrder = fLRU ? entry.getLastTouchMillis()\n : entry.getTouchCount();\n Object oPrev = array.set(lOrder, entry);\n if (oPrev != null)\n {\n // oops, more than one entry with the same order;\n // make a list of entries\n List list;\n if (oPrev instanceof List)\n {\n list = (List) oPrev;\n }\n else\n {\n list = new ArrayList();\n list.add((Entry) oPrev);\n }\n list.add(entry);\n array.set(lOrder, list);\n }\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n for (Iterator iter = array.iterator();\n getUnits() > cMin && iter.hasNext(); )\n {\n Object o = iter.next();\n if (o instanceof Entry)\n {\n Entry entry = (Entry) o;\n removeExpired(entry, true);\n }\n else\n {\n List list = (List) o;\n for (Iterator iterList = list.iterator();\n getUnits() > cMin && iterList.hasNext(); )\n {\n Entry entry = (Entry) iterList.next();\n removeExpired(entry, true);\n }\n }\n }\n }\n break;\n\n case EVICTION_POLICY_EXTERNAL:\n getEvictionPolicy().requestEviction(cMin);\n break;\n }\n m_stats.registerCachePrune(ldtStart);\n }", "public void terminateAllRemainingInstances() {\n for (Iterator<MemberContext> iterator = activeMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n // Forcefully deleting remaining pending members\n for (Iterator<MemberContext> iterator = pendingMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n /// Forcefully deleting remaining termination pending members\n for (Iterator<MemberContext> iterator = terminationPendingMembers.iterator(); iterator.hasNext(); ) {\n MemberContext member = iterator.next();\n // Remove the current element from the iterator and the list.\n iterator.remove();\n terminateForcefully(member.getMemberId());\n }\n\n\n // Forcefully deleting remaining obsolete members\n for (Map.Entry<String, MemberContext> entry : obsoletedMembers.entrySet()) {\n MemberContext ObsoleteMemberContext = entry.getValue();\n obsoletedMembers.remove(entry.getKey());\n terminateForcefully(ObsoleteMemberContext.getMemberId());\n }\n }", "private int cleanupExpiredSegments(final Log log) {\n final long startMs = time.milliseconds();\n String topic = parseTopicPartitionName(log.name()).topic;\n return log.deleteOldSegments(new Predicate<LogSegment>() {\n @Override\n public boolean apply(LogSegment _) {\n return startMs - _.lastModified() > log.config.retentionMs;\n }\n });\n }", "private void maintain() {\n SoftObject obj;\n int count = 0;\n\n while ((obj = (SoftObject)queue.poll()) != null) {\n count++;\n collection.remove(obj);\n }\n\n if (count != 0) {\n // some temporary debugging fluff\n System.err.println(\"vm reclaimed \" + count + \" objects\");\n }\n }", "void unsetProbables();", "public void processPreDestroyAnnotations ()\n throws Exception\n {\n \n for (Method m: _finder.getMethodsForAnnotation(PreDestroy.class))\n {\n if (!isServletType(m.getDeclaringClass()))\n {\n Log.debug(\"Ignoring \"+m.getName()+\" as non-servlet type\");\n continue;\n }\n if (m.getParameterTypes().length != 0)\n throw new IllegalStateException(m+\" has parameters\");\n if (m.getReturnType() != Void.TYPE)\n throw new IllegalStateException(m+\" is not void\");\n if (m.getExceptionTypes().length != 0)\n throw new IllegalStateException(m+\" throws checked exceptions\");\n if (Modifier.isStatic(m.getModifiers()))\n throw new IllegalStateException(m+\" is static\");\n \n PreDestroyCallback callback = new PreDestroyCallback(); \n callback.setTargetClass(m.getDeclaringClass());\n callback.setTarget(m);\n _callbacks.add(callback);\n }\n }", "public void clean(){\n\t\tsynchronized(this.lock){\n\t\t\tint index=0;\n\t\t\tfor(ResourceStatus<T> resourceStatus:this.resourcesStatus){\n\t\t\t\tif(resourceStatus!=null){\n\t\t\t\t\tif(!resourceStatus.isInUse()){\n\t\t\t\t\t\tlong lastTime=resourceStatus.getLastNotInUseTime();\n\t\t\t\t\t\tlong currentTime=System.currentTimeMillis();\n\t\t\t\t\t\tT resource=resourceStatus.getResource();\n\t\t\t\t\t\tif((currentTime-lastTime)>=this.resourceAliveTime){\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tdestroyResource(resource);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tlogger.error(Constants.Base.EXCEPTION, e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.resourcesStatus[index]=null;\n\t\t\t\t\t\t\tthis.currentSize--;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void destroyProcess() {\n\t\tsuper.destroyProcess();\n\t\tDataDirRemoverHandler ddhHandler = \n\t\t\tnew DataDirRemoverHandler(getLogHandler());\n\t\tddhHandler.setRetryLimitInMillis(2000);\n\t\tddhHandler.execute();\n\t\tportsInUse.remove(port);\n\t}", "private void srtScheduler(){\n\tif((GlobalVariables.processes.size() != 0) && (GlobalVariables.processes.get(0).getArrivalTime() == GlobalVariables.time) && GlobalVariables.processes.get(0).getRemainingTime() > 0){\n\t //add process pages to page table and disk\n\t Process p = GlobalVariables.processes.get(0);\n\t GlobalVariables.mm.addPagesToTableAndDisk(p);\n\t GlobalVariables.processes.remove(0);\n\t makeReadyFromNew(p);\n\t if (GlobalVariables.runningProcess != null){\n\t\treadyQueue.offer(GlobalVariables.runningProcess);\n\t\tGlobalVariables.runningProcess.setStatus(GlobalVariables.READY_STATUS);\n\t\tGlobalVariables.runningProcess = null;\n\t }\n\t}\n\n\t//handling blocked processes that are ready to be unblocked\n\tif (!blockedQueue.isEmpty()){\n\t Process head = blockedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readyQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedQueue.isEmpty());\n\t}\n\n\t//handling blocked suspended processes that are ready to be unblocked\n\tif (!blockedSuspendedQueue.isEmpty()){\n\t Process head = blockedSuspendedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedSuspendedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readySuspendedQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_SUSPENDED_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked/Suspended Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedSuspendedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedSuspendedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedSuspendedQueue.isEmpty());\n\t}\n\n\n\t\n\tif (GlobalVariables.runningProcess == null && !readyQueue.isEmpty()){\n\t GlobalVariables.runningProcess = readyQueue.poll();\n\t GlobalVariables.runningProcess.setStatus(GlobalVariables.RUNNING_STATUS);\n\t}\n\t// if there is a process running, run process one unit\n\t// we are letting a started process run on the same unit as it is being chosen\n\t// this assumes a low overhead as we talked about in class\n\tif (GlobalVariables.runningProcess != null){\n\t char c = GlobalVariables.runningProcess.runOneUnit();\n\n\t switch (c) {\n\t case '*':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\tblockRunningProcess();\n\t\tbreak;\n\t case '!':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\texitRunningProcess();\n\t\tbreak;\n\t default:\n\t GlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t }\n\t}\n }", "private void shutdown() {\n log.info(\"Shutting down\");\n kafka.shutdown();\n zookeeper.shutdown();\n }", "public void evict(Object po)\n {\n}", "public void destroy()\n {\n log = null;\n ComponentCache.clear();\n try {\n \t//to shut down all scheduler threads.....\n\t\t\tScheduler scheduler = StdSchedulerFactory.getDefaultScheduler();\n\t\t\tscheduler.shutdown();\n\t\t} catch (SchedulerException e) {\n\t\t}\n \n super.destroy();\n }", "@Override\r\n protected void processRemovedLRU(final K key, final IndexedDiskElementDescriptor value)\r\n {\r\n if (value != null)\r\n {\r\n subLengthFromCacheSize(value);\r\n }\r\n\r\n addToRecycleBin(value);\r\n\r\n log.debug(\"{0}: Removing key: [{1}] from key store.\", logCacheName, key);\r\n log.debug(\"{0}: Key store size: [{1}].\", logCacheName, this.size());\r\n\r\n doOptimizeRealTime();\r\n }", "private void reclaimWronglyAllocatedBuckets(Context ctx, OperationResult result)\n\t\t\tthrows SchemaException, PreconditionViolationException, ObjectNotFoundException, ObjectAlreadyExistsException {\n\t\tif (ctx.coordinatorTask.getWorkState() == null) {\n\t\t\treturn;\n\t\t}\n\t\tTaskWorkStateType newState = ctx.coordinatorTask.getWorkState().clone();\n\t\tint reclaiming = 0;\n\t\tSet<String> deadWorkers = new HashSet<>();\n\t\tSet<String> liveWorkers = new HashSet<>();\n\t\tfor (WorkBucketType bucket : newState.getBucket()) {\n\t\t\tif (bucket.getState() == WorkBucketStateType.DELEGATED) {\n\t\t\t\tString workerOid = bucket.getWorkerRef() != null ? bucket.getWorkerRef().getOid() : null;\n\t\t\t\tif (isDead(workerOid, deadWorkers, liveWorkers, result)) {\n\t\t\t\t\tLOGGER.info(\"Reclaiming wrongly allocated work bucket {} from worker task {}\", bucket, workerOid);\n\t\t\t\t\tbucket.setState(WorkBucketStateType.READY);\n\t\t\t\t\tbucket.setWorkerRef(null);\n\t\t\t\t\t// TODO modify also the worker if it exists (maybe)\n\t\t\t\t\treclaiming++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOGGER.trace(\"Reclaiming wrongly allocated buckets found {} buckets to reclaim in {}\", reclaiming, ctx.coordinatorTask);\n\t\tif (reclaiming > 0) {\n\t\t\tCONTENTION_LOGGER.debug(\"Reclaiming wrongly allocated buckets found {} buckets to reclaim in {}\", reclaiming, ctx.coordinatorTask);\n\t\t\t// As for the precondition we use the whole task state (reflected by version). The reason is that if the work\n\t\t\t// state originally contains (wrongly) DELEGATED bucket plus e.g. last COMPLETE one, and this bucket is reclaimed\n\t\t\t// by two subtasks at once, each of them see the same state afterwards: DELEGATED + COMPLETE. The solution would\n\t\t\t// be either to enhance the delegated bucket with some information (like to whom it is delegated), or this one.\n\t\t\t// In the future we might go the former way; as it would make reclaiming much efficient - not requiring to read\n\t\t\t// the whole task tree.\n\t\t\trepositoryService.modifyObject(TaskType.class, ctx.coordinatorTask.getOid(),\n\t\t\t\t\tbucketsReplaceDeltas(newState.getBucket()),\n\t\t\t\t\tnew VersionPrecondition<>(ctx.coordinatorTask.getVersion()), null, result);\n\t\t\tctx.reloadCoordinatorTask(result);\n\t\t\tctx.registerReclaim(reclaiming);\n\t\t}\n\t}", "public static void onVMDeath() {\n \tDeferredExecution.stopProcessors();\n }", "@PreDestroy\n public void destroy() {\n System.out.println(\"kafka-flink is closing...\");\n }", "public void destroy() {\n try {\n service.shutdown();\n } catch (Exception e) {Log.v(\"HierarchyDumpManager\", \"Could not destroy: \" + e.getMessage());}\n }", "private void rrScheduler(){\n\tif((GlobalVariables.processes.size() != 0) && (GlobalVariables.processes.get(0).getArrivalTime() == GlobalVariables.time) && GlobalVariables.processes.get(0).getRemainingTime() > 0){\n\t //add process pages to page table and disk\n\t Process p = GlobalVariables.processes.get(0);\n\t GlobalVariables.mm.addPagesToTableAndDisk(p);\n\t GlobalVariables.processes.remove(0);\n\t makeReadyFromNew(p);\n\t GlobalVariables.write(p.getPagesString());\n\t}\n\n\t//handling blocked processes that are ready to be unblocked\n\tif (!blockedQueue.isEmpty()){\n\t Process head = blockedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readyQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedQueue.isEmpty());\n\t}\n\n\t//handling blocked suspended processes that are ready to be unblocked\n\tif (!blockedSuspendedQueue.isEmpty()){\n\t Process head = blockedSuspendedQueue.peek();\n\t int headPID = head.getId();\n\t int id = headPID;\n\t do {\n\t\tProcess curProcess = blockedSuspendedQueue.poll();\n\t\tcurProcess.decrementBlockedTime();\n\t\tif (curProcess.getBlockedTime() == 0){\n\t\t readySuspendedQueue.offer(curProcess);\n\t\t curProcess.setStatus(GlobalVariables.READY_SUSPENDED_STATUS);\n\t\t GlobalVariables.write(\"\\tUNBLOCKING: Blocked/Suspended Process \" + curProcess.getId());\n\t\t} else{\n\t\t blockedSuspendedQueue.offer(curProcess);\n\t\t}\n\t\tProcess nextProcess = blockedSuspendedQueue.peek();\n\t\tif (nextProcess != null){\n\t\t id = nextProcess.getId();\n\t\t} \n\t } while (id != headPID && !blockedSuspendedQueue.isEmpty());\n\t}\n\t\n\tif (GlobalVariables.runningProcess == null && !readyQueue.isEmpty()){\n\t GlobalVariables.runningProcess = readyQueue.poll();\n\t GlobalVariables.write(\"\\tSTARTING: Process \" + GlobalVariables.runningProcess.getId());\n\t}\n\t// if there is a process running, run process one unit\n\t// we are letting a started process run on the same unit as it is being chosen\n\t// this assumes a low overhead as we talked about in class\n\tif (GlobalVariables.runningProcess != null){\n\t char c = GlobalVariables.runningProcess.runOneUnit();\n\n\t switch (c) {\n\t case '*':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\tblockRunningProcess();\n\t\tquantumCount = 0;\n\t\tbreak;\n\t case '!':\n\t\tGlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\texitRunningProcess();\n\t\tquantumCount = 0;\n\t\tbreak;\n\t default:\n\t GlobalVariables.write(\"\\t\" + GlobalVariables.runningProcess.getId() + \":\\t\" + c);\n\t\tquantumCount++;\n\t }\n\n\t if(quantumCount == GlobalVariables.ROUND_ROBIN_QUANTUM) {\n\t\tGlobalVariables.write(\"\\tTIMEOUT: Process \" + GlobalVariables.runningProcess.getId());\n\t\treadyQueue.offer(GlobalVariables.runningProcess);\n\t\tquantumCount = 0;\n\t\tGlobalVariables.runningProcess = null;\n\t }\n\t}\n }", "@Override\r\n \t\t\tpublic void deleteSessionsOfTenant(long tenantId) {\n \t\t\t\t\r\n \t\t\t}", "public void shutdown()\n {\n valid = false;\n quitSafely();\n\n synchronized (loading) {\n loading.clear();\n }\n synchronized (toLoad) {\n toLoad.clear();\n }\n synchronized (tilesByFetchRequest) {\n tilesByFetchRequest.clear();\n }\n }", "public final void destroy()\n {\n log.info(\"PerformanceData Servlet: Done shutting down!\");\n }", "public void shutdown() {\n\t\ttry {\n\t\t\ttsub.close();\n\t\t} catch (JMSException e) {\n\t\t\tSystem.out.println(\"> Error while closing the topic subscriber\");\n\t\t}\n\t\tArrayList<String> list = msgList.removeAllMessages();\n\t\tfor (String s : list) {\n\t\t\t//TODO save unprocessed messages to file\n\t\t}\n\t}", "@Override\n\tpublic void getCleanedUp() {\n\t\ttry {\n\t\t\t//studying\n\t\t\tThread.sleep(50 * capacity);\n\t\t\tLOGGER.info(\"Cleaning room \" + this.getRoomId());\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t}", "List<CatalogPartitionSpec> listPartitions(\n ObjectPath tablePath, CatalogPartitionSpec partitionSpec)\n throws TableNotExistException, TableNotPartitionedException,\n PartitionSpecInvalidException, CatalogException;", "@Override\n\tpublic void run() {\n\t\tNewDeliverTaskManager ndtm = NewDeliverTaskManager.getInstance();\n\t\tif(ndtm != null && ndtm.isNewDeliverTaskAct) {\n\t\t\tNewDeliverTaskManager.logger.error(\"[旧的任务库删除线程启动成功][\" + this.getName() + \"]\");\n\t\t\twhile(isStart) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tint count2 = 0;\n\t\t\t\tif(needRemoveList != null && needRemoveList.size() > 0) {\n\t\t\t\t\tList<DeliverTask> rmovedList = new ArrayList<DeliverTask>();\n\t\t\t\t\tfor(DeliverTask dt : needRemoveList) {\n\t\t\t\t\t\tDeliverTaskManager.getInstance().notifyDeleteFromCache(dt);\n\t\t\t\t\t\trmovedList.add(dt);\n\t\t\t\t\t\tcount1++;\n\t\t\t\t\t\tif(count1 >= 300) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.needRemoveList) {\n\t\t\t\t\t\tfor(DeliverTask dt : rmovedList) {\n\t\t\t\t\t\t\tneedRemoveList.remove(dt);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(heartBeatTime);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错1:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(teRemoveList != null && teRemoveList.size() > 0) {\n\t\t\t\t\tList<TaskEntity> teRemovedList = new ArrayList<TaskEntity>();\n\t\t\t\t\tfor(TaskEntity te : teRemoveList) {\n\t\t\t\t\t\tTaskEntityManager.getInstance().notifyDeleteFromCache(te);\n\t\t\t\t\t\tteRemovedList.add(te);\n\t\t\t\t\t\tcount2++;\n\t\t\t\t\t\tif(count2 >= 100) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tsynchronized (this.teRemoveList) {\n\t\t\t\t\t\tfor(TaskEntity te : teRemovedList) {\n\t\t\t\t\t\t\tteRemoveList.remove(te);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(30000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\tTransitRobberyManager.logger.error(\"删除旧的已完成列表线程出错2:\", e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tTransitRobberyManager.logger.error(\"[旧的任务库删除线程关闭][\" + this.getName() + \"]\");\n\t}" ]
[ "0.64373493", "0.60772675", "0.6017954", "0.58218616", "0.57633096", "0.57255274", "0.57176137", "0.5643471", "0.56420064", "0.56197864", "0.55181867", "0.5509593", "0.5497525", "0.54865664", "0.5442726", "0.5367982", "0.5327896", "0.531986", "0.53057843", "0.5286346", "0.5241258", "0.52318525", "0.52077794", "0.51412255", "0.5100614", "0.50969744", "0.5064958", "0.50508684", "0.5032936", "0.50135595", "0.50055814", "0.5000899", "0.49988243", "0.49876586", "0.49718648", "0.49670807", "0.4960124", "0.4942478", "0.4931026", "0.49124664", "0.49082834", "0.49002877", "0.48859143", "0.48792487", "0.4867448", "0.48636335", "0.48614308", "0.4850887", "0.4841802", "0.48398003", "0.48248497", "0.48007068", "0.4796611", "0.47820017", "0.4781499", "0.47798207", "0.47644687", "0.4764188", "0.47498775", "0.47347176", "0.47241038", "0.47226942", "0.47175968", "0.4712135", "0.47086197", "0.47077948", "0.46989578", "0.4696839", "0.46956283", "0.46935248", "0.46931556", "0.469296", "0.4677791", "0.46764216", "0.46728653", "0.46726245", "0.46725842", "0.46707183", "0.4661938", "0.46583727", "0.4650732", "0.46485302", "0.46478856", "0.46444762", "0.46412548", "0.46386975", "0.46310782", "0.4630742", "0.46175638", "0.46096742", "0.4609033", "0.46074042", "0.46072552", "0.46069846", "0.45847628", "0.4584613", "0.45833883", "0.4576802", "0.45724207", "0.45707777" ]
0.7183691
0
Take read lock for internal use.
private void internalReadUnlock() { checkpointLock.readLock().unlock(); if (ASSERTION_ENABLED) CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final void lockRead() {\n m_lock.readLock().lock();\n }", "public void acquireReadLock() {\r\n return;\r\n }", "public void checkReadLock() {\r\n return;\r\n }", "public void lock_read() {\n boolean update = false;\n logger.log(Level.INFO,\"lock_read()\"+this.lockState);\n lock.lock();\n logger.log(Level.INFO,\"lock_read : taking mutex : \"+this.lockState);\n \t\tswitch(this.lockState){\n \t\t\tcase RLC :\n \t\t\t\tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"reading in cache\");\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t\tthis.lockState=State.RLT_WLC;\n \t\t\t\tlogger.log(Level.INFO,\"reading in cache as previous writer\");\n \t\t\tbreak;\n \t\t\tdefault:\n update = true;\n \t\t\tbreak;\t\t\t\t\t\n \t\t}\n lock.unlock();\n logger.log(Level.FINE,\"lock_read : release the lock with :\"+lockState+\".\");\n if(update){\n logger.log(Level.INFO,\"Updating lockState to RLT\");\n \tthis.lockState=State.RLT;\n logger.log(Level.INFO,\"Lockstate was updated to \"+lockState);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n this.obj = client.lock_read(this.id);\n if(this.lockState!=State.RLT){\n logger.log(Level.SEVERE,\"Lock = \"+lockState+\" instead of RLT\");\n }\n logger.log(Level.INFO,\"lock_read(): end with \"+lockState);\n }\n \t}", "void acquireReadLock() throws InterruptedException;", "public void checkReadLock() {\n checkNotDeleted();\n super.checkReadLock();\n }", "void releaseReadLock();", "void acquireReadLock(E key);", "public SimpleLock readLock() {\n\n\t\treturn readerLock;\n\t}", "public void releaseReadLock() {\r\n return;\r\n }", "protected final void unlockRead() {\n m_lock.readLock().unlock();\n }", "public boolean acquireReadLockNoWait() {\r\n return true;\r\n }", "protected synchronized Lock acquireLock() {\n\t\tacquireReadLock();\n\t\treturn new Lock();\n\t}", "void unlockRead(long stamp);", "long tryReadLock(long timeout) throws InterruptedException;", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public ReadWriteLockObjectHolder() {\n\t\tthis(new ReentrantReadWriteLock());\n\t}", "void releaseReadLock(E key);", "public Object get() {\n while(isLocked() ) {\n try {\n Thread.sleep(10);\n }\n catch(InterruptedException ie) {\n // do nothing\n }\n }\n \n Object retVal = getHead();\n LAST_READ_TIME = now();\n return retVal;\n }", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "public void readWait()\n {\n try{\n waitLock.lock();\n while(readSector != -1){\n \t readDone.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "@Override public void run()\n\t\t{\n\t\t\twhile (mutex)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\");\n\t\t\t}\n\t\t\tmutex = true; \n\t\t\treadCount++;\n\t\t\tif (readCount == 1)\n\t\t\t{\n\t\t\twrt = true; // Locking writer when reader is active\n\t\t\t}\n\t\t\tmutex = false;\n\t\t\t// Critical Section \n\t\t\ttry {\n\t\t\t\t\tFile myObj = new File(\"shared.txt\"); \n\t\t\t\t\tScanner myReader = new Scanner(myObj); \n\t\t\t\t\tString data = myReader.nextLine(); \n\t\t\t\t\tSystem.out.println(\"Reading: \" + data); \n\t\t\t\t\tmyReader.close();\n\t\t\t\t} catch (FileNotFoundException e){}\n\n\t\t\t// Leave Critical section\n\t\t\twhile (mutex) { System.out.print(\"\"); } mutex = true;\n\t\t\treadCount--;\n\t\t\tif (readCount == 0) \n\t\t\t{\n\t\t\t\twrt = false; // Unlocking writer if all reading process is done.\n\t\t\t}\n\t\t\tmutex = false;\n\t\t}", "public void read() {\n\t\tthis.isRead = true;\n\t}", "public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }", "@Override\n public boolean hasReadAccess() {\n return true;\n }", "public SimpleReadWriteLock() {\n\n\t\treaderLock = new ReadLock();\n\t\twriterLock = new WriteLock();\n\t\treaders = 0;\n\t\twriters = 0;\n\t\tthis.lock = this;\n\t}", "public void logReadWait()\n {\n try{\n waitLock.lock();\n while(logReadSector != -1){\n \t logReadDone.awaitUninterruptibly();\n }\n return;\n }\n finally{\n waitLock.unlock();\n }\n }", "public abstract ReentrantLock getLock();", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshReadLock(lockKey, readToken, lockTimeoutSec);\r\n\t\t\t}", "private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }", "protected final void lockWrite() {\n m_lock.writeLock().lock();\n }", "@Override\n\t\tpublic void lock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twhile (writers > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlock.wait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treaders++;\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic ReadWriteLock getReadWriteLock() {\n\t\treturn null;\r\n\t}", "public void ownRead();", "protected void doBeginRead() throws Exception {}", "@Test\n public void writeTryReadLockTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int readThreadNum = 1;\n final CountDownLatch countDownLatch = new CountDownLatch(1);\n final List<Integer> result = new ArrayList<Integer>();\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n result.add(testUse.getCountInReadTryLock(2000));\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n countDownLatch.await();\n Assert.assertEquals(1000, result.get(0).intValue());\n }", "@ReturnsLock(\"RW\")\n public ReadWriteLock getLock() {\n return rwLock;\n }", "@Test\n public void readWaiteForWriteTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int readThreadNum = 5;\n final CountDownLatch countDownLatch = new CountDownLatch(6);\n final Set<Integer> readResult = new HashSet<Integer>();\n readResult.add(999);\n new Thread(new Runnable() {\n @Override\n public void run() {\n testUse.minusCountInWriteLock();\n countDownLatch.countDown();\n }\n }).start();\n Thread.sleep(2000);\n for (int i = 0; i < readThreadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n readResult.add(testUse.getCountInReadLock());\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(1, readResult.size());\n }", "synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}", "public void readSysCall() {\n read = false;\n clientChannel.read(readBuffer, this, readCompletionHandler);\n }", "void acquireDataverseReadLock(LockList locks, DataverseName dataverseName) throws AlgebricksException;", "public void readerUnlock() throws Exception, ClassCastException {\n\t\t// TODO\n\t\tif(holders.get() == null){\n\t\t\tthrow new Exception(\"Lock is not held by anyone\");\n\t\t}\n\t\tfinal Thread current = Thread.currentThread();\n\t\tReaderList newList;\n\t\tHolders readerLock;\n\t\tdo {\n\t\t\treaderLock = holders.get(); //return the value - not the instance holders\n\t\t\tif (readerLock instanceof Writer) {\n\t\t\t\tthrow new Exception(\"Lock is not held by any reader\");\n\t\t\t}\n\t\t\tif(!((ReaderList) readerLock).contains(current)){\n\t\t\t\tthrow new Exception(\"Lock not acquired\");\n\t\t\t}\n\t\t\tnewList = ((ReaderList) readerLock).remove(current);\n\t\t} while (!holders.compareAndSet(readerLock, newList));\n\t}", "public void acquire() {\r\n return;\r\n }", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "public synchronized void beginRead() {\n\t\tSystem.out.println(\"READER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint readTurn = currentTurn;\n\t\tcurrentTurn++;\n\t\t\n\t\twhile(readTurn!=nextTurn || numWriters > 0 ){\n\t\t\ttry {\n//\t\t\t\tSystem.out.println(\"READER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\twait();\n//\t\t\t\tSystem.out.println(\"READER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//number of readers at front of the queue\n\t\t//(unblocked reader)\n\t\tnumReaders ++;\n\n\t}", "void lock();", "public void lock() {\r\n super.lock();\r\n }", "public Object getLock() {\n return dataLock;\n }", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }", "public void lock_write() {\n boolean update = false;\n logger.log(Level.FINE,\"lock_write() \"+this.lockState+\".\");\n lock.lock();\n logger.log(Level.FINE,\"lock_write : taking mutex \"+this.lockState+\".\");\n switch(this.lockState){\n case WLC:\n this.lockState=State.WLT;\n logger.log(Level.INFO,\"writing with cache\");\n \t break;\n \t\t default: \t\n update = true;\n break;\n \t }\n lock.unlock();\n logger.log(Level.FINE,\"lock_write : the mutex with :\"+lockState+\".\");\n if(update){\n \tlogger.log(Level.INFO,\"Updating lock to WLT \"+lockState+\".\"); //Avant RLC\n \tthis.lockState=State.WLT; \n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\"); //Bien mmis à WLT.\n }\n logger.log(Level.INFO,\"LockState was updated to \"+lockState+\".\");\n this.obj = client.lock_write(this.id); //BUG : se fait invalider en tant que reader et passe à NL entrant dans la boucle suivante \n // A mon avis : se fait invalider en tant que lecteur (d'ou un lock_incohérent = WLT). A voir \n // Est-ce qu'il s'auto-invalide, auquel cas, il faut vérifier invalidate_reader mais je crois qu'il y un test pour ce cas.\n // Quelqu'un d'autre l'invalide mais dans ce cas, le serveur devrait \"séquencer\" cette autre invalidation et le lock_write.\n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\");\n }\n logger.log(Level.INFO,\"lock_write() : end with \"+lockState+\".\");\n }\n }", "boolean hasForRead();", "boolean getForRead();", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "@Test\n public void readLockShareTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int threadNum = 10;\n final CountDownLatch countDownLatch = new CountDownLatch(threadNum);\n final ConcurrentHashMap concurrentHashMap = new ConcurrentHashMap();\n for (int i = 0; i < threadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n boolean result = testUse.ifGetReadLockIn2Milliseconds();\n Assert.assertTrue(result);\n if (result) {\n concurrentHashMap.put(Thread.currentThread().getName(), \"value\");\n }\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(threadNum, concurrentHashMap.size());\n }", "public void setRead(){\n \tthis.isRead = true;\n }", "@Override\n\t\tpublic void lock() {\n\n\t\t\tsynchronized (lock) {\n\t\t\t\twhile (readers > 0 || writers > 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tlock.wait();\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\twriters++;\n\t\t\t}\n\t\t}", "public boolean readerTryLock() {\n\t\t// TODO\n\t\t/*\n\t\t * There is nothing stated saying that a thread cannot \n\t\t * try to take the lock multiple times\n\t\t */\n\t\tfinal Thread current = Thread.currentThread();\n\t\tHolders old = null;\n\t\tReaderList newHolder = null;\n\t\t// if lock is null or if instance is not a writer\n\t\tdo {\n\t\t\told = holders.get();\n\t\t\tif (old == null) {\n\t\t\t\tnewHolder = new ReaderList(current, null);\n\t\t\t} else if(old instanceof ReaderList){\n\t\t\t\ttry {\n\t\t\t\t\told = (ReaderList) holders.get();\n\t\t\t\t\tnewHolder = new ReaderList(current, (ReaderList) old);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} while (!holders.compareAndSet(old, newHolder));\n\t\treturn true;\n\t}", "private boolean _read(Transaction trans, DBObject obj, int index,\n boolean forUpdate, Filter filter) throws StorageException,\n LockConflict {\n long previousHolder = 0;\n if (forUpdate)\n previousHolder = lock(trans, index);\n\n // Get the location of the row on this page\n int loc = dir.loc(index);\n\n if (!RowHeader.isDeleted(pageBuffer, loc)) {\n // Read the tuple\n pageBuffer.get(loc + RowHeader.getOverhead(), obj);\n\n if (filter == null || filter.passes(obj)) {\n if (forUpdate) {\n // log the lock (needed for multi-versioning undo purposes)\n attachUndo(UNDO_LOCK, 10).getData().putShort((short) index)\n .putLong(previousHolder);\n attachRedo(REDO_LOCK, 10).getData().putShort((short) index)\n .putLong(trans.getTransId());\n }\n return true;\n }\n }\n\n if (forUpdate) {\n // Replace the lock before returning false\n if (previousHolder == 0)\n RowHeader.setLocked(pageBuffer, loc, false);\n else\n RowHeader.setLockHolder(pageBuffer, loc, previousHolder);\n }\n\n return false;\n }", "public Lock getLock();", "@Test\n public void readTryLockShareTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n final CountDownLatch countDownLatch = new CountDownLatch(5);\n final List<Integer> result = new ArrayList<Integer>();\n for (int i = 0; i < 5; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Integer r = testUse.getCountInReadTryLock(2000);\n if(r!=null){\n result.add(r);\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(5, result.size());\n }", "public void internalRead() {\r\n\t\tbusInt.put(data);\r\n\t}", "void acquireAdapterReadLock(LockList locks, DataverseName dataverseName, String adapterName)\n throws AlgebricksException;", "public void acquireDeferredLock() {\r\n return;\r\n }", "void acquireLibraryReadLock(LockList locks, DataverseName dataverseName, String libraryName)\n throws AlgebricksException;", "public ReadWriteLock getReadWriteLock() {\n\t\treturn rwLock;\n\t}", "protected final void lock(boolean writeLock) {\n Lock lock = writeLock ? m_lock.writeLock() : m_lock.readLock();\n lock.lock();\n }", "public boolean getForRead() {\n return forRead_;\n }", "public boolean lockRecordForRead(\n Transaction t, \n ContainerHandle container_handle,\n RecordHandle record, \n boolean waitForLock,\n boolean forUpdate)\n\t\tthrows StandardException\n\t{\n // RESOLVE - Did I do the right thing with the \"forUpdate\" variable.\n\n // For now just lock the row in Shared mode.\n\t\tObject qualifier = forUpdate ? getUpdateLockType() : getReadLockType();\n\n return(\n lf.lockObject(\n t.getCompatibilitySpace(), t, record, qualifier,\n waitForLock ? \n C_LockFactory.TIMED_WAIT : C_LockFactory.NO_WAIT));\n\t}", "public void lock() {\n\n }", "public boolean getlock()\r\n\t{\r\n\t\tif(cnt > 10)\r\n\t\t{\r\n\t\t\tcnt = 0;\r\n\t\t\treturn unlocked;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean isReadAccess();", "final public Lock test_get_lock() {\r\n\t\treturn lock_;\r\n\t}", "public boolean getForRead() {\n return forRead_;\n }", "public void lock() {\n if (!locked) {\n locked = true;\n sortAndTruncate();\n }\n }", "private void t1() {\n // read and write to the same region: just want the write effect\n writeProtected();\n readProtected();\n }", "@Test\n public void writeWaitForReadTest() throws InterruptedException {\n final TestUse testUse = new TestUse();\n int readThreadNum = 5;\n int writeThreadNum = 5;\n final CountDownLatch countDownLatch = new CountDownLatch(10);\n final Set<Integer> readResult = new HashSet<Integer>();\n readResult.add(1000);\n for (int i = 0; i < readThreadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n readResult.add(testUse.getCountAndSleepInReadLock(500));\n countDownLatch.countDown();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }).start();\n }\n Thread.sleep(2000);\n for (int i = 0; i < writeThreadNum; i++) {\n new Thread(new Runnable() {\n @Override\n public void run() {\n testUse.minusCountInWriteLock();\n countDownLatch.countDown();\n }\n }).start();\n }\n countDownLatch.await();\n Assert.assertEquals(1, readResult.size());\n Assert.assertEquals(995, testUse.count);\n }", "Read createRead();", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tif (wl != null && !wl.isHeld())\r\n\t\t\twl.acquire();\r\n\t}", "interface ReadWritePolicy {\n\tpublic void acquireRead() throws InterruptedException;\n\tpublic void releaseRead();\n\tpublic void acquireWrite() throws InterruptedException;\n\tpublic void releaseWrite();\n}", "@Test\n @Ignore(\"This is only applicable to Neo4j 2.0.0-M03 and below where transactions \" +\n \"were not mandatory for reading\")\n public void defaultReadingIsReadCommitted() throws Exception {\n assertNameAndAgeViaLookup(john.getId(), \"John\", 34, \"John\");\n\n // Do the update in a separate Thread and ensure its actually updated\n doUpdateInSeparateThread(new PersonUpdater(\"John\", 44));\n\n // Now, back in our thread, ensure we read the commited value\n assertNameAndAgeViaLookup(john.getId(), \"John\", 44, \"John\");\n }", "public void lock() {\n\t\tlocked = true;\n\t}", "@Override\n public int acquire() {\n final long stamp = allocatorLock.writeLock();\n try {\n return acquire0();\n } finally {\n allocatorLock.unlockWrite(stamp);\n }\n }", "protected RowLock getReadLockType() \n {\n\t\treturn(RowLock.RS3);\n }", "public Serializable jvnLockRead(int joi) throws JvnException {\n\t \tSerializable object = null;\n\t\ttry {\n\t\t\tobject = this.jRCoordonator.jvnLockRead(joi, js);\n\t\t} catch (RemoteException e) {\n\t\t\tSystem.out.println(\"Error jvnLockRead : \" + e.getMessage());\n\t\t}\n\t\treturn object;\n\t}", "public Object reduce_lock() {\n \t\tthis.lock.lock();\n switch(this.lockState){\n case WLT:\n \t\t while(this.lockState==State.WLT){\n \t\t\t try{\t\t \n \t\t\t\t this.available.await();\n \t\t }catch(InterruptedException i){}\n \t\t }\n this.lockState = State.RLC;\t\n \t\t\tbreak;\n \t\t\tcase RLT_WLC:\n \t\t\t this.lockState=State.RLT;\n \t\t\tbreak;\n \t\t\tcase WLC:\n \t\t\t this.lockState=State.RLC;\n \t\t\tbreak;\n \t\t\tdefault: \n logger.log(Level.SEVERE,\"reduce : Lock incoherent :\"+lockState+\".\");\n break;\n \t\t}\n //busy = true; \n logger.log(Level.INFO,\"I was <b>reduced</b> to \"+this.lockState+\".\");\n \t\tthis.lock.unlock();\n \t\treturn obj;\n \t}", "@Override\r\n\tpublic void read() {\n\r\n\t}", "@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean tryLock() {\n\t\treturn false;\n\t}", "public Result get(Get get, Integer lockId) throws IOException;", "private void doRead() throws IOException {\n\t\t\tvar res = sc.read(bb);\n\n\t\t\tif ( res == -1 ) {\n\t\t\t\tlogger.info(\"Connection closed with the client.\");\n\t\t\t\tclosed = true;\n\t\t\t}\n\n\t\t\tupdateInterestOps();\n\t\t}", "private void checkIndexLocking() throws IOException {\n\t\tboolean locked = IndexReader.isLocked(getDirectory());\n\t\tif( locked ) {\n\t\t\tif( resolveLock ) {\n\t\t\t\tIndexReader.unlock(getDirectory());\n\t\t\t} else {\n\t\t\t\tthrow new LuceneIndexAccessException(\"The index is locked\");\n\t\t\t}\n\t\t}\n\t}", "private void readData()\n {\n while(System.currentTimeMillis() - start <= durationMillis)\n {\n counters.numRequested.incrementAndGet();\n readRate.acquire();\n\n if (state.get() == SimulationState.TEARING_DOWN)\n break;\n }\n }", "protected BiFunction<SelectionKey, Integer, Runnable> onReading() {\n return readable;\n }", "public void acquire(boolean forMerge) {\r\n return;\r\n }", "void acquireDatasetReadLock(LockList locks, DataverseName dataverseName, String datasetName)\n throws AlgebricksException;", "@Override\n\tpublic Lock getLock() {\n\t\treturn this.lock;\n\t}" ]
[ "0.86329114", "0.85585153", "0.82360816", "0.791024", "0.7774374", "0.76223797", "0.75882435", "0.7565147", "0.7524529", "0.75224274", "0.7397726", "0.7260031", "0.702947", "0.69872016", "0.68892825", "0.667816", "0.65715677", "0.65506476", "0.65133345", "0.6494633", "0.64865404", "0.6471313", "0.64625657", "0.64552176", "0.6437199", "0.6414344", "0.63987494", "0.6393588", "0.6389517", "0.6379015", "0.63699937", "0.6295924", "0.6289993", "0.6247887", "0.622718", "0.6223755", "0.62229484", "0.6194143", "0.61901575", "0.6168844", "0.61595964", "0.6126356", "0.6105616", "0.61043876", "0.6087695", "0.6085382", "0.6078964", "0.60688156", "0.60394925", "0.6035633", "0.6032085", "0.60291594", "0.6026432", "0.6017304", "0.6017304", "0.6017304", "0.5977284", "0.59609956", "0.5959399", "0.5959213", "0.5957418", "0.5943317", "0.5938624", "0.592744", "0.5911445", "0.590843", "0.59017867", "0.5889587", "0.58804876", "0.58677787", "0.5866978", "0.5864903", "0.58405983", "0.58241093", "0.581195", "0.58073497", "0.57877344", "0.5785066", "0.5784013", "0.5778055", "0.57612103", "0.57568675", "0.575307", "0.5753069", "0.5742562", "0.5741362", "0.5741103", "0.57398087", "0.5737985", "0.57361704", "0.5726582", "0.5726582", "0.5723566", "0.5723562", "0.571804", "0.571758", "0.5713188", "0.5709519", "0.5698114", "0.56971115" ]
0.69582486
14
Fill cache group state in checkpoint record.
private void fillCacheGroupState(CheckpointRecord cpRec) throws IgniteCheckedException { GridCompoundFuture grpHandleFut = asyncRunner == null ? null : new GridCompoundFuture(); for (CacheGroupContext grp : cctx.cache().cacheGroups()) { if (grp.isLocal() || !grp.walEnabled()) continue; Runnable r = () -> { ArrayList<GridDhtLocalPartition> parts = new ArrayList<>(grp.topology().localPartitions().size()); for (GridDhtLocalPartition part : grp.topology().currentLocalPartitions()) parts.add(part); CacheState state = new CacheState(parts.size()); for (GridDhtLocalPartition part : parts) { state.addPartitionState( part.id(), part.dataStore().fullSize(), part.updateCounter(), (byte)part.state().ordinal() ); } synchronized (cpRec) { cpRec.addCacheGroupState(grp.groupId(), state); } }; if (asyncRunner == null) r.run(); else try { GridFutureAdapter<?> res = new GridFutureAdapter<>(); asyncRunner.execute(U.wrapIgniteFuture(r, res)); grpHandleFut.add(res); } catch (RejectedExecutionException e) { assert false : "Task should never be rejected by async runner"; throw new IgniteException(e); //to protect from disabled asserts and call to failure handler } } if (grpHandleFut != null) { grpHandleFut.markInitialized(); grpHandleFut.get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "private boolean fillSegmentWithDataFromCache(DataSegment segment, int[] cachePos, String basedir) {\n String filename=basedir+File.separator+(cachePos[0]+\"_\"+cachePos[1]);\n Object saved=loadObjectFromFile(filename);\n if (saved==null || !(saved instanceof DataSegment)) return false; \n String error=segment.importData((DataSegment)saved);\n if (error!=null) {\n engine.logMessage(\"SYSTEM WARNING: Detected problems while processing cached data (error code:\"+error+\")\");\n segment.setSegmentData(null); // this will clear the data\n return false;\n } // else engine.logMessage(\"DEBUG: imported data with no error from: \"+filename);\n return true;\n }", "private void fillPkCache(Stack s, String ename) {\n\t\tLong pkValueStart = getNextPkValueForEntityIncreaseBy(ename, 10, increaseBy());\n\t\tlong value = pkValueStart.longValue();\n\t\tlog.debug(\"filling pkCache for {}, starting at {}\", ename, value);\n\t\tfor (int i = increaseBy(); i > 0; i--) {\n\t\t\ts.push(Long.valueOf(i + value));\n\t\t}\n\t}", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "private void newGroup()\n\t{\n\t\t// There is no need anymore to take care of the meta-data.\n\t\t// That is done once in DenormaliserMeta.getFields()\n\t\t//\n data.targetResult = new Object[meta.getDenormaliserTargetFields().length];\n \n for (int i=0;i<meta.getDenormaliserTargetFields().length;i++)\n {\n data.targetResult[i] = null;\n\n data.counters[i]=0L; // set to 0\n data.sum[i]=null;\n }\n\t}", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "private void resetMarked() {\n if(!data.isEmpty()) {\n data.getFirst().reset();\n }\n for(IoBuffer buf : resetCache) {\n buf.reset();\n data.addFirst(buf);\n }\n resetCache.clear();\n }", "public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }", "@Override\n\t\t\tprotected void onResume() {\n\t\t\t\tsuper.onResume();\n\t\t\t\tmDbxAcctMgr1 = mDbxAcctMgr;\n\t\t\t\tmDatastore1 = mDatastore;\n\t\t\t\tLog.e(\"mtag\", \"main onResume\" + mDatastore1);\n\t\t\t}", "@Override\n\tpublic void cacheResult(LinkGroup linkGroup) {\n\t\tentityCache.putResult(LinkGroupModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\tLinkGroupImpl.class, linkGroup.getPrimaryKey(), linkGroup);\n\n\t\tlinkGroup.resetOriginalValues();\n\t}", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "@Override\n public void cacheGroupsRefresh() throws IOException {\n List<String> groups = NetgroupCache.getNetgroupNames();\n NetgroupCache.clear();\n cacheGroupsAdd(groups);\n }", "private void PopulateCheckpointList()\n {\n checkpoints.add(FindNextCheckpoint(startTile, directions = FindNextDirection(startTile)));\n \n int counter = 0;\n boolean cont = true;\n while (cont)\n {\n int[] currentDirection = FindNextDirection(checkpoints.get(counter).getTile());\n \n // Check if a next direction/checkpoint exists and end after 20 chekpoints(arbitrary).\n if(currentDirection[0] == 2 || counter == 20)\n {\n cont = false;\n }\n else\n {\n checkpoints.add(FindNextCheckpoint(checkpoints.get(counter).getTile(),\n directions = FindNextDirection(checkpoints.get(counter).getTile())));\n }\n counter++;\n }\n }", "@SuppressWarnings(\"unused\") // Used by scheduler\n @Secured({ \"GROUP_AGENT\" })\n void recalculateBatchInfo();", "public void fillCourse(Group group);", "public void setStateCache( ClusterFileStateCache stateCache) {\n\t\tsuper.setStateCache( stateCache);\n\t\t\n\t\t// Set the state cache for the remote oplock, if available\n\t\t// Needs to be set after deserialization of the file state/remote oplock\n\t\t\n\t\tif ( hasOpLock() && getOpLock() instanceof RemoteOpLockDetails) {\n\t\t\tRemoteOpLockDetails remoteOplock = (RemoteOpLockDetails) getOpLock();\n\t\t\tremoteOplock.setStateCache( stateCache);\n\t\t}\n\t}", "public void resumeLC() {\n\n Consensus cons = execManager.getConsensus(tempLastHighestCID.getCID());\n Epoch e = cons.getLastEpoch();\n\n int ets = cons.getEts();\n\n if (e == null || e.getTimestamp() != ets) {\n e = cons.createEpoch(ets, controller);\n } else {\n e.clear();\n }\n\n byte[] hash = tom.computeHash(tempLastHighestCID.getDecision());\n e.propValueHash = hash;\n e.propValue = tempLastHighestCID.getDecision();\n\n e.deserializedPropValue = tom.checkProposedValue(tempLastHighestCID.getDecision(), false);\n\n finalise(tempRegency, tempLastHighestCID,\n tempSignedCollects, tempPropose, tempBatchSize, tempIAmLeader);\n\n }", "private void updateAccPoolState() {\n List<AionAddress> clearAddr = new ArrayList<>();\n for (Entry<AionAddress, AccountState> e : this.accountView.entrySet()) {\n AccountState as = e.getValue();\n if (as.isDirty()) {\n\n if (as.getMap().isEmpty()) {\n this.poolStateView.remove(e.getKey());\n clearAddr.add(e.getKey());\n } else {\n // checking AccountState given by account\n List<PoolState> psl = this.poolStateView.get(e.getKey());\n if (psl == null) {\n psl = new LinkedList<>();\n }\n\n List<PoolState> newPoolState = new LinkedList<>();\n // Checking new tx has been include into old pools.\n BigInteger txNonceStart = as.getFirstNonce();\n\n if (txNonceStart != null) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState fn [{}]\",\n txNonceStart.toString());\n }\n for (PoolState ps : psl) {\n // check the previous txn status in the old\n // PoolState\n if (isClean(ps, as)\n && ps.firstNonce.equals(txNonceStart)\n && ps.combo == seqTxCountMax) {\n ps.resetInFeePool();\n newPoolState.add(ps);\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState add fn [{}]\",\n ps.firstNonce.toString());\n }\n\n txNonceStart = txNonceStart.add(BigInteger.valueOf(seqTxCountMax));\n } else {\n // remove old poolState in the feeMap\n if (this.feeView.get(ps.getFee()) != null) {\n\n if (e.getValue().getMap().get(ps.firstNonce) != null) {\n this.feeView\n .get(ps.getFee())\n .remove(\n e.getValue()\n .getMap()\n .get(ps.firstNonce)\n .getKey());\n }\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState remove fn [{}]\",\n ps.firstNonce.toString());\n }\n\n if (this.feeView.get(ps.getFee()).isEmpty()) {\n this.feeView.remove(ps.getFee());\n }\n }\n }\n }\n }\n\n int cnt = 0;\n BigInteger fee = BigInteger.ZERO;\n BigInteger totalFee = BigInteger.ZERO;\n\n for (Entry<BigInteger, SimpleEntry<ByteArrayWrapper, BigInteger>> en :\n as.getMap().entrySet()) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState mapsize[{}] nonce:[{}] cnt[{}] txNonceStart[{}]\",\n as.getMap().size(),\n en.getKey().toString(),\n cnt,\n txNonceStart != null ? txNonceStart.toString() : null);\n }\n if (en.getKey()\n .equals(\n txNonceStart != null\n ? txNonceStart.add(BigInteger.valueOf(cnt))\n : null)) {\n if (en.getValue().getValue().compareTo(fee) > -1) {\n fee = en.getValue().getValue();\n totalFee = totalFee.add(fee);\n\n if (++cnt == seqTxCountMax) {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case1 - nonce:[{}] totalFee:[{}] cnt:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt);\n }\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n\n txNonceStart = en.getKey().add(BigInteger.ONE);\n totalFee = BigInteger.ZERO;\n fee = BigInteger.ZERO;\n cnt = 0;\n }\n } else {\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case2 - nonce:[{}] totalFee:[{}] cnt:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt);\n }\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n\n // next PoolState\n txNonceStart = en.getKey();\n fee = en.getValue().getValue();\n totalFee = fee;\n cnt = 1;\n }\n }\n }\n\n if (totalFee.signum() == 1) {\n\n if (LOG.isTraceEnabled()) {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState case3 - nonce:[{}] totalFee:[{}] cnt:[{}] bw:[{}]\",\n txNonceStart,\n totalFee.toString(),\n cnt,\n e.getKey().toString());\n }\n\n newPoolState.add(\n new PoolState(\n txNonceStart,\n totalFee.divide(BigInteger.valueOf(cnt)),\n cnt));\n }\n\n this.poolStateView.put(e.getKey(), newPoolState);\n\n if (LOG.isTraceEnabled()) {\n this.poolStateView.forEach(\n (k, v) ->\n v.forEach(\n l -> {\n LOG.trace(\n \"AbstractTxPool.updateAccPoolState - the first nonce of the poolState list:[{}]\",\n l.firstNonce);\n }));\n }\n as.sorted();\n }\n }\n }\n\n if (!clearAddr.isEmpty()) {\n clearAddr.forEach(\n addr -> {\n lock.writeLock().lock();\n this.accountView.remove(addr);\n lock.writeLock().unlock();\n this.bestNonce.remove(addr);\n });\n }\n }", "protected void resetMeasures(List<StructureEntityVersion> chunk) {\n\t\tfor (BugPronenessMeasure measure: this.measures) {\n\t\t\tmeasure.startNewChunk(chunk);\n\t\t}\n\t}", "void prepareSortedLedgerStorageCheckpoint(long numBytesFlushed) throws IOException;", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "public abstract void updateBlockRecord();", "private void reset(int i) {\n long x = data[i];\n if (isTag(x))\n cas(i, x, save[threadId(x)]);\n }", "public void storeInCache() {\r\n lockValueStored = IN_CACHE;\r\n }", "@Override public WALRecord next() throws IgniteCheckedException {\n WALRecord rec = super.next();\n\n if (rec == null)\n return null;\n\n if (rec.type() == CHECKPOINT_RECORD) {\n CheckpointRecord cpRec = (CheckpointRecord)rec;\n\n // We roll memory up until we find a checkpoint start record registered in the status.\n if (F.eq(cpRec.checkpointId(), status.cpStartId)) {\n log.info(\"Found last checkpoint marker [cpId=\" + cpRec.checkpointId() +\n \", pos=\" + rec.position() + ']');\n\n needApplyBinaryUpdates = false;\n }\n else if (!F.eq(cpRec.checkpointId(), status.cpEndId))\n U.warn(log, \"Found unexpected checkpoint marker, skipping [cpId=\" + cpRec.checkpointId() +\n \", expCpId=\" + status.cpStartId + \", pos=\" + rec.position() + ']');\n }\n\n return rec;\n }", "@Override\n public void afterPropertiesSet() throws Exception {\n GuavaCacheMetrics.monitor(\n registry,\n cache,\n \"serialLookupCache\",\n Collections.singleton(Tag.of(StoreMetrics.TAG_STORE_KEY, StoreMetrics.TAG_STORE_VALUE)));\n }", "public synchronized void mark(int readlimit) {\n if(!data.isEmpty()) {\n data.getFirst().mark();\n }\n if(marked) {\n clearResetCache();\n }\n marked = true;\n resetCache = new LinkedList<IoBuffer>();\n }", "public void beginInitialization() {\n SQLiteDatabase db = this.helper.getWritableDatabase();\n db.beginTransaction();\n populateMeasurementVersionsCache(db);\n }", "private static void resetGroupLineArrays() {\n // Reset the arrays to make sure that we have uptodate information in them\n itemsArray = null;\n itemsArrayForAlterations = null;\n itemsArrayForOpenDeposit = null;\n }", "public void cacheResult(\n com.ext.portlet.model.ModelInputGroup modelInputGroup);", "public void setCompleteMD(byte[] cachedata);", "public final void rule__UpdateExpressionStoreReference__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7996:1: ( rule__UpdateExpressionStoreReference__Group__0__Impl rule__UpdateExpressionStoreReference__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:7997:2: rule__UpdateExpressionStoreReference__Group__0__Impl rule__UpdateExpressionStoreReference__Group__1\n {\n pushFollow(FOLLOW_rule__UpdateExpressionStoreReference__Group__0__Impl_in_rule__UpdateExpressionStoreReference__Group__015671);\n rule__UpdateExpressionStoreReference__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__UpdateExpressionStoreReference__Group__1_in_rule__UpdateExpressionStoreReference__Group__015674);\n rule__UpdateExpressionStoreReference__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void clearCheckpoint(int iCnt) {\n CHCKPRIO iObj = new CHCKPRIO(\"\");\n int iStatus = iObj.select(rObj);\n if (iStatus == -1) {\n System.out.println(\"*** FATAL ERROR. CHCKP COULD NOT BE DETERMINED. PROCESS HALTING.\");\n System.exit(0);\n }\n rObj.setUow(iCnt);\n if (rObj.getSdate().contains(\"0000-00-00\")) {\n rObj.setSdate(COMMONdate.getInstance().getDateTime());\n }\n rObj.setFdate(COMMONdate.getInstance().getDateTime());\n rObj.setStatus(1);\n if (iStatus == 0) {\n iObj.insert(rObj);\n } else {\n iObj.update(rObj);\n }\n }", "public static void initializeGroupMember(Group group){\n\t\tHibernate.initialize(group.getGroupMembers());\n\t}", "@Override\n public void cacheGroupsAdd(List<String> groups) throws IOException {\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tfigures.clear();\n\t\tfillData();\n\t\tboxAdapter.notifyDataSetChanged();\n\n\t}", "@Test\n public void testNamenodeStateOverride() throws Exception {\n String ns = \"ns0\";\n String nn = \"nn0\";\n MembershipState report = createRegistration(\n ns, nn, ROUTERS[1], FederationNamenodeServiceState.STANDBY);\n assertTrue(namenodeHeartbeat(report));\n\n // Load data into cache and calculate quorum\n assertTrue(getStateStore().loadCache(MembershipStore.class, true));\n\n MembershipState existingState = getNamenodeRegistration(ns, nn);\n assertEquals(\n FederationNamenodeServiceState.STANDBY, existingState.getState());\n\n // Override cache\n UpdateNamenodeRegistrationRequest request =\n UpdateNamenodeRegistrationRequest.newInstance(\n ns, nn, FederationNamenodeServiceState.ACTIVE);\n assertTrue(membershipStore.updateNamenodeRegistration(request).getResult());\n\n MembershipState newState = getNamenodeRegistration(ns, nn);\n assertEquals(FederationNamenodeServiceState.ACTIVE, newState.getState());\n\n // Override cache\n UpdateNamenodeRegistrationRequest request1 =\n UpdateNamenodeRegistrationRequest.newInstance(ns, nn,\n FederationNamenodeServiceState.OBSERVER);\n assertTrue(\n membershipStore.updateNamenodeRegistration(request1).getResult());\n\n MembershipState newState1 = getNamenodeRegistration(ns, nn);\n assertEquals(FederationNamenodeServiceState.OBSERVER, newState1.getState());\n }", "void resetCacheCounters();", "public final void rule__Store__Group__0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2613:1: ( rule__Store__Group__0__Impl rule__Store__Group__1 )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:2614:2: rule__Store__Group__0__Impl rule__Store__Group__1\n {\n pushFollow(FOLLOW_rule__Store__Group__0__Impl_in_rule__Store__Group__05152);\n rule__Store__Group__0__Impl();\n\n state._fsp--;\n\n pushFollow(FOLLOW_rule__Store__Group__1_in_rule__Store__Group__05155);\n rule__Store__Group__1();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "@Test\n public void testDataMix()\n throws InterruptedException {\n\n createGroup(2);\n\n ReplicatedEnvironment menv = repEnvInfo[0].getEnv();\n TransactionConfig txnConfig = RepTestUtils.WNSYNC_NONE_TC;\n Transaction txn = menv.beginTransaction(null, txnConfig);\n Database db = menv.openDatabase(txn, \"mixed\", dbconfig);\n txn.commit();\n txn = null;\n RepTestUtils.syncGroup(repEnvInfo);\n\n repEnvInfo[1].closeEnv();\n assertEquals(menv.getState(), State.MASTER);\n\n final int batchBuffSize =\n Integer.parseInt(RepParams.FEEDER_BATCH_BUFF_KB.getDefault()) *\n 1024;\n\n txn = menv.beginTransaction(null, txnConfig);\n\n /*\n * Generate a log pattern with an intervening large object that serves\n * to break up a batch.\n */\n for (int size : new int[] { 1, 2, /* batch 1 */\n batchBuffSize + 1, /* break the batch */\n 3, 4 /* batch 2 */\n }) {\n IntegerBinding.intToEntry(size, key);\n data.setData(new byte[size]);\n db.put(txn, key, data);\n }\n txn.commit();\n db.close();\n\n\n ReplicatedEnvironmentStats stats =\n menv.getRepStats(StatsConfig.CLEAR);\n\n repEnvInfo[1].openEnv();\n final VLSN vlsn = RepTestUtils.syncGroup(repEnvInfo);\n\n stats = menv.getRepStats(null);\n\n /*\n * Seven total messages: 1 unconditional startup heartbeat +\n * 5 puts + 1 commit\n */\n assertEquals(7, stats.getNProtocolMessagesWritten());\n\n /* 4 puts + 1 commit batched. */\n assertEquals(5, stats.getNProtocolMessagesBatched());\n\n /* 2 batches as above. */\n assertEquals(2, stats.getNProtocolMessageBatches());\n\n RepTestUtils.checkNodeEquality(vlsn, false, repEnvInfo);\n }", "public void reset() {\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n CacheData<K, V> pair = getCacheData(i);\r\n if (pair != null) {\r\n pair.reset();\r\n }\r\n }\r\n }", "void syncGroup();", "@Override\n\tpublic void cacheResult(List<LinkGroup> linkGroups) {\n\t\tfor (LinkGroup linkGroup : linkGroups) {\n\t\t\tif (entityCache.getResult(LinkGroupModelImpl.ENTITY_CACHE_ENABLED,\n\t\t\t\t\t\tLinkGroupImpl.class, linkGroup.getPrimaryKey()) == null) {\n\t\t\t\tcacheResult(linkGroup);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tlinkGroup.resetOriginalValues();\n\t\t\t}\n\t\t}\n\t}", "private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }", "void reschedule(Group groupInfo, boolean miss);", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\t// mManager.clearAll();\r\n\t\t// mManager.LoadData(app.user.sessionID, orderTab);\r\n\t}", "void checkpoint() throws IOException;", "@Override\r\n protected TupleBatch fetchNextReady() throws DbException {\r\n final Operator child = getChild();\r\n\r\n if (child.eos()) {\r\n return getResultBatch();\r\n }\r\n\r\n TupleBatch tb = child.nextReady();\r\n while (tb != null) {\r\n for (int row = 0; row < tb.numTuples(); ++row) {\r\n int rowHash = HashUtils.hashSubRow(tb, gfields, row);\r\n IntArrayList hashMatches = groupKeyMap.get(rowHash);\r\n if (hashMatches == null) {\r\n hashMatches = newKey(rowHash);\r\n newGroup(tb, row, hashMatches);\r\n continue;\r\n }\r\n boolean found = false;\r\n for (int i = 0; i < hashMatches.size(); i++) {\r\n int value = hashMatches.get(i);\r\n if (TupleUtils.tupleEquals(tb, gfields, row, groupKeys, grpRange, value)) {\r\n updateGroup(tb, row, aggStates.get(value));\r\n found = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!found) {\r\n newGroup(tb, row, hashMatches);\r\n }\r\n Preconditions.checkState(groupKeys.numTuples() == aggStates.size());\r\n }\r\n tb = child.nextReady();\r\n }\r\n\r\n /*\r\n * We know that child.nextReady() has returned <code>null</code>, so we have processed all tuple we can. Child is\r\n * either EOS or we have to wait for more data.\r\n */\r\n if (child.eos()) {\r\n return getResultBatch();\r\n }\r\n\r\n return null;\r\n }", "private void preloadData()\n {\n ICardinality cardinality = newCardinality();\n\n byte[] scratchBytes = new byte[8];\n ByteBuffer scratch = ByteBuffer.wrap(scratchBytes);\n long numToFlush;\n int lastFlushed = 0;\n long lastLogged = System.currentTimeMillis();\n long maxBytesToInsert = (long) datasetSizeGB << 30;\n long bytesInserted = 0;\n int i = 0;\n\n logger.info(\"Inserting up to {}\", FBUtilities.prettyPrintMemory(maxBytesToInsert));\n\n try\n {\n while(bytesInserted < maxBytesToInsert)\n {\n scratch.clear();\n scratch.putLong(0, i);\n long hash = MurmurHash.hash64(scratchBytes, scratchBytes.length);\n cardinality.offerHashed(hash);\n\n counters.numInserted.incrementAndGet();\n bytesInserted += valueSize;\n\n i++;\n if (i == maxKey)\n i = 0;\n\n if (System.currentTimeMillis()- lastLogged >= TimeUnit.SECONDS.toMillis(1))\n {\n lastLogged = System.currentTimeMillis();\n logger.debug(\"Ins: {}, keys: {}, live sstables: {}, compacting: {}, pending compactions: {}\",\n FBUtilities.prettyPrintMemory(bytesInserted),\n i,\n dataTracker.getLiveSSTables().size(),\n dataTracker.getCompacting().size(),\n compactions.size() + strategy.getEstimatedRemainingTasks());\n }\n\n if (i >= (lastFlushed + uniqueKeysPerSStable) && // no point in checking the cardinality until we've inserted uniqueKeysPerSStable more entries\n (numToFlush = cardinality.cardinality()) >= uniqueKeysPerSStable)\n {\n counters.numFlushed.addAndGet(numToFlush);\n lastFlushed = i;\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n\n cardinality = newCardinality();\n }\n\n if (i % 1000 == 0 && state.get() == SimulationState.TEARING_DOWN)\n { // this happens if the compaction threads fail\n logger.debug(\"Interrupting preload, simulation is tearing down\");\n break;\n }\n }\n\n if ((numToFlush = cardinality.cardinality()) > 0)\n {\n counters.numFlushed.addAndGet(numToFlush);\n generateSSTables(cardinality, numToFlush, partitioner.getMinimumToken(), partitioner.getMaximumToken(), \"preload\", true);\n }\n }\n catch (Exception e)\n {\n logger.error(\"Exception happen during preloading\", e);\n }\n }", "protected void updateGroupData() {\n if (!mGroupList.isEmpty()) {\n mAdapter.notifyDataSetChanged();\n // If we did not load 8 groups, we are at the end of the list, so signal\n // not to try to load more groups.\n if (mGroupList.size() - mCurrentAmountShown < 8) {\n loadMore = false;\n if(getListView() != null) {\n \tgetListView().removeFooterView(mProgressBar);\n }\n }\n \n hasGroups = true;\n } else {\n ArrayAdapter<String> blankAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1);\n blankAdapter.add(\"no groups to display\");\n getListView().setAdapter(blankAdapter);\n getListView().setEnabled(false);\n getListView().removeFooterView(mProgressBar);\n }\n }", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "public void addFetchGroup(final String group) {\n\t\t query.getFetchPlan().addFetchGroup(group);\n\t}", "DbGroupGradingSheet(int groupId, int partId) {\n super(null);\n _groupId = groupId;\n _partId = partId;\n _assignedToId = null;\n _submittedById = null;\n _submittedDate = null;\n \n _subsectionEarnedPoints = new ConcurrentHashMap<Integer, GroupSubsectionEarnedRecord>();\n _sectionComments = new ConcurrentHashMap<Integer, GroupSectionCommentsRecord>();\n }", "private void addGroupsToGroupCache(ModelGroupReader modelGroupReader,\n\t\t ResourceHandler resourceHandler)\n throws OfbizDataException {\n\t\tif(modelGroupReader == null || resourceHandler == null) {\n\t\t\tLOG.warn(String.format(\"Null timereport group reader or resource \" +\n\t\t\t\t\t \"handler in addGroupsToGroupCache() method.\" +\n\t\t\t\t\t \" Model reader: %s resource handler: %s\",\n\t\t\t\t\t modelGroupReader, resourceHandler));\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tMap<?, ?> groupCache = modelGroupReader.getGroupCache();\n Document document;\n\n\t\t\tsynchronized (ModelGroupReader.class) {\n\n\t\t\t\ttry {\n\t\t\t\t\tdocument = resourceHandler.getDocument();\n\t\t\t\t} catch (GenericConfigException e) {\n\t\t\t\t\tString msg = \"Error loading entity group timereport\";\n\t\t\t\t\tLOG.error(msg, e);\n\t\t\t\t\tthrow new OfbizDataException(msg, e);\n\t\t\t\t}\n\t\t\t\tif (document == null) {\n\t\t\t\t\tString msg = String.format(\"Could not get document for %s\",\n resourceHandler);\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\n\t\t\t\tElement docElement = document.getDocumentElement();\n\n\t\t\t\tif (docElement == null) {\n String msg = \"NULL doc element.\";\n\t\t\t\t\tLOG.error(msg);\n\t\t\t\t\tthrow new OfbizDataException(msg);\n\t\t\t\t}\n\t\t\t\tdocElement.normalize();\n\t\t\t\tNode curChild = docElement.getFirstChild();\n\n\t\t\t\tif (curChild != null) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (curChild.getNodeType() == Node.ELEMENT_NODE &&\n\t\t\t\t\t\t\t\"entity-group\".equals(curChild.getNodeName())) {\n\t\t\t\t\t\t\tElement curEntity = (Element) curChild;\n\t\t\t\t\t\t\tString entityName =\n UtilXml.checkEmpty(curEntity.getAttribute(\"entity\"));\n\t\t\t\t\t\t\tString groupName =\n UtilXml.checkEmpty(curEntity.getAttribute(\"group\"));\n\n\t\t\t\t\t\t\tif(groupName == null ||\n\t\t\t\t\t\t\t entityName == null) {\n\t\t\t\t\t\t\t continue;\n }\n safelyMapAdd(groupCache, entityName, groupName);\n\t\t\t\t\t\t}\n\t\t\t\t\t} while ((curChild = curChild.getNextSibling()) != null);\n\t\t\t\t} else {\n\t\t\t\t\tLOG.warn(\"[addGroupsToGroupCache()] No child nodes found.\");\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception ex) {\n\t\t\tString msg = String.format(\"Got exception when adding groups \" +\n\t\t\t\t\t \"from resource handler: %s\", resourceHandler);\n\t\t\tLOG.error(msg, ex);\n\t\t\tthrow new OfbizDataException(msg, ex);\n\t\t}\n\t}", "public void mergeIntoParentCache(CacheKey unitOfWorkCacheKey, CacheKey parentSessionCacheKey){\r\n if (isStoredInCache() && unitOfWorkCacheKey != null && parentSessionCacheKey != null) {\r\n unitOfWorkCacheKey.setWriteLockValue(parentSessionCacheKey.getWriteLockValue());\r\n }\r\n }", "@Override\n\tpublic final void beforeExecutions() throws CacheException {\n\t\tif ( persister.hasCache() ) {\n\t\t\tfinal CollectionRegionAccessStrategy cache = persister.getCacheAccessStrategy();\n\t\t\tfinal Object ck = cache.generateCacheKey(\n\t\t\t\t\tkey,\n\t\t\t\t\tpersister,\n\t\t\t\t\tsession.getFactory(),\n\t\t\t\t\tsession.getTenantIdentifier()\n\t\t\t);\n\t\t\tfinal SoftLock lock = cache.lockItem( session, ck, null );\n\t\t\t// the old behavior used key as opposed to getKey()\n\t\t\tafterTransactionProcess = new CacheCleanupProcess( key, persister, lock );\n\t\t}\n\t}", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix cache () { throw new RuntimeException(); }", "private void refreshDataCache(){\n this.stageplaatsen = dbFacade.getAllStageplaatsen();\n this.bedrijven = dbFacade.getAllBedrijven();\n }", "@Override\n public void modify( MemoryGroupByMeta someMeta ) {\n someMeta.allocate( 5, 5 );\n }", "private void populateData() {\n\t\tList<TrafficRecord> l = TestHelper.getSampleData();\r\n\t\tfor(TrafficRecord tr: l){\r\n\t\t\tput(tr);\r\n\t\t}\r\n\t\t \r\n\t}", "@Override public void checkpointReadLock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n long timeout = checkpointReadLockTimeout;\n\n long start = U.currentTimeMillis();\n\n boolean interruped = false;\n\n try {\n for (; ; ) {\n try {\n if (timeout > 0 && (U.currentTimeMillis() - start) >= timeout)\n failCheckpointReadLock();\n\n try {\n if (timeout > 0) {\n if (!checkpointLock.readLock().tryLock(timeout - (U.currentTimeMillis() - start),\n TimeUnit.MILLISECONDS))\n failCheckpointReadLock();\n }\n else\n checkpointLock.readLock().lock();\n }\n catch (InterruptedException e) {\n interruped = true;\n\n continue;\n }\n\n if (stopping) {\n checkpointLock.readLock().unlock();\n\n throw new IgniteException(new NodeStoppingException(\"Failed to perform cache update: node is stopping.\"));\n }\n\n if (checkpointLock.getReadHoldCount() > 1 || safeToUpdatePageMemories() || checkpointerThread == null)\n break;\n else {\n checkpointLock.readLock().unlock();\n\n if (timeout > 0 && U.currentTimeMillis() - start >= timeout)\n failCheckpointReadLock();\n\n try {\n checkpointer.wakeupForCheckpoint(0, \"too many dirty pages\").cpBeginFut\n .getUninterruptibly();\n }\n catch (IgniteFutureTimeoutCheckedException e) {\n failCheckpointReadLock();\n }\n catch (IgniteCheckedException e) {\n throw new IgniteException(\"Failed to wait for checkpoint begin.\", e);\n }\n }\n }\n catch (CheckpointReadLockTimeoutException e) {\n log.error(e.getMessage(), e);\n\n timeout = 0;\n }\n }\n }\n finally {\n if (interruped)\n Thread.currentThread().interrupt();\n }\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() + 1);\n }", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n refreshData();\r\n }", "void updateLandmarks() {\n\n\t\t\tregisterUpdateLandmarksTimer();\n\n\t\t\tint m = 2;\n\t\t\tfinal int expectedLandmarks = NumberOfLandmarks + m;\n\t\t\tIterator<Long> ier = pendingHSHLandmarks.keySet().iterator();\n\n\t\t\tSet<AddressIF> tmpList = new HashSet<AddressIF>(1);\n\t\t\tLong curRecord = null;\n\n\t\t\t// get a non-empty list of landmarks\n\t\t\twhile (ier.hasNext()) {\n\t\t\t\tLong nxt = ier.next();\n\t\t\t\tif (pendingHSHLandmarks.get(nxt).IndexOfLandmarks != null\n\t\t\t\t\t\t&& pendingHSHLandmarks.get(nxt).IndexOfLandmarks.size() > 0) {\n\t\t\t\t\ttmpList\n\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(nxt).IndexOfLandmarks);\n\t\t\t\t\tcurRecord = nxt;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if empty, we need to update landmarks immediately\n\t\t\tif (tmpList.size() == 0) {\n\t\t\t\t// remove the record\n\t\t\t\tif (curRecord != null) {\n\t\t\t\t\tpendingHSHLandmarks.get(curRecord).clear();\n\t\t\t\t\tpendingHSHLandmarks.remove(curRecord);\n\t\t\t\t} else {\n\t\t\t\t\t// null curRecord\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tfinal Long Timer = curRecord;\n\t\t\t\t// ping landmarks, if several of them fails, p percentage p=0.2\n\t\t\t\t// , we remove the records, and restart the landmark process\n\t\t\t\t// =================================================================\n\t\t\t\tfinal List<AddressIF> aliveLandmarks = new ArrayList<AddressIF>(\n\t\t\t\t\t\t1);\n\n\t\t\t\tNNManager.collectRTTs(tmpList, new CB2<Set<NodesPair>, String>() {\n\t\t\t\t\tprotected void cb(CBResult ncResult, Set<NodesPair> nps,\n\t\t\t\t\t\t\tString errorString) {\n\t\t\t\t\t\t// send data request message to the core node\n\t\t\t\t\t\tlong timer=System.currentTimeMillis();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (nps != null && nps.size() > 0) {\n\t\t\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t\t\t.println(\"\\n==================\\n Alive No. of landmarks: \"\n\t\t\t\t\t\t\t\t\t\t\t+ nps.size()\n\t\t\t\t\t\t\t\t\t\t\t+ \"\\n==================\\n\");\n\n\t\t\t\t\t\t\tIterator<NodesPair> NP = nps.iterator();\n\t\t\t\t\t\t\twhile (NP.hasNext()) {\n\t\t\t\t\t\t\t\tNodesPair tmp = NP.next();\n\t\t\t\t\t\t\t\tif (tmp != null && tmp.rtt >= 0) {\n\n\t\t\t\t\t\t\t\t\tAddressIF peer = (AddressIF)tmp.endNode;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//====================================================\n\t\t\t\t\t\t\t\t\tif (!ncManager.pendingLatency.containsKey(peer)) {\n\t\t\t\t\t\t\t\t\t\tncManager.pendingLatency.put(peer,\n\t\t\t\t\t\t\t\t\t\t\t\tnew RemoteState<AddressIF>(peer));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tncManager.pendingLatency.get(peer).addSample(tmp.rtt, timer);\n\t\t\t\t\t\t\t\t\t//=====================================================\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Timer)\n\t\t\t\t\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Timer).IndexOfLandmarks == null) {\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tint index = pendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t\t.indexOf(peer);\n\n\t\t\t\t\t\t\t\t\tif (index < 0) {\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\t\t\t\t// found the element, and it is smaller\n\t\t\t\t\t\t\t\t\t\t// than\n\t\t\t\t\t\t\t\t\t\t// rank, i.e., it is closer to the\n\t\t\t\t\t\t\t\t\t\t// target\n\t\t\t\t\t\t\t\t\t\taliveLandmarks.add(peer);\n\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// wrong measurements\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t// all nodes fail, so there are no alive nodes\n\t\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// some landmarks are offline, we clear records and\n\t\t\t\t\t\t// start\n\t\t\t\t\t\tif (pendingHSHLandmarks.containsKey(Timer)) {\n\n\t\t\t\t\t\t\tif (aliveLandmarks.size() < 0.8 * expectedLandmarks) {\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.remove(Timer);\n\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// the landmarks are healthy, so we can sleep\n\t\t\t\t\t\t\t\t// awhile\n\t\t\t\t\t\t\t\t// TODO: remove dead landmarks, and resize the\n\t\t\t\t\t\t\t\t// landmarks\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).IndexOfLandmarks\n\t\t\t\t\t\t\t\t\t\t.addAll(aliveLandmarks);\n\n\t\t\t\t\t\t\t\t// pendingHSHLandmarks.get(Timer).readyForUpdate=false;\n\t\t\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(\n\t\t\t\t\t\t\t\t\t\t1);\n\n\t\t\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Timer).IndexOfLandmarks);\n\t\t\t\t\t\t\t\tpendingHSHLandmarks.get(Timer).readyForUpdate = true;\n\n\t\t\t\t\t\t\t\t//update the rtts\n\t\t\t\t\t\t\t\t updateRTTs(Timer.longValue(),nodes, new\n\t\t\t\t\t\t\t\t CB1<String>(){ protected void cb(CBResult\n\t\t\t\t\t\t\t\t ncResult, String errorString){ switch\n\t\t\t\t\t\t\t\t (ncResult.state) { case OK: {\n\t\t\t\t\t\t\t\t System.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t System.out.println();\n\t\t\t\t\t\t\t\t if(errorString.length()<=0){\n\t\t\t\t\t\t\t\t pendingHSHLandmarks\n\t\t\t\t\t\t\t\t .get(Timer).readyForUpdate=true; }\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t break; } case ERROR: case TIMEOUT: { break; }\n\t\t\t\t\t\t\t\t } nodes.clear(); } });\n\t\t\t\t\t\t\t\t \n\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t// ==================================================================\n\n\t\t\t// expected landmarks, K+m\n\n\t\t\tfinal Set<AddressIF> pendingNodes = new HashSet<AddressIF>(1);\n\n\t\t\tgetRandomNodes(pendingNodes, expectedLandmarks);\n\n\t\t\t// remove myself\n\t\t\tif (pendingNodes.contains(Ninaloader.me)) {\n\t\t\t\tpendingNodes.remove(Ninaloader.me);\n\t\t\t}\n\n\t\t\tSystem.out.println(\"$: HSH: Total number of landmarks are: \"\n\t\t\t\t\t+ pendingNodes.size());\n\n\t\t\tif (pendingNodes.size() == 0) {\n\t\t\t\tString errorString = \"$: HSH no valid nodes\";\n\t\t\t\tSystem.out.println(errorString);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tBarrier barrierUpdate = new Barrier(true);\n\t\t\tfinal StringBuffer errorBuffer = new StringBuffer();\n\n\t\t\tfinal long TimeStamp = System.currentTimeMillis();\n\n\t\t\tfor (AddressIF addr : pendingNodes) {\n\t\t\t\tseekLandmarks(TimeStamp, addr, barrierUpdate,\n\t\t\t\t\t\tpendingHSHLandmarks, errorBuffer);\n\t\t\t}\n\n\t\t\tEL.get().registerTimerCB(barrierUpdate, new CB0() {\n\t\t\t\tprotected void cb(CBResult result) {\n\t\t\t\t\tString errorString;\n\t\t\t\t\tif (errorBuffer.length() == 0) {\n\t\t\t\t\t\terrorString = new String(\"Success\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\terrorString = new String(errorBuffer);\n\t\t\t\t\t}\n\n\t\t\t\t\t// finish the landmark seeking process\n\n\t\t\t\t\tif (!pendingHSHLandmarks.containsKey(Long\n\t\t\t\t\t\t\t.valueOf(TimeStamp))\n\t\t\t\t\t\t\t|| pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks == null) {\n\t\t\t\t\t\tSystem.out.println(\"$: NULL elements! \");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks\n\t\t\t\t\t\t\t.size() < (0.7 * expectedLandmarks)) {\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp))\n\t\t\t\t\t\t\t\t.clear();\n\t\t\t\t\t\tpendingHSHLandmarks.remove(Long.valueOf(TimeStamp));\n\t\t\t\t\t\tSystem.out.println(\"$: not enough landmark nodes\");\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\t//\n\t\t\t\t\t\tpendingHSHLandmarks.get(Long.valueOf(TimeStamp)).readyForUpdate = true;\n\t\t\t\t\t\tSystem.out.println(\"$: enough landmark nodes\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tfinal Set<AddressIF> nodes = new HashSet<AddressIF>(1);\n\t\t\t\t\t\tnodes\n\t\t\t\t\t\t\t\t.addAll(pendingHSHLandmarks.get(Long.valueOf(TimeStamp)).IndexOfLandmarks);\n\t\t\t\t\t\tupdateRTTs(Long.valueOf(TimeStamp), nodes, new CB1<String>() {\n\t\t\t\t\t\t\tprotected void cb(CBResult ncResult, String errorString) {\n\t\t\t\t\t\t\t\tswitch (ncResult.state) {\n\t\t\t\t\t\t\t\tcase OK: {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"$: Update completed\");\n\t\t\t\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase ERROR:\n\t\t\t\t\t\t\t\tcase TIMEOUT: {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tnodes.clear();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public void ResetData(boolean check) {\n }", "public void markFinalizePartitionCounters() {\n finalizePartitionCounters = true;\n }", "private void freshTheData() {\n mData.clear();\n mData.addAll(mDataOrg);\n }", "public void recordState() {\n this.event = null;\n flowContextInfo.setWaitingNode(currentNode);\n }", "private void populateDataAndVerify(ReplicatedEnvironment masterEnv) {\n createTestData();\n populateDB(masterEnv, dbName, keys);\n readDB(masterEnv, dbName, startKey, numKeys);\n logger.info(numKeys + \" records (start key: \" +\n startKey + \") have been populated into db \" +\n dbName + \" and verified\");\n }", "public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}", "public void\tgroupUpdate(GroupUpdate update)\n\t{\n\t\tAttributes\tattr = envr.object.getAttr();\n\t\tfillCheckBox.setSelected(attr.showFill);\n\t\tedgeCheckBox.setSelected(attr.showEdges);\n\t\tpointCheckBox.setSelected(attr.showPoints);\n\t\tfillColorBox.setBackground(attr.fillColor);\n\t\tfillOpacityField.setText((int) (attr.fillOpacity*100) + \" %\");\n\t\tedgeColorBox.setBackground(attr.edgeColor);\n\t\tedgeOpacityField.setText((int) (attr.edgeOpacity*100) + \" %\");\n\t\tpointColorBox.setBackground(attr.pointColor);\n\t\tpointOpacityField.setText((int) (attr.pointOpacity*100) + \" %\");\n\t\tpointRadiusField.setText(attr.pointRadius + \"\");\n\t}", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void flush(String resourceGroupName, String cacheName, String storageTargetName);", "public void refreshData() {\n\n if (!mUpdatingData) {\n new RefreshStateDataTask().execute((Void) null);\n }\n }", "private void waitForBackgroupTasks() {\n this.objectStore.getAllObjectIDs();\n this.objectStore.getAllEvictableObjectIDs();\n this.objectStore.getAllMapTypeObjectIDs();\n }", "private final void zacb() {\n ArrayList<Integer> arrayList;\n Throwable th;\n StringBuilder sb;\n synchronized (this) {\n try {\n if (!this.zame) {\n int count = this.mDataHolder.getCount();\n new ArrayList();\n this.zamf = arrayList;\n if (count > 0) {\n boolean add = this.zamf.add(0);\n String primaryDataMarkerColumn = getPrimaryDataMarkerColumn();\n String string = this.mDataHolder.getString(primaryDataMarkerColumn, 0, this.mDataHolder.getWindowIndex(0));\n for (int i = 1; i < count; i++) {\n int windowIndex = this.mDataHolder.getWindowIndex(i);\n String string2 = this.mDataHolder.getString(primaryDataMarkerColumn, i, windowIndex);\n String str = string2;\n if (string2 == null) {\n Throwable th2 = th;\n new StringBuilder(78 + String.valueOf(primaryDataMarkerColumn).length());\n new NullPointerException(sb.append(\"Missing value for markerColumn: \").append(primaryDataMarkerColumn).append(\", at row: \").append(i).append(\", for window: \").append(windowIndex).toString());\n throw th2;\n }\n if (!str.equals(string)) {\n string = str;\n boolean add2 = this.zamf.add(Integer.valueOf(i));\n }\n }\n }\n this.zame = true;\n }\n } catch (Throwable th3) {\n Throwable th4 = th3;\n throw th4;\n }\n }\n }", "private void setFillIndex() {\n\t\tint t = this.fillgingIndex + 1;\n\t\tif (t == NUMBEROFEACHCARD) {\n\t\t\tthis.fillgingIndex = 0;\n\t\t\tsetComponentsOfIndex();\n\t\t} else {\n\t\t\tthis.fillgingIndex = t;\n\t\t}\n\n\t}", "private void reset()\r\n {\r\n log.info(\"{0}: Resetting cache\", logCacheName);\r\n\r\n try\r\n {\r\n storageLock.writeLock().lock();\r\n\r\n if (dataFile != null)\r\n {\r\n dataFile.close();\r\n }\r\n\r\n final File dataFileTemp = new File(rafDir, fileName + \".data\");\r\n Files.delete(dataFileTemp.toPath());\r\n\r\n if (keyFile != null)\r\n {\r\n keyFile.close();\r\n }\r\n final File keyFileTemp = new File(rafDir, fileName + \".key\");\r\n Files.delete(keyFileTemp.toPath());\r\n\r\n dataFile = new IndexedDisk(dataFileTemp, getElementSerializer());\r\n keyFile = new IndexedDisk(keyFileTemp, getElementSerializer());\r\n\r\n this.recycle.clear();\r\n this.keyHash.clear();\r\n }\r\n catch (final IOException e)\r\n {\r\n log.error(\"{0}: Failure resetting state\", logCacheName, e);\r\n }\r\n finally\r\n {\r\n storageLock.writeLock().unlock();\r\n }\r\n }", "@Override\n\tpublic void saveOrUpdate(Group group) throws ServiceException {\n\n\t}", "@Override public void checkpointReadUnlock() {\n if (checkpointLock.writeLock().isHeldByCurrentThread())\n return;\n\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "private void reloadGroupAppData(JsonEvents events) {\n\n\t\tAuthzManager.getPerunPrincipal(new JsonEvents() {\n\t\t\t@Override\n\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\tlocalPP = result.cast();\n\n\t\t\t\t// since this is a group initi form we know that vo and group are not null.\n\t\t\t\tRegistrarManager.initializeRegistrar(registrar.getVo().getShortName(), registrar.getGroup().getName(), new JsonEvents() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFinished(JavaScriptObject result) {\n\t\t\t\t\t\tRegistrarObject ro = result.cast();\n\t\t\t\t\t\tregistrar.setGroupFormInitial(ro.getGroupFormInitial());\n\t\t\t\t\t\tregistrar.setGroupFormInitialException(ro.getGroupFormInitialException());\n\t\t\t\t\t\t// continue with the step\n\t\t\t\t\t\tevents.onFinished(null);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onError(PerunException error) {\n\t\t\t\t\t\t// ignore and continue with the step\n\t\t\t\t\t\tevents.onFinished(null);\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onLoadingStart() {\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(PerunException error) {\n\t\t\t\t// ignore it and continue with default form init processing\n\t\t\t\tevents.onFinished(null);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onLoadingStart() {\n\t\t\t}\n\t\t});\n\n\n\t}", "@Override\n public void setGroupActive(int group, boolean value) {\n assert 0 <= group && group < active.length;\n \n active[group] = value;\n for (XYDatasetWithGroups dataset : datasets) {\n dataset.setGroupActive(group, value);\n }\n recalculateMaxCounts();\n notifyListeners(new DatasetChangeEvent(this, this));\n }", "private InliningState createChildState(CachedBzlLoadDataManager cachedBzlLoadDataManager) {\n CachedBzlLoadData.Builder newBuilder = cachedBzlLoadDataManager.cachedDataBuilder();\n RecordingSkyFunctionEnvironment newRecordingEnv =\n new RecordingSkyFunctionEnvironment(\n recordingEnv.getDelegate(),\n newBuilder::addDep,\n newBuilder::addDeps,\n newBuilder::noteException);\n return new InliningState(\n newRecordingEnv,\n newBuilder,\n loadStack,\n successfulLoads,\n unsuccessfulLoads,\n newBuilder::addTransitiveDeps);\n }", "private void fillData()\r\n\t{\n\t\tif(mManager.getLoader(LOADER_LOG) != null && !mManager.getLoader(LOADER_LOG).isReset())\r\n\t\t{\r\n\t\t\tmManager.restartLoader(LOADER_LOG, null, this);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tmManager.initLoader(LOADER_LOG, null, this);\r\n\t\t}\r\n\t\t\r\n\t\tif(selectMode != WorkoutMode.Tactical)\r\n\t\t{\r\n\t\t\tif(mManager.getLoader(LOADER_LOG_CARDIO) != null && !mManager.getLoader(LOADER_LOG_CARDIO).isReset())\r\n\t\t\t{\r\n\t\t\t\tmManager.restartLoader(LOADER_LOG_CARDIO, null, this);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmManager.initLoader(LOADER_LOG_CARDIO, null, this);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tboolean ok = true;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tif(selectMode == WorkoutMode.Tactical || this.dayMode ==WorkoutMode.Tactical)\r\n\t\t\t{\r\n\t\t\t\tlogAdapter = new LogAdapter(this, null, // mGroupCursor,\r\n\t\t\t\t\t\tR.layout.log_ex_name,\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE},\r\n\t\t\t\t\t\tnew int[]{R.id.ex_name},\r\n\t\t\t\t\t\tR.layout.log_tacktical_details,\t\t\t\t\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE, DBAdapter.COL_LAPS},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_name,R.id.txt_laps});\t\r\n\t\t\t\t\r\n\t\t\t\t//Hide cardio\r\n\t\t\t\thideCardio();\r\n\t\t\t}\r\n\t\t\telse //weigh + cardio, only weight; only cardio; \r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tlogAdapter = new LogAdapter(this, null, // mGroupCursor,\r\n\t\t\t\t\t\tR.layout.log_ex_name,\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_TITLE},\r\n\t\t\t\t\t\tnew int[]{R.id.ex_name},\r\n\t\t\t\t\t\tR.layout.log_ex_details,\t\t\t\t\r\n\t\t\t\t\t\tnew String[]{DBAdapter.COL_SET_NUM, DBAdapter.COL_REPS,DBAdapter.COL_WEIGHT,DBAdapter.COL_UNITS},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_set,R.id.txt_reps,R.id.txt_wt,R.id.txt_units});\r\n\t\t\t\t\r\n\t\t\t\tcardioAdapter = new SimpleCursorAdapter(this, R.layout.log_item_cardio,null,\r\n\t\t\t\t\t\tnew String[]{ DBAdapter.COL_DISTANCE, DBAdapter.COL_UNITS, DBAdapter.COL_EQUIPMENT,DBAdapter.COL_TIME},\r\n\t\t\t\t\t\tnew int[]{R.id.txt_cardio_dist,R.id.txt_cardio_units,R.id.img_cardio,R.id.txt_cardio_time}, \r\n\t\t\t\t\t\tCursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER);\r\n\t\t\t\t\r\n\t\t\t\tListView cardioList = (ListView)findViewById(R.id.list_log_cardio);\r\n\t\t\t\tcardioList.setAdapter(cardioAdapter);\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tcatch(Exception ex)\r\n\t\t{\r\n\t\t\tex.printStackTrace();\r\n\t\t\tok = false;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif(ok){\r\n\t\t\tsetListAdapter(logAdapter);\r\n//\t\t\tfinal int cnt =logAdapter.getGroupCount();\r\n//\t\t\tfor(int i=0; i < cnt; i++)\r\n//\t\t\t{\r\n//\t\t\t\tlist.expandGroup(i);\r\n//\t\t\t}\r\n\t\t}\r\n\t\t//getExpandableListView().setGroupIndicator(getResources().getDrawable(R.drawable.group_selector));\r\n\t}", "private void prepareTestEnv() throws InterruptedException {\n\n createGroup(numDataNodes);\n\n for (int i=0; i < numDataNodes; i++) {\n final ReplicatedEnvironment env = repEnvInfo[i].getEnv();\n final int targetGroupSize = groupSize;\n\n ReplicationGroup group = null;\n for (int j=0; j < 100; j++) {\n group = env.getGroup();\n if (group.getNodes().size() == targetGroupSize) {\n break;\n }\n /* Wait for the replica to catch up. */\n Thread.sleep(1000);\n }\n assertEquals(\"Nodes\", targetGroupSize, group.getNodes().size());\n assertEquals(RepTestUtils.TEST_REP_GROUP_NAME, group.getName());\n for (int ii = 0; ii < targetGroupSize; ii++) {\n RepTestUtils.RepEnvInfo rinfo = repEnvInfo[ii];\n final ReplicationConfig repConfig = rinfo.getRepConfig();\n ReplicationNode member =\n group.getMember(repConfig.getNodeName());\n assertNotNull(\"Member\", member);\n assertEquals(repConfig.getNodeName(), member.getName());\n assertEquals(repConfig.getNodeType(), member.getType());\n assertEquals(repConfig.getNodeSocketAddress(),\n member.getSocketAddress());\n }\n\n /* verify data nodes */\n final Set<ReplicationNode> dataNodes = group.getDataNodes();\n for (final ReplicationNode n : dataNodes) {\n assertEquals(NodeType.ELECTABLE, n.getType());\n }\n logger.info(\"data nodes verified\");\n }\n }", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "public final void rule__UpdateExpressionStoreReference__Group__1() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8027:1: ( rule__UpdateExpressionStoreReference__Group__1__Impl )\n // ../eu.quanticol.caspa.ui/src-gen/eu/quanticol/ui/contentassist/antlr/internal/InternalCASPA.g:8028:2: rule__UpdateExpressionStoreReference__Group__1__Impl\n {\n pushFollow(FOLLOW_rule__UpdateExpressionStoreReference__Group__1__Impl_in_rule__UpdateExpressionStoreReference__Group__115732);\n rule__UpdateExpressionStoreReference__Group__1__Impl();\n\n state._fsp--;\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }", "public void setCached() {\n }", "void doResetGroups( long start_id )\n {\n // Log.v(\"DistoX\", \"Reset CID \" + mApp.mCID + \" from gid \" + start_id );\n mApp_mDData.resetAllGMs( mApp.mCID, start_id ); // reset all groups where status=0, and id >= start_id\n }", "public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "protected void reset()\n {\n this.shapeDataCache.removeAllEntries();\n this.sector = null;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n void resume(String resourceGroupName, String cacheName, String storageTargetName);", "@Test\n public void testPartialCheckpointNewIndexRows() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 100_000, false);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 10);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n String reason = getTestIgniteInstanceName();\n IgniteInternalFuture<Void> awaitBeforeCpBeginFut = awaitBeforeCheckpointBeginAsync(n, reason);\n IgniteInternalFuture<Void> disableCpFut = enableCheckpointsAsync(n, reason, false);\n\n awaitBeforeCpBeginFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n\n disableCpFut.get(getTestTimeout());\n slowdownIdxCreateConsumer.sleepTime.set(0);\n\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> rebIdxFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(rebIdxFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n rebIdxFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(100_000, selectPersonByName(n.cache(cacheName)).size());\n }", "private void loadData()\n {\n try\n {\n //Reads in the data from default file\n System.out.println(\"ATTEMPTING TO LOAD\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups.dat\");\n System.out.println(\"LOADED\");\n loadSuccessful = true;\n \n //If read is successful, save backup file in case of corruption\n try\n {\n System.out.println(\"SAVING BACKUP\");\n serial.Serialize(allGroups, \"All-Groups-backup.dat\");\n System.out.println(\"BACKUP SAVED\");\n } catch (IOException e)\n {\n System.out.println(\"FAILED TO WRITE BACKUP DATA\");\n }\n } catch (IOException e)\n {\n //If loading from default file fails, first try loading from backup file\n System.out.println(\"READING FROM DEFAULT FAILED\");\n try\n {\n System.out.println(\"ATTEMPTING TO READ FROM BACKUP\");\n allGroups = (ArrayList<CharacterGroup>)serial.Deserialize(\"All-Groups-backup\");\n System.out.println(\"READING FROM BACKUP SUCCESSFUL\");\n loadSuccessful = true;\n } catch (IOException ex)\n {\n //If reading from backup fails aswell generate default data\n System.out.println(\"READING FROM BACKUP FAILED\");\n allGroups = new ArrayList();\n } catch (ClassNotFoundException ex){}\n } catch (ClassNotFoundException e){}\n }", "protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }", "private void cleanupUserKeyRecords() {\n\t\tUserKeyRecord currentlyValid = null;\n\t\t//For all \"new\" entries: If there's another sandbox record (regardless of user)\n\t\t//which shares the sandbox ID, we can set the status of the new record to be\n\t\t//the same as the old record.\n\t\t\n\t\t//TODO: We dont' need to read these records, we can read the metadata straight.\n\t\tSqlStorage<UserKeyRecord> storage = app.getStorage(UserKeyRecord.class);\n\t\tfor(UserKeyRecord record : storage) {\n\t\t\tif(record.getType() == UserKeyRecord.TYPE_NORMAL) {\n\t\t\t\t\n\t\t\t\tif(record.getUsername().equals(username) && record.isCurrentlyValid() && record.isPasswordValid(password)) {\n\t\t\t\t\tif(currentlyValid == null) {\n\t\t\t\t\t\tcurrentlyValid = record;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_ERROR_ASSERTION, \"User \" + username + \" has more than one currently valid key record!!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(record.getType() == UserKeyRecord.TYPE_NEW) {\n\t\t\t\t//See if we have another sandbox with this ID that is fully initialized.\n\t\t\t\tif(app.getStorage(UserKeyRecord.class).getIDsForValues(new String[] {UserKeyRecord.META_SANDBOX_ID, UserKeyRecord.META_KEY_STATUS}, new Object[] {record.getUuid(), UserKeyRecord.TYPE_NORMAL}).size() > 0) {\n\t\t\t\t\t\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Marking new sandbox \" + record.getUuid() + \" as initialized, since it's already in use on this device\");\n\t\t\t\t\t//If so, this sandbox _has_ to have already been initialized, and we should treat it as such.\n\t\t\t\t\trecord.setType(UserKeyRecord.TYPE_NORMAL);\n\t\t\t\t\tstorage.write(record);\n\t\t\t\t}\n\t\t\t} else if (record.getType() == UserKeyRecord.TYPE_PENDING_DELETE) {\n\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Cleaning up sandbox which is pending removal\");\n\t\t\t\t\n\t\t\t\t//See if there are more records in this sandbox. (If so, we can just wipe this record and move on) \n\t\t\t\tif(storage.getIDsForValue(UserKeyRecord.META_SANDBOX_ID, record.getUuid()).size() > 2) {\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Record for sandbox \" + record.getUuid() + \" has siblings. Removing record\");\n\t\t\t\t\t\n\t\t\t\t\t//TODO: Will this invalidate our iterator?\n\t\t\t\t\tstorage.remove(record);\n\t\t\t\t} else {\n\t\t\t\t\t//Otherwise, we should see if we can read the data, and if so, wipe it as well as the record.\n\t\t\t\t\tif(record.isPasswordValid(password)) {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Current user has access to purgable sandbox \" + record.getUuid() + \". Wiping that sandbox\");\n\t\t\t\t\t\tUserSandboxUtils.purgeSandbox(this.getContext(), app, record,record.unWrapKey(password));\n\t\t\t\t\t}\n\t\t\t\t\t//Do we do anything here if we couldn't open the sandbox?\n\t\t\t\t}\n\t\t\t}\n\t\t\t//TODO: Specifically we should never have two sandboxes which can be opened by the same password (I think...)\n\t\t}\n\t}", "public synchronized void forceRelease() {\n try {\n if (store != null) {\n store.close();\n }\n } catch (IOException e) {\n LOG.warn(\"Error closing timeline store\", e);\n }\n store = null;\n // reset offsets so next time logs are re-parsed\n for (LogInfo log : appLogs.getDetailLogs()) {\n if (log.getFilename().contains(groupId.toString())) {\n log.setOffset(0);\n }\n }\n LOG.debug(\"Cache for group {} released. \", groupId);\n }" ]
[ "0.53333265", "0.5320729", "0.50044227", "0.4929421", "0.488718", "0.48699", "0.48367697", "0.48193997", "0.481237", "0.47668222", "0.47186095", "0.4717615", "0.46461713", "0.4641848", "0.46391276", "0.4630323", "0.46215793", "0.46119857", "0.4593418", "0.45834", "0.4551934", "0.45497477", "0.45319706", "0.45280543", "0.4513913", "0.4505871", "0.45034254", "0.45000124", "0.44758236", "0.4466992", "0.44597727", "0.4452468", "0.44390285", "0.44309068", "0.44277388", "0.44212276", "0.44185406", "0.43999293", "0.43983456", "0.4386731", "0.43766233", "0.43683627", "0.43599018", "0.4349067", "0.43481782", "0.4344964", "0.43411642", "0.43384358", "0.43332347", "0.43317124", "0.43144223", "0.4312429", "0.43116814", "0.43094376", "0.43091285", "0.4302762", "0.42978075", "0.42950854", "0.42846602", "0.42838782", "0.42835057", "0.42755646", "0.42726916", "0.42690086", "0.42617014", "0.42598745", "0.425411", "0.42520338", "0.42517066", "0.42431042", "0.42425928", "0.4237236", "0.42368096", "0.4236039", "0.42330742", "0.42244458", "0.42229915", "0.42214957", "0.42200986", "0.4219117", "0.42159343", "0.42139882", "0.42117164", "0.42103645", "0.4207577", "0.4207419", "0.420659", "0.42060024", "0.4204948", "0.4202358", "0.41982862", "0.4197457", "0.41946504", "0.4189701", "0.41873407", "0.4186057", "0.41858134", "0.41856995", "0.41854793", "0.41852996" ]
0.7520558
0
Update current checkpoint progress by scheduled.
@NotNull private GridCacheDatabaseSharedManager.CheckpointProgress updateCurrentCheckpointProgress() { final CheckpointProgress curr; synchronized (this) { curr = scheduledCp; curr.state(LOCK_TAKEN); if (curr.reason == null) curr.reason = "timeout"; // It is important that we assign a new progress object before checkpoint mark in page memory. scheduledCp = new CheckpointProgress(checkpointFreq); curCpProgress = curr; } return curr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateProgress() {\r\n\t\tfireTableDataChanged();\r\n\t}", "protected void updateProgress(Integer progress) {\n // Note to self: We don't bother updating the local \"job\" batch data\n batchService.updateBatchJobProgress(jobContext.getInstanceId(), progress);\n }", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "void reportProgress(List<Node> update);", "private void updateProgressBar() {\n\t\tdouble current = model.scannedCounter;\n\t\tdouble total = model.fileCounter;\n\t\tdouble percentage = (double)(current/total);\n\t\t\n\t\t//Update Progress indicators\n\t\ttxtNumCompleted.setText((int) current + \" of \" + (int) total + \" Completed (\" + Math.round(percentage*100) + \"%)\");\n\t\tprogressBar.setProgress(percentage);\n\t}", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "public void update()\n {\n this.lastProgress = this.progress;\n\n if (this.lastProgress >= 1.0F)\n {\n this.func_184322_i();\n this.worldObj.removeTileEntity(this.pos);\n this.invalidate();\n\n if (this.worldObj.getBlockState(this.pos).getBlock() == Blocks.piston_extension)\n {\n this.worldObj.setBlockState(this.pos, this.pistonState, 3);\n this.worldObj.notifyBlockOfStateChange(this.pos, this.pistonState.getBlock());\n }\n }\n else\n {\n this.progress += 0.5F;\n\n if (this.progress >= 1.0F)\n {\n this.progress = 1.0F;\n }\n\n this.func_184322_i();\n }\n }", "public void update()\r\n\t{\r\n\t\tcurrenttime = Calendar.getInstance();\r\n\t\trunningTime = (currenttime.getTimeInMillis() - starttime.getTimeInMillis()) - amountOfPause;\r\n\t\t\r\n\t\tif (tickPeriod != 0)\r\n\t\t{\r\n\t\t\tif (runningTime - lastRunningTime >= tickPeriod)\r\n\t\t\t{\r\n\t\t\t\tpassedTicks++;\r\n\t\t\t\tlastRunningTime = passedTicks * tickPeriod;\r\n\t\t\t\tif (tickListener != null) tickListener.onTick(this);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void scheduledUpdate() {\n\n if (isUpdating.compareAndSet(false, true)) {\n\n if (getCurrentChannel() != null) {\n\n updateData();\n }\n }\n\n timer.cancel();\n timer.purge();\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new UpdateTask(), 3600000,\n 3600000);\n\n }", "public void updateTask() {}", "private void notifyTaskProgress(int action, int status, int progress) {\n Intent intent = new Intent(LocalAction.ACTION_BACKUP_SERVICE_RUNNING);\n intent.putExtra(ACTION, action);\n intent.putExtra(PROGRESS_STATUS, status);\n intent.putExtra(PROGRESS_VALUE, progress);\n intent.putExtra(CALLER_ID, mCallerId);\n mBroadcastManager.sendBroadcast(intent);\n // update the notification if required\n if (mNotificationBuilder != null) {\n mNotificationBuilder.setContentText(getNotificationContentText(status));\n mNotificationBuilder.setProgress(100, progress, false);\n startForeground(NotificationContract.NOTIFICATION_ID_BACKUP_PROGRESS, mNotificationBuilder.build());\n }\n }", "public void updateProgress(Land land){\n String wiltedString = \"[ wilted ]\";\n StringBuilder progressBar = new StringBuilder();\n String percentageCompleted = \"\";\n int finalStatus = land.getCurrentStatus();\n\n if (land.getCropName() != null){\n Crop crop = cropDAO.retrieveCrop(land.getCropName());\n double timeToGrow = crop.getTime();\n\n Date plantTime = land.getPlantTime();\n Date finishedTime = land.getFinishedTime();\n Date witherTime = land.getWitherTime();\n Date timeNow = new Date();\n\n int timeAfterWilt = (int) (timeNow.getTime() - witherTime.getTime());\n int timeAfterFinished = (int) (timeNow.getTime() - finishedTime.getTime());\n// double timeElapsed =(double) (timeNow.getTime() - plantTime.getTime());\n double timeElapsed =(double) ((timeNow.getTime() - plantTime.getTime()) / 60000);\n\n if (timeAfterWilt > 0){ //withered\n land.setCurrentStatus(-1);\n finalStatus = -1;\n progressBar = new StringBuilder(wiltedString);\n } else if (timeAfterFinished > 0 ){\n land.setCurrentStatus(2);\n finalStatus = 2;\n progressBar = new StringBuilder(\"[##########]\");\n percentageCompleted = \"100%\";\n } else {\n double percentage = (timeElapsed / timeToGrow )* 100;\n int intPercentage = (int) percentage;\n percentageCompleted = intPercentage + \"%\";\n progressBar = new StringBuilder(\"[\");\n int display = intPercentage/10 ;\n for (int i =1; i<= 10; i++){\n if (i <= display){\n progressBar.append(\"#\");\n } else {\n progressBar.append(\"-\");\n }\n }\n progressBar.append(\"]\");\n }\n }\n\n String finalProgressBar = progressBar + \" \"+ percentageCompleted;\n land.setProgressBar(finalProgressBar);\n\n Connection conn = controller.getConnection();\n PreparedStatement stmt = null;\n String sql = \"UPDATE magnet.land SET currentStatus = ?, progressBar = ? WHERE owner = ? AND plotNumber = ?;\";\n\n try {\n stmt = conn.prepareStatement(sql);\n stmt.setInt(1, finalStatus);\n stmt.setString(2, finalProgressBar);\n stmt.setString(3, land.getOwner());\n stmt.setInt(4, land.getPlotNumber());\n stmt.executeUpdate();\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void checkpoint() throws IOException;", "public void updatePeriodic() {\r\n }", "private void updateProgress() {\n progressBar.setProgress( (1.0d * currentQuestion) / numQuestions);\n }", "public synchronized void writeCheckpoint() {\n\t\tflush();\n\t\tpw.println(\"CHECKPOINT \" \n\t\t\t\t\t+ TransactionManager.instance().transactionList());\n\t\tflush();\n\t}", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "public void updateProgress( int pagesPrinted );", "@Override\n\tpublic void execute()\n\t{\n\t\tintake.set(percentage);\n\t}", "public abstract void setProgress (int currentStep, int totalSteps);", "public void onProgressUpdate(int numRouleau,String prochain);", "void sendScheduledNotifications(JobProgress progress);", "public void run() {\r\n ouputProgressModel.setPogressStarted(true);\r\n try {\r\n for (int i = 0; i <= 100; i += 10) {\r\n // pause the thread\r\n Thread.sleep(PROCCESS_SLEEP_LENGTH);\r\n // update the percent value\r\n ouputProgressModel.setPercentComplete(i);\r\n SessionRenderer.render(\"progressExample\");\r\n }\r\n }\r\n catch (InterruptedException e) { }\r\n ouputProgressModel.setPogressStarted(false);\r\n }", "public void checkpoint(boolean sync, boolean fullCheckpoint) {\n try {\n if (journal == null )\n throw new IllegalStateException(\"Journal is closed.\");\n \n long now = System.currentTimeMillis();\n CountDownLatch latch = null;\n synchronized(this) {\n latch = nextCheckpointCountDownLatch;\n lastCheckpointRequest = now;\n if( fullCheckpoint ) {\n this.fullCheckPoint = true; \n }\n }\n \n checkpointTask.wakeup();\n \n if (sync) {\n log.debug(\"Waking for checkpoint to complete.\");\n latch.await();\n }\n }\n catch (InterruptedException e) {\n log.warn(\"Request to start checkpoint failed: \" + e, e);\n }\n }", "public void updateProgress (Session connect)\n {\n String req = \"from \" + ProgressData.class.getSimpleName () + \" where smd='\" + this.id + \"' and finished=false\";\n List<ProgressData> lst = connect.createQuery (req).list ();\n\n SiteSMD site = SiteSMD.findById (connect, this.id);\n if (lst.isEmpty ()) {\n site.setHave_a_probleme (false);\n connect.update (site);\n }\n else {\n site.setHave_a_probleme (true);\n connect.update (site);\n }\n\n }", "public void progressMade();", "public void updateTask(int tid,String title,String detail,int money,String type,int total_num,int current_num,Timestamp start_time,Timestamp end_time,String state);", "@Override\n public void update(final Progress progress) {\n SwingUtilities.invokeLater(new Runnable() {\n\n @Override\n public void run() {\n progressBar.setValue(progress.getIntPercentage());\n progressField.setText(roundToSingleDigit(progress.getPercentage()) + \"%\");\n }\n });\n }", "@Test\n public void currentProgressTest() {\n\n smp.checkAndFillGaps();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n smp.increaseCurrentProgress();\n\n assertEquals(5, smp.getCurrentProgress());\n assertEquals(30, smp.getUnitsTotal() - smp.getCurrentProgress());\n assertEquals(Float.valueOf(30), smp.getEntriesCurrentPace().lastEntry().getValue());\n assertTrue(smp.getEntriesCurrentPace().size() > 0);\n assertFalse(smp.isFinished());\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MMM-YY\", Locale.getDefault());\n\n for (Map.Entry<Date, Float> entry : smp.getEntriesCurrentPace().entrySet()) {\n System.out.println(dateFormat.format(entry.getKey()) + \" : \" + entry.getValue());\n }\n\n\n for (int i = 0; i < 30; i++) {\n smp.increaseCurrentProgress();\n }\n\n assertTrue(smp.isFinished());\n\n smp.increaseCurrentProgress();\n\n assertEquals(Float.valueOf(0), smp.getEntriesCurrentPace().lastEntry().getValue());\n\n }", "private void updateTaskActivityLabel()\r\n {\r\n setLabelValue(\"Tile Downloads \" + myActiveQueryCounter.intValue());\r\n setProgress(myDoneQueryCounter.doubleValue() / myTotalSinceLastAllDoneCounter.doubleValue());\r\n }", "void setProgress(float progress);", "public final void update(){\n if(waitingToExecute){\n execute();\n waitingToExecute = false;\n }\n }", "public void notify(DocumentSavingArgs args)\r\n {\r\n DateTime canceledAt = new Date();\r\n double ellapsedSeconds = (DateTime.subtract(canceledAt, mSavingStartedAt)).getTotalSeconds();\r\n if (ellapsedSeconds > MAX_DURATION)\r\n throw new IllegalStateException($\"EstimatedProgress = {args.EstimatedProgress}; CanceledAt = {canceledAt}\");\r\n }", "public static void updateProgressBar() {\r\n mHandler.postDelayed(mUpdateTime, 100);\r\n }", "public void periodicUpdate();", "public void updateStep(int current){\n visualization.setProgress(current + stepsToMoveForward);\n }", "void setProgress(int progress);", "void setProgress(int progress);", "public void progressTheGame() {\r\n gameProgress = GameState.values()[this.gameProgress.ordinal()+1];\r\n }", "public void updateTaskProgress(Integer newDownloadProgress)\n {\n lastDownloadProgress = newDownloadProgress;\n downloadListener.onUpdateDownloadProgress(newDownloadProgress);\n }", "@ScheduledMethod(start = 1, interval = 1)\n\tpublic void update() {\n\t\tupdateParameters();\t\t\t// update bee coefficients using parameters UI\n\t\tkillBee();\t\t\t\t\t// (possibly) kill the bee (not currently used)\n\t\tlowFoodReturn();\n\t\tif(state == \"SLEEPING\"){\n\t\t\tsleep();\n\t\t}\n\t\tif(state == \"SCOUTING\"){\n\t\t\tscout();\n\t\t}\n\t\tif(state == \"TARGETING\"){\n\t\t\ttarget();\n\t\t}\n\t\tif(state == \"HARVESTING\"){\n\t\t\tharvest();\n\t\t}\n\t\tif(state == \"RETURNING\"){\n\t\t\treturnToHive();\n\t\t}\n\t\tif(state == \"AIMLESSSCOUTING\"){\n\t\t\taimlessScout();\n\t\t}\n\t\tif(state == \"DANCING\"){\n\t\t\tdance();\n\t\t}\n\t\tif(state == \"FOLLOWING\"){\n\t\t\tfollow();\n\t\t}\n\t}", "public void increment() { this.progressBar.setValue(++this.progressValue); }", "@Override\r\n\t\t\tpublic void progressMade() {\n\t\t\t\twriteReadSemaphore.refreshWriteLock(lockKey, finalWriteToken, lockTimeoutSec);\r\n\t\t\t}", "public void run() {\n updateSyncStats();\n\n double d = uploadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveUploads() == 0)\n {\n // Hide KB/s when not active uploads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n uploadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_uploads\"));\n } else {\n String s = Format.formatDecimal(d);\n uploadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_uploads_active\", s));\n }\n d = downloadCounter.calculateCurrentKBS();\n if (getController().getTransferManager().countActiveDownloads() == 0)\n {\n // Hide KB/s when no active downloads\n d = 0;\n }\n if (Double.compare(d, 0) == 0) {\n downloadsLine.setNormalLabelText(Translation\n .getTranslation(\"status_tab.files_downloads\"));\n } else {\n String s = Format.formatDecimal(d);\n downloadsLine.setNormalLabelText(Translation.getTranslation(\n \"status_tab.files_downloads_active\", s));\n }\n }", "public void saveProgress() {\n\t\tsaveUsers();\n\t\tsaveMaterials();\n\t\tsaveBorrowings();\n\t}", "@Override\n public boolean statusUpdate(TaskAttemptID taskId, TaskStatus taskStatus)\n throws IOException, InterruptedException {\n superStepCount = taskStatus.getSuperstepCount();\n return true;\n }", "@Scheduled(cron = \"0 0 */1 * * ?\")\n\tpublic void schedule() {\n\t\tif (!active) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// do not process if there is no update\n\t\tif (updateService.count() == 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOGGER.info(\"Updating indices\");\n\t\t\n\t\t// import all indices list\n\t\ttry {\n\t\t\tList<String> indices = getAllIndices();\n\t\t\tfor (String index : indices) {\n\t\t\t\tStockIndex indexEntity = getIndex(index);\n\t\t\t\ttry {\n\t\t\t\t\tprocessIndexCompanies(indexEntity);\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tLOGGER.error(\"EXCEPTION.DOWNLOAD.CMPS.\" + index, ex);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"EXCEPTION.DOWNLOAD.IDXS\", e);\n\t\t}\n\t}", "@Override\n\tpublic void onProgressUpdate() {\n\n\t}", "@Override\n public void periodic() {\n UpdateDashboard();\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n barratime.setProgress(values[0]);\n }", "@SuppressLint({\"CommitPrefEdits\"})\n public void checkForUpdates() {\n synchronized (this.preferenceStore) {\n if (this.preferenceStore.get().contains(\"last_update_check\")) {\n this.preferenceStore.save(this.preferenceStore.edit().remove(\"last_update_check\"));\n }\n }\n long currentTimeMillis = this.currentTimeProvider.getCurrentTimeMillis();\n long j = ((long) this.betaSettings.updateSuspendDurationSeconds) * 1000;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Check for updates delay: \");\n sb.append(j);\n Fabric.getLogger().d(\"Beta\", sb.toString());\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Check for updates last check time: \");\n sb2.append(getLastCheckTimeMillis());\n Fabric.getLogger().d(\"Beta\", sb2.toString());\n long lastCheckTimeMillis2 = getLastCheckTimeMillis() + j;\n StringBuilder sb3 = new StringBuilder();\n sb3.append(\"Check for updates current time: \");\n sb3.append(currentTimeMillis);\n sb3.append(\", next check time: \");\n sb3.append(lastCheckTimeMillis2);\n Fabric.getLogger().d(\"Beta\", sb3.toString());\n if (currentTimeMillis >= lastCheckTimeMillis2) {\n try {\n performUpdateCheck();\n } finally {\n setLastCheckTimeMillis(currentTimeMillis);\n }\n } else {\n Fabric.getLogger().d(\"Beta\", \"Check for updates next check time was not passed\");\n }\n }", "private void updateProgress(int progress) {\n if (myHost != null && progress != previousProgress) {\n myHost.updateProgress(progress);\n }\n previousProgress = progress;\n }", "void setProgress(@FloatRange(from = 0, to = 1) float progress);", "public void setProgress(int value);", "@Override\n public void updateBudgetPassed() {\n }", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "public void resumeUpdates();", "private void updateProgress(String progressLabel, int progress) {\n if (myHost != null && ((progress != previousProgress) || \n (!progressLabel.equals(previousProgressLabel)))) {\n myHost.updateProgress(progressLabel, progress);\n }\n previousProgress = progress;\n previousProgressLabel = progressLabel;\n }", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "@Override\n public void performUpdate() {\n this.getController().getDatabase().updateNumbersTest(\n this.getController().getPatID(), finalTime, 5);\n }", "protected void sendProgress() {\n setProgress(getProgress() ^ 1);\n }", "@Override\n public void run() {\n for (int i = 0; i<100 ; i++) {\n pb.setProgress(i/1000.0);\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public void updateGameProgression() {\n \tif (players.size() == 0) {\n \t\tSystem.out.println(\"Game over\");\n \t\tgameOver.set(true);\n \t}\n \tif (goal.checkGoalCompleted().get()) {\n \t\tdungeonCompleted.set(true);\n \t} else {\n \t\tdungeonCompleted.set(false);\n \t}\n }", "@Override protected void onProgressUpdate(Integer... vals) {\n updateProgressBar(vals[0].intValue());\n }", "public abstract void setProgress (String description, int currentStep, int totalSteps);", "@Override\n\tpublic int estimateCurrentProgress() {\n\t\treturn counter.getCurrent();\n\t}", "private void updateProgress(int progress) {\n if (myHost != null) {\n myHost.updateProgress(progress);\n } else {\n System.out.println(\"Progress: \" + progress + \"%\");\n }\n }", "private void calculate() throws InterruptedException {\n\tfor (int i = 1; i <= 100; i++) {\n\t Thread.sleep(100);\n\t update(i);\n\t}\n }", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "@Test\n public void progressionUpdaterStartedAfterPlay() {\n expandPanel();\n SeekBar seekBar = (SeekBar) getActivity().findViewById(R.id.mpi_seek_bar);\n final int progress = seekBar.getProgress();\n\n onView(isRoot()).perform(ViewActions.waitForView(\n R.id.mpi_seek_bar, new ViewActions.CheckStatus() {\n @Override\n public boolean check(View v) {\n return ((SeekBar) v).getProgress() > progress;\n }\n }, 10000));\n }", "@Override\n public void syncState() {\n scheduledCounter.check();\n }", "public void updateProgress(int remaining, int total) {\n try {\n setProgress.invoke(bossBar, ((double) remaining) / ((double) total));\n } catch (IllegalAccessException | InvocationTargetException ex) {\n Bukkit.getLogger().log(Level.SEVERE, \"An error occurred while updating boss bar progress, are you using Minecraft 1.9 or higher?\", ex);\n }\n }", "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "public boolean doCheckpoint() {\n CountDownLatch latch = null;\n boolean fullCheckpoint;\n synchronized(this) { \n latch = nextCheckpointCountDownLatch;\n nextCheckpointCountDownLatch = new CountDownLatch(1);\n fullCheckpoint = this.fullCheckPoint;\n this.fullCheckPoint=false; \n } \n try {\n \n log.debug(\"Checkpoint started.\");\n RecordLocation newMark = null;\n \n ArrayList futureTasks = new ArrayList(queues.size()+topics.size());\n \n //\n // We do many partial checkpoints (fullCheckpoint==false) to move topic messages\n // to long term store as soon as possible. \n // \n // We want to avoid doing that for queue messages since removes the come in the same\n // checkpoint cycle will nullify the previous message add. Therefore, we only\n // checkpoint queues on the fullCheckpoint cycles.\n //\n if( fullCheckpoint ) { \n Iterator iterator = queues.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalMessageStore ms = (JournalMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n }\n \n Iterator iterator = topics.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalTopicMessageStore ms = (JournalTopicMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n \n try {\n for (Iterator iter = futureTasks.iterator(); iter.hasNext();) {\n FutureTask ft = (FutureTask) iter.next();\n RecordLocation mark = (RecordLocation) ft.get();\n // We only set a newMark on full checkpoints.\n if( fullCheckpoint ) {\n if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {\n newMark = mark;\n }\n }\n }\n } catch (Throwable e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n \n \n if( fullCheckpoint ) {\n try {\n if (newMark != null) {\n log.debug(\"Marking journal at: \" + newMark);\n journal.setMark(newMark, true);\n }\n }\n catch (Exception e) {\n log.error(\"Failed to mark the Journal: \" + e, e);\n }\n \n if (longTermPersistence instanceof JDBCPersistenceAdapter) {\n // We may be check pointing more often than the checkpointInterval if under high use\n // But we don't want to clean up the db that often.\n long now = System.currentTimeMillis();\n if( now > lastCleanup+checkpointInterval ) {\n lastCleanup = now;\n ((JDBCPersistenceAdapter) longTermPersistence).cleanup();\n }\n }\n }\n \n log.debug(\"Checkpoint done.\");\n }\n finally {\n latch.countDown();\n }\n synchronized(this) {\n return this.fullCheckPoint;\n } \n \n }", "public void toNow() {\r\n double now = currentSimulationTime();\r\n double passed_time = now - lastTime - suspendetTime;\r\n\r\n if (MathTools.less(0, passed_time)) {\r\n if (currentStep != null) {\r\n\r\n // get the demand of the first job\r\n double demand = running_processes.get(currentStep);\r\n demand -= passed_time;\r\n SuspendableFCFSResource.this.remainingDemand -= passed_time;\r\n \r\n // avoid trouble caused by rounding issues\r\n demand = MathTools.equalsDouble(demand, 0) ? 0.0 : demand;\r\n\r\n assert demand >= 0 : \"Remaining demand (\" + demand + \") smaller than zero! at simulation time: \"\r\n + now;\r\n\r\n running_processes.put(currentStep, demand);\r\n }\r\n }\r\n lastTime = now;\r\n suspendetTime = 0;\r\n }", "private void updateProgress(final int value) {\n \t\t// update progress bar\n \t\tprogressBar.setValue(value);\n \t\tfinal int previous = 100 * (value - 1) / progressBar.getMaximum();\n \t\tfinal int current = 100 * value / progressBar.getMaximum();\n \t\tif (previous != current) progressBar.setString(\"\" + current + \"%\");\n \n \t\t// redraw calendar graphic\n \t\tprogressFrame.repaint();\n \t}", "@Override\n\t\tprotected void onProgressUpdate(Object... values) {\n\t\t}", "public void onProgress(int pos);", "protected void onProgressUpdate(Integer... progress) {\n\t\t}", "void notifyProgress(MessageSnapshot snapshot);", "void startProgress();", "private void updateProgress(String progressLabel, int progress) {\n if (myHost != null) {\n myHost.updateProgress(progressLabel, progress);\n } else {\n System.out.println(progressLabel + \" \" + progress + \"%\");\n }\n }", "@Override\n public long progressInterval() {\n return 500;\n }", "@Override\n\tprotected void updateOtherProgress() {\n\t\t\n\t\ttempList.clear();\n\t\titeration++;\n\t\tJMetalLogger.logger.info(iteration + \" iteration...\");\n\t\t\n//\t\ttry {\n//\t\t\tnew SolutionListOutput(getPopulation()).printObjectivesToFile(\"results/media/FUN\"+iteration+\".tsv\");\n//\t\t} catch (IOException e) {\n//\t\t\te.printStackTrace();\n//\t\t}\n\t}", "void checkpoint(Node node) throws RepositoryException;", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "@Override\n public void notifyUpdate() {\n Update();\n //Invia all'activity di questo frammento il totale speso per aggiornare la sezione di controllo del budget\n onSendTotSpent.ReceiveTotSpent(contactGiftAdapter.totSpent());\n }", "@Scheduled(fixedDelay = 10000)\n @Transactional\n @Override\n public void updatedExpiredTradesStatus() {\n tradeRepository.updateExpiredTradesStatus();\n }", "public void updateStatus() {\n var taskStatuses = new ArrayList<OptimizationTaskStatus>();\n\n synchronized (tasks) {\n for (var task : tasks.values()) {\n taskStatuses.add(task.getStatus());\n }\n }\n\n wrapper.setStatus(JsonSerializer.toJson(new OptimizationToolStatus(taskStatuses)));\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\r\n protected void onProgressUpdate(Integer... progress) {\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "@Override\n protected void onProgressUpdate(Integer... values) {\n progressBar.setProgress(values[0]);\n }", "@Override\n public void progress(FileStatus status) {\n progressReporter.progress();\n }", "public void update(Observable o, Object arg) {\n final Download download = (Download) o;\n int index = downloadList.indexOf(download);\n // Fire table row update notification to table.\n fireTableRowsUpdated(index, index);\n\n progressBar1.setMaximum(getRowCount());\n\n final int s = download.getStatus();\n\n if (s == Download.COMPLETE || s == Download.SKIPPED)\n progress++;\n else if (s == Download.CANCELLED)\n progress--;\n progressBar1.setValue(progress);\n\n if (getStatus() == Download.DOWNLOADING && (s == Download.COMPLETE || s == Download.ERROR || s == Download.SKIPPED)) {\n Download candidate = null;\n for (Download d : downloadList) {\n if (d.getStatus() == Download.DOWNLOADING) return;\n if (d.getStatus() == Download.PENDING && candidate == null) candidate = d;\n }\n if (candidate != null) candidate.resume(); // Start the next download\n }\n }", "void progress(int pUnitsCompleted);", "@FXML\n private void updatePrice()\n {\n running = true;\n scheduledExecutorService = Executors.newSingleThreadScheduledExecutor();\n\n scheduledExecutorService.scheduleAtFixedRate(() ->\n {\n try {\n currentPrice.setText(api.getPrice(selectedComboBoxPairing));\n } catch (BinanceApiException e) {\n e.printStackTrace();\n }\n\n }, 0, 4, TimeUnit.SECONDS);\n }", "public void checkpointStateChanged(final CheckpointState newCheckpointState) {\n \t\tthis.taskManager.checkpointStateChanged(this.environment.getJobID(), this.vertexID, newCheckpointState);\n \t}" ]
[ "0.6216341", "0.59873563", "0.59761", "0.5935325", "0.583803", "0.5817346", "0.57999116", "0.5781354", "0.5774881", "0.5734786", "0.56915593", "0.56848663", "0.5647067", "0.5633522", "0.5621703", "0.5606704", "0.558938", "0.55563796", "0.5547154", "0.55377775", "0.5486498", "0.5479185", "0.54660106", "0.54398793", "0.5435382", "0.5430693", "0.5420526", "0.5413905", "0.5410722", "0.53896797", "0.53825074", "0.5381838", "0.53666234", "0.53517157", "0.5345571", "0.5334785", "0.5334053", "0.53279644", "0.53279644", "0.53276795", "0.53267574", "0.5318074", "0.5307309", "0.5305647", "0.5303626", "0.5301573", "0.53002274", "0.5289286", "0.5287048", "0.5273841", "0.5270132", "0.5259342", "0.5252254", "0.524853", "0.5237874", "0.5231915", "0.523171", "0.5220936", "0.52141714", "0.5211669", "0.51862586", "0.5185844", "0.51816195", "0.517808", "0.5175977", "0.5174284", "0.517154", "0.51693606", "0.51533276", "0.5152247", "0.5145174", "0.51415336", "0.5129727", "0.5125788", "0.51243716", "0.51239926", "0.51226795", "0.51212656", "0.5119586", "0.5115716", "0.5100594", "0.5071814", "0.5057166", "0.5046793", "0.503256", "0.5029809", "0.5026213", "0.5026118", "0.502323", "0.5022916", "0.5021307", "0.5021307", "0.5016887", "0.5007036", "0.5007036", "0.50054526", "0.4995211", "0.49924046", "0.4992344", "0.49904397" ]
0.7341735
0
Await all async tasks from executor was finished.
public void awaitPendingTasksFinished() throws IgniteCheckedException { GridCompoundFuture pendingFut = this.pendingTaskFuture; this.pendingTaskFuture = new GridCompoundFuture(); if (pendingFut != null) { pendingFut.markInitialized(); pendingFut.get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void await() {\n for (final Future<Void> future : futures) {\n try {\n future.get();\n } catch (final Throwable e) {\n LOGGER.error(\"Scheduled blob storage job threw an exception.\", e);\n }\n }\n futures.clear();\n }", "@Override\n\tpublic synchronized void waitAllTasks() throws ExecutionException, InterruptedException {\n\t\twaitTasks(key -> true);\n\t}", "public void awaitTermination() throws InterruptedException, ExecutionException {\n executor.awaitTermination(1, TimeUnit.SECONDS);\n if (future != null) {\n future.get();\n }\n }", "public void waitAllNodesCompleteProcessingTask() {\n // check coordinator finished task\n while (!txnCoordinator.hasNoRunningJobs()) {\n Thread.yield();\n }\n // check each participant finished task and resolve unfinished task\n for (Participant p : txnCoordinator.getParticipants()) {\n while (!((Node) p).hasNoRunningJobs()) {\n Thread.yield();\n }\n p.resolveUnfinishedTask();\n }\n }", "private void awaitDone() throws IgniteInterruptedCheckedException {\n U.await(doneLatch);\n }", "public void waitForFinish() {\n for(Future future : futures){\n try {\n future.get();\n } catch (InterruptedException | ExecutionException e) {\n LOGGER.error(\"ERROR\",e);\n }\n }\n }", "public static void shutdown() {\n\t\trunning = false;\n\t\texecutor.shutdown();\n\t\tlog.info(\"### All threads shutdown requested ###\");\n\t\t\n\t\ttry {\n\t\t\tfor (int i = 0; !executor.awaitTermination(10, TimeUnit.SECONDS); i++) {\n\t\t\t\tlog.info(\"### Awaiting for pending task pool termination... ({}) ###\", i);\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\tlog.warn(\"### Exception awaiting for pending task pool termination: {} ###\", e.getMessage());\n\t\t}\n\t\t\n\t\tlog.info(\"### All threads have finished ###\");\n\t}", "public void shutdown() {\n executor.shutdown();\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void awaitDone() {\n try {\n // Wait until the CountDownLatch reaches 0.\n mExitBarrier.await();\n } catch(java.lang.InterruptedException e) {\n errorLog(\"PlatformStrategyAndroid\",\n e.getMessage());\n }\n }", "public void notifyAsyncTaskDone();", "private static void await_execution(Thread[] threads) {\n for (Thread t: threads)\n {\n if (t.isAlive()) {\n try {\n t.join();\n }\n catch (InterruptedException ie) { \n ie.printStackTrace();\n }\n }\n }\n }", "void submitAndWaitForAll(Iterable<Runnable> tasks);", "public CompletableFuture<Void> closeAsync() {\n logger.info(\"Signalled closing of connection pool on {} with core size of {}\", host, minPoolSize);\n\n CompletableFuture<Void> future = closeFuture.get();\n if (future != null)\n return future;\n\n announceAllAvailableConnection();\n future = CompletableFuture.allOf(killAvailableConnections());\n\n return closeFuture.compareAndSet(null, future) ? future : closeFuture.get();\n }", "public void done() {\n AppMethodBeat.i(98166);\n try {\n AsyncTask.this.a(get());\n AppMethodBeat.o(98166);\n } catch (InterruptedException e) {\n AppMethodBeat.o(98166);\n } catch (ExecutionException e2) {\n RuntimeException runtimeException = new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n AppMethodBeat.o(98166);\n throw runtimeException;\n } catch (CancellationException e3) {\n AsyncTask.this.a(null);\n AppMethodBeat.o(98166);\n }\n }", "long getExecutorCompletedTaskCount();", "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\") // I know what I'm doing - famous last words.\n private static void awaitCompletion(final HashMultimap<UUID, Future<Void>> handles) {\n final Set<Future<Void>> futures;\n synchronized (handles) {\n futures = new HashSet<>(handles.values());\n handles.clear();\n }\n\n for (final Future<Void> future : futures) {\n await(future);\n }\n }", "@Override\n\tpublic boolean done() {\n\t\tfor(Task t : details.getPendingTasks()){\n\t\t\tif(!t.isComplete())\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public void done() {\n try {\n AsyncTask.this.a(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occured while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n AsyncTask.this.a(null);\n }\n }", "public void collectAsync() throws IOException {\n rmiAcceptor = new RMIAcceptor(rmiPort);\n socketAcceptor = new SocketAcceptor(socketPort);\n // We prepare the task to get our first Future, it will then be overwritten once we get the promised result\n currentRMITask = threadPool.submit(rmiAcceptor);\n currentSocketTask = threadPool.submit(socketAcceptor);\n\n threadPool.execute(this::scheduledTask);\n }", "protected void completeFuturesForFauxInstances() {\n }", "@Override\r\n public void tasksFinished()\r\n {\n }", "public ExecutorService asyncEventExecutor() {\n\t\treturn asyncListenersExecutor.get(rand.nextInt(asyncListenersExecutor.size()));\n\t}", "public void done() {\n try {\n C1000c.this.mo5101e(get());\n } catch (InterruptedException e) {\n Log.w(\"AsyncTask\", e);\n } catch (ExecutionException e2) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", e2.getCause());\n } catch (CancellationException unused) {\n C1000c.this.mo5101e(null);\n } catch (Throwable th) {\n throw new RuntimeException(\"An error occurred while executing doInBackground()\", th);\n }\n }", "<T> T endProcess(AsyncResult<T> asyncResult) throws ExecutionException, InterruptedException;", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "public List<Runnable> shutdownNow() {\n lock.lock();\n try {\n shutdown();\n List<Runnable> result = new ArrayList<>();\n for (SerialExecutor serialExecutor : serialExecutorMap.values()) {\n serialExecutor.tasks.drainTo(result);\n }\n result.addAll(executor.shutdownNow());\n return result;\n } finally {\n lock.unlock();\n }\n }", "public void allFinished() {\n\t}", "private void completionService() {\n ListeningExecutorService executor = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(numberOfThreadsInThePool));\n ExecutorCompletionService<String> completionService = new ExecutorCompletionService<String>(executor);\n for (final String printRequest : printRequests) {\n// ListenableFuture<String> printer = completionService.submit(new Printer(printRequest));\n completionService.submit(new Printer(printRequest));\n }\n try {\n for (int t = 0, n = printRequests.size(); t < n; t++) {\n Future<String> f = completionService.take();\n System.out.print(f.get());\n }\n } catch (InterruptedException | ExecutionException e) {\n Thread.currentThread().interrupt();\n } finally {\n// if (executor != null) {\n executor.shutdownNow();\n// }\n }\n\n }", "public void executeAll()\n {\n this.queue.clear();\n this.queue_set = false;\n this.resetComputation();\n while(executeNext()) {}\n }", "public void run() {\n\t\tfor (ConConsumer consumer : _consumers) {\n\t\t\tconsumer.register();\n\t\t}\n\t\t// commit the channels <\n\t\t// wait for the tasks finish >\n\t\t_monitor.checkFinish();\n\t\t// wait for the tasks finish <\n\t\t_threadPool.shutdown();\n\t}", "private void shutdown() {\n try {\n LOGGER.debug(\"Shutting down executor service\");\n this.executorService.shutdown();\n LOGGER.debug(\"Waiting for termination of executor\");\n this.executorService.awaitTermination(15, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n LOGGER.warn(\"Interrupted while waiting for Executor to shut down!\");\n } finally {\n for (Extractor extractor : this.extractors) {\n try {\n extractor.finish();\n } catch (Exception e) {\n LOGGER.error(\"Error while shutting down extractor {} : {}\",\n extractor.getClass().getSimpleName(), LogHelper.getStackTrace(e));\n }\n }\n LOGGER.debug(\"All extractors termination, executor service terminated. Exiting shutdown.\");\n }\n }", "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\") // I know what I'm doing - famous last words.\n private static void awaitCompletion(final HashMultimap<UUID, Future<Void>> handles, final UUID handle) {\n final Set<Future<Void>> futures;\n synchronized (handles) {\n futures = handles.removeAll(handle);\n }\n\n for (final Future<Void> future : futures) {\n await(future);\n }\n }", "final void waitFinished() {\n if (selectionSyncTask != null) {\n selectionSyncTask.waitFinished();\n }\n }", "public ArrayList<Task> getFinishedTasks(){\r\n return finished;\r\n }", "@Override\n public boolean isDone() {\n return future.isDone();\n }", "@Override\n public void close() {\n executor.shutdown();\n }", "protected void fireQueueComplete() {\n for (UploadListener uploadListener : uploadListeners) {\n uploadListener.queueUploadComplete();\n }\n }", "public static <T> void getAllDone(final Iterable<Future<T>> futures, final Collection<T> results) {\n getAllDone(futures.iterator(), results);\n }", "public static <T> void getAllDone(final Iterator<Future<T>> futures, final Collection<T> results) {\n while (futures.hasNext()) {\n final Future<T> future = futures.next();\n if (future.isDone()) {\n try {\n final T t = future.get();\n results.add(t);\n }\n catch (InterruptedException e) {\n e.printStackTrace();\n }\n catch (ExecutionException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n public void shutdown() throws ExecutionException, InterruptedException {\n // When we close this service we need to shutdown our executor!\n threadPoolExecutorService.shutdown();\n if (!threadPoolExecutorService.awaitTermination(SHUTDOWN_TIME, TimeUnit.SECONDS)) {\n LOG.error(\"SfcOfFlowProgrammerImpl Executor did not terminate in the specified time.\");\n List<Runnable> droppedTasks = threadPoolExecutorService.shutdownNow();\n LOG.error(\"SfcOfFlowProgrammerImpl Executor was abruptly shut down. [{}] tasks will not be executed.\",\n droppedTasks.size());\n }\n }", "public void executeQueue() {\n\tLog.d(TaskExecutor.class.getName(), \"Execute \" + mQueue.size() + \" Tasks\");\n\tfor (Task task : mQueue) {\n\t if (!mTaskExecutor.getQueue().contains(task))\n\t\texecuteTask(task);\n\t}\n }", "private void shutdownExecutor(ExecutorService executor) {\n try {\n System.out.println(\"attempt to shutdown executor\");\n // The executor shuts down softly ...\n executor.shutdown();\n // ... by waiting a certain amount of time for termination of currently running tasks.\n executor.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n System.err.println(\"tasks interrupted\");\n }\n // After a maximum of five seconds ...\n finally {\n // ... the executor finally shuts down by interrupting all running tasks.\n if (!executor.isTerminated()) {\n System.err.println(\"cancel non-finished tasks\");\n }\n executor.shutdownNow();\n System.out.println(\"shutdown finished\");\n }\n }", "public boolean awaitTermination(int timeout) throws InterruptedException {\n\n long target = Timeouts.start(timeout);\n lock.lock();\n if (threads.stream().allMatch(t -> t.available)) return true;\n threadWaitingForCompletion = true;\n lock.unlock();\n\n for (ThreadPoolObj t : threads) {\n\n //ficar a espera\n if (Timeouts.isTimeout(Timeouts.remaining(target))) return false;\n t.thread.join(Timeouts.remaining(target));\n\n }\n\n return !Timeouts.isTimeout(Timeouts.remaining(target));\n\n }", "protected void awaitResult(){\t\n\t\ttry {\n\t\t\t/*place thread/tuple identifier in waitlist for future responses from web service*/\n\t\t\tResponses.getInstance().addToWaitList(this.transId, this);\n\t\t\tthis.latch.await();\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\n\t\t\tLogger.getLogger(\"RSpace\").log(Level.WARNING, \"Transaction #\" + transId + \" response listener was terminated\");\n\t\t}\n\t}", "public void run() throws InterruptedException, ExecutionException {\n\t\tExecutorService exec = Executors.newCachedThreadPool();\n\t\tfor (Entry<Integer, Set<Task>> entry : map.entrySet()) {\n\t\t\tList<Future<?>> futures = new ArrayList<Future<?>>();\n\t\t\t\n\t\t\t// submit each task in the set to the executor\n\t\t\tfor (Task task : entry.getValue()){\n\t\t\t\tfutures.add(exec.submit(task));\n\t\t\t}\n\t\t\t\n\t\t\t// iterate the futures to see if all the tasks in the set have finished execution\n\t\t\tfor (Iterator<Future<?>> iterator = futures.iterator(); iterator.hasNext();) {\n\t\t\t\tFuture<?> future = (Future<?>) iterator.next();\n\t\t\t\tif (future.get() == null);\n\t\t\t}\n\t\t}\n\t\texec.shutdown();\n\t}", "public static void shutdownAndAwaitTermination(ExecutorService pool, String poolName,\n long timeout, TimeUnit unit, Logger logger) {\n Preconditions.checkNotNull(pool);\n\n pool.shutdown(); // Disable new tasks from being submitted\n try {\n // Wait a while for existing tasks to terminate\n if (!pool.awaitTermination(timeout, unit)) {\n pool.shutdownNow(); // Cancel currently executing tasks\n // Wait a while for tasks to respond to being cancelled\n if ((!pool.awaitTermination(timeout, unit)) && (logger != null)) {\n logger.error(\"Executor service {} did not terminate\",\n StringUtils.defaultIfBlank(poolName, \"null\"));\n }\n }\n } catch (InterruptedException ignored) {\n // (Re-)Cancel if current thread also interrupted\n pool.shutdownNow();\n // Preserve interrupt status\n Thread.currentThread().interrupt();\n }\n }", "private void awaitCleanUp() {\n\n // Get the first transaction awaiting clean up.\n StmTransaction firstTransAwaitingCleanUp = firstTransactionAwaitingCleanUp.get();\n\n // Link this transaction into the head of the list.\n this.nextTransactionAwaitingCleanUp.set( firstTransAwaitingCleanUp );\n\n // Spin until we do both atomically.\n while ( !firstTransactionAwaitingCleanUp.compareAndSet( firstTransAwaitingCleanUp, this ) ) {\n firstTransAwaitingCleanUp = firstTransactionAwaitingCleanUp.get();\n this.nextTransactionAwaitingCleanUp.set( firstTransAwaitingCleanUp );\n }\n\n }", "public void forceShutdown()\n {\n taskExecutor.shutdownNow();\n differencingDone.signalAll();\n completed.signalAll();\n }", "public void shutdown() {\n\t\tfinal List<Runnable> tasks = updater.shutdownNow();\n\t\tif (null == tasks) return;\n\t\tfor (final Runnable t : tasks)\n\t\t\tt.run();\n\t}", "public void waitCompletion()\n {\n\n if (isThreadEnabled())\n {\n try\n {\n executionThread.join();\n }\n catch (InterruptedException ex)\n {\n throw new RuntimeException(ex);\n }\n }\n }", "public void finish() {\n latch.countDown();\n }", "public void finishedAllRequests() {\n hasMoreRequests = false;\n }", "public void finish() {\n\t\ttask.run();\n\t\ttask.cancel();\n\t}", "private boolean shutdownAndAwaitTermination(\n ExecutorService pool, long timeout, \n TimeUnit unit, List<Runnable> addInterruptedHere) {\n \n pool.shutdown(); // Disable new tasks from being submitted\n\n if(timeout <= 0) {\n timeout = 1;\n }\n\n try {\n \n // Wait a while for existing tasks to terminate\n if (!pool.awaitTermination(timeout, unit)) {\n \n List interrupted = pool.shutdownNow(); // Cancel currently executing tasks\n \n if(addInterruptedHere != null && \n (interrupted != null && !interrupted.isEmpty())) {\n addInterruptedHere.addAll(interrupted);\n }\n \n // Wait a while for tasks to respond to being cancelled\n if (!pool.awaitTermination(timeout, unit)) { \n return false;\n } \n }\n } catch (InterruptedException ie) {\n \n // (Re-)Cancel if current thread also interrupted\n List interrupted = pool.shutdownNow();\n \n if(addInterruptedHere != null && \n (interrupted != null && !interrupted.isEmpty())) {\n addInterruptedHere.addAll(interrupted);\n }\n \n // Preserve interrupt status\n Thread.currentThread().interrupt();\n }\n \n return true;\n }", "public static void clearAsynTask() {\n if (tasksList != null && tasksList.size() > 0) {\n for (AsyncTask<Void, Integer, Boolean> mTask : tasksList) {\n if (!(null == mTask)) {\n mTask.cancel(true);\n }\n }\n tasksList.clear();\n }\n }", "public void shutdown() {\r\n ThreadLocalEventLoop.INSTANCE.resetEventLoop$kotlinx_coroutines_core();\r\n this.isCompleted = true;\r\n closeQueue();\r\n do {\r\n } while (processNextEvent() <= 0);\r\n rescheduleAllDelayed();\r\n }", "public static <T> void executeUntilFailure(Executor executor, Collection<Callable<T>> tasks)\n {\n CompletionService<T> completionService = new ExecutorCompletionService<>(executor);\n List<Future<T>> futures = new ArrayList<>(tasks.size());\n for (Callable<T> task : tasks) {\n futures.add(completionService.submit(task));\n }\n try {\n for (int i = 0; i < futures.size(); i++) {\n getDone(take(completionService));\n }\n }\n catch (Exception failure) {\n try {\n futures.forEach(future -> future.cancel(true));\n }\n catch (RuntimeException e) {\n failure.addSuppressed(e);\n }\n throw failure;\n }\n }", "void await()\n throws InterruptedException;", "protected abstract int doAwaitExit() throws InterruptedException;", "public long getCompletedTasks()\n {\n return getCompletedTaskCount();\n }", "@Override\n public void onCompleted() {\n System.out.println(\n \"\\n\\tServer is finished!\"\n );\n\n this.latch.countDown();\n }", "public void runTasks() {\n promoteBlockedTasks();\n\n final AtomicInteger counter = new AtomicInteger(0);\n\n ExecutorService runners = threadPerCpuExecutor(stderr, \"TaskQueue\");\n\n for (int i = 0; i < Runtime.getRuntime().availableProcessors(); i++) {\n runners.execute(() -> {\n while (runOneTask()) {\n // running one task at a time\n counter.getAndIncrement();\n }\n });\n }\n\n runners.shutdown();\n\n try {\n runners.awaitTermination(FOREVER, TimeUnit.SECONDS);\n\n stdout.println(String.format(\"Executed tasks: %d\", counter.get()));\n\n } catch (InterruptedException e) {\n stdout.println(\"failed task: \" + e.getMessage());\n e.printStackTrace(stderr);\n throw new AssertionError();\n }\n }", "public void completeTask() {\n completed = true;\n }", "public Status waitUntilFinished();", "public void run()\r\n/* 996: */ {\r\n/* 997:838 */ if (DefaultPromise.this.listeners == null) {\r\n/* 998: */ for (;;)\r\n/* 999: */ {\r\n/* :00:840 */ GenericFutureListener<?> l = (GenericFutureListener)poll();\r\n/* :01:841 */ if (l == null) {\r\n/* :02: */ break;\r\n/* :03: */ }\r\n/* :04:844 */ DefaultPromise.notifyListener0(DefaultPromise.this, l);\r\n/* :05: */ }\r\n/* :06: */ }\r\n/* :07:849 */ DefaultPromise.execute(DefaultPromise.this.executor(), this);\r\n/* :08: */ }", "public final boolean isDone() {\n return TrustedListenableFutureTask.this.isDone();\n }", "public void completePendingOps() throws JournalException {\n while (!this.pendingOps.isEmpty()) {\n Serializable op = this.pendingOps.poll();\n execute(op);\n complete();\n }\n }", "private List<PartETag> waitForAllPartUploads() throws IOException {\n LOG.debug(\"Waiting for {} uploads to complete\", partETagsFutures.size());\n try {\n return Futures.allAsList(partETagsFutures).get();\n } catch (InterruptedException ie) {\n LOG.warn(\"Interrupted partUpload\", ie);\n Thread.currentThread().interrupt();\n return null;\n } catch (ExecutionException ee) {\n //there is no way of recovering so abort\n //cancel all partUploads\n LOG.debug(\"While waiting for upload completion\", ee);\n LOG.debug(\"Cancelling futures\");\n for (ListenableFuture<PartETag> future : partETagsFutures) {\n future.cancel(true);\n }\n //abort multipartupload\n store.abortMultipartUpload(key, uploadId);\n throw new IOException(\"Multi-part upload with id '\" + uploadId\n + \"' to \" + key, ee);\n }\n }", "void await() throws InterruptedException;", "void await() throws InterruptedException;", "void await() throws InterruptedException;", "public void finish() {\n for (RecordConsumer consumer : consumerList) {\n consumer.submit(new Record(true));\n }\n }", "public void done() {\n if (!isCancelled()) {\n try {\n C0637h.this.mo7991a(get());\n } catch (InterruptedException | ExecutionException e) {\n C0637h.this.mo7992a(e.getCause());\n }\n } else {\n C0637h.this.mo7992a((Throwable) new CancellationException());\n }\n }", "void finish(Task task);", "@Test\n public void testFutureWithDone() throws Exception {\n Callable<String> task = new Callable<String>() {\n public String call() throws Exception {\n // do something that takes some time\n LOG.info(\"Starting to process task\");\n Thread.sleep(5000);\n LOG.info(\"Task is now done\");\n return \"Camel rocks\";\n }\n };\n\n // this is the thread pool we will use\n ExecutorService executor = Executors.newCachedThreadPool();\n\n // now submit the task to the thread pool\n // and get the Future handle back so we can later get the result\n LOG.info(\"Submitting task to ExecutorService\");\n Future<String> future = executor.submit(task);\n LOG.info(\"Task submitted and we got a Future handle\");\n\n // test when we are done\n boolean done = false;\n while (!done) {\n done = future.isDone();\n LOG.info(\"Is the task done? \" + done);\n if (!done) {\n Thread.sleep(2000);\n }\n }\n\n // and get the answer\n String answer = future.get();\n LOG.info(\"The answer is: \" + answer);\n }", "public abstract void await() throws InterruptedException;", "@Override\n public void suspend() {\n super.suspend();\n if (executor != null) executor.shutdownNow();\n executorQueued.set(false);\n }", "private void waitUntilAllThreadsAreFinished() {\n int index = 1;\n\n while (true) {\n while (index <= noThread) {\n if (carry[index] == -1) {\n index = 1;\n } else {\n index++;\n }\n }\n break;\n }\n }", "public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {\n lock.lock();\n try {\n long waitUntil = System.nanoTime() + unit.toNanos(timeout);\n long remainingTime = waitUntil - System.nanoTime();\n while (remainingTime > 0 && !serialExecutorMap.isEmpty()) {\n terminating.awaitNanos(remainingTime);\n remainingTime = waitUntil - System.nanoTime();\n }\n\n if (remainingTime <= 0) {\n return false;\n }\n\n if (serialExecutorMap.isEmpty()) {\n return executor.awaitTermination(remainingTime, TimeUnit.NANOSECONDS);\n }\n return false;\n } finally {\n lock.unlock();\n }\n }", "public void completeNext()\n {\n\tTask t = toDo.get(0);\n\tt.complete();\n\ttoDo.remove(0);\n\tcompleted.add(t);\n }", "public static <R> DurableBackgroundTaskResult<R> complete() {\n return new DurableBackgroundTaskResult<>(COMPLETED, null, null);\n }", "public void finishTask() {\n\t\t\n\t}", "public void shutDownExecutors(ScheduledExecutorService executorService) {\n try {\n java.lang.System.out.println(\"attempt to shutdown executor\");\n executorService.shutdown();\n executorService.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n java.lang.System.err.println(\"tasks interrupted\");\n }\n finally {\n if (!executorService.isTerminated()) {\n java.lang.System.err.println(\"cancel non-finished tasks\");\n }\n executorService.shutdownNow();\n java.lang.System.out.println(\"shutdown finished\");\n }\n }", "@Override\r\n\tpublic Executor getAsyncExecutor() {\n\t\treturn null;\r\n\t}", "public synchronized void waitForDone() {\n\twhile (!done) myWait();\n }", "private void shutdownAndAwaitTermination(ExecutorService pool, int shutdownTime, TimeUnit unit) {\n if (pool != null) {\n log.info(\"Entered the shutdown method : total shutdown time is : \" + shutdownTime + \" time unit is : \" + unit.toString());\n pool.shutdown();\n\n try {\n if (!pool.awaitTermination((long)shutdownTime, unit)) {\n pool.shutdownNow();\n if (!pool.awaitTermination(10L, TimeUnit.SECONDS)) {\n log.info(\"Pool did not terminate\");\n }\n }\n } catch (InterruptedException var4) {\n pool.shutdownNow();\n Thread.currentThread().interrupt();\n } catch (Exception var5) {\n log.error(\"exception occured : \" + var5.getMessage(), var5);\n log.error(var5.getMessage(), var5);\n }\n\n log.info(\"pool is shut down\");\n }\n }", "private static void threadPoolWithExecute() {\n\n Executor executor = Executors.newFixedThreadPool(3);\n IntStream.range(1, 10)\n .forEach((i) -> {\n executor.execute(() -> {\n System.out.println(\"started task for id - \"+i);\n try {\n if (i == 8) {\n Thread.sleep(4000);\n } else {\n Thread.sleep(1000);\n }\n System.out.println(\"In runnable task for id -\" + i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n });\n });\n System.out.println(\"End of method .THis gets printed immdly since execute is not blocking call\");\n }", "@Override\n\tprotected void onPostExecute() {\n\n\t\tprogressDialog.dismiss();\n\n\t\ttry {\n\n\t\t\tgetResult();\n\n\t\t\tif (completionListener != null) {\n\t\t\t\tcompletionListener.onDownloadAllDataComplete(true);\n\t\t\t}\n\n\t\t} catch (Exception error) {\n\t\t\tAlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\t\tbuilder.setTitle(string.error)\n\t\t\t\t\t.setMessage(context.getString(string.datasync_dialog_cantsync) + error.getMessage())\n\t\t\t\t\t.setCancelable(false).setPositiveButton(string.ok, new DialogInterface.OnClickListener() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tif (completionListener != null) {\n\t\t\t\t\t\t\t\tcompletionListener.onDownloadAllDataComplete(false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t}\n\n\t}", "public void executWaiting() {\n for (Runnable action : this.todo) {\n runAction( action );\n }\n }", "private void delegateTasks() {\n logger.debug(\"task delegation started\");\n\n untilTasksAndThreadsAreAvailable:\n while (true) {\n Optional<Node> selectedNode;\n Optional<WorkerPoolTask> task = workerPool.pollTask();\n\n if (!task.isPresent()) {\n while (true) {\n State prevState = state.get();\n State nextState;\n if (prevState == DURING_DELEGATION) {\n // No more tasks and free threads appeared\n nextState = NO_DELEGATION;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n nextState = DURING_DELEGATION;\n }\n if (state.compareAndSet(prevState, nextState)) {\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n if (prevState == DURING_DELEGATION) {\n return;\n } else {\n //prevState == DURING_DELEGATION_WITH_SCHEDULED_RE_EXECUTION\n continue untilTasksAndThreadsAreAvailable;\n }\n }\n logger.debug(\"state change missed in delegateTasks when task wasn't present\");\n }\n }\n\n synchronized (nodes) { // Synchronization with HeartBeat nodes.updateAfterHeartBeat method.\n selectedNode = nodes.drainThreadFromNodeHavingHighestPriority();\n if (!selectedNode.isPresent()) {\n workerPool.submitTask(task.get(), true);\n State nextState = AWAITING_FREE_THREADS;\n State prevState = state.getAndSet(nextState);\n logger.debug(\"changed from \" + prevState + \" to \" + nextState);\n return;\n }\n }\n\n if (!delegateTask(selectedNode.get(), task.get())) {\n //If delegation failed we release the thread to keep proper number of free threads up-to-date\n //If HeartBeat happened between draining a thread and returning it, this operation will take no effect\n //as we are working on invalidated version of node.\n nodes.returnThread(selectedNode.get());\n }\n }\n }", "@NonNull\n public List<HubEvent<?>> await() {\n Latch.await(latch);\n return Immutable.of(events);\n }", "void TaskFinished(Task task) {\n\n repository.finishTask(task);\n }", "protected final void whenResolved(Collection<? extends Task<?>> tasks, Runnable callback) {\n \tnumOfTasksLeft = tasks.size();\n Object[] tmpArr = tasks.toArray();\n this.callback=callback;\n// \tfor (Task<?> t : tasks) {\n//\n//\t\t}\n \n for (int i=0; i<tmpArr.length; i++){\n ((Task<?>)tmpArr[i]).getResult().whenResolved(()->{\n \tsynchronized (this) { // we need to synchronize in order to prevent a situation where two threads adds the same resolved task\n \tnumOfTasksLeft--;\n if (numOfTasksLeft <= 0)\n // Add to my Queue\n myProcessor.getPool().addTask(this, myProcessor.getProcessorID());\n \t}\n });\n }\n \n \n // I get tasks, and callbacks. When all the tasks are completed, run the callback\n // @pre-condition - all of the tasks needs to be resolved <-> getResult!=null\n// \tIterator<? extends Task<?>> it=tasks.iterator();\n// \twhile (it.hasNext()) {\n// \t\tif (it.next().getResult()==null)\n//\t\t\t\ttry {\n//\t\t\t\t\t// Option for OBJECT in wait\n//\t\t\t\t\twait();\n//\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te.printStackTrace();\n//\t\t\t\t}\n// \t}\n }", "@Override\n public void onTaskDone(Object... values) {\n }", "@Override\n public Completable closeAsync() {\n return defer(() -> {\n try {\n applicationHandler.onShutdown(container);\n return completed();\n } catch (final Throwable t) {\n return failed(t);\n }\n });\n }", "java.util.concurrent.Future<DescribeExportTasksResult> describeExportTasksAsync(DescribeExportTasksRequest describeExportTasksRequest,\n com.amazonaws.handlers.AsyncHandler<DescribeExportTasksRequest, DescribeExportTasksResult> asyncHandler);", "@Override\n protected void onPostExecute(BackgroundTaskResult result)\n {\n taskCompleted = true;\n dismissProgressDialog();\n notifyTaskCompletion(result);\n }", "protected void handleCompletedTask(Future<Task> task)\n {\n m_RunningTasks.remove(task);\n\n }", "public static void main(String[] args) throws Exception {\n // construct a new executor that will run async tasks\n AsyncExecutor executor = new ThreadAsyncExecutor();\n\n // start few async tasks with varying processing times, two last with callback handlers\n AsyncResult<Integer> asyncResult1 = executor.startProcess(lazyval(10, 5000));\n AsyncResult<String> asyncResult2 = executor.startProcess(lazyval(\"test\", 3000));\n AsyncResult<Long> asyncResult3 = executor.startProcess(lazyval(50L, 7000));\n AsyncResult<Integer> asyncResult4 = executor.startProcess(lazyval(20, 4000), callback(9999));\n AsyncResult<String> asyncResult5 =\n executor.startProcess(lazyval(\"I am result5\", 6000), callback(\"Callback result 5\"));\n\n // emulate processing in the current thread while async tasks are running in their own threads\n Thread.sleep(3500); // Oh boy I'm working hard here\n log(\"Some hard work done\");\n\n // wait for completion of the tasks\n Integer result1 = executor.endProcess(asyncResult1);\n String result2 = executor.endProcess(asyncResult2);\n Long result3 = executor.endProcess(asyncResult3);\n asyncResult4.await();\n asyncResult5.await();\n\n // log the results of the tasks, callbacks log immediately when complete\n log(\"Result 1: \" + result1);\n log(\"Result 2: \" + result2);\n log(\"Result 3: \" + result3);\n log(\"Result 4: \" + asyncResult4.getValue());\n log(\"Result 5: \" + asyncResult5.getValue());\n }", "String waitForCompletion(ClientResponse asyncResponse, int maxRetries) throws VPlexApiException {\n MultivaluedMap<String, String> headers = asyncResponse.getHeaders();\n String taskResourceStr = headers.getFirst(VPlexApiConstants.LOCATION_HEADER);\n if (taskResourceStr == null) {\n throw new VPlexApiException(\"Can't find location for asynchronous reponse.\");\n }\n s_logger.info(\"Waiting for task {} to complete\", taskResourceStr);\n // Check the task for completion until we've reached the\n // maximum number of status checks.\n int retries = 0;\n while (retries++ < maxRetries) {\n ClientResponse taskResponse = get(URI.create(taskResourceStr));\n String responseStr = taskResponse.getEntity(String.class);\n s_logger.info(\"Wait for completion response is {}\", responseStr);\n int taskStatus = taskResponse.getStatus();\n taskResponse.close();\n if (taskStatus == VPlexApiConstants.SUCCESS_STATUS) {\n // Task completed successfully\n s_logger.info(\"Task {} completed successfully\", taskResourceStr);\n return responseStr;\n } else if (taskStatus != VPlexApiConstants.TASK_PENDING_STATUS) {\n // Task failed.\n throw new VPlexApiException(String.format(\n \"Task %s did not complete successfully\", taskResourceStr));\n } else {\n // Task is still pending completion, sleep a bit and check again.\n VPlexApiUtils.pauseThread(VPlexApiConstants.TASK_PENDING_WAIT_TIME);\n }\n }\n\n // We've timed out waiting for the operation to complete.\n throw VPlexApiException.exceptions\n .timeoutWaitingForAsyncOperationToComplete(taskResourceStr);\n }" ]
[ "0.7080475", "0.66852605", "0.65589637", "0.64115006", "0.63977456", "0.6355946", "0.63231415", "0.59716314", "0.5958142", "0.59494394", "0.5923623", "0.5909508", "0.5830649", "0.5830326", "0.57690275", "0.5760761", "0.571497", "0.5713369", "0.5662366", "0.5565056", "0.5527177", "0.5473217", "0.54231066", "0.54162425", "0.54053557", "0.54000694", "0.538033", "0.5348814", "0.53353155", "0.53222394", "0.530911", "0.5274495", "0.5271949", "0.52556443", "0.523874", "0.5232858", "0.5160478", "0.5157581", "0.51345503", "0.51296", "0.51165587", "0.51148045", "0.50940686", "0.50712645", "0.5063463", "0.506249", "0.50492746", "0.50430435", "0.50345427", "0.503247", "0.50248736", "0.5009009", "0.49963436", "0.4984823", "0.4984717", "0.49810848", "0.4977152", "0.4972852", "0.49663267", "0.49526548", "0.49466082", "0.49452162", "0.49447653", "0.49394643", "0.4918452", "0.49124017", "0.49032384", "0.48978117", "0.4895174", "0.4895174", "0.4895174", "0.48771998", "0.4848278", "0.48254168", "0.48200253", "0.48196694", "0.4808993", "0.47872165", "0.4770829", "0.4765179", "0.47620395", "0.47586817", "0.4756456", "0.4747377", "0.4741367", "0.4739019", "0.47352767", "0.47350255", "0.47284213", "0.47196224", "0.47180617", "0.47155687", "0.47082356", "0.4698578", "0.4698119", "0.46971828", "0.4689617", "0.46814436", "0.46781862", "0.46764347" ]
0.70974797
0
Performs parallel sort in isolated fork join pool.
private static void parallelSortInIsolatedPool( FullPageId[] pagesArr, Comparator<FullPageId> cmp ) throws IgniteCheckedException { ForkJoinPool.ForkJoinWorkerThreadFactory factory = new ForkJoinPool.ForkJoinWorkerThreadFactory() { @Override public ForkJoinWorkerThread newThread(ForkJoinPool pool) { ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool); worker.setName("checkpoint-pages-sorter-" + worker.getPoolIndex()); return worker; } }; ForkJoinPool forkJoinPool = new ForkJoinPool(PARALLEL_SORT_THREADS + 1, factory, null, false); ForkJoinTask sortTask = forkJoinPool.submit(() -> Arrays.parallelSort(pagesArr, cmp)); try { sortTask.get(); } catch (InterruptedException e) { throw new IgniteInterruptedCheckedException(e); } catch (ExecutionException e) { throw new IgniteCheckedException("Failed to perform pages array parallel sort", e.getCause()); } forkJoinPool.shutdown(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public <T extends Comparable<? super T>> List<T> sort(List<T> list){\n return pool.invoke(new ForkJoinSorter<T>(list));\n }", "private void multiThreadSort(T[] array, int first, int last, boolean parallel) {\n int cursor = partition(array, first, last);\n\n nextPass(array, first, cursor - 1);\n nextPass(array, cursor, last);\n\n if (parallel) {\n synchronized (counter) {\n counter.threads--;\n counter.notify();\n }\n }\n }", "public static void parallelSort(List<Integer> data, int numProcessors) {\n if (((data.size() / numProcessors) <= 1) || (numProcessors <= 1)) {\n ParSort.sequentialSort(data, 0, data.size());\n return;\n }\n\n int splitDepth = (int) (Math.log(numProcessors) / Math.log(2));\n\n ThreadPool pool = new ThreadPool(numProcessors);\n List<Job> jobs = new ArrayList<>();\n\n ParSort.parallelSort(data, 0, data.size(), jobs, 0, splitDepth);\n\n for (Job job : jobs)\n pool.submit(job);\n\n for (Job job : jobs)\n job.waitUntilFinished();\n }", "private static void evaluateMergesortVogellaThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n msVogellaJThreads.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static void sort(int[] array, int from, int to) {\n int size = to - from + 1;\n int mid = from + (to - from)/2;\n if (size < cutoff|| counThread>20) \n \t{\n \t\tSystem.out.println(\"cut-off: \"+ (to-from+1));\n \t\tArrays.sort(array, from, to+1);\n \t}\n else {\n \n \tCompletableFuture<int[]> parsort1 = parsort(array, from, mid);\n \t\n \t\n CompletableFuture<int[]> parsort2 = parsort(array, mid+1, to);\n\n\n CompletableFuture<int[]> parsort = \n \t\tparsort1.thenCombine(parsort2, (xs1, xs2) -> {\n \tint[] result = new int[xs1.length + xs2.length];\n \tmerge(array, result, from);\n return result;\n });\n\n parsort.whenComplete((result, throwable) -> { \t\n// \tSystem.arraycopy(result, 0, array, from, to-from+1);\n// \tSystem.out.println(\"Thread count: \"+ counThread);\n \t\n \t\n }); \n parsort.join();\n }\n }", "private void nextPass(T[] array, int first, int last) {\n if (last > first) {\n boolean parallel = false;\n synchronized (counter) {\n if (counter.threads < maxThreads) {\n parallel = true;\n counter.threads++;\n }\n }\n\n if (parallel) {\n executor.submit(() -> multiThreadSort(array, first, last, true));\n } else {\n multiThreadSort(array, first, last, false);\n }\n }\n }", "private void sort() {\n\t\trunPassZero();\n\t\tList<TupleReaderBinary> buffers = new ArrayList<>();\n\t\tList<Tuple> sortStage = new ArrayList<>();\n\t\tassert (readerBucketID == 0);\n\t\tassert (writerBucketID == 0);\n\t\tassert (passNumber == 1);\n\t\tassert (currentGroup == 1);\n\t\toutputBuffer.clear();\n\n\t\t// assign buffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tbuffers.add(null);\n\t\t\tassignBuffer(buffers, i);\n\t\t\tsortStage.add(null);\n\t\t}\n\n\t\tassert (buffers.size() == numInputBuffers);\n\t\tassert (sortStage.size() == numInputBuffers);\n\n\t\t// read from buffers into list of size numInputBuffers\n\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t}\n\n\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\" + instanceHashcode\n\t\t\t\t+ \"_\" + passNumber + \"_\" + writerBucketID);\n\n\t\twhile (true) {\n\t\t\tif (!findAndReplaceSmallest(buffers, sortStage)) {\n\t\t\t\tprevPrevTotalBuckets = prevTotalBuckets;\n\t\t\t\tprevTotalBuckets = writerBucketID + 1;\n\t\t\t\tflushOutputBuffer();\n\t\t\t\toutputWriter.close();\n\n\t\t\t\t// We are done! Return\n\t\t\t\tif (prevTotalBuckets == 1) {\n\t\t\t\t\tdeleteTempFiles();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\twriterBucketID = 0;\n\t\t\t\treaderBucketID = 0;\n\t\t\t\twriterFlushes = 0;\n\t\t\t\tdeleteTempFiles();\n\t\t\t\tpassNumber++;\n\t\t\t\tcurrentGroup = 1;\n\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tassignBuffer(buffers, i);\n\t\t\t\t\tsortStage.add(null);\n\t\t\t\t}\n\t\t\t\tfor (int i = 0; i < numInputBuffers; i++) {\n\t\t\t\t\tsortStage.set(i, readFromBuffer(buffers, i));\n\t\t\t\t}\n\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\n\t}", "private static void evaluateMergesortUniversityWashingtonThreaded() {\n\n // LOGGER.info(\"evaluating parallel mergesort with Java Threads based on the version of the University\n // of Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n MergesortUniversityWashingtonThreaded.parallelMergeSort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Java Threads (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint[] arr= {5,8,2,4,3};\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\t\t\r\n\t\tArrays.parallelSort(arr);\r\n\t\tSystem.out.println(\"Elements after sort\");\r\n\t\t\r\n\t\tfor (int i:arr) {\r\n\t\t\tSystem.out.println(i+\" \");\r\n\t\t}\r\n\r\n\t}", "private void sort(int low, int n) {\n\t\tif (n > 1) {\n\t\t\tint mid = n >> 1;\n\t\t\t// create a lambda expression of Runnable to sort the first half of the array as separate thread\n\t\t\tRunnable r1 = ()->sort(low, mid);\n\t\t\t// create a lambda expression of Runnable to sort the second half of the array as separate thread\n\t\t\tRunnable r2 = ()->sort(low + mid, mid);\n\t\t\t\n\t\t\tThread t1 = new Thread(r1);\n\t\t\tThread t2 = new Thread(r2);\n\t\t\t\n\t\t\t// start the first thread\n\t\t\tt1.start();\n\t\t\t// start the second thread\n\t\t\tt2.start();\n\t\t\t// the t1.join and t2.join will instruct the main thread not exit before t1 and t2 are complete\n\t\t\ttry {\n\t\t\t\tt1.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tt2.join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t// Now time to combine\n\t\t\tcombine(low, n, 1);\n\t\t}\n\t}", "public void sort()throws InterruptedException{\n\t\tfor (int i = 0; i < a.length - 1; i++) {\n\t\t\tint minPos = minPosition(i);\n\t\t\tsortStateLock.lock();\n\t\t\ttry{\n\t\t\t\tswap(minPos, i);\n\t\t\t\t// For animation\n\t\t\t\talreadySorted = i;\n\t\t\t}\n\t\t\tfinally{\n\t\t\t\tsortStateLock.unlock();\n\t\t \t\t}\n\t\t\tpause(2);\n\t }\n }", "private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}", "private static void performSort(TestApp testApp) {\n testApp.testPartition();\n\n /*\n Date end = new Date();\n System.out.println(\"Sort ended @ \" + end.getTime());\n System.out.println(\"Total time = \" + (end.getTime() - start.getTime())/1000.0 + \" seconds...\");\n */\n }", "public static void parallelSort(int[] a, int[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tfor (int i = 0; i < 1000000; i++) {\n\t\t\t\tint[] a = Util.generateRandomArray(500, 200000);\n\t\t\t\tint[] b = a.clone();\n\t\t\t\t\n\t\t\t\ta = sort(a);\n\t\t\t\tArrays.sort(b);\n\t\t\t\t\n\t\t\t\tfor (int j = 0; j < b.length; j++) {\n\t\t\t\t\tUtil.Assert(a[j] == b[j], \"shit\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Heap sort ok\");\n\t\t}", "public static <T> void parallelSort(long[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2,0, a.length);\n\t}", "@Override public void run() {\n\t\t\t// Handle the base case:\n\t\t\tif(len - start < 2) {\n\t\t\t\t// Arrive at the base-case state & return:\n\t\t\t\tph.arrive();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// TODO: Select an optimal pivot point:\n\t\t\tint pivot = start;\n\n\t\t\t// Perform the necessary swap operations:\n\t\t\tfor(int i = start; i < len; ++i) {\n\t\t\t\tif(data[i] < data[pivot]) {\n\t\t\t\t\tint tmp = data[pivot];\n\t\t\t\t\tdata[pivot] = data[i];\n\t\t\t\t\tdata[i] = data[pivot + 1];\n\t\t\t\t\tdata[pivot + 1] = tmp;\n\t\t\t\t\t++pivot;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Handle the single-threaded case:\n\t\t\tif(this.pool == null) {\n\t\t\t\t// Store local variables temporarily:\n\t\t\t\tint start = this.start;\n\t\t\t\tint len = this.len;\n\n\t\t\t\t// Do the first half:\n\t\t\t\tthis.len = pivot;\n\t\t\t\trun();\n\n\t\t\t\t// Prepare for the second half of the array:\n\t\t\t\tthis.len = len;\n\t\t\t} else {\n\t\t\t\t\t// Register a task to process the first half of the array:\n\t\t\t\t\t// TODO: Don't do this if that thread's base-case is met\n\t\t\t\t\tpool.submit(new Sorter(this.pool, this.ph, data, start, pivot));\n\t\t\t}\n\n\t\t\t// Recursively process the second half of the array:\n\t\t\tstart = pivot + 1;\n\t\t\trun();\n\t\t}", "private static void evaluateMergesortUniversityWashingtonOpenMP() {\n\n // LOGGER.info(\"evaluating parallel mergesort with OpenMP based on the version of the University of\n // Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort @TODO\n // MergesortUniversityWashingtonOpenMP.parallelMerge(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: OpenMP (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "private static void evaluateMergesortVogellaOpenMP() {\n\n // LOGGER.info(\"evaluating parallel mergesort with OpenMP based on the Vogella version\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort @TODO\n //msVogellaOMP.sort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: OpenMP (Vogella) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public static <T,O> void parallelSort(List<T> a, List<O> a2, Comparator<T> cmp) {\n\t\tif (a.size()!=a2.size())\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, cmp, 0, a.size());\n\t}", "@Test\n public void testSort() {\n System.out.println(\"sort\");\n ParallelMergeSort instance = null;\n instance.sort();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public static <T> void parallelSort(int[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "public static <T> void parallelSort(byte[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "public static int[] parallelMergeSort(int[] array, int maxRecursionLevel) {\n\n int length = array.length;\n\n // return if only one element left\n if (length == 1)\n return array;\n\n // divide\n int mid_index = length / 2;\n int[] leftHalf = Arrays.copyOfRange(array, 0, mid_index);\n int[] rightHalf = Arrays.copyOfRange(array, mid_index, length);\n\n // fall back to single threaded merge sort if all threads are currently in use\n if(maxRecursionLevel <= 1) {\n return mergeSort(array);\n }\n\n //\n ExecutorService leftHalfArray = Executors.newSingleThreadExecutor();\n Callable<int[]> leftHalfArrayCallable = () -> parallelMergeSort(leftHalf, maxRecursionLevel - 1);\n\n ExecutorService rightHalfArray = Executors.newSingleThreadExecutor();\n Callable<int[]> rightHalfArrayCallable = () -> parallelMergeSort(rightHalf, maxRecursionLevel - 1);\n\n Future<int[]> leftHalfFuture = leftHalfArray.submit(leftHalfArrayCallable);\n Future<int[]> rightHalfFuture = rightHalfArray.submit(rightHalfArrayCallable);\n\n int[] sortedLeftHalf = null;\n int[] sortedRightHalf = null;\n try {\n sortedLeftHalf = leftHalfFuture.get();\n sortedRightHalf = rightHalfFuture.get();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n\n leftHalfArray.shutdown();\n rightHalfArray.shutdown();\n\n assert sortedLeftHalf != null;\n assert sortedRightHalf != null;\n\n //\n return merge(sortedLeftHalf, sortedRightHalf);\n }", "public void setSortOnCPUTime() {\n this.sortedJobList = new TreeSet<Job>(new Comparator<Job>() {\n @Override\n public int compare(Job a, Job b) {\n\n int aCPUUsed = 0;\n int bCPUUsed = 0;\n\n try {\n aCPUUsed = a.getCPUUsed();\n bCPUUsed = b.getCPUUsed();\n } catch (AS400SecurityException e) {\n e.printStackTrace();\n } catch (ErrorCompletingRequestException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ObjectDoesNotExistException e) {\n e.printStackTrace();\n }\n\n if (aCPUUsed == bCPUUsed) return 0;\n else return bCPUUsed - aCPUUsed;\n }\n });\n }", "public void sortBasedPendingJobs();", "@Override\n protected void runAlgorithm() {\n for (int i = 0; i < getArray().length; i++) {\n for (int j = i + 1; j < getArray().length; j++) {\n if (applySortingOperator(getValue(j), getValue(i))) {\n swap(i, j);\n }\n }\n }\n }", "public void sort() {\r\n int k = start;\r\n for (int i = 0; i < size - 1; i++) {\r\n int p = (k + 1) % cir.length;\r\n for (int j = i + 1; j < size; j++) {\r\n if ((int) cir[p] < (int) cir[k % cir.length]) {\r\n Object temp = cir[k];\r\n cir[k] = cir[p];\r\n cir[p] = temp;\r\n }\r\n p = (p + 1) % cir.length;\r\n }\r\n k = (k + 1) % cir.length;\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\tMPMergeSortTest.MPParallelRandomGen(start, end, r, data);\n\n\t}", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "public static void main(String[] args) throws Exception {\n\t\tInptfilepath = args[0];\n\t\tblockName = args[1];\n\t\tnoOfFiles = Integer.parseInt(args[2]);\n\t\tthreadCount = Integer.parseInt(args[3]);\n\t\tOutputfilepath = args[4];\n\n\t\t\n\t\tSystem.out.println(\"Running Threads: \" + threadCount);\n\t\tSystem.out.println(\"Total Files: \" + noOfFiles);\n\t\t// System.out.println(\"File Name: \"+blockName);\n\t\tSystem.out.println(\"Input File Name: \" + Inptfilepath);\n\n\t\tdouble startTime = System.currentTimeMillis();\n\n\t\tfinal List<Integer> fileIndexes = new ArrayList<Integer>();\n\t\tfor (int i = 0; i < noOfFiles; i++) {\n\t\t\tDividedfileList.add(\"/tmp/file-\" + String.format(\"%\" + blockName + \"d\", i) + \".txt\");\n\t\t\tfileIndexes.add(i);\n\t\t}\n\n\t\tFile file = new File(Inptfilepath);\n\t\ttotalLinesInMainFile = file.length();\n\t\tlinesPerFile = totalLinesInMainFile / noOfFiles / 100;\n\n\t\tThread[] mythread = new Thread[threadCount];\n\n\t\tfor (int count = 0; count < threadCount; count++) {\n\t\t\tmythread[count] = new Thread(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfor (int filePerThread = 0; filePerThread < noOfFiles / threadCount; filePerThread++) {\n\n\t\t\t\t\t\t\tint fileIndex = ((Integer.parseInt(Thread.currentThread().getName()) * noOfFiles)\n\t\t\t\t\t\t\t\t\t/ (threadCount)) + filePerThread;\n\t\t\t\t\t\t\tdoSort(fileIndexes.get(fileIndex));\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tmythread[count].setName(Integer.toString(count));\n\t\t\tmythread[count].start();\n\t\t}\n\n\t\tfor (int count = 0; count < threadCount; count++) {\n\t\t\tmythread[count].join();\n\t\t}\n\n\t\tSystem.out.println(\n\t\t\t\t\"Time taken in seconds to sort all files: \" + ((System.currentTimeMillis() - startTime) / 1000));\n\n\t\tSystem.out.println(\"Merging sorted files\");\n\n\t\tmergeSortedFiles();\n\n\t\tSystem.out.println(\"Total time taken in seconds to sort and merge single file: \"\n\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000));\n\t}", "public void doTheAlgorithm() {\n this.swapCount = 0;\n this.compCount = 0;\n \n\t\tdoQuickSort(0, this.sortArray.length - 1);\n\t}", "private void doSort (Column A, int [] i, int p, int r, int begin) {//double[] A, int p, int r, MutableTable t) {\n\t\tif (p < r) {\n\t\t\tint q = partition(A, i, p, r, begin);\n\t\t\tdoSort(A, i, p, q, begin);\n\t\t\tdoSort(A, i, q + 1, r, begin);\n\t\t}\n\t}", "private PerfectMergeSort() {}", "public void go(int boundary) {\n\t\tthis.b = boundary;\n\t\tSystem.out.println(\"Start QuickSort ...\");\n\t\tthis.startTime = new Date().getTime();\n\t\tsort(0, sequence.length - 1);\n\t\tthis.endTime = new Date().getTime();\n\t}", "public Sorter(ExecutorService pool, Phaser ph, int data[], int start, int len) {\n\t\t\tthis.pool = pool;\n\t\t\tthis.ph = ph;\n\t\t\tthis.data = data;\n\t\t\tthis.start = start;\n\t\t\tthis.len = len;\n\n\t\t\tph.register();\n\t\t}", "private synchronized void freshSort(){\n Process[] newQueue = new Process[pros.proSize()];\n for(int i = 0; i <queue.length; i++){\n if(pros.isInList(queue[i])){\n newQueue[i] = queue[i];\n }\n }\n queue = new Process[pros.proSize()];\n queue = newQueue;\n }", "List<CompressResult> parallelCompress(Path input, Path output, int maxSizeInMB, int nThread) throws IOException;", "public static void main(String[] args) throws InterruptedException {\n\t\tArrayList<Integer> list = createRandomList(2500000);\n\t\t\n\t\t//heap array\n\t\tArrayList<Integer> subList1 = new ArrayList<>(list.subList(0, 999999));\n\t\tArrayList<Integer> subList2 = new ArrayList<>(list.subList(1000000, 1499999));\n\t\tArrayList<Integer> subList3 = new ArrayList<>(list.subList(1500000, 2500000));\n\n\n\n\t\tMythread mt1 = new Mythread(subList1, \"Thread 1\");\n\t\tMythread mt2 = new Mythread(subList2, \"Thread 2\");\n\t\tMythread mt3 = new Mythread(subList3, \"Thread 3\");\n\t\t\n\t\tmt1.getThrd().start();\n\t\tmt2.getThrd().start();\n\t\tmt3.getThrd().start();\t\n\t\t\n\t\tmt1.getThrd().join();\n\t\tmt2.getThrd().join();\n\t\tmt3.getThrd().join();\n\t\t\n\t\tArrayList<Integer> sumList = new ArrayList<>();\n\t\tsumList.addAll(subList1);\n\t\tsumList.addAll(subList2);\n\t\tsumList.addAll(subList3);\n\t\t\n\t\twriteFile(sumList, \"output.txt\");\n\n\t}", "@Test\n\tpublic void testAscendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tCollections.reverse(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}", "@Override\n public void sort() throws IOException {\n long i = 0;\n // j represents the turn of writing the numbers either to g1 or g2 (or viceversa)\n long j = 0;\n long runSize = (long) Math.pow(2, i);\n long size;\n\n long startTime = System.currentTimeMillis();\n\n System.out.println(\"Strart sorting \"+ this.inputFileName);\n\n while(i <= Math.ceil(Math.log(this.n) / Math.log(2))){\n j = 0;\n do{\n size = merge(runSize, destinationFiles[(int)j % 2]);\n j += 1;\n }while (size/2 == runSize);\n\n System.out.println(\"iteration: \" + i + \", Run Size:\" + runSize + \", Total time elapsed: \" + (System.currentTimeMillis() - startTime));\n i += 1;\n runSize = (long) Math.pow(2, i);\n swipe();\n }\n System.out.println(\"The file has been sorted! Total time elapsed: \"+(System.currentTimeMillis() - startTime));\n\n destinationFiles[0].close();\n destinationFiles[1].close();\n originFiles[0].close();\n originFiles[1].close();\n\n createFile(OUT_PATH +inputFileName);\n copyFile(new File(originFileNames[0]), new File(\"out/TwoWayMergesort/OUT_\"+inputFileName));\n\n }", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static <T,P> void parallelSort(T[] a, P[] a2, Comparator<T> comp, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, comp, fromIndex, toIndex-fromIndex);\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException{\n final int ELEMENT_SIZE = 1000;\n \n // How large (how many elements) the arrays will be\n int dataSize = 0;\n // How many times the program will run\n int trials = 1;\n // User-inputted number that dictates what sort the program will use\n int sortSelector = 0;\n // Variables for running time caculations\n long startTime = 0;\n long endTime = 0;\n long duration = 0;\n // The longest time a sort ran, in seconds\n double maxTime = 0;\n // The fastest time a sort ran, in seconds\n double minTime = Double.MAX_VALUE;\n // The average time a sort ran, running \"trials\" times\n double average = 0;\n // A duration a sort ran, in seconds\n double durationSeconds = 0;\n\n Scanner reader = new Scanner(System.in);\n \n System.out.println(\"Please enter a size for the test array: \");\n dataSize = reader.nextInt();\n \n System.out.println(\"Please enter the amount of times you would like the sort to run: \");\n trials = reader.nextInt();\n // Slection menu for which sort to run\n System.out.println(\"Please designate the sorting algorithim you would like the program to use: \");\n System.out.println(\"Enter \\\"1\\\" for BubbleSort \");\n System.out.println(\"Enter \\\"2\\\" for SelectionSort \");\n System.out.println(\"Enter \\\"3\\\" for InsertionSort \");\n System.out.println(\"Enter \\\"4\\\" for QuickSort \");\n System.out.println(\"Enter \\\"5\\\" for MergeSort \");\n sortSelector = reader.nextInt();\n // Print sorting results header and begin running sort(s)\n System.out.println();\n System.out.println(\"Trial Running times (in seconds): \");\n \n int[] original = new int[dataSize];\n int[] sortingArray = new int[dataSize];\n \n // This loop controls the amount of times a sorting algorithim will run\n for(int i = 1; i <= trials; i++){\n // Start by generating test array\n for(int j = 0; j < dataSize; j++){\n original[j] = (int)((Math.random() * ELEMENT_SIZE) + 1);\n }\n // Copy the original to a working array\n for(int j = 0; j < dataSize; j++){\n sortingArray[j] = original[j];\n }\n // Start the \"timer\"\n startTime = System.nanoTime();\n // Run whatever sort the user selected, BubbleSort is default\n switch(sortSelector){\n case 1:\n BubbleSort.runSort(sortingArray);\n break;\n case 2:\n SelectionSort.runSort(sortingArray);\n break;\n case 3:\n InsertionSort.runSort(sortingArray);\n break;\n case 4:\n QuickSort.runSort(sortingArray);\n break;\n case 5:\n MergeSort.runSort(sortingArray);\n break;\n default:\n BubbleSort.runSort(sortingArray);\n break;\n }\n // End the \"timer\"\n endTime = System.nanoTime();\n // Generate the program's running duration\n duration = endTime - startTime;\n // Convert running time to seconds\n durationSeconds = ((double)duration / 1000000000.0);\n // Print the duration (to file)\n System.out.println(durationSeconds);\n // Update min/max running times\n if(durationSeconds < minTime){\n minTime = durationSeconds;\n }\n if(durationSeconds > maxTime){\n maxTime = durationSeconds;\n }\n // Add latest trial to running average\n average += durationSeconds;\n }\n // After trials conclude, the average running time has to be calculated\n average /= ((double)trials);\n \n System.out.println(\"\\nAfter running your selected sort \" + trials + \" times: \");\n System.out.println(\"The slowest sort took \" + maxTime + \" seconds, \");\n System.out.println(\"the fastest sort took \" + minTime + \" seconds, \");\n System.out.println(\"and the average running time was \" + average + \" seconds. \");\n \n // Left this in for testing the sorting algorithims themselves\n /*\n System.out.println();\n for(int element : original){\n System.out.println(element);\n }\n System.out.println();\n for(int element : sortingArray){\n System.out.println(element);\n }\n */\n }", "private static void sort(long[] list) {\n\t\tint start = 0, limit = list.length;\n\t\t\n\t\tlong temp;\n\t\tint current;\n\t\tint lowestindex;\n\n\t\twhile (start < limit) {\n\t\t\tlowestindex = start;\n\t\t\tfor (current = start; current < limit; current++)\n\t\t\t\tif (list[current] < list[lowestindex])\n\t\t\t\t\tlowestindex = current;\n\t\t\t//swap\n\t\t\ttemp = list[start];\n\t\t\tlist[start] = list[lowestindex];\n\t\t\tlist[lowestindex] = temp;\n\t\t\tstart++;\n\t\t}\n\t}", "void sort(int a[]) throws Exception {\n\n // Make the input into a heap\n for (int i = a.length-1; i >= 0; i--)\n reheap (a, a.length, i);\n\n // Sort the heap\n for (int i = a.length-1; i > 0; i--) {\n int T = a[i];\n a[i] = a[0];\n a[0] = T;\n pause();\n reheap (a, i, 0);\n }\n }", "public static <T,P> void parallelSort(T[] a, int[] a2, Comparator<T> comp, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, comp, fromIndex, toIndex-fromIndex);\n\t}", "public static void main(String[] args) {\n for (int N = 100; N <= 100000; N *= 10) {\n int[] nums = new int[N];\n Random random = new Random();\n for (int i = 0; i < N; i++) {\n nums[i] = random.nextInt(N * 10);\n }\n Long start = 0L, end = 0L;\n int[] quickSortArray = Arrays.copyOf(nums, nums.length);\n int[] InsertSortArray = Arrays.copyOf(nums, nums.length);\n int[] shellSortArray = Arrays.copyOf(nums, nums.length);\n int[] bubbleSortArray = Arrays.copyOf(nums, nums.length);\n int[] selectionSortArray = Arrays.copyOf(nums, nums.length);\n int[] mergeSortArray = Arrays.copyOf(nums, nums.length);\n System.out.println(\"数据量为:\" + N);\n start = System.currentTimeMillis();\n QuickSort.quickSort(quickSortArray, 0, N - 1);\n end = System.currentTimeMillis();\n System.out.println(\"快速排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n InsertSort.insertSort(InsertSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"插入排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n ShellSort.shellSort(shellSortArray, 8);\n end = System.currentTimeMillis();\n System.out.println(\"希尔排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n BubbleSort.bubbleSort(bubbleSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"冒泡排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n SelectionSort.selectionSort(selectionSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"选择排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n MergeSort.mergeSort(mergeSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"归并排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n }\n }", "public static <T> void parallelSort(char[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "@Override\r\n protected void compute() {\r\n //if count != 0 || splitA.length == 1 then go, else for loop to make splitA.length subtasks to run splitArrayB and then they all call mergeAB\r\n if(global_count == 0){\r\n splitArrayB();\r\n }\r\n if(global_count != 0 || splitA.length == 1){\r\n mergeAB();\r\n }\r\n else{\r\n List<ConcurrentMerge> subtasks = new ArrayList<>();\r\n ConcurrentMerge temp;\r\n for(int i = 0; i < splitA.length; i++){\r\n global_count++;\r\n temp = new ConcurrentMerge(A, B, splitA, splitB, C, global_count);\r\n subtasks.add(temp);\r\n }\r\n invokeAll(subtasks);\r\n }\r\n }", "public static void main(String[] args) {\n ForkJoinPool forkJoinPool = new ForkJoinPool(Runtime.getRuntime().availableProcessors());\n\n //Create three FolderProcessor tasks. Initialize each one with a different folder path.\n FolderProcessor desktop = new FolderProcessor(\"/Users/neeraj/Desktop\", \"log\");\n FolderProcessor downloads = new FolderProcessor(\"/Users/neeraj/Downloads\", \"log\");\n FolderProcessor github = new FolderProcessor(\"/Users/neeraj/Projects/office\", \"log\");\n\n // Execute the 3 tasks in the ForkJoinPool.\n forkJoinPool.execute(desktop);\n forkJoinPool.execute(downloads);\n forkJoinPool.execute(github);\n\n //Write to the console information about the status of the pool every second\n //until the three tasks have finished their execution.\n do {\n System.out.printf(\"******************************************\\n\");\n System.out.printf(\"Main: Parallelism: %d\\n\", forkJoinPool.getParallelism());\n System.out.printf(\"Main: Active Threads: %d\\n\", forkJoinPool.getActiveThreadCount());\n System.out.printf(\"Main: Task Count: %d\\n\", forkJoinPool.getQueuedTaskCount());\n System.out.printf(\"Main: Steal Count: %d\\n\", forkJoinPool.getStealCount());\n System.out.printf(\"******************************************\\n\");\n try {\n TimeUnit.SECONDS.sleep(1);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n } while ((!desktop.isDone()) || (!downloads.isDone()) || (!github.isDone()));\n\n //Shut down ForkJoinPool using the shutdown() method.\n forkJoinPool.shutdown();\n\n //Write the number of results generated by each task to the console.\n List<String> results;\n results = desktop.join();\n System.out.printf(\"Desktop: %d files found.\\n\", results.size());\n results = downloads.join();\n System.out.printf(\"Downloads: %d files found.\\n\", results.size());\n results = github.join();\n System.out.printf(\"Github: %d files found.\\n\", results.size());\n\n }", "private void mergesort(ToCompare[] a, int l, int r) throws BrokenBarrierException, InterruptedException {\n if (l >= r) {\r\n return;\r\n }\r\n\r\n //recursion step: a[l..r] is not empty \r\n //divide into sublists and merge \r\n int m = (l + r) / 2;\r\n mergesort(a, l, m);\r\n mergesort(a, m + 1, r);\r\n merge(a, l, m, r);\r\n }", "public synchronized void firstSort(){\n Process temp;\n for(int j = 0; j<queue.length;j++){\n temp = null;\n for(int i = 0; i<pros.proSize(); i++){\n if(i==0){\n temp = new Process((pros.getPro(i)));\n }else if(temp.getArrivalTime() == pros.getPro(i).getArrivalTime()){\n if(temp.getId() > pros.getPro(i).getId()){\n temp = pros.getPro(i);\n }\n }else if (temp.getArrivalTime() > pros.getPro(i).getArrivalTime()){\n temp = pros.getPro(i);\n }\n }\n queue[j] = temp;\n pros.remove(temp.getId());\n }\n for(int i = 0; i< queue.length; i++){\n pros.addPro(queue[i]);\n }\n }", "public static <T> void parallelSort(long[] a, T[] a2, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, fromIndex, toIndex-fromIndex);\n\t}", "public static <T,P> void parallelSort(T[] a, int[] a2, Comparator<T> comp) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, comp,0, a.length);\n\t}", "private static void fourSorts(int[] array) {\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\t//Performs insertion sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.insertionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\n\t\t//Performs selection sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.selectionSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t}", "private void sort()\n {\n // This implements Shell sort.\n // Unfortunately we cannot use the sorting functions from the library\n // (e.g. java.util.Arrays.sort), since the ones that work on int\n // arrays do not accept a comparison function, but only allow\n // sorting into natural order.\n int jump = length;\n boolean done;\n \n while( jump>1 ){\n jump /= 2;\n \n do {\n done = true;\n \n for( int j = 0; j<(length-jump); j++ ){\n int i = j + jump;\n \n if( !areCorrectlyOrdered( indices[j], indices[i] ) ){\n // Things are in the wrong order, swap them and step back.\n int tmp = indices[i];\n indices[i] = indices[j];\n indices[j] = tmp;\n done = false;\n }\n }\n } while( !done );\n }\n \n // TODO: integrate this with the stuff above.\n for( int i=1; i<length; i++ ){\n commonality[i] = commonLength( indices[i-1], indices[i] );\n }\n commonality[0] = -1;\n }", "public static void parallelSort(int[] a, int[] a2, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, fromIndex, toIndex-fromIndex);\n\t}", "public String doSort();", "public static <T,P> void parallelSort(T[] a, P[] a2, Comparator<T> comp) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, comp,0, a.length);\n\t}", "void sort();", "void sort();", "public static void main(String[] args){\n\n Scanner sc = new Scanner(System.in);\n String[] elements = sc.nextLine().trim().split(\" \");\n int[] unsorted = Arrays.stream(elements).parallel()\n .mapToInt(Integer::parseInt).toArray();\n /* System.out.println(partition(unsorted, 0, unsorted.length-1));\n System.out.println(Arrays.toString(unsorted));*/\n quickSort(unsorted, 0, unsorted.length-1);\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\t@Override\n\tpublic void sort() {\n\t\t\n\t\t// create maxHeap\n\t\tHeap<E> maxHeap = new MaxHeap<E>(arr);\n\t\t\n\t\telapsedTime = System.nanoTime(); // get time of start\n\t\t\n\t\tfor (int i = length - 1; i > 0; i--) {\n\n\t\t\tmaxHeap.swap(arr, 0, i);\n\t\t\tmaxHeap.heapSize--;\n\t\t\t((MaxHeap) maxHeap).maxHeapify(arr, 0);\n\n\t\t}\n\t\t\n\t\telapsedTime = System.nanoTime() - elapsedTime; // get elapsed time\n\t\t\n\t\tprint(); // print sorted array\n\t\tprintElapsedTime(); // print elapsed time\n\t\t\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\n\t\tdouble selectionTime, mergeTime, quickTime; \n\t\t\n\t\tSystem.out.println(\"Running All Sorting Algorithms on smaller arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tSelection\\t Merge\\t Quick\\n\");\n\t\t\n\t\t// sort arrays with lengths from *sizes* array (selection, merge & quick)\n\t\tfor (int num = 0; num < sizes.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(sizes[num],0,Integer.MAX_VALUE-1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tselectionTime \t = testSelectionSort(list);\n\t\t\tmergeTime \t = testMergeSort(list);\n\t quickTime \t = testQuickSort(list);\n\t \n\t // generate output (average time for each algo)\n\t System.out.printf(\"%s\\t%.2f\\t\\t %.2f\\t %.2f\\n\",sizes[num],selectionTime,mergeTime,quickTime);\n\t\t}\n\t\t\n\t\t\n\t\tSystem.out.println(\"\\nRunning Merge & Quick Sort Algorithms on big arrays...\\n\");\n\t\tSystem.out.printf(\"Size\\tMergeSort\\tQuickSort\\n\");\n\t\t\n\t\t// sort arrays with lengths from *bigger* array (merge & quick)\n\t\tfor (int num = 0; num < bigger.length; num++){\n\t\t\t// make random array\n\t\t\tInteger[] list = makeRandomArray(bigger[num],0, Integer.MAX_VALUE - 1);\n\t\t\t\n\t\t\t// sort array copies with each algo TEST_RUN times\n\t\t\tmergeTime \t\t = testMergeSort(list);\n\t\t\tquickTime \t\t = testQuickSort(list);\n\t\t\t\n\t\t\t// generate output (average time for each algo)\n\t\t\tSystem.out.printf(\"%s\\t%.2f\\t\\t%.2f\\n\",bigger[num],mergeTime,quickTime);\n\t\t}\n\t}", "JDKSort() {\n }", "public void sort(){\n\t\t\n\t\tif(Q.size() != 1){\n\t\t\tArrayQueue<E> tempQueue1 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue2 = Q.dequeue();\n\t\t\tArrayQueue<E> tempQueue3 = merge(tempQueue1, tempQueue2);\n\t\t\tQ.enqueue(tempQueue3);\n\t\t\tsort();\n\t\t}\n\t\t\n\t}", "public static void main(String[] args) {\n\t\t// Part 1 Bench Testing\n\t\t// -----------------------------------\n\n\t\t// -----------------------------------\n\t\t// Array and other declarations\n\t\t// -----------------------------------\n\t\tStopWatch sw = new StopWatch(); // timer for measuring execution speed\n\t\tfinal int SIZE = 100000; // size of array we are using\n\n\t\tint[] sourceArray, copyArray; // arrays for testing insertionSort and selectionSort\n\t\tInteger[] sourceArray2, copyArray2; // arrays for testing shell, merge, quicksort\n\n\t\t// -------------------------------------------------\n\t\t// Array initialization to a predetermined shuffle\n\t\t// -------------------------------------------------\n\t\tsourceArray = new int[SIZE]; // for use in selection, insertion sort\n\t\tscrambleArray(sourceArray, true); // scramble to a random state\n\t\tsourceArray2 = new Integer[SIZE]; // for use in shell,merge,quicksort\n\t\tscrambleArray(sourceArray2, true); // scramble to a random state\n\n\t\t// ---------------------------------------\n\t\t// SELECTION SORT\n\t\t// ---------------------------------------\n\t\t// for all sorts, we must reset copyArray\n\t\t// to sourceArray before sorting\n\t\t// ---------------------------------------\n\t\tcopyArray = Arrays.copyOf(sourceArray, SIZE);\n\n\t\tSystem.out.println(\"Before Selection Sort\");\n\t\t// printArray(copyArray);\n\t\tSystem.out.println(\"Selection Sort\");\n\t\tsw.start(); // start timer\n\t\tSortArray.selectionSort(copyArray, SIZE);\n\t\tsw.stop(); // stop timer\n\t\tSystem.out.println(\"selection sort took \" + sw.getElapsedTime() + \" msec\");\n\t\tSystem.out.println(\"After Selection Sort\");\n\t\t// printArray(copyArray);\n\n\t\t// -----------------------------------------\n\t\t// INSERTION SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 2 here\n\n\t\t// -----------------------------------------\n\t\t// SHELL SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 3 here\n\n\t\t// -----------------------------------------\n\t\t// MERGE SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 4 here\n\n\t\t// -----------------------------------------\n\t\t// QUICK SORT\n\t\t// -----------------------------------------\n\t\t// Reset copyArray2 back to unsorted state\n\t\t// -----------------------------------------\n\n\t\t// add statements for STEP 5 here\n\n\t}", "public static <T> void parallelSort(byte[] a, T[] a2, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, fromIndex, toIndex-fromIndex);\n\t}", "public static void main(String[] args) {\n LinkedList<Integer> myInts = new LinkedList<>();\n myInts.insert(1);\n myInts.insert(3);\n myInts.insert(7);\n myInts.insert(8);\n myInts.insert(5);\n myInts.insert(15);\n myInts.insert(22);\n\n myInts.displayList();\n\n// System.out.println(myInts.get(10));\n\n int[] values = {1, 1000, 200, 4000, 500, 700, 10000};\n sleepSort(values);\n }", "@Override\n public void sort(IAlg algorithm, boolean decrescent){}", "public static <T> void parallelSort(short[] a, T[] a2) {\n\t\tif (a.length!=a2.length)\n\t\t\tthrow new IllegalArgumentException(\"Arrays don't have same length!\");\n\t\tsort1(a, a2, 0, a.length);\n\t}", "public void sort() {\n compares = 0;\n shuttlesort((int[]) indexes.clone(), indexes, 0, indexes.length);\n }", "public SortingAlgorithmResult<E> sort(List<E> l);", "public void sortTasks() {\n tasks.sort(null);\n }", "private void runMergeSort(double[] heights, int numberOfThreads, List<List<List<double[]>>> animations) {\n // Merge sort splits the input into separate sections to sorted separately and then merged, so this list keeps\n // track of the starting index of each section of the input\n List<List<Integer>> starts = new ArrayList<List<Integer>>();\n starts.add(new ArrayList<Integer>());\n\n // The number of rectangles separating the start of each section created by the first stage of merge sort\n int interval;\n if(numberOfThreads > arrSize) {\n interval = 1;\n } else {\n interval = (int) Math.ceil((double) arrSize / (double) numberOfThreads);\n }\n\n /*\n The first stage of concurrent merge sort is to sort each separate section of the input with an individual\n thread. Then each subsequent stage consists of merging the separate sections such that the number of\n separately sorted sections is halved until the input is fully sorted. For the purposes of visualization,\n each stage in the process is represented as a time level in the animations list in the form of a list.\n Each separate section of the input at a given time level is represented as a list which is nested inside of\n the list corresponding to the time level at which the section (location) exists. Each list of locations\n holds arrays of doubles with each array representing some step in the process of merge sort (such as the\n comparison of two values, or the changing of some value in the input).\n */\n List<List<double[]>> firstTimeLevel = new ArrayList<List<double[]>>();\n animations.add(firstTimeLevel);\n\n // main.Sorting the separate sections of the input as defined by the number of threads being used\n for(int i = 0; i < arrSize - interval; i += interval) {\n List<double[]> location = new ArrayList<double[]>();\n firstTimeLevel.add(location);\n int start = i;\n int end = (i + interval - 1) > (arrSize - 1) ? arrSize - 1: i + interval - 1;\n starts.get(0).add(start);\n MergeSort.mergeSort(heights, start, end, location);\n }\n\n List<double[]> location = new ArrayList<double[]>();\n firstTimeLevel.add(location);\n int start = (arrSize - interval) >= 0 ? arrSize - interval : 0;\n int end = arrSize - 1;\n starts.get(0).add(start);\n MergeSort.mergeSort(heights, start, end, location);\n\n runMerge(heights, numberOfThreads / 2, starts, animations);\n }", "void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n sort( low, pi-1);\n sort( pi+1, high);\n }\n }", "private static void evaluateMergesortUniversityWashington() {\n\n // LOGGER.info(\"evaluating sequential mergesort by the University of Washington\");\n\n // The time before start to sort.\n long startTime;\n\n // The time after sort.\n long endTime;\n\n // generate sorted array\n numbers = generateSortedArray(ARRAY_SIZE);\n\n // get array to evaluate\n generateWorstUnsortArray(numbers);\n\n // get systemtime before sorting\n startTime = System.currentTimeMillis();\n\n // sort\n MergesortUniversityWashington.parallelMergeSort(numbers);\n\n // get systemtime after sorting\n endTime = System.currentTimeMillis();\n\n // show the result of the sorting process\n System.out.println(\"\\n- Sortierergebnis: Sequential (University Washington) -\");\n System.out.println(\"Die sortierte Folge lautet: \" + arrayToString(numbers));\n System.out.printf(\"Für die Sortierung wurden %d ms benötigt\", endTime - startTime);\n System.out.println(\"\\n------------------------------------------------\\n\");\n }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "public abstract void sort() throws RemoteException;", "public void sort() {\n }", "public static void main(String[] args) throws Exception{\n testSort();\n }", "public static void main(String[] args)\n\t{\n\t\tString fullFile = \"\";\n\t\tint lineAmount = 0;\n\t\ttry\n\t\t{\n\t\t\tBufferedReader br = new BufferedReader(\n\t\t\t\t\tnew FileReader(\"alice.txt\"));\n\t\t\t\n\t\t\tString st = br.readLine();\n\t\t\t//int counter = 0;\n\t\t while (st != null)\n\t\t {\n\t\t \t//fullFile[counter] = st;\n\t\t \tfullFile += st;\n\t\t \t//System.out.println(st);\n\t\t \tst = br.readLine();\n\t\t \tlineAmount++;\n\t\t \t//counter++;\n\t\t }\n\t\t br.close();\n\t\t}\n\t\tcatch(FileNotFoundException ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint processors = Runtime.getRuntime().availableProcessors();\n\t\tSystem.out.println(\"Num of processors: \" + processors);\n\t\t\n\t\tForkJoinPool forkJoinPool = new ForkJoinPool(processors);\n\t\t\n\t\tint x = fullFile.length() / processors;\n\t\t\n//\t\tint count = 0;\n//\t\tint stoppingPointForLastThread = 0;\n\t\t\n//\t\tfor(int i = 0; i < fullFile.length(); i++)\n//\t\t{\n//\t\t\tif(fullFile.charAt(i) == '\\n')\n//\t\t\t{\n//\t\t\t\tcount++;\n//\t\t\t}\n//\t\t\t\n//\t\t\tif(count >= processors)\n//\t\t\t{\n//\t\t\t\tThread t = new Thread( fullFile.substring(\n//\t\t\t\t\t\tstoppingPointForLastThread, i) );\n//\t\t\t\t\n//\t\t\t\tstoppingPointForLastThread = i;\n//\t\t\t\tcount = 0;\n//\t\t\t}\n//\t\t}\n\t\t\n\t\tint divisionOfWork = (lineAmount * 40) / processors;\n\t\t\n//\t\tThread t = new Thread( fullFile.substring(0, \n//\t\t\t\tdivisionOfWork) );\n//\t\tThread t = new Thread( \n//\t\t\t\tfullFile.substring(divisionOfWork, \n//\t\t\t\tdivisionOfWork * 2) );\n\t\t\n\t\t//FORKJOIN\n\t\tAtomicInteger wordCount = new AtomicInteger(0);\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\tDataParallelThread t = new DataParallelThread( \n\t\t\t\t\tfullFile.substring(divisionOfWork * i, \n\t\t\t\t\tdivisionOfWork + (divisionOfWork * i)) );\n\t\t\t\n\t\t\twordCount.getAndAdd(\n\t\t\t\t\tforkJoinPool.invoke(t).get()\n\t\t\t\t\t);\n\t\t}\n\t\tSystem.out.println(\"Word count of \\\"the\\\" is: \" + \n\t\t\t\twordCount);\n\t\t\n\t\t//THREAD\n\t\tMyThread[] threads = new MyThread[processors];\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\tMyThread t = new MyThread( \n\t\t\t\t\tfullFile.substring(divisionOfWork * i, \n\t\t\t\t\tdivisionOfWork + (divisionOfWork * i)) );\n\t\t\t\n\t\t\tt.run();\n\t\t\tthreads[i] = t;\n\t\t}\n\t\t\n\t\tint wordCount2 = 0;\n\t\tfor(int i = 0; i < processors; i++)\n\t\t{\n\t\t\twordCount2 += threads[i].WordCount();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Word count of \\\"the\\\" is: \" + \n\t\t\t\t\twordCount2);\n\t\t\n\t\t\n\t\t\n//\t\tint wordCount = 0;\n//\t\tfor(int i = 0; i < processors; i++)\n//\t\t{\n//\t\t\twordCount += forkJoinPool.\n//\t\t}\n\t}", "private static void quickSort(double arr[],Integer[] pageIDS, int low, int high)\n {\n if (low < high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(arr,pageIDS, low, high);\n\n // Recursively sort elements before\n // partition and after partition\n quickSort(arr, pageIDS, low, pi-1);\n quickSort(arr, pageIDS,pi+1, high);\n }\n }", "public static <T> void parallelSort(int[] a, T[] a2, int fromIndex, int toIndex) {\n\t\trangeCheck(a.length, fromIndex, toIndex);\n\t\trangeCheck(a2.length, fromIndex, toIndex);\n\t\tsort1(a, a2, fromIndex, toIndex-fromIndex);\n\t}", "public static double testSelectionSort(Integer[] list){\n\t\tdouble totalTime = 0;\n\t\tfor (int i = 0; i < TEST_RUNS; i++){\n\t\t\tInteger[] tmp = Arrays.copyOf(list, list.length);\t// make copy of list\n\t\t\tt.start();\t\t\t\t\t\t\t\t\t\t\t// start clock\t\n\t\t\tSelectionSort.sort(tmp);\t\t\t\t\t\t\t// sort copy\n\t\t\ttotalTime += t.getTime();\t\t\t\t\t\t\t// end clock and increment total\n\t\t\tSystem.gc();\n\t\t}\n\t\treturn totalTime / TEST_RUNS;\n\t}", "@Test(timeout = SHORT_TIMEOUT)\n public void testAdaptiveCocktailShakerSort() {\n //Test adaptiveness of completely ordered sort\n\n //Generate sorted array\n toSort = randArrDuplicates(MAX_ARR_SIZE, new Random(2110));\n Arrays.parallelSort(toSort, comp);\n sortedInts = cloneArr(toSort);\n\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n int numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n //Should require only 1 pass through array, for n-1 comparisons\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= MAX_ARR_SIZE - 1);\n\n //Check adaptiveness with 1 item out-of-order\n\n //Set up list\n toSort = new IntPlus[6];\n for (int i = 0; i < toSort.length; i++) {\n toSort[i] = new IntPlus(2 * i);\n }\n toSort[0] = new IntPlus(7);\n\n sortedInts = cloneArr(toSort);\n\n /*\n Initial Array: [7, 2, 4, 6, 8, 10]\n Forward pass: [ 2, 4, 6, *7, *8, *10]. 5 comparisons. Last swap at\n index 2, so starred items in order\n Backward pass: [ 2, 4, 6, *7, *8, *10]. 2 comparisons. Search ends\n */\n comp.resetCount();\n Sorting.cocktailSort(sortedInts, comp);\n numComparisons = comp.getCount();\n\n assertSorted(sortedInts, comp);\n\n assertTrue(\"Too many comparisons: \" + numComparisons,\n numComparisons <= 7);\n }", "public static void main(String[] args) {\n\r\n\t\t int[] arr = generateRandomArrayWithRandomNum();\r\n\t int checksSelectionSort = 0;\r\n\t int checksBubbleSort = 0;\r\n\t int checksMergeSort = 0;\r\n\t int checksQuickSort = 0;\r\n\t int[] copyArr = new int[1000];\r\n\t for (int x = 0; x < 20; x++) {\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksSelectionSort += doSelectionSort(arr);\r\n\r\n\t \r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksBubbleSort += bubbleSort(copyArr);\r\n\t System.arraycopy(arr, 0, copyArr, 0, 1000);\r\n\t checksMergeSort += new mergeSort().sort(arr);\r\n\t System.arraycopy(copyArr, 0, arr, 0, 1000);\r\n\t checksQuickSort += new quickSort().sort(copyArr);\r\n\t }\r\n\t System.out.println(\"Analysis Of Sorting algorithms \");\r\n\t System.out.println(\"Selection Sort : \"+checksSelectionSort/20);\r\n\t System.out.println(\"Bubble Sort : \"+checksBubbleSort/20);\r\n\t System.out.println(\"Merge Sort : \"+checksMergeSort/20);\r\n\t System.out.println(\"Quick Sort : \"+checksQuickSort/20);\r\n\r\n\t \r\n\t }", "protected void sort(T[] nums, int l, int h) {\n\t\tif(h <= l) return;\n\t\tint j = partition(nums,l,h);\n\t\tsort(nums,0,j-1);\n\t\tsort(nums,j+1,h);\n\t}", "public static final void run(String filenameIn, String filenameOut, RandomAccessFile fos) {\n\n // INITIALISING VARIABLES\n // The two files are used for swapping B with A when the algorithm has finished running.\n File a = new File(filenameIn);\n File b = new File(filenameOut);\n\n try {\n // assigned the random access file to read from file a\n fis = new RandomAccessFile(a, \"r\");\n } catch (IOException e){\n e.printStackTrace();\n }\n\n // The sorter object used later on for sorting\n ForkJoinQSort sorter;\n\n // Creates a new byte array to use as a buffer to read in the data.\n buf = new byte[BUF_SIZE];\n\n // creates a new integer array to fit the size of the given file.\n ints = new int[(int)a.length()/BYTES_TO_INTS];\n\n // Index will hold the current position in the integer array, so that I know\n // which index to write to next, and how much of the array has been used.\n int index = 0;\n\n try {\n\n // Read in the desired vales to be sorted into the array, and return the number of values read.\n index = readFromBuffer();\n\n // call the quick sort algorithm.\n if (index > 0) {\n // run the sort on the array of integer values\n sorter = new ForkJoinQSort();\n //sorter.setArr(ints);\n // run the standard sort algorithm with no threads directly.\n //sorter.stSort(0, index-1);\n sorter.run(ints, 0, index-1);\n }\n\n // write the sorted array out to the file\n writeToBuffer(index, fos);\n\n // Rename file be to a so that a now holds the sorted data.\n b.renameTo(a);\n\n } catch (IOException e){\n e.printStackTrace();\n }\n\n //Alg finished, set relevant values to null to save space.\n buf = null; ints = null; sorter = null; fis = null; fos = null;\n\n }", "public void run()\n { // checking for appropriate sorting algorithm\n \n if(comboAlgorithm.equals(\"Shell Sort\"))\n {\n this.shellSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Selection Sort\"))\n {\n this.selectionSort(randInt);\n }\n \n if(comboAlgorithm.equals(\"Insertion Sort\"))\n {\n this.insertionSort(randInt);\n }\n if(comboAlgorithm.equals(\"Bubble Sort\"))\n {\n this.bubbleSort(randInt);\n }\n \n }", "public static void sort(Comparable[] a)\n {\n // Do lg N passes of pairwise merges.\n int N = a.length;\n aux = new Comparable[N];\n for (int sz = 1; sz < N; sz = sz+sz) // sz: subarray size\n for (int lo = 0; lo < N - sz; lo += sz + sz) // lo: subarray index\n merge(a, lo, lo + sz - 1, Math.min(lo + sz + sz - 1, N - 1));\n }", "public void sort(){\r\n\t\t\t// we pass this doubly linked list's head to merge sort it\r\n\t\t\tthis.head = mergeSort(this.head);\r\n\t\t}", "public static void main(String[] args)\n {\n //reading the size of array\n Scanner in = new Scanner(System.in);\n int size = 0;\n System.out.println(\"Enter the size of the array\\n\");\n size = in.nextInt();\n\n // creating a random array of given size\n Random rd = new Random();\n int[] array = new int[size];\n for (int i = 0; i < array.length; i++)\n array[i] = rd.nextInt(size);\n\n //System.nanoTime() is used to calculate the time taken by the algorithm to multiply the numbers\n //implementing selection sort and timing the performance\n final long startTimeS = System.nanoTime();\n selectionSort(array);\n System.out.print(\"Sorted array via selection sort: \");\n printArray(array);\n final long elapsedTimeS = System.nanoTime() - startTimeS;\n System.out.println(\"The time taken: \" + elapsedTimeS);\n\n //implementing bogo sort and timing the performance\n final long startTime = System.nanoTime();\n bogoSort(array);\n System.out.print(\"Sorted array via bogo sort: \");\n printArray(array);\n final long elapsedTime = System.nanoTime() - startTime;\n System.out.println(\"The time taken: \" + elapsedTime);\n\n //implementing insertion sort and timing the performance\n final long startTimeI = System.nanoTime();\n insertSort(array);\n System.out.print(\"Sorted array via insertion sort: \");\n printArray(array);\n final long elapsedTimeI = System.nanoTime() - startTimeI;\n System.out.println(\"The time taken: \" + elapsedTimeI);\n\n //implementing merge sort and timing the performance\n final long startTimeM = System.nanoTime();\n mergeSort(array, size);\n System.out.print(\"Sorted array via merge sort: \");\n printArray(array);\n final long elapsedTimeM = System.nanoTime() - startTimeM;\n System.out.println(\"The time taken: \" + elapsedTimeM);\n\n //implementing enhanced merge sort and timing the performance\n final long startTimeEm = System.nanoTime();\n enhancedMergeSort(array, size);\n System.out.print(\"Sorted array via enhanced merge sort: \");\n printArray(array);\n final long elapsedTimeEm = System.nanoTime() - startTimeEm;\n System.out.println(\"The time taken: \" + elapsedTimeEm);\n\n //implementing quick sort and timing the performance\n final long startTimeQ= System.nanoTime();\n quickSort(array);\n System.out.print(\"Sorted array via quick sort: \");\n printArray(array);\n final long elapsedTimeQ = System.nanoTime() - startTimeQ;\n System.out.println(\"The time taken: \" + elapsedTimeQ);\n\n //implementing enhanced quick sort and timing the performance\n final long startTimeEq = System.nanoTime();\n enhancedQuickSort(array);\n System.out.print(\"Sorted array via enhanced quick sort: \");\n printArray(array);\n final long elapsedTimeEq= System.nanoTime() - startTimeEq;\n System.out.println(\"The time taken: \" + elapsedTimeEq);\n\n }", "public static void main(String[] args) {\n\t\tScanner sc =new Scanner(System.in);\n\t\tBigInteger n=sc.nextBigInteger();\n\t\tBigInteger k=sc.nextBigInteger();\n\t\t\n\t\ttriangle task3=new triangle(n,k);\n\t\tdouble s = System.currentTimeMillis();\n\t\tBigInteger r =task3.recurse(n, k);\n\t\tdouble e = System.currentTimeMillis();\n\t\tdouble totalTime3 = e - s;\n\t\t\n\t\tForkJoinPool pool=new ForkJoinPool(1);\n\t\ttriangle task=new triangle(n,k);\n\t\tdouble shuru = System.currentTimeMillis();\n\t\tBigInteger yo=pool.invoke(task);\n\t\tdouble khatam = System.currentTimeMillis();\n\t\tdouble yolo = khatam - shuru;\n\t\t\n\t\tSystem.out.println(yolo/totalTime3);\n\t\tSystem.out.println(yo);\n\t\t\n\t\tForkJoinPool pooll=new ForkJoinPool(2);\n\t\ttriangle taskk=new triangle(n,k);\n\t\tdouble shuruu = System.currentTimeMillis();\n\t\tBigInteger yoo=pooll.invoke(taskk);\n\t\tdouble khatamm = System.currentTimeMillis();\n\t\tdouble yoloo = khatamm - shuruu;\n\t\t\n\t\tSystem.out.println(yoloo/totalTime3);\n\t\tSystem.out.println(yoo);\n\t\t\n\t\tForkJoinPool poolll=new ForkJoinPool(3);\n\t\ttriangle taskkk=new triangle(n,k);\n\t\tdouble shuruuu = System.currentTimeMillis();\n\t\tBigInteger yooo=poolll.invoke(taskkk);\n\t\tdouble khatammm = System.currentTimeMillis();\n\t\tdouble yolooo = khatammm - shuruuu;\n\t\t\n\t\tSystem.out.println(yolooo/totalTime3);\n\t\tSystem.out.println(yooo);\n\t\t\n\t\tSystem.out.println(\"Ratio of time for 2nd by 1st Thread pool-\");\n\t\tSystem.out.println(yoloo/yolo);\n\t\t\n\t\tSystem.out.println(\"Ratio of time for 3rd by 1st Thread pool-\");\n\t\tSystem.out.println(yolooo/yolo);\n\t}", "public void sort() {\n Collections.sort(tasks);\n }", "@Override public final void compute2() {\n assert _left == null && _rite == null && _res == null;\n if( _hi-_lo >= 2 ) { // Multi-chunk case: just divide-and-conquer to 1 chunk\n final int mid = (_lo+_hi)>>>1; // Mid-point\n _left = clone();\n _rite = clone();\n _left._hi = mid; // Reset mid-point\n _rite._lo = mid; // Also set self mid-point\n addToPendingCount(1); // One fork awaiting completion\n _left.fork(); // Runs in another thread/FJ instance\n _rite.compute2(); // Runs in THIS F/J thread\n return; // Not complete until the fork completes\n }\n // Zero or 1 chunks, and further chunk might not be homed here\n if( _hi > _lo ) { // Single chunk?\n Vec v0 = _fr.firstReadable();\n if( v0.chunkKey(_lo).home() ) { // And chunk is homed here?\n\n // Make decompression chunk headers for these chunks\n Chunk bvs[] = new Chunk[_fr._vecs.length];\n for( int i=0; i<_fr._vecs.length; i++ )\n if( _fr._vecs[i] != null )\n bvs[i] = _fr._vecs[i].elem2BV(_lo);\n\n // Call all the various map() calls that apply\n if( _fr._vecs.length == 1 ) map(bvs[0]);\n if( _fr._vecs.length == 2 && bvs[0] instanceof NewChunk) map((NewChunk)bvs[0], bvs[1]);\n if( _fr._vecs.length == 2 ) map(bvs[0], bvs[1]);\n if( _fr._vecs.length == 3 ) map(bvs[0], bvs[1], bvs[2]);\n if( true ) map(bvs );\n _res = self(); // Save results since called map() at least once!\n // Further D/K/V put any new vec results.\n for( Chunk bv : bvs )bv.close(_lo+_outputChkOffset,_fs);\n }\n }\n tryComplete(); // And this task is complete\n }", "public static void main(String[] args) {\n\t\tSelectionSort ss = new SelectionSort();\n\t\tInsertionSort is = new InsertionSort();\n\t\tint [] listToSort = ss.listToSort();\n\t\tlong startTime = System.currentTimeMillis();\n\t\tis.insertionSort(listToSort);\n\t\tSystem.out.println(\"Time Taken to Sort :: \"+(System.currentTimeMillis()-startTime)+\"ms\");\n\t\tss.printList(listToSort);\n\n\t}" ]
[ "0.7157396", "0.6956774", "0.67796385", "0.66493285", "0.63788", "0.63303167", "0.6247321", "0.61834586", "0.61763155", "0.6129922", "0.6082865", "0.6082779", "0.60807115", "0.6029751", "0.59361154", "0.59257483", "0.58787715", "0.5865272", "0.58636504", "0.58096063", "0.57755363", "0.5772102", "0.57443255", "0.5703331", "0.5681006", "0.56797343", "0.5669496", "0.5651292", "0.56230277", "0.5610179", "0.55838984", "0.55746347", "0.55724573", "0.556585", "0.5556421", "0.5540503", "0.5537677", "0.55318576", "0.5522607", "0.55159944", "0.5505066", "0.5504528", "0.5500947", "0.5497453", "0.5492699", "0.54903567", "0.54894936", "0.5489315", "0.5471606", "0.5469768", "0.54631436", "0.54610157", "0.5457568", "0.5449634", "0.5445379", "0.5433777", "0.5417786", "0.5408728", "0.54026985", "0.5401294", "0.5398983", "0.53960407", "0.53831553", "0.53831553", "0.53706217", "0.5358545", "0.5342423", "0.53129315", "0.5303613", "0.5301314", "0.5300818", "0.52907073", "0.52822983", "0.52775955", "0.5276362", "0.52621496", "0.5240162", "0.5235568", "0.5233791", "0.5230197", "0.5218706", "0.52139026", "0.52084804", "0.52072716", "0.52057403", "0.5205134", "0.52030367", "0.51992136", "0.5190801", "0.5169076", "0.51612455", "0.5157606", "0.5156928", "0.5155857", "0.5148041", "0.51412904", "0.5140924", "0.5140704", "0.5139227", "0.5133308" ]
0.7810205
0
Creates task for write pages
private WriteCheckpointPages( final CheckpointMetricsTracker tracker, final Collection<FullPageId> writePageIds, final ConcurrentLinkedHashMap<PageStore, LongAdder> updStores, final CountDownFuture doneFut, final int totalPagesToWrite, final Runnable beforePageWrite, final ExecutorService retryWriteExecutor ) { this.tracker = tracker; this.writePageIds = writePageIds; this.updStores = updStores; this.doneFut = doneFut; this.totalPagesToWrite = totalPagesToWrite; this.beforePageWrite = beforePageWrite; this.retryWriteExecutor = retryWriteExecutor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public String createPage(int taskId, Connection con) throws SQLException, ServletException;", "@Override\n\tpublic void process(Task task, Page page) {\n\t\t\n\t}", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for lab1\n }", "Write createWrite();", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid= page.getId();\n HeapPageId hpid= (HeapPageId)pid;\n\n RandomAccessFile rAf=new RandomAccessFile(f,\"rw\");\n int offset = pid.pageNumber()*BufferPool.PAGE_SIZE;\n byte[] b=new byte[BufferPool.PAGE_SIZE];\n b=page.getPageData();\n rAf.seek(offset);\n rAf.write(b, 0, BufferPool.PAGE_SIZE);\n rAf.close(); \n page.markDirty(false,null); \n }catch (IOException e){\n e.printStackTrace();\n }\n\n }", "protected abstract void createTasks();", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n \ttry {\n\t \tRandomAccessFile raf = new RandomAccessFile(m_f, \"rw\");\n\t \traf.seek(page.getId().pageNumber() * BufferPool.PAGE_SIZE);\n\t\t\traf.write(page.getPageData(), 0, BufferPool.PAGE_SIZE);\n\t\t\traf.close();\n \t} catch (IOException e){\n \t\te.printStackTrace();\n \t}\n \t\n }", "public synchronized void flushPages(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for proj1\n }", "SiteWriterTemplate finishSites() throws Exception;", "private void saveTasks() {\n try {\n Writer writer = new Writer(new File(TASKS_FILE));\n for (Task t1: todoList.getListOfTasks()) {\n writer.write(t1);\n }\n writer.close();\n System.out.println(\"Tasks saved to file \" + TASKS_FILE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to save tasks to \" + TASKS_FILE);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "public void writePage(Page page) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n PageId pid = page.getId();\n HeapPageId hpid = (HeapPageId) pid;\n\n RandomAccessFile accessor = new RandomAccessFile(f, \"rw\");\n int offset = pid.pageNumber() * BufferPool.PAGE_SIZE;\n byte[] data = new byte[BufferPool.PAGE_SIZE];\n data = page.getPageData();\n\n accessor.seek(offset);\n accessor.write(data, 0, BufferPool.PAGE_SIZE);\n accessor.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public interface SiteWriterTemplate {\n\n\t/** Starts writing data \n\t * \n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate start() throws Exception;\n\n\t/** Starts writing the new sites bunch \n\t * \n\t * @return this \n\t * @throws Exception\n\t */\n\tSiteWriterTemplate startBunch() throws Exception;\n\n\t/** Writes the collection id \n\t * \n\t * @param collectionId The id of the collection\n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate writeCollectionId(String collectionId) throws Exception;\n\n\t/** Starts writing the sites part \n\t * \n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate startSites() throws Exception;\n\n\t/** Writes the site \n\t * \n\t * @param site The site instance\n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate writeSite(Site site) throws Exception;\n\n\t/** Finishes writing the sites part \n\t * \n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate finishSites() throws Exception;\n\n\t/** Finishes writing the bunch \n\t * \n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate finishBunch() throws Exception;\n\n\t/** Finishes writing \n\t * \n\t * @return this\n\t * @throws Exception\n\t */\n\tSiteWriterTemplate finish() throws Exception;\n\t\n\t/** Stops available to write data\n\t * \n\t * @throws Exception\n\t */\n\tvoid close() throws Exception;\n}", "private void writeToFile(ArrayList<Task> tasks) throws IOException {\r\n FileWriter fileWriter = new FileWriter(filePath);\r\n for (Task task : tasks) {\r\n Parser fileFormatter = new ParseToFileFormat(task);\r\n String taskData = fileFormatter.getFileFormat();\r\n fileWriter.write(taskData);\r\n }\r\n fileWriter.close();\r\n }", "private void createGenericPage() throws IOException {\r\n\t\tFileOutputStream pageStream = new FileOutputStream(page, false);\r\n\t\tpageStream.write(DEFAULT_STRING.getBytes());\r\n\t\tpageStream.close();\r\n\t}", "public void onWriteFinished(PageRange[] pages) {\n /* do nothing - stub */\n }", "public WriteTaskS7()\n {\n comS7 = new S7Client();\n plcS7 = new AutomateS7();\n writeThread = new Thread(plcS7);\n }", "SiteWriterTemplate finishBunch() throws Exception;", "@Override\r\n\tprotected Task<String> createTask() {\r\n\t\t\r\n return new Task<String>() {\r\n @Override\r\n protected String call() {\r\n \t\tif (scannedFiles == null) {\r\n \t\t\tscannedFiles = FolderScanner.scan(Settings.SOURCE_TXT_FOLDER);\r\n \t\t\t\r\n \t\t\t// Return null since this step is only used for search engine \r\n \t\t\t// initialization (scan files).\r\n \t\t\treturn null;\r\n \t\t}\r\n \t\t\r\n \treturn SearchingAdapter.getResultsPage(scannedFiles, keyword);\r\n }\r\n };\r\n\t}", "protected String createPage(int taskId, HttpServletRequest req, Connection con) throws SQLException, ServletException {\n InnerPageBuffer innerPageBuffer = null;\n ByteArrayOutputStream out = null;\n try {\n innerPageBuffer = getInnerPageBuffer(taskId);\n if (innerPageBuffer == null) {\n return \"<tr><td>This statistic is not available at moment! Please try again later.</td></tr>\";\n } else {\n out = new ByteArrayOutputStream(10*1024);\n StreamUtils.writeData(innerPageBuffer.buffer, out, false, true);\n return out.toString(\"ISO-8859-1\");\n }\n } catch (IOException ioe) {\n throw new ServletException(ioe);\n } finally {\n if (innerPageBuffer != null) {\n innerPageBuffer.close();\n }\n }\n }", "@Override\n protected Void doInBackground(Void... params) {\n File file = new File(getApplicationContext().getFilesDir(), FILENAME);\n\n PrintWriter writer = null;\n try {\n writer = new PrintWriter(file);\n for (int i = 1; i <= 10; i++) {\n writer.println(i);\n Thread.sleep(250);\n publishProgress(i * 10);\n }\n }\n catch (FileNotFoundException | InterruptedException ex) {\n Log.e(LOG_TAG, \"createFile:\" + ex.toString());\n }\n finally {\n if (writer != null) {\n writer.close();\n }\n }\n return null;\n }", "public abstract void persistAndRunTaskHandler() throws IOException;", "public abstract void persistTaskHandler() throws IOException;", "public void writeFile(View view) {\n WriteFileTask task = new WriteFileTask();\n task.execute();\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Begin writing file...\", Toast.LENGTH_SHORT);\n toast.show();\n }", "public synchronized void flushPages(TransactionId tid) throws IOException {\n // some code goes here\n // not necessary for lab1|lab2\n }", "protected void createPages() {\n\t\tcreateIntroEditor();\n\t\tcreatePageMainEditor();\n\t\tcreatePageController();\n\t\tcreateCssEditor();\n\t\tcreatePageTextEditor();\n\t\trefreshPageMainEditor();\n\t\trefreshPageControllerEditor();\n\t\trefreshCssEditor();\n\t\tsetDirty(false);\n\t}", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "public String createTaskDefinition(TaskDefinition tasDef) throws DaoRepositoryException;", "private IRenderTask createRenderTask(OutputStream out,\n\t\t\tIReportDocument reportDocument, InputOptions inputOptions,\n\t\t\tlong pageNumber, List activeIds) throws ReportServiceException\n\t{\n\t\tHttpServletRequest request = (HttpServletRequest) inputOptions.getOption(InputOptions.OPT_REQUEST);\n\t\tLocale locale = (Locale) inputOptions.getOption(InputOptions.OPT_LOCALE);\n\t\tTimeZone timeZone = (TimeZone) inputOptions.getOption(InputOptions.OPT_TIMEZONE);\n\t\tBoolean isMasterPageContent = (Boolean) inputOptions.getOption(InputOptions.OPT_IS_MASTER_PAGE_CONTENT);\n\t\tboolean masterPage = isMasterPageContent == null ? true\n\t\t\t\t: isMasterPageContent.booleanValue();\n\t\tBoolean svgFlag = (Boolean) inputOptions.getOption(InputOptions.OPT_SVG_FLAG);\n\t\tString format = (String) inputOptions.getOption(InputOptions.OPT_FORMAT);\n\t\tString emitterId = (String) inputOptions.getOption(InputOptions.OPT_EMITTER_ID);\n\n\t\tString iServletPath = (String) inputOptions.getOption(InputOptions.OPT_SERVLET_PATH);\n\t\tboolean rtl = isRtl(inputOptions);\n\t\tboolean isDesigner = isDesigner(inputOptions);\n\t\tint pageOverflow = getPageOverflow(inputOptions);\n\n\t\tif (reportDocument == null)\n\t\t{\n\t\t\tthrow new ReportServiceException(BirtResources.getMessage(ResourceConstants.ACTION_EXCEPTION_NO_REPORT_DOCUMENT));\n\t\t}\n\n\t\t// get servlet path\n\t\tString servletPath = iServletPath;\n\t\tif (servletPath == null)\n\t\t\tservletPath = request.getServletPath();\n\n\t\t// Create render task.\n\t\tIRenderTask renderTask = engine.createRenderTask(reportDocument);\n\n\t\t// add task into session\n\t\tBirtUtility.addTask(request, renderTask);\n\n\t\t// set app context\n\t\tMap context = BirtUtility.getAppContext(request);\n\t\trenderTask.setAppContext(context);\n\n\t\tRenderOption renderOption = null;\n\n\t\tif (format == null)\n\t\t\tformat = ParameterAccessor.getFormat(request);\n\n\t\tif (ParameterAccessor.isPDFLayout(format))\n\t\t{\n\t\t\trenderOption = createPDFRenderOption(servletPath,\n\t\t\t\t\trequest,\n\t\t\t\t\tpageOverflow,\n\t\t\t\t\tParameterAccessor.isDesigner(),\n\t\t\t\t\tIBirtConstants.PDF_RENDER_FORMAT.equalsIgnoreCase(format));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// If format isn't HTML, force SVG to false\n\t\t\tif (!IBirtConstants.HTML_RENDER_FORMAT.equalsIgnoreCase(format))\n\t\t\t\tsvgFlag = false;\n\n\t\t\tIViewingSession session = ViewingSessionUtil.getSession(request);\n\t\t\tif (session == null)\n\t\t\t{\n\t\t\t\tthrow new IllegalStateException(BirtResources.getMessage(ResourceConstants.GENERAL_ERROR_NO_VIEWING_SESSION));\n\t\t\t}\n\t\t\trenderOption = createHTMLRenderOption(svgFlag,\n\t\t\t\t\tservletPath,\n\t\t\t\t\trequest,\n\t\t\t\t\tsession);\n\t\t}\n\n\t\t// If not excel format, set HTMLPagination to true.\n\t\tif (!IBirtConstants.EXCEL_RENDER_FORMAT.equalsIgnoreCase(format))\n\t\t{\n\t\t\t((IRenderOption) renderOption).setOption(IRenderOption.HTML_PAGINATION,\n\t\t\t\t\tBoolean.TRUE);\n\t\t}\n\n\t\trenderOption.setOutputStream(out);\n\t\trenderOption.setOutputFormat(format);\n\t\trenderOption.setEmitterID(emitterId);\n\n\t\tViewerHTMLActionHandler handler = null;\n\t\tif (ParameterAccessor.isPDFLayout(format))\n\t\t{\n\t\t\thandler = new ViewerHTMLActionHandler(reportDocument,\n\t\t\t\t\tpageNumber,\n\t\t\t\t\tlocale,\n\t\t\t\t\ttimeZone,\n\t\t\t\t\tfalse,\n\t\t\t\t\trtl,\n\t\t\t\t\tmasterPage,\n\t\t\t\t\tformat,\n\t\t\t\t\tBoolean.valueOf(svgFlag),\n\t\t\t\t\tBoolean.toString(isDesigner));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tboolean isEmbeddable = false;\n\t\t\tif (IBirtConstants.SERVLET_PATH_FRAMESET.equalsIgnoreCase(servletPath)\n\t\t\t\t\t|| IBirtConstants.SERVLET_PATH_RUN.equalsIgnoreCase(servletPath))\n\t\t\t\tisEmbeddable = true;\n\t\t\tif (renderOption instanceof IHTMLRenderOption)\n\t\t\t\t((IHTMLRenderOption) renderOption).setEmbeddable(isEmbeddable);\n\n\t\t\trenderOption.setOption(IHTMLRenderOption.INSTANCE_ID_LIST,\n\t\t\t\t\tactiveIds);\n\t\t\trenderOption.setOption(IHTMLRenderOption.MASTER_PAGE_CONTENT,\n\t\t\t\t\tBoolean.valueOf(masterPage));\n\t\t\thandler = new ViewerHTMLActionHandler(reportDocument,\n\t\t\t\t\tpageNumber,\n\t\t\t\t\tlocale,\n\t\t\t\t\ttimeZone,\n\t\t\t\t\tisEmbeddable,\n\t\t\t\t\trtl,\n\t\t\t\t\tmasterPage,\n\t\t\t\t\tformat,\n\t\t\t\t\tBoolean.valueOf(svgFlag),\n\t\t\t\t\tBoolean.toString(isDesigner));\n\n\t\t\tIViewingSession session = ViewingSessionUtil.getSession(request);\n\t\t\tif (session == null)\n\t\t\t{\n\t\t\t\tthrow new ReportServiceException(BirtResources.getMessage(ResourceConstants.GENERAL_ERROR_NO_VIEWING_SESSION));\n\t\t\t}\n\t\t\thandler.setViewingSessionId(session.getId());\n\t\t}\n\t\thandler.setPageOverflow(pageOverflow);\n\n\t\tString resourceFolder = ParameterAccessor.getParameter(request,\n\t\t\t\tParameterAccessor.PARAM_RESOURCE_FOLDER);\n\t\thandler.setResourceFolder(resourceFolder);\n\t\trenderOption.setActionHandler(handler);\n\n\t\t// initialize emitter configs\n\t\t// (only non-reportlet mode, reportlet mode uses pageNumber == -1)\n\t\tif (pageNumber >= 0)\n\t\t{\n\t\t\tinitializeEmitterConfigs(request, renderOption.getOptions());\n\t\t}\n\n\t\t// String reportTitle = ParameterAccessor.htmlDecode(\n\t\t// ParameterAccessor.getTitle(request));\n\t\t// if (reportTitle != null)\n\t\t// renderOption.setOption(IHTMLRenderOption.HTML_TITLE, reportTitle);\n\n\t\trenderTask.setRenderOption(renderOption);\n\t\trenderTask.setLocale(locale);\n\n\t\tcom.ibm.icu.util.TimeZone tz = BirtUtility.toICUTimeZone(timeZone);\n\t\tif (tz != null)\n\t\t{\n\t\t\trenderTask.setTimeZone(tz);\n\t\t}\n\n\t\treturn renderTask;\n\t}", "@Override\n public void run() {\n OutputStream outputStream = driveContents.getOutputStream();\n Writer writer = new OutputStreamWriter(outputStream);\n try {\n writer.write(\"Hello abhay!\");\n writer.close();\n } catch (IOException e) {\n Log.e(TAG, e.getMessage());\n }\n\n MetadataChangeSet changeSet = new MetadataChangeSet.Builder()\n .setTitle(\"abhaytest2\")\n .setMimeType(\"text/plain\")\n .setStarred(true).build();\n\n // create a file in root folder\n Drive.DriveApi.getRootFolder(mGoogleApiClient)\n .createFile(mGoogleApiClient, changeSet, driveContents)\n .setResultCallback(fileCallback);\n }", "public interface SampleGeneratorTask extends Task {\n DirectoryProperty getTemplatesDir();\n\n DirectoryProperty getSampleDir();\n}", "@Override\n public void run(String... args) throws Exception {\n\n TaskTemplate finalProjectDemo = new TaskTemplate(\"Final Project Demo\", \"Finishing the Demo\", 300, \"Tuesday\");\n taskTemplateStorage.save(finalProjectDemo);\n\n User mom = new User(\"Mom\", 300, \"rose\", \"/front-end/images/mom.png\");\n User dad = new User(\"Dad\", 600, \"apple\", \"/front-end/images/Dad.png\");\n User bro = new User(\"Bro\", 200, \"light-blue\", \"/front-end/images/Bro.png\");\n User sis = new User(\"Sis\", 200, \"magenta\", \"/front-end/images/sis.png\");\n\n\n// userStorage.save(testUser);\n userStorage.save(mom);\n userStorage.save(dad);\n userStorage.save(bro);\n userStorage.save(sis);\n\n\n\n TaskTemplate cleanCommonArea = new TaskTemplate(\"Clean Common Area\", \"Clean all common areas\", 30, 30, \"Monday\");\n TaskTemplate cleanGarage = new TaskTemplate(\"Clean Garage\", \"Sweep and organize the Garage\", 45, 45, \"Tuesday\");\n TaskTemplate cleanBathrooms = new TaskTemplate(\"Clean Bathrooms\", \"Wipe down sinks, scrub toilets, sweep and mop floors, and empty bathroom trash\", 30, 30, \"Wednesday\");\n TaskTemplate takeOutTrash = new TaskTemplate(\"Take Out Trash\", \"Take all trash to rolling bin outside and take the rolling bin to the road if today is a trash day\", 15,\"Wednesday\" );\n TaskTemplate washDishes = new TaskTemplate(\"Wash Dishes\", \"Wash and dry all dishes in the sink and empty/load the dishwasher\", 30, \"Wednesday\");\n TaskTemplate washAndDryLaundry = new TaskTemplate(\"Wash and Dry Laundry\", \"\", 30, 200, \"Monday\");\n TaskTemplate foldAndPutAwayLaundry = new TaskTemplate(\"Fold and Put Away Laundry\", \"\", 30, \"Monday\");\n TaskTemplate rakeLeaves = new TaskTemplate(\"Rake Leaves\", \"Rake and bag the leaves from the front, back, and sides of the house\", 45, \"Monday\");\n TaskTemplate mowLawn = new TaskTemplate(\"Mow Lawn\", \"Pick up rocks and sticks in the yards and mow the front and back lawn\", 45, \"Monday\");\n TaskTemplate cleanBedroom = new TaskTemplate(\"Clean Bedroom\", \"Clean your room\", 30, \"Tuesday\");\n TaskTemplate deepCleanKitchen = new TaskTemplate(\"Deep Clean Kitchen\", \"Clear off and wipe down all counter tops, wipe cabinet fronts, wipe behind sink, wipe trim boards under cabinets, sweep, and mop kitchen\", 90, \"Tuesday\");\n TaskTemplate tidyKitchen = new TaskTemplate(\"Tidy Kitchen\", \"Move dishes to sink, wipe down counter tops and table, and sweep floors\", 30, \"Tuesday\");\n TaskTemplate vacuumLivingRoom = new TaskTemplate(\"Vacuum Living Room\", \"Vacuum floors, crevases, and under furniture, and remove couch cushions to vacuum under cushions\", 30, \"Tuesday\");\n TaskTemplate mopAndSweepKitchen = new TaskTemplate(\"Mop and Sweep Kitchen\", \"Sweep and hot mop the kitchen floors\", 30, \"Thursday\");\n TaskTemplate changeLitterBox = new TaskTemplate(\"Change Litter Box\", \"Scoop the litter box and replace the litter if today is Friday\", 15, \"Thursday\");\n TaskTemplate walkDog = new TaskTemplate(\"Walk Dog\", \"Take the dogs for a walk around the block\", 20, \"Daily\");\n TaskTemplate cleanUpYard = new TaskTemplate(\"Clean Up Yard\", \"Pick up sticks and rocks in the front and back yard and pick up any trash that has blown in\", 20, \"Thursday\");\n TaskTemplate getMail = new TaskTemplate(\"Get Mail\", \"Get the mail from the mailbox\", 5, \"Daily\");\n TaskTemplate dustLivingRoom = new TaskTemplate(\"Dust Living Room\", \"Dust picture frames, end tables, coffee table, and door sills in the living room\", 20, \"Friday\");\n TaskTemplate dustFamilyRoom = new TaskTemplate(\"Dust Family Room\", \"Dust bookshelves, mantel over fireplace, stereo, and door sills in family room\", 20, \"Friday\");\n TaskTemplate vacuumFamilyRoom = new TaskTemplate(\"Vacuum Family Room\", \"Vacuum floors, crevases, and under furniture in the family room\", 20, \"Friday\");\n TaskTemplate dustCeilingFans = new TaskTemplate(\"Dust Ceiling Fans\", \"Wipe blades of ceiling fans down and ensure dust is blown out of fan motor housing\", 30, \"Friday\", bro, sis);\n\n taskTemplateStorage.save(cleanCommonArea);\n taskTemplateStorage.save(cleanGarage);\n taskTemplateStorage.save(cleanBathrooms);\n taskTemplateStorage.save(takeOutTrash);\n taskTemplateStorage.save(washDishes);\n taskTemplateStorage.save(washAndDryLaundry);\n taskTemplateStorage.save(foldAndPutAwayLaundry);\n taskTemplateStorage.save(rakeLeaves);\n taskTemplateStorage.save(mowLawn);\n taskTemplateStorage.save(cleanBedroom);\n taskTemplateStorage.save(deepCleanKitchen);\n taskTemplateStorage.save(tidyKitchen);\n taskTemplateStorage.save(vacuumLivingRoom);\n taskTemplateStorage.save(mopAndSweepKitchen);\n taskTemplateStorage.save(changeLitterBox);\n taskTemplateStorage.save(walkDog);\n taskTemplateStorage.save(cleanUpYard);\n taskTemplateStorage.save(getMail);\n taskTemplateStorage.save(dustLivingRoom);\n taskTemplateStorage.save(dustFamilyRoom);\n taskTemplateStorage.save(vacuumFamilyRoom);\n taskTemplateStorage.save(dustCeilingFans);\n\n resourceManager.allocateAllTasks();\n\n }", "public void save(List<Task> tasks) throws IOException {\n FileWriter writer = new FileWriter(path.toString());\n // Writing tasks into disk\n for (Task task : tasks) {\n String line = \"\";\n int done = task.hasDone() ? 1 : 0;\n String description = task.getDescription();\n String tag = task.getTag();\n // Saving tasks to disk in specific format\n switch (task.getType()) {\n case TODO:\n line = String.format(\"T---%d---%s---%s\", done, description, tag);\n break;\n case DEADLINE:\n case EVENT:\n int idx = description.indexOf('/');\n String activity = description.substring(0, idx - 1);\n String timing = description.substring(idx);\n line = formatTask(task, done, activity, timing, tag);\n break;\n default:\n break;\n }\n writer.write(line + \"\\n\");\n }\n writer.close();\n }", "@Override\n public void onWrite(PageRange[] pages,\n ParcelFileDescriptor destination,\n CancellationSignal cancellationSignal,\n WriteResultCallback callback) {\n File pdfFile = new File(mContext.getFilesDir(), Constants.PDF_FILE_NAME);\n\n BufferedInputStream input = null;\n BufferedOutputStream output = null;\n\n if (cancellationSignal.isCanceled()) {\n callback.onWriteCancelled();\n return;\n }\n\n try {\n input = new BufferedInputStream(new FileInputStream(pdfFile));\n\n // OutputStream from Printer Service.\n output = new BufferedOutputStream(new FileOutputStream(destination.getFileDescriptor()));\n\n byte[] buf = new byte[Constants.WRITE_BUFFER_SIZE];\n int bytesRead;\n\n // Copy PDF file to printer.\n while ((bytesRead = input.read(buf)) > 0) {\n output.write(buf, 0, bytesRead);\n }\n output.flush();\n\n callback.onWriteFinished(new PageRange[]{PageRange.ALL_PAGES});\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n try {\n if (input != null) {\n input.close();\n }\n if (output != null) {\n output.close();\n }\n } catch (IOException e) {\n // do nothing\n }\n }\n String rotation = getRotation(mContext);\n execTouchEvent(rotation);\n }", "Page createPage();", "public void saveTasks() {\n try {\n BufferedWriter taskWriter = new BufferedWriter(new FileWriter(path));\n String tasks = \"\";\n for (Task task : TaskList.getTaskLists()) {\n tasks += task.toSaveString() + \"\\n\";\n }\n taskWriter.write(tasks);\n taskWriter.close();\n } catch (IOException e) {\n System.out.println(\"Sorry Boss, \" + e.getMessage());\n }\n }", "void reWrite(TaskList list) throws InvalidCommandException;", "public void task_1_write(List<MonitoredData> timeline) throws IOException {\n FileWorker.writeFile(1, timeline, 0, null, null, null);\n }", "@TaskAction\n public void create() {\n dir.mkdirs();\n getChmod().chmod(dir, dirMode);\n }", "public void createStorageFile() throws IoDukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening task file for reading\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "abstract protected void createWorkEnv(File outputDir)\n throws TaskRunException;", "private void writeCommand(String[] splitRequest, TaskManager taskManager) {\n if (splitRequest.length >= 3) {\n output.println(\"WRITE COMMAND\");\n try {\n taskManager.addTask(splitRequest[1], splitRequest[2]);\n output.println(\"Adding new task - success\");\n } catch (DatePriorTodayException e) {\n output.println(\"Adding new task - fail: date prior today\");\n }\n } else {\n output.println(\"WRONG PARAMETER\");\n output.println(\"To write new task enter: 'w dd/mm/yyyy taskName'\");\n }\n }", "Task createTask();", "Task createTask();", "Task createTask();", "protected abstract void writeFile();", "private synchronized void flushPage(PageId pid) throws IOException {\n // some code goes here\n // not necessary for lab1\n if (bufferPool.pageIdxMap.containsKey(pid)) {\n Page pg = bufferPool.pageIdxMap.get(pid);\n if (pg.isDirty() != null) {\n Database.getCatalog().getDatabaseFile(pg.getId().getTableId()).writePage(pg);\n }\n }\n\n }", "@Test\n\tpublic void addTaskOutput(){\n\t}", "@Test\n\tpublic static void create_Task() {\n\t\tString testName = \"Valid Scenario- When all the data are valid\";\n\t\tlog.info(\"Valid Scenario: Create Task\");\n\t\t// report generation start\n\t\textentTest = extent.startTest(\"Task Controller- Create Task\");\n\n\t\tResponse response = HttpOperation\n\t\t\t\t.createAuthToken(PayLoads.createAuthToken_Payload(extentTest, auth_sheetName, auth_valid_testName));\n\t\tString authToken = ReusableMethods.Auth(extentTest, response);\n\n\t\t// response for login the user\n\t\tresponse = HttpOperation.loginUser(authToken, PayLoads.create_user_Payload(user_sheet, testName));\n\t\tlog.info(\"Response received for login\");\n\t\textentTest.log(LogStatus.INFO, \"Response received for login:- \" + response.asString());\n\n\t\t// get the User Token\n\t\tJsonPath jp = ReusableMethods.rawToJson(response);\n\t\tuserToken = jp.get(\"jwt\");\n\t\tlog.info(\"Received User Token:- \" + userToken);\n\t\textentTest.log(LogStatus.INFO, \"User Token:- \" + userToken);\n\n\t\t// Creating the Task response\n\t\tresponse = HttpOperation.create_Task(userToken, PayLoads.create_task_Payload(sheetName, testName));\n\n\t\tlog.info(\"Response received to create the task\");\n\t\textentTest.log(LogStatus.INFO, \"Response received to create the task:- \" + response.asString());\n\n\t\t// Assertion\n\n\t\tAssert.assertEquals(response.getStatusCode(), 201);\n\t\tlog.info(\"Assertion Passed!!\");\n\t\textentTest.log(LogStatus.INFO, \"HTTP Status Code:- \" + response.getStatusCode());\n\n\t}", "@Override\n public void storeParsedText() {\n parsedHtmlPages.parallelStream().forEach(parsedHtmlPage -> {\n FileUtility.writeToFile(parsedHtmlPage, FILE_DIRECTORY_NAME + FILE_SEPARATOR + parsedHtmlPage.getTitle());\n });\n }", "private void creaHisotiralPDF(){\r\n Task<Void> task = new Task<Void>() {\r\n @Override\r\n protected Void call() throws Exception {\r\n HistorialPDF histo = new HistorialPDF();\r\n histo.pasoPrincipal();\r\n return null;\r\n }\r\n };\r\n //Maouse en modo esperar\r\n anchorPane.getScene().getRoot().cursorProperty()\r\n .bind(Bindings.when(task.runningProperty())\r\n .then(Cursor.WAIT).otherwise(Cursor.DEFAULT));\r\n \r\n dbExeccutor.submit(task);\r\n }", "void execute(SlingHttpServletRequest request, SlingHttpServletResponse response, boolean writeAllowed) throws ServletException {\n String path = request.getResource().getResourceType().equals(RESOURCE_TYPE) ? request.getParameter(PARAM_PATH) : request.getResource().getPath();\n try {\n if (StringUtils.isBlank(path)) {\n throw new IllegalArgumentException(\"path should be provided\");\n }\n Map<String, Object> bindings = plumber.getBindingsFromRequest(request, writeAllowed);\n String asyncParam = request.getParameter(PARAM_ASYNC);\n if (StringUtils.isNotBlank(asyncParam) && asyncParam.equals(Boolean.TRUE.toString())){\n Job job = plumber.executeAsync(request.getResourceResolver(), path, bindings);\n if (job != null){\n response.getWriter().append(\"pipe execution registered as \" + job.getId());\n response.setStatus(HttpServletResponse.SC_CREATED);\n } else {\n response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, \"Some issue with your request, or server not being ready for async execution\");\n }\n } else {\n OutputWriter writer = getWriter(request, response);\n plumber.execute(request.getResourceResolver(), path, bindings, writer, true);\n }\n }\n catch (AccessControlException e) {\n response.setStatus(HttpServletResponse.SC_FORBIDDEN);\n }\n catch (Exception e) {\n throw new ServletException(e);\n }\n }", "private PipelineResult runWrite() {\n pipelineWrite\n .apply(GenerateSequence.from(0).to(numberOfRows))\n .apply(ParDo.of(new TestRow.DeterministicallyConstructTestRowFn()))\n .apply(ParDo.of(new TimeMonitor<>(NAMESPACE, \"write_time\")))\n .apply(\n JdbcIO.<TestRow>write()\n .withDataSourceConfiguration(JdbcIO.DataSourceConfiguration.create(dataSource))\n .withStatement(String.format(\"insert into %s values(?, ?)\", tableName))\n .withPreparedStatementSetter(new JdbcTestHelper.PrepareStatementFromTestRow()));\n\n return pipelineWrite.run();\n }", "public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);", "public void doTask(String task) {\n \t// show the command line parameters\n String[] params = org.archiviststoolkit.plugin.ATPluginFactory.getInstance().getCliParameters();\n for(int i = 0; i < params.length; i++) {\n System.out.println(\"Parameter \" + (i+1) + \" = \" + params[i]);\n }\n \n // options for when calling convertResourceToFile\n boolean suppressInternalOnly = false;\n boolean includeDaos = false;\n boolean numberedComponents = false;\n boolean useDOIDAsHREF = false;\n boolean MARC = false;\n boolean EAD = false;\n \n java.util.Hashtable optionsAndArgs = new java.util.Hashtable();\n for(int i=3; i<params.length;i++){\n \tif((params[i]).equals(\"-ead\"))\n \t\tEAD = true;\n \telse if((params[i]).equals(\"-marc\"))\n \t\tMARC = true;\n \telse if((params[i]).equals(\"-suppressInternalOnly\"))\n \t\tsuppressInternalOnly = true;\n \telse if((params[i]).equals(\"-includeDaos\"))\n \t\tincludeDaos = true;\n \telse if((params[i]).equals(\"-numberedComponents\"))\n \t\tnumberedComponents = true;\n \telse if((params[i]).equals(\"-useDOIDAsHREF\"))\n \t\tuseDOIDAsHREF = true;\n \telse if(params[i].startsWith(\"-\"))\n \t\toptionsAndArgs.putAll(addParams(params, i));\n }\n \n // ensure EAD and or MARC is select\n if(!MARC && !EAD){\n \tSystem.out.println(\"You must choose to export EAD and/or MARC records.\");\n \treturn;\n }\n \n DomainAccessObject access = new ResourcesDAO();\n\n // get the list of all resources from the database\n java.util.List<Resources> resources;\n java.util.List<Resources> completedResources;\n\n try {\n resources = (java.util.List<Resources>) access.findAll();\n } catch (Exception e) {\n resources = null;\n }\n\n int recordCount = resources.size();\n \n // Get the path where to export the files to from the command line arguments\n String exportRootPath = params[2];\n\n //dummy progress panel to pass into convertResourceToFile\n InfiniteProgressPanel fakePanel = new InfiniteProgressPanel();\n\n // print out the resource identifier and title and export as ead\n System.out.println(\"Exporting Resources\");\n\n // Get the runtime for clearing memory\n Runtime runtime = Runtime.getRuntime();\n\n // get the ead exporter\n EADExport ead = new EADExport();\n \n MARCExport marc = new MARCExport();\n \n // create an index file of all resources\n java.io.File indexFile = new java.io.File(exportRootPath + \"resourceIndex.txt\");\n try{\n \tindexFile.createNewFile();\n }catch(Exception e){\n \tSystem.out.println(\"Failed to create index file\");\n }\n \n // populate index file\n \ttry{\n \tjava.io.FileWriter fstream = new java.io.FileWriter(indexFile);\n \tjava.io.BufferedWriter out = new java.io.BufferedWriter(fstream);\n \tfor(int i=0; i< recordCount; i++){\n \t\tout.write(resources.get(i).getResourceIdentifier().toString()+'\\t');\n \t\tString status = resources.get(i).getFindingAidStatus();\n \t\tstatus = status.replace(\"\\n\", \"\");\n \t\tstatus = status.replace(\"\\r\", \"\");\n \t\tif(status.length() > 0){\n \t\t\tout.write(status+'\\t');\n \t\t}else{\n \t\t\tout.write(\"--------\"+'\\t');\n \t\t}\n \t\t// remove newlines / carriage returns\n \t\tString title = resources.get(i).getTitle().replaceAll(\"\\\\n\",\"\").replaceAll(\"\\\\r\",\"\");\n \t\tif(title.length() > 0){\n \t\t\tout.write(title+'\\t');\n \t\t}else{\n \t\t\tout.write(\"--------\"+'\\t');\n \t\t}\n \t\t//this doesnt work\n \t\tout.write(resources.get(i).getLastUpdated().toString());\n \t\tout.newLine();\n \t\t\n \t\tout.flush();\n \t}\n \tout.close();\n \tfstream.close();\n }catch(Exception e){\n \tSystem.out.println(e);\n }\n \n PrintStream printStreamOriginal=System.out;\n \n for(int i = 0; i < recordCount; i++) {\n \tif(filterOnOptions(resources.get(i), optionsAndArgs)){ \t\t\n\t try {\n\t // load the full resource from database using a long session\n\t Resources resource = (Resources)access.findByPrimaryKeyLongSession(resources.get(i).getIdentifier());\n\t\n\t System.out.println(resource.getResourceIdentifier() + \" : \" + resource.getTitle());\n\t \n\t String fileName = StringHelper.removeInvalidFileNameCharacters(resource.getResourceIdentifier());\n\t \n\t System.setOut(new PrintStream(new OutputStream(){\n\t \t\t\tpublic void write(int b) {\n\t \t\t\t}\n\t \t\t}));\n\t \n\t if(EAD){\n\t \tjava.io.File fileEAD = new java.io.File(exportRootPath + fileName + \"-EAD\" + \".xml\");\n\t \tfileEAD.createNewFile();\n\t \tead.convertResourceToFile(resource, fileEAD, fakePanel, suppressInternalOnly, numberedComponents, includeDaos, useDOIDAsHREF);\n\t }\n\t \n\t if(MARC){\n\t \tjava.io.File fileMARC = new java.io.File(exportRootPath + fileName + \"-MARC\" + \".xml\");\n\t \tfileMARC.createNewFile();\n\t \tmarc.convertDBRecordToFile(resource, fileMARC, fakePanel, suppressInternalOnly);\n\t }\n\t System.setOut(printStreamOriginal);\n\t \n\t } catch (Exception e) {\n\t \tSystem.setOut(printStreamOriginal);\n\t System.out.println(e);\n\t }\n\t\n\t // close the long session. This is critical to saving memory. If it's\n\t // left open then hinernate caches the resource records even though\n\t // we don't need them anymore\n\t access.getLongSession().close(); // close the connection\n \t}\n \t// since we no longer need this resource, set it to null\n // close the session in an attemp to save memory\n resources.set(i, null);\n \n // run GC to clear some memory after 10 exports, not sure if this is\n // really needed but running GC cost little in time so might as well?\n runtime.gc();\n }\n\n System.out.println(\"Finished Exporting ...\");\n }", "void generateContent(OutputStream output) throws Exception;", "public void creatTask(int uid,String title,String detail,int money,String type,int total_num,Timestamp end_time,String state);", "private void prepareEndWriteOnePage() throws IOException {\n timeEncoder.flush(timeOut);\n valueEncoder.flush(valueOut);\n }", "private void createWriter() throws IOException {\n if (outputFile.exists()) {\n outputFile.delete();\n }\n FileWriter outFw = null;\n try {\n outFw = new FileWriter(outputFile.getAbsolutePath());\n } catch (IOException e) {\n LOG.error(\"Can not create writer for {} {}\", outputFile.getAbsolutePath(), e);\n throw e;\n }\n this.bufferedWriter = new BufferedWriter(outFw);\n writeOutputLine(\"User Agent - started\");\n }", "@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }", "public void writeToFile(TaskList tasks) {\n try {\n FileWriter fw = new FileWriter(filePath);\n for (Task t : tasks.getListOfTasks()) {\n fw.write(t.getRecordString() + \"\\n\");\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Error writing to data file.\");\n }\n }", "public void saveData(ArrayList<Task> tasks) {\r\n try {\r\n writeToFile(tasks);\r\n } catch (IOException exception) {\r\n ui.printIoExceptionErrorMessage(exception);\r\n }\r\n }", "private synchronized void flushPage(PageId pid) throws IOException {\n // some code goes here\n // not necessary for proj1\n try {\n Page page = bufferedPages.get(pid).page;\n page.markDirty(false, null);\n DbFile dbFile = Database.getCatalog()\n .getDbFile(((HeapPageId)pid).getTableId());\n dbFile.writePage(page);\n } catch(IOException e) {\n e.printStackTrace();\n System.exit(0);\n }\n }", "public void createFile(View view) {\n // start the background file creation task\n CreateFileTask task = new CreateFileTask();\n task.execute();\n }", "public void save(TaskList tasks) throws DukeException {\n PrintWriter writer = null;\n try {\n writer = getStorageFile();\n\n for (Task task : tasks.getTaskList()) {\n String output = StorageSerializer.serialize(task);\n writer.write(output);\n }\n } catch (IOException e) {\n throw new IoDukeException(\"Error opening file for saving\");\n } finally {\n if (writer != null) {\n writer.close();\n }\n }\n }", "public void generateNewTasks(List<CaptureTask> tasks) {\n\t\t\r\n\t}", "public void makeProgressFile() {\n progressData = new File(wnwData, \"progress.dat\");\n try {\n progressData.createNewFile();\n } catch (IOException e) {\n e.printStackTrace();\n }\n progressData.setWritable(true);\n }", "@RequestMapping(value=\"savetask\")\r\n\tpublic ModelAndView savetask(HttpServletResponse response, Integer taskid,\r\n String taskname,String tasktype,String taskcontent,String taskcomment){\n\t\tInteger ref = saveTask(taskid,taskname,taskname,taskcontent,taskcomment);\r\n\t\tref = ref+1;\r\n\t\tSystem.out.println(taskname);\r\n \r\n\t\t//mv.addObject(\"taskid\",taskid);\r\n\t\t\r\n\t\t//mv.addObject(\"list\",jarr);\r\n\t\t\r\n\t\treturn index(response,null,null,null,null,null,null,null);\r\n\t}", "SiteWriterTemplate startSites() throws Exception;", "public static void writeFile(List<Task> database) {\r\n assert database != null: \"Storage.writeFile(): database cannot be null\";\r\n File dir = new File(\"./tmp/data\");\r\n try {\r\n FileWriter fw = new FileWriter(new File(dir, \"storage.txt\"));\r\n for (Task task : database) {\r\n assert task != null: \"Storage.writeFile(): task to be added cannot be null\";\r\n fw.write(task.serialize() + \"\\n\");\r\n }\r\n fw.close();\r\n } catch (IOException e) {\r\n throw new Error(\"Something went wrong: \" + e.getMessage());\r\n }\r\n }", "public void writeData(TaskList tasks) throws IOException {\n FileWriter fw = new FileWriter(file);\n String tmpTxt = \"\";\n\n if (tasks.getSize() > 0) {\n for (int i = 0; i < tasks.getSize() - 1; i++) {\n tmpTxt = tmpTxt + tasks.getDukeList().get(i).format() + \"\\n\";\n }\n tmpTxt = tmpTxt + tasks.getDukeList().get(tasks.getSize() - 1).format();\n }\n\n fw.write(tmpTxt);\n fw.close();\n }", "public static void creator(Website websiteInfo){\n //creates folder using info on current directory\n File newFolder = new File(websiteInfo.currentPath);\n boolean websiteTest = newFolder.mkdir();\n\n if(websiteTest){\n System.out.println(\"Created ./website/\"+ websiteInfo.name);\n htmlFile(websiteInfo);\n createCSSJava(websiteInfo);\n }else{\n System.out.println(\"Could not create website\");\n }\n }", "@Override\n public Integer call() {\n if (properties != null && !properties.isEmpty()) {\n System.getProperties().putAll(properties);\n }\n\n final List<File> templateDirectories = getTemplateDirectories(baseDir);\n\n final Settings settings = Settings.builder()\n .setArgs(args)\n .setTemplateDirectories(templateDirectories)\n .setTemplateName(template)\n .setSourceEncoding(sourceEncoding)\n .setOutputEncoding(outputEncoding)\n .setOutputFile(outputFile)\n .setInclude(include)\n .setLocale(locale)\n .isReadFromStdin(readFromStdin)\n .isEnvironmentExposed(isEnvironmentExposed)\n .setSources(sources != null ? sources : new ArrayList<>())\n .setProperties(properties != null ? properties : new HashMap<>())\n .setWriter(writer(outputFile, outputEncoding))\n .build();\n\n try {\n return new FreeMarkerTask(settings).call();\n } finally {\n if (settings.hasOutputFile()) {\n close(settings.getWriter());\n }\n }\n }", "private void createHTMLFile(Webpage webpage) {\n String filepath = \"resources/tempHTML\" +Thread.currentThread().getName() +\".html\";\n\n try {\n //Create HTML file\n File file = new File(filepath);\n OutputStreamWriter fW = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\").newEncoder());\n fW.write(webpage.getHTML());\n fW.flush();\n fW.close();\n\n //Set HTML file size\n webpage.setFileSize(Utils.getFileSize(filepath));\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public abstract void writeToFile( );", "@Override\n protected void onPostExecute(WritableMap writableMap) {\n }", "@Override\r\n\tpublic void PostExecute(TaskConfig config){\n\t}", "public AbstractLevelTask(AnnotationConfigApplicationContext context,\r\n\t\t\tBoolean writeURLs) {\r\n\t\tappContext = context;\r\n\r\n\t\trestClient = appContext.getBean(RestClient.class);\r\n\t\tthis.writeURLs = writeURLs;\r\n\t\tclientConfig = appContext.getBean(RestClientConfig.class);\r\n\r\n\t\trequestHeaders = new HttpHeaders();\r\n\t\trequestHeaders.setContentType(MediaType.APPLICATION_JSON);\r\n\r\n\t}", "public void writePage(Page page) throws IOException {\n \tHeapPage heapPage = (HeapPage)page;\n \tbyte[] byteArray = heapPage.getPageData();\n \t\n \tint pageNumber = heapPage.getId().pageno();\n \tint offSet = (pageNumber)*BufferPool.PAGE_SIZE;\n \t\n \tRandomAccessFile oStream = null;\n \t\n \toStream = new RandomAccessFile(file,\"rw\");\n \toStream.skipBytes(offSet);\n \toStream.write(byteArray);\n }", "public void addTasks(TaskManager taskManager) throws IOException {\n FileWriter fileWriter = new FileWriter(filePath);\n List<Task> listOfTasks = taskManager.getListOfTasks();\n for (int i = 0; i < listOfTasks.size(); i++) {\n String line = listOfTasks.get(i).formatLine();\n fileWriter.write(line);\n }\n fileWriter.close();\n }", "@Test\n\tpublic void test04_CreateNewPageUsingExistingTemplate() {\n\t\tinfo(\"Test 4: Create new page using existing template\");\n\t\tString template1 = wTempData.getWikiTemplate(0);\n\t\tString title1 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template1);\n\t\tString template2 = wTempData.getWikiTemplate(1);\n\t\tString title2 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template2);\n\t\tString template3 = wTempData.getWikiTemplate(2);\n\t\tString title3 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template3);\n\t\tString template4 = wTempData.getWikiTemplate(3);\n\t\tString title4 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template4);\n\t\tString template5 = wTempData.getWikiTemplate(4);\n\t\tString title5 = txData.getContentByArrayTypeRandom(1)+getRandomNumber();\n\t\tSystem.out.println(template5);\n\t\t\n\t\t/*Step Number: 1\n\t\t*Step Name: Step 1: Open form to create new page\n\t\t*Step Description: \n\t\t\t- Choose path to add new page\n\t\t\t- Click [Add Page] --> [From Template...]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\t- By default, the [Create Wiki page] is displayed in the [Rich Text] mode */\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t \n\t /*Step Number: 2\n\t\t*Step Name: Step 2: Create new page with Two Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Two Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with two column layout*/\n\t\twikiMg.addSimpleWikiPageByTemplate(template1,title1);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title1);\n\t\tarrayPage.add(title1);\n\t \n\t\t /*Step Number: 3\n\t\t*Step Name: Step 3: Create new page with Three Column layout\n\t\t*Step Description: \n\t\t\t- Choose template [Three Column layout] in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with three column layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template2,title2);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title2);\n\t\tarrayPage.add(title2);\n\t\t\n\t\t /*Step Number: 4\n\t\t*Step Name: Step 4: Create new page with Status Meeting layout\n\t\t*Step Description: \n\t\t\t- Choose template \"Status Meeting\" in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like.\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Status Meeting layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template3,title3);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title3);\n\t\tarrayPage.add(title3);\n\t\t\n\t\t /*Step Number: 5\n\t\t*Step Name: Step 5: Create new page with HOW-TO Guide layout\n\t\t*Step Description: \n\t\t\t- Choose template [HOW-TO Guide] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with HOW-TO Guide layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template4,title4);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title4);\n\t\tarrayPage.add(title4);\n\t\t\n\t\t/*Step Number: 6\n\t\t*Step Name: Step 6: Create new page with Leave Planning layout\n\t\t*Step Description: \n\t\t\t- Choose template [Leave Planning] layout in list and click [Select]\n\t\t\t- Click [Preview] if you want to see how your page looks like\n\t\t\t- Select [Source Editor] to switch to [Source Editor] mode\n\t\t\t- Put the title for this page\n\t\t\t- Put the content of page\n\t\t\t- Click [Save]\n\t\t*Input Data: \n\t\t\t\n\t\t*Expected Outcome: \n\t\t\tNew page is created successfully with Leave Planning layout*/\n\t\thp.goToWiki();\n\t\twHome.goToAddTemplateWikiPage();\n\t\twikiMg.addSimpleWikiPageByTemplate(template5,title5);\n\t\tUtils.pause(2000);\n\t\tinfo(\"Page is add/edited successfully\");\n\t\twValidate.verifyTitleWikiPage(title5);\n\t\tarrayPage.add(title5);\n \t}", "interface WriteExecutor<R> {\n /**\n * Execute previously defined operation\n */\n R execute();\n }", "private Integer saveTask(Integer taskid,String taskname,String tasktype,String taskcontent,\r\n\t\t\tString taskcomment){\n\t\treturn 1;\r\n\t}", "@Override\n\t\t\t\tprotected void apply(List<Entry<WyilFile>> matches, Collection<Task> tasks) throws IOException {\n\t\t\t\t\tJavaScriptCompileTask task = new JavaScriptCompileTask(project, binary, matches.get(0));\n\t\t\t\t\ttask.setDebug(debug);\n\t\t\t\t\ttask.setIncludes(jsIncludes);\n\t\t\t\t\ttasks.add(task);\n\t\t\t\t}", "public void submitTask(WikiTask<?> task) {\n\n\t\t// get thread pool\n\t\tServletContext context = VaadinServlet.getCurrent().getServletContext();\n\t\tExecutorService threadPool = (ExecutorService) context.getAttribute(\"threadPool\");\n\n\t\t// submit task\n\t\tthreadPool.submit(task);\n\t}", "public void runExstream () throws IOException, InterruptedException {\n\t\tnew File(path).mkdir();\n\t\t\n\t\t// create control file\n\t\tControlFile controlFile = createControlFile();\n\t\tcontrolFile.writeControlFile(path + request.getTemplate() + \".control\");\n\t\t\n\t\t// write data file\n\t\tInputStream is = this.getClass().getResourceAsStream(\"/TPS/TPS_SPRDR1.xml\");\n\t\tString content = IOUtils.toString(is);\n\t\tcontent = content.replace(\"{INSERT GUID}\", request.getGuid());\n\t\t\n\t\tStringReader sr = new StringReader(content);\n\t\tOutputStream os = new FileOutputStream(new File(path + templateXml));\n\t\t\n\t\tIOUtils.copy(sr, os);\n\t\t\n\t\t// run exstream\n\t\tRuntime runtime = Runtime.getRuntime();\n\t\tProcess process = null;\n\t\t\n\t\tprocess = runtime.exec(command);\n\t\t\n\t\tint exitCode = process.waitFor();\n\t\t\n\t\t\n\t\t\n\t}", "FileContent createFileContent();", "CompletableFuture<WriteResponse> submit();", "public void savePageAsync(final ImagePageInfo info) {\n Realm r = Realm.getDefaultInstance();\n try {\n r.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n RealmResults<ImagePageInfo> all = realm.where(ImagePageInfo.class)\n .findAll();\n if(!all.contains(info)) {\n realm.copyToRealmOrUpdate(info);\n }\n }\n }, new Realm.Transaction.OnSuccess() {\n @Override\n public void onSuccess() {\n Log.v(TAG,\"savePageAsync(): success\");\n //cannot access from this thread\n //trimData();\n }\n }, new Realm.Transaction.OnError() {\n @Override\n public void onError(Throwable error) {\n Log.v(TAG, \"onError()\" + error);\n //write(info);\n }\n });\n }finally {\n r.close();\n }\n }", "public void generateAndwriteToFile() {\n List<GeneratedJavaFile> gjfs = generate();\n if (gjfs == null || gjfs.size() == 0) {\n return;\n }\n for (GeneratedJavaFile gjf : gjfs) {\n writeToFile(gjf);\n }\n }", "public void saveTask (View view) {\n \t\n \tTask task = gatherTaskInfo();\n \t//calls to crowd sourcer only if a task is returned\n \tif(task != null) {\n \t\tnew saveTask().execute(task);\t\t\n \t} \t\n }", "void writeItem(String outDir, List<T> items);", "abstract void execute(TaskList tasks, Ui ui, Storage storage) throws IOException;", "public void save() throws IOException {\n File f = new File(\"data/pages/\" + pageName + \".class\");\n if (!f.exists()) {\n if (!f.getParentFile().exists()) {\n if (f.getParentFile().mkdirs()) {\n f.createNewFile();\n }\n }\n }\n FileOutputStream fos = new FileOutputStream(f);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.flush();\n oos.close();\n }", "private static void writeFile(String name, Trajectory t) {\n\t\ttry {\n\t\t\tFile directory = new File(cacheDirectory);\n\t\t\tif (!directory.exists()) {\n\t\t\t\tconsole.log(\"missing dir, making\");\n\t\t\t\tdirectory.mkdir();\n\t\t\t}\n\t\t\t\n\t\t\tFileOutputStream fos = new FileOutputStream(cacheDirectory + name);\n\t\t ObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\t oos.writeObject(t);\n\t\t oos.close();\n\t\t fos.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tconsole.error(e);\n\t\t}\n\t}", "public void save(List<Task> list) throws IOException {\n FileWriter writer = new FileWriter(file);\n StringBuilder output = new StringBuilder();\n for (Task t : list) {\n output.append(formatTask(t));\n output.append(\"\\n\");\n }\n writer.write(output.toString());\n writer.close();\n }", "public void writeTemplateContent() throws IOException {\n\t\tFile templateFile = generateTemplateFile(templateFilename);\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(templateFile, false), \"UTF-8\"));\n\t\tbw.write(\"<!DOCTYPE html>\\n<html><head></head><body><p></p>\");\n\t\tfor (String s : contentList) {\n\t\t\tbw.write(s);\n\t\t}\n\t\tbw.write(\"</body></html>\");\n\t\tbw.close();\n\t\tJsoup.parse(templateFile, \"UTF-8\");\n\t}", "public void execute() throws MojoExecutionException {\n CodeGeneratorLoggerFactory.setLogger(getLog());\n\n // iff baseFolder is null or empty, reset it to the default value\n baseFolder = StringUtils.defaultIfEmpty(baseFolder, \"GUIData\");\n\n // create the helper with our config\n CodeGeneratorHelper helper = new CodeGeneratorHelper(toCodeGeneratorConfig());\n\n if (CodeGeneratorLoggerFactory.getLogger().isDebugEnabled()) {\n helper.displayProjectInformation();\n }\n\n // register all custom element classes\n helper.registerCustomElements();\n\n // create the generated page details file\n helper.createSeLionPageDetailsFile();\n\n // process the files.\n helper.processFiles();\n }", "public static void createOrOpenTasksFile() {\n try {\r\n File tasksFile = new File(\"tasks.txt\");\r\n if (tasksFile.createNewFile()) {\r\n System.out.println(\"\\nFiles \" + tasksFile.getName() + \" has been created.\");\r\n } else {\r\n System.out.println(\"\\nFile \" + tasksFile.getName() + \" is ready.\");\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public String createTask(String name, String[] taskTypeNames, HashMap inputParameter,\n HashMap outputParameter, String title, String subject, String description, String priority) {\n ITaskInstance task = null;\n JSONObject response = new JSONObject();\n // Check if taskType is there\n if (taskTypeNames == null) {\n return \"taskType\";\n }\n // Create taskInstance\n try {\n task = dataAccessTosca.createTask(name, title, subject, description, priority, taskTypeNames);\n if (task == null) {\n return \"taken\";\n }\n response.put(\"id\", task.getId());\n\n // map task to task type\n /* for (int i = 0; i < taskTypeNames.length; i++) {\n dataAccessTosca.addTaskToTaskType(task.getId(), taskTypeNames[i]);\n }*/\n // insert inputParameters, if not null\n if (inputParameter != null) {\n Set<String> entries = inputParameter.keySet();\n for (String entry: entries) {\n boolean insert = false;\n try {\n insert = dataAccessTosca.createInputParameter(entry, (String) inputParameter.get(entry), task.getId());\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n if (!insert) {\n return null;\n }\n }\n }\n // insert outputParameters, if not null\n if (outputParameter != null) {\n Set<String> entries = outputParameter.keySet();\n for (String entry: entries) {\n boolean insert = false;\n try {\n insert = dataAccessTosca.createOutputParameter(entry, (String) outputParameter.get(entry), task.getId());\n } catch (DatabaseException e) {\n e.printStackTrace();\n }\n if (!insert) {\n return null;\n }\n }\n }\n } catch (DatabaseException e) {\n e.printStackTrace();\n\n\n }\n\n return response.toString();\n }", "@Test\n void fileWriter() {\n\n\n ArrayList<String> fileLines = Name_Sorter.fileRead(this.readFile, \"src/main/java/oop/assignment3/ex41/base/testFile-ex41\");\n Collections.sort(fileLines);\n this.writeFile = Name_Sorter.fileWriter(this.writeFile, fileLines, \"src/main/java/oop/assignment3/ex41/base/ex41-testOutputFile.txt\");\n boolean actualOutput = this.writeFile != null;\n Assertions.assertTrue(actualOutput);\n }" ]
[ "0.62398756", "0.5917099", "0.5793045", "0.5692722", "0.564747", "0.56466156", "0.56310624", "0.55595136", "0.554829", "0.5538737", "0.55257577", "0.54878145", "0.5481212", "0.5464842", "0.54456043", "0.5429764", "0.5393958", "0.538875", "0.5360618", "0.5337066", "0.52925617", "0.5260584", "0.52429634", "0.5229185", "0.5216223", "0.51895165", "0.5152674", "0.5134335", "0.51009125", "0.5067171", "0.5039", "0.5035938", "0.50191593", "0.5017718", "0.50145245", "0.5010862", "0.49803308", "0.49518192", "0.4943254", "0.49080497", "0.49059796", "0.48986468", "0.48986468", "0.48986468", "0.48774627", "0.48772904", "0.487642", "0.48741406", "0.48683527", "0.48671132", "0.4860055", "0.48474982", "0.48317567", "0.48307565", "0.48154885", "0.48089427", "0.48069564", "0.4794733", "0.4783183", "0.47809818", "0.4779475", "0.47772294", "0.47723177", "0.47589296", "0.4756109", "0.47556543", "0.47432077", "0.47322804", "0.47322133", "0.47256628", "0.4713323", "0.47105834", "0.4692734", "0.46914926", "0.4687689", "0.46804467", "0.46740082", "0.466971", "0.46649292", "0.46646625", "0.46624073", "0.46477458", "0.46408403", "0.46357328", "0.46355668", "0.46328664", "0.46282423", "0.4626588", "0.46193254", "0.46030536", "0.46014935", "0.45879897", "0.4584675", "0.4582491", "0.45786196", "0.45782444", "0.456626", "0.45637423", "0.45635155", "0.45552015" ]
0.5450047
14
Changing checkpoint state if order of state is correct.
public void state(@NotNull State newState) { State state = this.state.get(); if (state.ordinal() < newState.ordinal()) this.state.compareAndSet(state, newState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void checkpoint(S state) {\n checkpoint();\n state(state);\n }", "public void checkpointStateChanged(final CheckpointState newCheckpointState) {\n \t\tthis.taskManager.checkpointStateChanged(this.environment.getJobID(), this.vertexID, newCheckpointState);\n \t}", "protected void checkpoint() {\n checkpoint = internalBuffer().readerIndex();\n }", "void checkpoint() throws IOException;", "public void flushCheckpoint(long checkpoint)\r\n/* 124: */ {\r\n/* 125:155 */ this.checkpoint = checkpoint;\r\n/* 126: */ }", "static synchronized void makeNewCheckpoint() {\n HashMap<String, String> newCheckpoint = new HashMap<>(localState);\n checkpoints.put(Thread.currentThread(), newCheckpoint);\n }", "synchronized void updateCheckpointOnReplica(final long checkpoint) {\n /*\n * The global checkpoint here is a local knowledge which is updated under the mandate of the primary. It can happen that the primary\n * information is lagging compared to a replica (e.g., if a replica is promoted to primary but has stale info relative to other\n * replica shards). In these cases, the local knowledge of the global checkpoint could be higher than sync from the lagging primary.\n */\n if (this.globalCheckpoint <= checkpoint) {\n this.globalCheckpoint = checkpoint;\n logger.trace(\"global checkpoint updated from primary to [{}]\", checkpoint);\n }\n }", "void checkpoint(Node node) throws RepositoryException;", "@Override public void onStateRestored(AffinityTopologyVersion topVer) throws IgniteCheckedException {\n IgniteThread cpThread = new IgniteThread(cctx.igniteInstanceName(), \"db-checkpoint-thread\", checkpointer);\n\n cpThread.start();\n\n checkpointerThread = cpThread;\n\n CheckpointProgressSnapshot chp = checkpointer.wakeupForCheckpoint(0, \"node started\");\n\n if (chp != null)\n chp.cpBeginFut.get();\n }", "public long flushCheckpoint()\r\n/* 119: */ {\r\n/* 120:150 */ return this.checkpoint;\r\n/* 121: */ }", "private void changeState() {\n if (jobs.contains(this.currentFloor)){\n throw new AssertionError(\"Changing state of elevator no \" + ElevatorID + \" on destination floor\");\n }\n\n // empty job set -> going to IDLE state\n if (jobs.size() == 0) {\n this.currentState = IDLE;\n return;\n }\n\n Integer closestFloorDownwards = jobs.floor(this.currentFloor);\n Integer closestFloorUpwards = jobs.ceiling(this.currentFloor);\n\n switch (this.currentState) {\n // if elevator is in idle state then we need to go to the closest job possible\n case IDLE -> {\n Integer closestFloor =\n findClosestFloor(this.currentFloor, closestFloorUpwards, closestFloorDownwards);\n\n if (closestFloor < this.currentFloor) {\n this.currentState = DOWN;\n } else {\n this.currentState = UP;\n }\n }\n case DOWN -> {\n if (closestFloorDownwards != null) { // if there exists a predecessor in `jobs`\n this.currentState = DOWN; // let's continue going down\n } else {\n this.currentState = UP; // otherwise we need to go up\n }\n }\n case UP -> {\n if (closestFloorUpwards != null) { // if there exists a successor in `jobs`\n this.currentState = UP; // let's continue going up\n } else {\n this.currentState = DOWN; // otherwise we need to go down\n }\n }\n }\n }", "@Override\n\tpublic void setCheckpoint(java.util.Date checkpoint) {\n\t\t_userSync.setCheckpoint(checkpoint);\n\t}", "@Test\n public void testUpdateCheckpoint() throws Exception {\n TestHarnessBuilder builder = new TestHarnessBuilder();\n builder.withLease(leaseKey, null).build();\n\n // Run the taker and renewer in-between getting the Lease object and calling checkpoint\n coordinator.runLeaseTaker();\n coordinator.runLeaseRenewer();\n\n Lease lease = coordinator.getCurrentlyHeldLease(leaseKey);\n if (lease == null) {\n List<Lease> leases = leaseRefresher.listLeases();\n for (Lease kinesisClientLease : leases) {\n System.out.println(kinesisClientLease);\n }\n }\n\n assertNotNull(lease);\n final ExtendedSequenceNumber initialCheckpoint = new ExtendedSequenceNumber(\"initialCheckpoint\");\n final ExtendedSequenceNumber pendingCheckpoint = new ExtendedSequenceNumber(\"pendingCheckpoint\");\n final ExtendedSequenceNumber newCheckpoint = new ExtendedSequenceNumber(\"newCheckpoint\");\n final byte[] checkpointState = \"checkpointState\".getBytes();\n\n // lease's leaseCounter is wrong at this point, but it shouldn't matter.\n assertTrue(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), initialCheckpoint, lease.concurrencyToken()));\n\n final Lease leaseFromDDBAtInitialCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(initialCheckpoint);\n lease.leaseOwner(coordinator.workerIdentifier());\n assertEquals(lease, leaseFromDDBAtInitialCheckpoint);\n\n dynamoDBCheckpointer.prepareCheckpoint(lease.leaseKey(), pendingCheckpoint, lease.concurrencyToken().toString(), checkpointState);\n\n final Lease leaseFromDDBAtPendingCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(initialCheckpoint);\n lease.pendingCheckpoint(pendingCheckpoint);\n lease.pendingCheckpointState(checkpointState);\n assertEquals(lease, leaseFromDDBAtPendingCheckpoint);\n\n assertTrue(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), newCheckpoint, lease.concurrencyToken()));\n\n final Lease leaseFromDDBAtNewCheckpoint = leaseRefresher.getLease(lease.leaseKey());\n lease.leaseCounter(lease.leaseCounter() + 1);\n lease.checkpoint(newCheckpoint);\n lease.pendingCheckpoint(null);\n lease.pendingCheckpointState(null);\n assertEquals(lease, leaseFromDDBAtNewCheckpoint);\n }", "@Override\n\tpublic void adjust() {\n\t\tstate = !state;\n\t}", "public void changeState()\r\n\t{\r\n\t\tfailedNumber=0;\r\n\t\tif(state.equalsIgnoreCase(\"IN PREPARATION\"))\r\n\t\t\tsetState(\"IN TRANSIT\");\r\n\t\telse if(state.equalsIgnoreCase(\"IN TRANSIT\"))\r\n\t\t{\r\n\t\t\tfailedNumber=Math.random();\r\n\t\t\tif(failedNumber<=0.2) setState(\"FAILED\");\r\n\t\t\telse setState(\"RECEIVED\");\r\n\t\t}\r\n\t}", "public void changeState() {\n if (!isDead) {\n Bitmap temp = getBitmap();\n setBitmap(stateBitmap);\n stateBitmap = temp;\n }\n }", "private void updateState() {\n\t while(!isGoodState()) {\n\t\t updateStateOnce();\n\t }\n }", "public boolean doCheckpoint() {\n CountDownLatch latch = null;\n boolean fullCheckpoint;\n synchronized(this) { \n latch = nextCheckpointCountDownLatch;\n nextCheckpointCountDownLatch = new CountDownLatch(1);\n fullCheckpoint = this.fullCheckPoint;\n this.fullCheckPoint=false; \n } \n try {\n \n log.debug(\"Checkpoint started.\");\n RecordLocation newMark = null;\n \n ArrayList futureTasks = new ArrayList(queues.size()+topics.size());\n \n //\n // We do many partial checkpoints (fullCheckpoint==false) to move topic messages\n // to long term store as soon as possible. \n // \n // We want to avoid doing that for queue messages since removes the come in the same\n // checkpoint cycle will nullify the previous message add. Therefore, we only\n // checkpoint queues on the fullCheckpoint cycles.\n //\n if( fullCheckpoint ) { \n Iterator iterator = queues.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalMessageStore ms = (JournalMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n }\n \n Iterator iterator = topics.values().iterator();\n while (iterator.hasNext()) {\n try {\n final JournalTopicMessageStore ms = (JournalTopicMessageStore) iterator.next();\n FutureTask task = new FutureTask(new Callable() {\n public Object call() throws Exception {\n return ms.checkpoint();\n }});\n futureTasks.add(task);\n checkpointExecutor.execute(task); \n }\n catch (Exception e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n }\n \n try {\n for (Iterator iter = futureTasks.iterator(); iter.hasNext();) {\n FutureTask ft = (FutureTask) iter.next();\n RecordLocation mark = (RecordLocation) ft.get();\n // We only set a newMark on full checkpoints.\n if( fullCheckpoint ) {\n if (mark != null && (newMark == null || newMark.compareTo(mark) < 0)) {\n newMark = mark;\n }\n }\n }\n } catch (Throwable e) {\n log.error(\"Failed to checkpoint a message store: \" + e, e);\n }\n \n \n if( fullCheckpoint ) {\n try {\n if (newMark != null) {\n log.debug(\"Marking journal at: \" + newMark);\n journal.setMark(newMark, true);\n }\n }\n catch (Exception e) {\n log.error(\"Failed to mark the Journal: \" + e, e);\n }\n \n if (longTermPersistence instanceof JDBCPersistenceAdapter) {\n // We may be check pointing more often than the checkpointInterval if under high use\n // But we don't want to clean up the db that often.\n long now = System.currentTimeMillis();\n if( now > lastCleanup+checkpointInterval ) {\n lastCleanup = now;\n ((JDBCPersistenceAdapter) longTermPersistence).cleanup();\n }\n }\n }\n \n log.debug(\"Checkpoint done.\");\n }\n finally {\n latch.countDown();\n }\n synchronized(this) {\n return this.fullCheckPoint;\n } \n \n }", "@Override\r\n\tpublic void setState(final SubcherryTreeNode.Check state) {\n\t\tif(Check.GRAYED == state) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// propagate the new state to all changes\r\n\t\tfor(final SubcherryTreeRevisionNode change : getChanges()) {\r\n\t\t\tchange.setState(state);\r\n\t\t}\r\n\t}", "@Override\n public void undo()\n {\n story.setEstimate(oldEstimate);\n\n if (ready) {\n story.setReadinessToReady();\n }\n }", "public synchronized void writeCheckpoint() {\n\t\tflush();\n\t\tpw.println(\"CHECKPOINT \" \n\t\t\t\t\t+ TransactionManager.instance().transactionList());\n\t\tflush();\n\t}", "public void onRestorePendingState() {\n }", "public void storeState() {\n if (best == null || best.getCost() > path.getCost()) {\n best = new IterativeState(path);\n }\n }", "synchronized void revertState()\n {\n state = state.revert();\n notifyAll();\n }", "public void save(){\n checkpoint = chapter;\n }", "private void backupState(BPState curState) {\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t}", "public boolean checkpoint() {\n\t\ttry {\n\t\t\toutputStream.flush();\n\t\t} catch (IOException e) {\n\t\t\tif (RTS_COMMON.Option.VERBOSE)\n\t\t\t\te.printStackTrace();\n\t\t\treturn (false);\n\t\t}\n\t\treturn (true);\n\t}", "synchronized void advanceState()\n {\n state = state.advance();\n notifyAll();\n }", "@Override\n protected void incrementStates() {\n\n }", "public void checkpoint(boolean hasUncommittedData) throws SQLException;", "public void applyNewState() {\n this.setAlive(this.newState);\n }", "private void saveState() {\n // Increase capacity if necessary\n if (nSaved == savedC.length) {\n Object tmp;\n tmp = savedC;\n savedC = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedC,0,nSaved);\n tmp = savedCT;\n savedCT = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedCT,0,nSaved);\n tmp = savedA;\n savedA = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedA,0,nSaved);\n tmp = savedB;\n savedB = new int[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedB,0,nSaved);\n tmp = savedDelFF;\n savedDelFF = new boolean[nSaved+SAVED_INC];\n System.arraycopy(tmp,0,savedDelFF,0,nSaved);\n }\n // Save the current sate\n savedC[nSaved] = c;\n savedCT[nSaved] = cT;\n savedA[nSaved] = a;\n savedB[nSaved] = b;\n savedDelFF[nSaved] = delFF;\n nSaved++;\n }", "public void setState(DiagramModel state) {\r\n for (Element e : state) {\r\n savedState_.add(0, e.makeCopy());\r\n }\r\n }", "void changeState(Spreadable spreadable, State from, State to, int count);", "public void changeState(int transition) {\n lastState = currentState;\n currentState = nextState[currentState][transition];\n // System.out.println(\" = \" + currentState);\n if (currentState == -2) {\n System.out.println(\"Error [\" + currentState + \"] has occured\");\n terminate();\n }\n else if (currentState == -1) {\n terminate();\n }\n states[currentState].run();\n }", "public void saveState() {\n\t\tsuper.saveState();\n\t}", "public void transitionStates () {\n myCurrentState = myNextState;\n myNextState = null;\n }", "public void chg() {\n currentChangeStep = 3;\n }", "public void checkpoint(boolean sync, boolean fullCheckpoint) {\n try {\n if (journal == null )\n throw new IllegalStateException(\"Journal is closed.\");\n \n long now = System.currentTimeMillis();\n CountDownLatch latch = null;\n synchronized(this) {\n latch = nextCheckpointCountDownLatch;\n lastCheckpointRequest = now;\n if( fullCheckpoint ) {\n this.fullCheckPoint = true; \n }\n }\n \n checkpointTask.wakeup();\n \n if (sync) {\n log.debug(\"Waking for checkpoint to complete.\");\n latch.await();\n }\n }\n catch (InterruptedException e) {\n log.warn(\"Request to start checkpoint failed: \" + e, e);\n }\n }", "private void setNewStatusIfNeeded() {\n \t\tfor(FileDiffDirectory dir : directories ) {\n \t\t\tif (dir.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tfor(FileDiffFile file : files ) {\n \t\t\tif (file.getState() != DiffState.SAME) {\n \t\t\t\tsetState(DiffState.CHANGED);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t}", "public void changeState() {\r\n if(state == KioskState.CLOSED) {\r\n state = KioskState.OPEN;\r\n } else {\r\n state = KioskState.CLOSED;\r\n }\r\n }", "public abstract Op resetStates();", "private boolean transitionRunStateTo(int state) {\n for (;;) {\n int s = runState;\n if (s >= state)\n return false;\n if (_unsafe.compareAndSwapInt(this, runStateOffset, s, state))\n return true;\n }\n }", "public void doPreSaveActions() {\n\t\tcalculateBlockedPartitions();\n\t}", "public void saveState() { }", "private void computeExternalState(InternalState newState) {\n if (internalState != newState) {\n switch (internalState) {\n case BUILD:\n Preconditions.checkState(newState == InternalState.PROBE_IN || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_IN:\n Preconditions.checkState(newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.REPLAY ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROBE_OUT:\n case PROBE_PIVOT_AND_OUT:\n Preconditions.checkState(newState == InternalState.PROBE_IN ||\n newState == InternalState.PROBE_OUT ||\n newState == InternalState.PROBE_PIVOT_AND_OUT ||\n newState == InternalState.PROJECT_NON_MATCHES ||\n newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case PROJECT_NON_MATCHES:\n Preconditions.checkState(newState == InternalState.REPLAY || newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n\n case REPLAY:\n Preconditions.checkState(newState == InternalState.DONE,\n \"unexpected transition from state \" + internalState + \" to new state \" + newState);\n break;\n }\n internalState = newState;\n }\n computeExternalState();\n }", "public void saveState() \n\t{\n\t\tsuper.saveState();\n\t}", "private void backupState(BPState curState, FileProcess fileState) {\n\n\t\tprogram.generageCFG(\"/asm/cfg/\" + program.getFileName() + \"_test\");\n\t\tprogram.getResultFileTemp().appendInLine(\n\t\t\t\tprogram.getDetailTechnique() + \" Nodes:\" + program.getBPCFG().getVertexCount() + \" Edges:\"\n\t\t\t\t\t\t+ program.getBPCFG().getEdgeCount() + \" \");\n\t\t//System.out.println();\n\t}", "public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "protected void assertBackToState() {\n\t\tassertTrue(recorder.recorded(EC.TLC_BACK_TO_STATE));\n\t\tfinal List<Object> loop = recorder.getRecords(EC.TLC_BACK_TO_STATE);\n\t\tassertTrue(loop.size() > 0);\n\t}", "public void setState(State state) { model.setState(state); }", "@Test\n public void testActiveApexIsRevertedOnCheckpointRollback_Commit() throws Exception {\n int sessionId = retrieveLastSessionId();\n assertSessionApplied(sessionId);\n assertThat(InstallUtils.getInstalledVersion(SHIM_APEX_PACKAGE_NAME)).isEqualTo(2);\n // Commit a new staged session\n sessionId = Install.single(TestApp.Apex3).setStaged().commit();\n assertSessionReady(sessionId);\n storeSessionId(sessionId);\n }", "public void setStateToActive() {\n state = VALID_STATES[0];\n }", "public void stateChanged() {\r\n if (nextBigStepButton != null) {\r\n nextBigStepButton.setEnabled(!automata.isAtEnd());\r\n }\r\n if (prevBigStepButton != null) {\r\n prevBigStepButton.setEnabled(!automata.isAtStart());\r\n }\r\n\r\n nextStepButton.setEnabled(!automata.isAtEnd());\r\n prevStepButton.setEnabled(!automata.isAtStart());\r\n restartButton.setEnabled(!automata.isAtStart());\r\n\r\n autoButton.setState(controller.getExecutionMode());\r\n autoButton.setEnabled(!automata.isAtEnd());\r\n }", "private void checkStateChange() {\n\t\tif(previousState == null){\n\t\t\tpreviousState = getOrientation();\n\t\t}\n\t\telse{\n\t\t\tif(previousState != getOrientation()){\n\t\t\t\tif(isTurningLeft){\n\t\t\t\t\tisTurningLeft = false;\n\t\t\t\t}\n\t\t\t\tif(isTurningRight){\n\t\t\t\t\tisTurningRight = false;\n\t\t\t\t}\n\t\t\t\tpreviousState = getOrientation();\n\t\t\t}\n\t\t}\n\t}", "private void restoreToCheckpoint(Parameters checkpoint) {\n assert geometricParts.diskShardCount() == 0 : \"Restore to Checkpoint should only be called at startup!\";\n\n this.lastAddedDocumentIdentifier = checkpoint.getString(\"lastDoc/identifier\");\n this.lastAddedDocumentNumber = (int) checkpoint.getLong(\"lastDoc/number\");\n this.indexBlockCount = (int) checkpoint.getLong(\"indexBlockCount\");\n Parameters shards = checkpoint.getMap(\"shards\");\n for (String indexPath : shards.getKeys()) {\n this.geometricParts.add((int) shards.getLong(indexPath), indexPath);\n }\n }", "@Override\n\tpublic void setState(State state) \n\t\t{ current = new PuzzleState(state.getString(state.getState()),\n\t\t\t\t\t\t\t\t\tstate.getString(state.getGoalState())); \n\t\t}", "@Test\n public void testStateTransitions3()\n {\n //Undo from starting state\n boolean assertionFailed = false;\n try\n {\n theEngine.undoLastMove();\n }\n catch (AssertionError ae)\n {\n assertionFailed = true;\n }\n \n assertTrue(assertionFailed);\n \n //Undo from playing state\n theEngine.start();\n try\n {\n theEngine.undoLastMove();\n }\n catch (AssertionError ae)\n {\n assertionFailed = true;\n }\n \n //Undo from halted state\n theEngine.quit();\n movePlayerToCell(getEmptyCell());\n theEngine.undoLastMove();\n //didn't throw assertion error, so fine\n assertTrue(theEngine.invariant());\n assertTrue(theEngine.inHaltedState());\n }", "@Override\n\tpublic void setAutomataChanges() {\n\t\tautomata.transformShapeToState(shapes);\n\t\tautomata.verifyAutomata();\n\t}", "protected abstract boolean swapPointCheck(final TreeStructure tree, final Point current, final Point pending);", "abstract public void updateState();", "@Test\n public void testUpdateCheckpointLeaseUpdated() throws LeasingException {\n TestHarnessBuilder builder = new TestHarnessBuilder();\n builder.withLease(leaseKey, null).build();\n\n coordinator.runLeaseTaker();\n coordinator.runLeaseRenewer();\n Lease lease = coordinator.getCurrentlyHeldLease(leaseKey);\n\n assertNotNull(lease);\n leaseRefresher.renewLease(coordinator.getCurrentlyHeldLease(leaseKey));\n\n ExtendedSequenceNumber newCheckpoint = new ExtendedSequenceNumber(\"newCheckpoint\");\n assertFalse(dynamoDBCheckpointer.setCheckpoint(lease.leaseKey(), newCheckpoint, lease.concurrencyToken()));\n\n Lease fromDynamo = leaseRefresher.getLease(lease.leaseKey());\n\n lease.leaseCounter(lease.leaseCounter() + 1);\n // Counter and owner changed, but checkpoint did not.\n lease.leaseOwner(coordinator.workerIdentifier());\n assertEquals(lease, fromDynamo);\n }", "protected abstract int newState();", "void beforeState();", "public boolean updateState( Integer state)\n {\n //some result checking...\n //set last update time\n time = NTPDate.currentTimeMillis();\n int prevState = nState;\n //get state as int\n nState = state.intValue();\n return (prevState!=nState);\n }", "public void updateNewState() {\n Integer aliveCount = 0;\n for (final Cell neighbor : this.neighbors) {\n if (neighbor.isAlive()) {\n aliveCount++;\n }\n }\n\n if (aliveCount < 2) {\n this.setNewState(false);\n } else if (!this.isAlive() && aliveCount == 3) {\n this.setNewState(true);\n } else if (aliveCount > 3) {\n this.setNewState(false);\n }\n }", "void changed(State state, Exception e);", "public synchronized void updateLocalCheckpoint(final String allocationId, final long checkpoint) {\n final int indexOfKey = inSyncLocalCheckpoints.indexOf(allocationId);\n if (indexOfKey >= 0) {\n final long current = inSyncLocalCheckpoints.indexGet(indexOfKey);\n if (current < checkpoint) {\n inSyncLocalCheckpoints.indexReplace(indexOfKey, checkpoint);\n if (logger.isTraceEnabled()) {\n logger.trace(\"updated local checkpoint of [{}] to [{}] (was [{}])\", allocationId, checkpoint, current);\n }\n } else {\n logger.trace(\n \"skipping update of local checkpoint [{}], current checkpoint is higher (current [{}], incoming [{}], type [{}])\",\n allocationId,\n current,\n checkpoint,\n allocationId);\n }\n } else {\n logger.trace(\"[{}] isn't marked as in sync. ignoring local checkpoint of [{}].\", allocationId, checkpoint);\n }\n }", "@Test\n @DisplayName(\"State sees changes committed to backend if not modified on the state\")\n void dirtyRead() {\n backingStore.set(CHAD);\n final var state = createState();\n assertThat(state.get()).isEqualTo(CHAD);\n backingStore.set(DENMARK);\n assertThat(state.get()).isEqualTo(DENMARK); // Sees change\n state.put(ESTONIA);\n assertThat(state.get()).isEqualTo(ESTONIA);\n backingStore.set(FRANCE);\n assertThat(state.get()).isEqualTo(ESTONIA); // Does not see change\n }", "@Override\r\n\tpublic void resume() {\n\t\tcurrentState.resume();\r\n\t}", "public void setCameFrom(State n)\r\n\t{\r\n\t\tthis.previousState = new State(n);\r\n\t}", "@Override\n\tpublic void changeStateTo(String complainId, String state) throws Exception {\n\t\tIBOOrderComplainsValue ivalue = getOrderComplainsById(complainId);\n\t\tivalue.setState(state);\n\t\tBOOrderComplainsEngine.save(ivalue);\n\t}", "public void resetState() {\n \ts = State.STRAIGHT;\n }", "private SavedState(Parcel parcel) {\n super(parcel);\n boolean bl2 = parcel.readInt() != 0;\n this.isOpen = bl2;\n }", "@Test\n //checks for state switching (on/off)\n void SwitchStates() {\n Assertions.assertFalse(machine.isTurnedOn());\n\n //then, switch on and check if on\n machine.setTurnedOn(true);\n Assertions.assertTrue(machine.isTurnedOn());\n\n //switch off to see if turned off correctly\n machine.setTurnedOn(false);\n Assertions.assertFalse(machine.isTurnedOn());\n\n //and now check the inversion\n machine.flipSwitch();\n\n Assertions.assertTrue(machine.isTurnedOn());\n }", "public void setState (int new_state, int force) {\n\t\t\tLog.d (\"STATE\", \"New state : \" + new_state);\n\t\t\tif (new_state >= BotMove.RIGHT_15 && new_state <= BotMove.LEFT_5){\n\t\t\t\tstate = new_state;\n\t\t\t\ttakeInterruptAction();\n\t\t\t}\n\t\t\telse if(state != new_state || force == 1){\n\t\t\t\tstate = new_state;\n\t\t\t\ttakeInterruptAction();\n\t\t\t}\n\t\t\telse wt.take_reading = true;\n\t\t}", "@Override\n\tpublic void stateCheck() {\n\t\tif(balance<0 && balance>=-1000)\n\t\t{\n\t\t\tacc.setState(new YellowState(this));\n\t\t}\n\t\telse if(balance<-1000)\n\t\t{\n\t\t\tacc.setState(new RedState(this));\n\t\t}\n\t}", "@PreDestroy\n public void saveStates() {\n if(getShopId() != 0) {\n log.info(\"Interrupt matching for shop {} during phase {} at {} \", getShopId(), getPhase(), new Date());\n getRemainingStates().add(new State(getShopId(), getPhase(), getPictureIds()));\n }\n getMatcherStateRepository().saveAllStates(getRemainingStates());\n }", "private void updateState(ExecutionEntity entity, TaskState state) {\r\n\t\tupdateStateRecursive(elements, entity, state);\r\n\t}", "void initializeStateOrder( int nIdWorkflow );", "public void updateState(boolean state);", "public void setState(int state);", "public void setState(int state);", "protected void SwitchState(StateID state)\n {\n targetID = state;\n\n //This sets this ID to the restart state if you try and switch to this state, meaning that if you try and switch to this state, the state will reload.\n if(targetID == state)\n {\n this.ID = StateID.RESTART_STATE;\n }\n }", "@Override\n public void restoreState(Map<String, Object> state) {\n\n }", "@Override\r\n\tpublic void nextState() {\n\t\t\r\n\t}", "void setState(int state);", "private void trueRevertBlock() {\r\n\t\tthis.reverted = true;\r\n\t\tif (instances_.containsKey(this.block)) {\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> {\r\n\t\t\t\tTempBlock last = instances_.get(this.block).getLast();\r\n\t\t\t\tthis.block.setBlockData(last.newData); //Set the block to the next in line TempBlock\r\n\t\t\t});\r\n\t\t} else { //Set to the original blockstate\r\n\t\t\tPaperLib.getChunkAtAsync(this.block.getLocation()).thenAccept(result -> revertState());\r\n\t\t}\r\n\r\n\t\tREVERT_QUEUE.remove(this);\r\n\t\tif (this.revertTask != null) {\r\n\t\t\tthis.revertTask.run();\r\n\t\t}\r\n\r\n\t\tfor (TempBlock attached : attachedTempBlocks) {\r\n\t\t\tattached.revertBlock();\r\n\t\t}\r\n\t}", "private ScanState switchState(ScanState desired,EnumSet<ScanState> allowed) {\n final ScanState old;\n final long timestamp;\n final long sequence;\n synchronized(this) {\n old = state;\n if (!allowed.contains(state))\n throw new IllegalStateException(state.toString());\n state = desired;\n timestamp = System.currentTimeMillis();\n sequence = getNextSeqNumber();\n }\n LOG.fine(\"switched state: \"+old+\" -> \"+desired);\n if (old != desired)\n queueStateChangedNotification(sequence,timestamp,old,desired);\n return old;\n }", "@Override\n\tpublic void setLastState(STATE state) {\n\n\t}", "public void setStateFromRules (int state) {\n \tswitch(state) {\n\t\tcase 31:\n\t\t\tthis.visitState = VisitState.NOT_MATCHED;\n\t\n\t\t//TODO: add more cases here\n\t}\n \t\n }", "private void restorePreviousState() {\n\n\t\tif (StoreAnalysisStateApplication.question1Answered) {\n\t\t\tfirstImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question2Answered) {\n\t\t\tsecondImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.question3Answered) {\n\t\t\tthirdImageVievQuestion\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreAnalysisStateApplication.stageCleared) {\n\t\t\tfirstImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.swipegestureenabled);\n\t\t}\n\n\t\tif (StoreDesignStateApplication.stageCleared) {\n\t\t\tsecondImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.voicereadingenabled);\n\t\t}\n\n\t\tif (StoreImplementationStateApplication.stageCleared) {\n\t\t\tthirdImageVievDescription\n\t\t\t\t\t.setImageResource(R.drawable.microphonenabled);\n\t\t}\n\n\t}", "public void setState(int state) {\n\t\tif (state == CHASE)\n\t\t\tthis.state = CHASE;\n\t\telse if (state == RUN) \n\t\t\tthis.state = RUN;\n\t}", "protected void stateChanged(final SpacecraftState state) {\n final AbsoluteDate date = state.getDate();\n final boolean forward = date.durationFrom(getStartDate()) >= 0.0;\n for (final DoubleArrayDictionary.Entry changed : state.getAdditionalStatesValues().getData()) {\n final TimeSpanMap<double[]> tsm = unmanagedStates.get(changed.getKey());\n if (tsm != null) {\n // this is an unmanaged state\n if (forward) {\n tsm.addValidAfter(changed.getValue(), date, false);\n } else {\n tsm.addValidBefore(changed.getValue(), date, false);\n }\n }\n }\n }", "public abstract void stateChanged(STATE state);", "public void updatAssemblyLineState(AssemblyLineState previousState, AssemblyLineState currentState);", "public void prepareStateForOperator(int subtaskIndex) throws Exception {\n stateForSubtask =\n AbstractStreamOperatorTestHarness.repartitionOperatorState(\n stateForRescaling,\n maxParallelism,\n parallelismBefore,\n parallelismAfter,\n subtaskIndex);\n subtaskHarness = getTestHarness(x -> x, maxParallelism, parallelismAfter, subtaskIndex);\n subtaskHarness.setStateBackend(stateBackend);\n subtaskHarness.setup();\n }", "public void forceChangeState(State toState) {\n changeState(state, toState);\n }", "protected void markUnstable() {\n if (this.step == null || this.step.markUnstable) {\n if (this.run != null) {\n this.run.setResult(Result.UNSTABLE);\n }\n }\n }" ]
[ "0.7670132", "0.6908182", "0.6766781", "0.659072", "0.64230347", "0.6253009", "0.5945919", "0.5903952", "0.58949417", "0.58841544", "0.5739423", "0.5711049", "0.5684371", "0.56280655", "0.55359155", "0.5521387", "0.5493189", "0.54812336", "0.5477241", "0.54631877", "0.5450082", "0.541361", "0.54102397", "0.53911555", "0.53904384", "0.53880364", "0.5358576", "0.53560305", "0.53511745", "0.5343719", "0.5339824", "0.53223693", "0.53187233", "0.5318148", "0.5315844", "0.531495", "0.53097886", "0.53092414", "0.5294901", "0.52814263", "0.52793765", "0.5277082", "0.52744293", "0.5265667", "0.5257828", "0.52499783", "0.5247811", "0.524553", "0.5243534", "0.52408016", "0.5235957", "0.5233597", "0.5224438", "0.5221612", "0.52200615", "0.5210931", "0.52059925", "0.5202467", "0.51881367", "0.5181863", "0.5154446", "0.5147555", "0.5146239", "0.51305497", "0.51259553", "0.5111202", "0.5109489", "0.51088005", "0.51036674", "0.5096219", "0.50914156", "0.50889367", "0.5079959", "0.5077235", "0.5075534", "0.50634813", "0.5060904", "0.50596994", "0.5058608", "0.5053614", "0.50524455", "0.50523245", "0.5051583", "0.5051583", "0.5050943", "0.5048024", "0.5043083", "0.5027569", "0.50175345", "0.5015594", "0.50128937", "0.5010168", "0.5007059", "0.5006669", "0.5006271", "0.5004215", "0.5002927", "0.49934855", "0.49888667", "0.49849084" ]
0.5496573
16
Write node id (who captured lock) into lock file.
private void writeContent(String content) throws IOException { FileChannel ch = lockFile.getChannel(); byte[] bytes = content.getBytes(); ByteBuffer buf = ByteBuffer.allocate(bytes.length); buf.put(bytes); buf.flip(); ch.write(buf, 1); ch.force(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void put_node_id(long node_id, long number) {\n ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].putLong((int) (number * POINTER_LENGTH % ptr_parts_size[0]), node_id);\n }", "void lockInode(Inode inode, LockMode mode);", "void unlockWrite(long stamp);", "public void writeNode(BTreeNode node) throws IOException {\n\t\tif (useCache) {\n\t\t\tif (cache.indexOf(node) == -1) {\n\t\t\t\tcache.add(node);\n\t\t\t}\n\t\t} else {\n\t\t\tfile.write(node);\n\t\t}\n\t}", "void pushWriteLockedEdge(Inode inode, String childName);", "public void writeNode() throws IOException {\n // seek to end of file\n file.seek(offset);\n // write offset data\n file.writeLong(offset);\n // write numKeys data\n file.writeLong(numKeys);\n // write children offset\n for (int i = 0; i < children.length; i++){\n file.writeLong(children[i]);\n }\n // write key data\n for (int i = 0; i < keys.length; i++){\n if (keys[i] == null){\n file.writeLong(-1);\n file.writeInt(0);\n }\n else{\n file.writeLong(keys[i].getKey());\n file.writeInt(keys[i].getFrequency());\n }\n }\n\n //The node has been updated -- move it to the front of the cache\n if (cache != null){\n cache.addObject(this);\n }\n\n\n }", "public static void acquireLock(String id, MessageHandler messageHandler)\r\n\t\t\tthrows AlreadyLockedException {\r\n\t\t// Some usefull references.\r\n\t\tFile lockFile;\r\n\t\tFile portFile;\r\n\t\tFileChannel fileChannel;\r\n\t\tFileLock fileLock;\r\n\t\tServer server;\r\n\t\t// ID normalization.\r\n\t\tString nid = normalizeID(id);\r\n\t\t// Locks JUnique.\r\n\t\tj_lock();\r\n\t\ttry {\r\n\t\t\t// Gets file paths.\r\n\t\t\tlockFile = getLockFileForNID(nid);\r\n\t\t\tportFile = getPortFileForNID(nid);\r\n\t\t\t// Tries to open the lock file in write mode.\r\n\t\t\tLOCK_FILES_DIR.mkdirs();\r\n\t\t\ttry {\r\n\t\t\t\tRandomAccessFile raf = new RandomAccessFile(lockFile, \"rw\");\r\n\t\t\t\tfileChannel = raf.getChannel();\r\n\t\t\t\tfileLock = fileChannel.tryLock();\r\n\t\t\t\tif (fileLock == null) {\r\n\t\t\t\t\t// The file is already locked.\r\n\t\t\t\t\tthrow new AlreadyLockedException(id);\r\n\t\t\t\t}\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\t// The file cannot be locked.\r\n\t\t\t\tthrow new AlreadyLockedException(id);\r\n\t\t\t}\r\n\t\t\t// Starts a lock server for this lock.\r\n\t\t\tserver = new Server(id, messageHandler);\r\n\t\t\t// The lock has been taken. Let's remember it!\r\n\t\t\tLock lock = new Lock(id, lockFile, portFile, fileChannel, fileLock,\r\n\t\t\t\t\tserver);\r\n\t\t\tlocks.put(nid, lock);\r\n\t\t\t// Starts the lock server.\r\n\t\t\tserver.start();\r\n\t\t\t// Writes the port file.\r\n\t\t\tWriter portWriter = null;\r\n\t\t\ttry {\r\n\t\t\t\tportWriter = new FileWriter(portFile);\r\n\t\t\t\tportWriter.write(String.valueOf(server.getListenedPort()));\r\n\t\t\t\tportWriter.flush();\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\t;\r\n\t\t\t} finally {\r\n\t\t\t\tif (portWriter != null) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tportWriter.close();\r\n\t\t\t\t\t} catch (Throwable t) {\r\n\t\t\t\t\t\t;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\t// Releases the lock on JUnique.\r\n\t\t\tj_unlock();\r\n\t\t}\r\n\t}", "public void write(String id);", "private static void readAndWriteNodes(String name) throws IOException {\n System.out.println(name);\n Map<Long, Long> nodeMap = new HashMap<>();\n boolean firstLine = true;\n fileReader = new BufferedReader(new FileReader(PATH + name));\n fileWriter = new BufferedWriter(new FileWriter(PATH + \"/uid/\" + name));\n String line;\n while ((line = fileReader.readLine()) != null) {\n if (!firstLine) {\n long globalId = getGlobalId();\n String[] lineTokens = LINE_TOKEN_SEPARATOR.split(line);\n long ID = Long.parseLong(lineTokens[0]);\n nodeMap.put(ID, globalId);\n String writeLine = \"\";\n for (int i = 0; i < lineTokens.length; i++) {\n if (i == 0) {\n writeLine += globalId;\n } else {\n writeLine += lineTokens[i];\n }\n writeLine += \"|\";\n }\n fileWriter.write(writeLine);\n fileWriter.newLine();\n vertexCount++;\n globalVertexCount++;\n } else {\n fileWriter.write(line);\n fileWriter.newLine();\n firstLine = false;\n }\n }\n fileWriter.close();\n fileReader.close();\n counterMapNodes.put(name, vertexCount);\n vertexCount = 0;\n vertexList.add(nodeMap);\n }", "@Override\n public void writeIdFile(String idName) throws IOException {\n File file = new File(getOutputDir() + \"/log\");\n file.mkdirs();\n FileWriter fw = new FileWriter(getOutputDir() + \"/log/\" + idName);\n for (String s : idMap.keySet()) fw.write(idMap.get(s) + \" \" + s + \"\\n\");\n fw.close();\n }", "private static File getLockFileForNID(String nid) {\r\n\t\tString filename = normalizeID(nid) + \".lock\";\r\n\t\treturn new File(LOCK_FILES_DIR, filename);\r\n\t}", "void lockEdge(Inode inode, String childName, LockMode mode);", "void unlockLastInode();", "private void writeFile(TimerEntity entity) {\n final File file = fileName(entity.getTimedObjectId(), entity.getId());\n\n FileOutputStream fileOutputStream = null;\n try {\n fileOutputStream = new FileOutputStream(file, false);\n final Marshaller marshaller = factory.createMarshaller(configuration);\n marshaller.start(new OutputStreamByteOutput(fileOutputStream));\n marshaller.writeObject(entity);\n marshaller.finish();\n fileOutputStream.flush();\n fileOutputStream.getFD().sync();\n } catch (FileNotFoundException e) {\n throw new RuntimeException(e);\n } catch (IOException e) {\n throw new RuntimeException(e);\n } finally {\n if (fileOutputStream != null) {\n try {\n fileOutputStream.close();\n } catch (IOException e) {\n logger.error(\"IOException closing file \", e);\n }\n }\n }\n }", "private void removeLockId()\n {\n MDC.remove(OutwardlyManagedFileResourceStore.LOCK_ID);\n }", "public Object saveNode(IBTreeNode node) {\n\t\tOID oid = null;\n\n\t\t// Here we only save the node if it does not have id,\n\t\t// else we just save into the hashmap\n\t\tif (node.getId() == StorageEngineConstant.NULL_OBJECT_ID) {\n\t\t\ttry {\n\t\t\t\tnbSaveNodes++;\n\t\t\t\t// first get the oid. : -2:it could be any value\n\t\t\t\toid = engine.getObjectWriter().getIdManager().getNextObjectId(\n\t\t\t\t\t\t-2);\n\t\t\t\tnode.setId(oid);\n\t\t\t\toid = engine.store(oid, node);\n\t\t\t\tif (OdbConfiguration.isDebugEnabled(LOG_ID)) {\n\t\t\t\t\tDLogger.debug(\"Saved node id \" + oid);// + \" : \" +\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// node.toString());\n\t\t\t\t}\n\t\t\t\tif (tree != null && node.getBTree() == null) {\n\t\t\t\t\tnode.setBTree(tree);\n\t\t\t\t}\n\t\t\t\toids.put(oid, node);\n\t\t\t\treturn oid;\n\t\t\t} catch (Exception e) {\n\t\t\t\tthrow new ODBRuntimeException(BTreeError.INTERNAL_ERROR\n\t\t\t\t\t\t.addParameter(\"While saving node\"), e);\n\t\t\t}\n\t\t}\n\t\tnbSaveNodesInCache++;\n\t\toid = (OID) node.getId();\n\t\toids.put(oid, node);\n\t\taddModifiedOid(oid);\n\n\t\treturn oid;\n\n\t}", "public void setID() throws IOException;", "public void writeIDfile(String ID,String password)throws IOException\n {\n\n\n List<String> lines = Files.readAllLines(Paths.get(\"idpassword.txt\"));\n /*write part*/\n\n BufferedWriter bw = null;\n FileWriter fw = null;\n try {\n int j=0;\n String content = \"\";\n while (j<lines.size())\n {\n content+= lines.get(j)+\"\\n\";\n j++;\n }\n content+=ID+\",\"+password;\n\n fw = new FileWriter(\"idpassword.txt\");\n bw = new BufferedWriter(fw);\n bw.write(content);\n\n bw.close();\n fw.close();\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n } finally {\n\n try {\n\n if (bw != null)\n bw.close();\n\n if (fw != null)\n fw.close();\n\n } catch (IOException ex) {\n\n ex.printStackTrace();\n\n }\n\n }\n }", "public void write_file(String filename)\n {\n out.println(\"WRITE\");\n out.println(filename);\n int timestamp = 0;\n synchronized(cnode.r_list)\n {\n timestamp = cnode.r_list.get(filename).cword.our_sn;\n }\n // content = client <ID>, <ts>\n out.println(\"Client \"+my_c_id+\", \"+timestamp);\n // check if write operation finished on server and then exit method\n try\n {\n String em = null;\n em = in.readLine();\n Matcher m_eom = eom.matcher(em);\n if (m_eom.find())\n {\n System.out.println(\"WRITE operation finished on server : \"+remote_c_id);\n }\n else\n {\n System.out.println(\"WRITE operation ERROR on server : \"+remote_c_id);\n }\n }\n catch (IOException e) \n {\n \tSystem.out.println(\"Read failed\");\n \tSystem.exit(-1);\n }\n }", "void acquireNodeGroupWriteLock(LockList locks, String nodeGroupName) throws AlgebricksException;", "public abstract String lock(String oid) throws OIDDoesNotExistException, LockNotAvailableException;", "protected String generateLockId() {\n return AkkaUtils.nextId();\n }", "public void lock(int key);", "private void writeInode(BuilderContext context) {\n fillCommonInodeData(context);\n inode.type = InodeType.Directory;\n setInodeRef(context.getInodeWriter().getPosition());\n inode.writeTo(context.getIoBuffer(), 0);\n context.getInodeWriter().write(context.getIoBuffer(), 0, inode.size());\n }", "static String getLockNodeIdFromName(String lockNodeName) {\n\t\tint lastPathSep = lockNodeName.lastIndexOf(\"/\");\n\t\tif (lastPathSep != -1)\n\t\t\treturn lockNodeName.substring(lastPathSep+1);\n\t\telse\n\t\t\treturn lockNodeName;\n\t}", "@Override\n\tpublic void writeFile(String hashname) {\n\t\tfor(CircosNode node : nodes){\n\t\t\tString useThisLabel = \"\";\n\t\t\tif(node.getLabel().length() > maxLabelLenght){\n\t\t\t\tuseThisLabel = node.getLabel().substring(0, maxLabelLenght) + \"...\";\n\t\t\t}else{\n\t\t\t\tuseThisLabel = node.getLabel();\n\t\t\t}\n\t\t\toutput += \"chr\" + Settings.CIRCOS_DELIMITER + \"-\" + Settings.CIRCOS_DELIMITER + node.getID() + Settings.CIRCOS_DELIMITER + useThisLabel + \n\t\t\t\t\tSettings.CIRCOS_DELIMITER + \"0\" + Settings.CIRCOS_DELIMITER + Math.round(node.getSzMetricValue()) + \n\t\t\t\t\tSettings.CIRCOS_DELIMITER + node.getID() + \"\\n\";\n\t\t}\n\t\tTools.createFile(Settings.CIRCOS_DATA_PREFIX+\"node\"+hashname+\".txt\", output);\n\t}", "public void storeID(String id) {\n try {\n FileWriter myWriter = new FileWriter(\"history_dao.txt\");\n myWriter.write(id);\n myWriter.close();\n System.out.println(\"Successfully wrote to the file.\");\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "void write(IdWriter writer) throws IOException {\n cellRevision.write(writer);\n writer.writeBoolean(modified);\n }", "public long getWriteId() {\n return writeId;\n }", "public void lock_write() {\n boolean update = false;\n logger.log(Level.FINE,\"lock_write() \"+this.lockState+\".\");\n lock.lock();\n logger.log(Level.FINE,\"lock_write : taking mutex \"+this.lockState+\".\");\n switch(this.lockState){\n case WLC:\n this.lockState=State.WLT;\n logger.log(Level.INFO,\"writing with cache\");\n \t break;\n \t\t default: \t\n update = true;\n break;\n \t }\n lock.unlock();\n logger.log(Level.FINE,\"lock_write : the mutex with :\"+lockState+\".\");\n if(update){\n \tlogger.log(Level.INFO,\"Updating lock to WLT \"+lockState+\".\"); //Avant RLC\n \tthis.lockState=State.WLT; \n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\"); //Bien mmis à WLT.\n }\n logger.log(Level.INFO,\"LockState was updated to \"+lockState+\".\");\n this.obj = client.lock_write(this.id); //BUG : se fait invalider en tant que reader et passe à NL entrant dans la boucle suivante \n // A mon avis : se fait invalider en tant que lecteur (d'ou un lock_incohérent = WLT). A voir \n // Est-ce qu'il s'auto-invalide, auquel cas, il faut vérifier invalidate_reader mais je crois qu'il y un test pour ce cas.\n // Quelqu'un d'autre l'invalide mais dans ce cas, le serveur devrait \"séquencer\" cette autre invalidation et le lock_write.\n if(lockState!=State.WLT){\n logger.log(Level.SEVERE,\"Lock = \"+this.lockState+\" instead of WLT\");\n }\n logger.log(Level.INFO,\"lock_write() : end with \"+lockState+\".\");\n }\n }", "public void writeIDs() {\n try {\n FileOutputStream fileOut = new FileOutputStream(\"temp/ids.ser\");\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(ids);\n out.close();\n fileOut.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "private Locks() {\n\t\tlockId = ObjectId.get().toString();\n\t}", "private void updateToFile(PQNode node) throws Exception{\n List<PQNode> nodes = retrieveWholeFile(node.getPqIndex());\n int replaceIndex = node.getPqIndex()-bufStart;\n\n nodes.set(replaceIndex,node);\n int fileId = (node.getPqIndex()-1)/ENTRY_BLOCK_SIZE;\n File file = new File(DIRECTORY + getMapFileName(NAME_PATTERN, fileId));\n storeToFile(file,nodes, false);\n }", "public String getLockId() {\n return lockId;\n }", "@Override\n public WriterResult write(int clientId) throws RemoteException {\n log.info(\"writing news client id {}\", clientId);\n try {\n WriterResult result = new WriterResult();\n serverState.getNumOfWriters().incrementAndGet();\n result.setrSeq(numOfClients.incrementAndGet());\n Thread.sleep(new Random().nextInt(10_000));\n serverState.getSharedNews().lockWrite();\n serverState.getSharedNews().setNewsValue(clientId);\n int writeSSeq = serverState.getSequenceNumber().incrementAndGet();\n result.setsSeq(writeSSeq); //sSeq\n writerLog(clientId, writeSSeq);\n serverState.getSharedNews().unlockWrite();\n serverState.getNumOfWriters().decrementAndGet();\n return result;\n } catch (final Exception e) {\n throw new RemoteException(\"Error happend\");\n }\n }", "public void setUniqueFileIdentifier( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), UNIQUEFILEIDENTIFIER, value);\r\n\t}", "void writeLong(long v) throws IOException;", "void nodeCreate( long id );", "private static void j_lock() {\r\n\t\tdo {\r\n\t\t\tLOCK_FILES_DIR.mkdirs();\r\n\t\t\ttry {\r\n\t\t\t\tRandomAccessFile raf = new RandomAccessFile(GLOBAL_LOCK_FILE,\r\n\t\t\t\t\t\t\"rw\");\r\n\t\t\t\tFileChannel channel = raf.getChannel();\r\n\t\t\t\tFileLock lock = channel.lock();\r\n\t\t\t\tglobalFileChannel = channel;\r\n\t\t\t\tglobalFileLock = lock;\r\n\t\t\t\tbreak;\r\n\t\t\t} catch (Throwable t) {\r\n\t\t\t\t;\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public void insertOtherNode(String key,String value) {\n Log.v(\"insert\", value);\n String filename = key;\n String string = value;\n String hashedKey=\"\";\n Log.v(\"Created \" + hashedKey, \"with value \" + string + \"Before hash \" + filename);\n FileOutputStream outputStream;\n try {//Context.MODE_PRIVATE\n System.out.println(filename);\n System.out.println(context);\n outputStream = context.openFileOutput(filename, Context.MODE_PRIVATE);\n outputStream.write(string.getBytes());\n outputStream.flush();\n outputStream.close();\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(TAG, \"File write failed\");\n }\n\n\n }", "void writeFile(File file, String password, String cnt);", "public Serializable jvnLockWrite(int joi) throws JvnException {\n\t \tSerializable object = null;\n\t\ttry {\n\t\t\tobject = this.jRCoordonator.jvnLockWrite(joi, js);\n\t\t} catch (RemoteException e) {\n\t\t\tSystem.out.println(\"Error jvnLockWrite : \" + e.getMessage());\n\t\t}\n\t\treturn object;\n\t}", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "public void setUuid_(long uuid_) throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__io__block.writeInt64(__io__address + 0, uuid_);\n\t\t} else {\n\t\t\t__io__block.writeInt64(__io__address + 0, uuid_);\n\t\t}\n\t}", "protected final void lockWrite() {\n m_lock.writeLock().lock();\n }", "public Integer getWriteUid() {\n return writeUid;\n }", "public Integer getWriteUid() {\n return writeUid;\n }", "public Integer getWriteUid() {\n return writeUid;\n }", "public Integer getWriteUid() {\n return writeUid;\n }", "public Integer getWriteUid() {\n return writeUid;\n }", "public void write(int datum) throws IOException {\n if (!_open)\n return;\n datum &= 0xff;\n long _here = position();\n\n // Are we synced up?\n if (_here == _digestvalidto) {\n\n // Yes, digest the byte and move the valid to pointer.\n _digest.update((byte) datum);\n _digestvalidto++; // JMC: Was missing.\n\n } // Otherwise, advancing of the position will destroy the digest sync.\n\n datum = _head.crypt((byte) datum, _here);\n _backing.write(datum);\n }", "@Override\n\tpublic void write(DataOutputStream dataOutStream) throws IOException {\n\t\tdataOutStream.writeLong(id);\n\t\tsuper.write(dataOutStream);\n\t}", "LockBlockResult lockBlock(final long blockId) throws IOException;", "@Override\r\n public void write(int value) throws IOException {\r\n super.write(value);\r\n if (!(inWrite1 || inWrite3)) {\r\n /*if (!Helper.NEW_IO_HANDLING && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, 1);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, 1, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n }", "void processAfterLocking(MutableCachedNode modifiedNode,\n SaveContext context) throws Exception;", "String getLockOwner();", "public int write(long addr) {\n\t\treturn findBlock(addr);\n\t}", "public void writeId(final Object instance, final ObjectStreamWriter writer)\n {\n Objects.requireNonNull(instance);\n Objects.requireNonNull(writer);\n final String id = registry.get(instance);\n Objects.requireNonNull(id);\n writer.writeObject(id);\n }", "void writeBlock(int blockId, byte[] buffer) throws IOException;", "public static synchronized void setOwnerId(int id) {\r\n /* If this is the first time, that's fine, but if a change were made again */\r\n /* then we have an not-in-sync issue with journal files! */\r\n if (owner_id == master_pid) {\r\n owner_id = id;\r\n SlaveJvm.sendMessageToMaster(SocketMessage.ONE_TIME_STATUS, \"Data Validation Owner ID found in journal: \" + id);\r\n return;\r\n }\r\n\r\n /* The next time however, the ID is not allowed to change: */\r\n if (id != owner_id) {\r\n common.ptod(\"Current master process id: \" + master_pid);\r\n common.ptod(\"Current owner id: \" + owner_id);\r\n common.ptod(\"Second request to set owner id: \" + id);\r\n common.failure(\"Owner ID not in sync, are we mixing up journal files?\");\r\n }\r\n }", "public SimpleLock writeLock() {\n\n\t\treturn writerLock;\n\t}", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tWritableUtils.writeVInt(out, this.id);\r\n\t}", "public void writeFileForCircosOrder(String hashname) {\n\t\tString dummyOut = \"\";\n\t\tfor(CircosNode node : nodes){\n\t\t\tString useThisLabel = \"dummyLabel\";\n\t\t\t\n\t\t\tdummyOut += \"chr\" + Settings.CIRCOS_DELIMITER + \"-\" + Settings.CIRCOS_DELIMITER + node.getID() + Settings.CIRCOS_DELIMITER + useThisLabel + \n\t\t\t\t\tSettings.CIRCOS_DELIMITER + \"0\" + Settings.CIRCOS_DELIMITER + Math.round(node.getSzMetricValue()) + \n\t\t\t\t\tSettings.CIRCOS_DELIMITER + node.getID() + \"\\n\";\n\t\t}\n\t\tTools.createFile(Settings.CIRCOS_DATA_PREFIX+\"nodeForCircosOrder\"+hashname+\".txt\", dummyOut);\n\t}", "public String getLockUserid() {\n\t\treturn lockUserid;\n\t}", "@Override\n protected void writeAttributes(XMLStreamWriter out)\n throws XMLStreamException {\n super.writeAttributes(out);\n \n out.writeAttribute(\"nextID\", Integer.toString(nextID));\n }", "public void writeId(ByteBuf output) {\n\t\twriteVarInt(output, id);\n\t}", "public void task_1_write(List<MonitoredData> timeline) throws IOException {\n FileWorker.writeFile(1, timeline, 0, null, null, null);\n }", "public long get_node_id(long number) {\n return ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getLong((int) (number * POINTER_LENGTH % ptr_parts_size[0]));\n }", "public LockImpl(long id) {\n\t\tthis.id = id;\n\t}", "long tryWriteLock(long timeout) throws InterruptedException;", "public String getNode_id() {\r\n\t\treturn node_id;\r\n\t}", "public int lock() throws IOException{\n\t\tint n = 1;\n\t\t\n\t\twhile (n <= maxNum) {\n\t\t\tFile file = new File(baseDir, constructFilename(n));\n\t\t\tif (!isLockValid(file)) {\n\t\t\t\tif (createLockfile(file)) {\n\t\t\t\t\treturn n;\n\t\t\t\t}\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\treturn 0;\n\t}", "private static File getPortFileForNID(String nid) {\r\n\t\tString filename = normalizeID(nid) + \".port\";\r\n\t\treturn new File(LOCK_FILES_DIR, filename);\r\n\t}", "private static void readAndWriteProperties(String name) throws IOException {\n System.out.println(name);\n boolean firstLine = true;\n fileReader = new BufferedReader(new FileReader(PATH + name));\n fileWriter = new BufferedWriter(new FileWriter(PATH + \"/uid/\" + name));\n String line;\n while ((line = fileReader.readLine()) != null) {\n if (!firstLine) {\n String[] lineTokens = LINE_TOKEN_SEPARATOR.split(line);\n long globalID = vertexList.get(3).get(Long.parseLong(lineTokens[0]));\n String writeLine = \"\";\n for (int i = 0; i < lineTokens.length; i++) {\n if (i == 0) {\n writeLine += globalID;\n } else {\n writeLine += lineTokens[i];\n }\n writeLine += \"|\";\n }\n fileWriter.write(writeLine);\n fileWriter.newLine();\n } else {\n fileWriter.write(line);\n fileWriter.newLine();\n firstLine = false;\n }\n }\n fileReader.close();\n fileWriter.close();\n }", "void localOutputXml(IvyXmlWriter xw)\n{\n xw.field(\"KIND\",\"MUTEX\");\n for (TraceLockLocation ll : getLocations()) {\n ll.outputXml(xw,false);\n }\n}", "void writeLong(long value);", "public void setLockId(String lockId) {\n this.lockId = lockId;\n }", "void acquireWriteLock(E key);", "void lockExpired(String lock);", "public long create_node(Node node)\r\n\t\t{ \r\n\t\t long id = 0; //id de la tabla user (único) \r\n\r\n\t\t try \r\n\t\t { \r\n\t\t iniciaOperacion(); \r\n\t\t id = (Long)sesion.save(node); //metodo para guardar cliente (del objeto hibernate.sesion) \r\n\t\t tx.commit(); \r\n\t\t }catch(HibernateException he) \r\n\t\t { \r\n\t\t manejaExcepcion(he);\r\n\t\t throw he; \r\n\t\t }finally \r\n\t\t { \r\n\t\t sesion.close(); \r\n\t\t } \r\n\t\t return id; \r\n\t\t}", "public void markNodeAsRegistered(String nodeId);", "public void setLockNum(Long lockNum) {\n this.lockNum = lockNum;\n }", "public synchronized void setCommittedTx( long tx )\n {\n waitForSyncConnected();\n this.committedTx = tx;\n String root = getRoot();\n String path = root + \"/\" + machineId + \"_\" + sequenceNr;\n byte[] data = dataRepresentingMe( tx );\n try\n {\n zooKeeper.setData( path, data, -1 );\n }\n catch ( KeeperException e )\n {\n throw new ZooKeeperException( \"Unable to set current tx\", e );\n }\n catch ( InterruptedException e )\n {\n Thread.interrupted();\n throw new ZooKeeperException( \"Interrupted...\", e );\n }\n }", "void tryWriteLockInOMRequest() throws IOException;", "private synchronized int getNewTransactionId() throws IOException {\n File file = new File(TA_ID_FILE_NAME);\n int transactionId = 0;\n\n if (file.exists()) {\n FileReader freader = new FileReader(file);\n BufferedReader breader = new BufferedReader(freader);\n\n String stringtaid = breader.readLine();\n transactionId = Integer.parseInt(stringtaid);\n\n breader.close();\n } else {\n file.createNewFile();\n }\n\n FileWriter writer = new FileWriter(TA_ID_FILE_NAME);\n writer.write(Integer.toString(transactionId + 1));\n writer.close();\n\n return transactionId;\n }", "public void writeToClientFile(String nick, MESSAGE message) {\n ConcurrentHashMap<String, Client> clientsList = ccv.getClients();\n Client client = clientsList.get(nick);\n OutputStream outputStream = null;\n try {\n// System.out.println(\"Server writer sendToClient \"+ client.getNick()+\" : \" +line);\n outputStream = client.getFileSenderSocket().getOutputStream();\n MessageManger.directWriteMessage(message, outputStream);\n } catch (SocketException ex) {\n synchronized (clientsList) {\n clientsList.remove(client.getNick());\n }\n //comunico a tutti di eliminare l'utente\n ServerWriter sw = new ServerWriter(ccv);\n MESSAGE toSend = MessageManger.createCommand(Command.REMOVEUSER, null);\n MessageManger.addParameter(toSend, \"nick\", client.getNick());\n sw.writeAll(toSend);\n log.error(ex);\n } catch (Exception ex) {\n log.warn(ex);\n log.debug(\"Resend message\");\n writeToClientFile(nick, message);\n }\n\n }", "private void write(int i) {\n\t\tEditor edit = preticketint.edit();\r\n\t\tedit.putInt(\"ticketint\", i);\r\n\t\tedit.commit();\r\n\t}", "public void writeToFile() {\n try {\n // stworz plik\n File file = new File(\"../Alice.ids\");\n // stworz bufor zapisu do pliku\n FileWriter fileWriter = new FileWriter(file);\n for(int i = 0; i < identificationNumbers.length; i++) {\n for(int j = 0; j < identificationNumbers[i].length; j++)\n fileWriter.write(Integer.toString(identificationNumbers[i][j]));\n\t\t\t fileWriter.write(\"\\n\");\n }\n\t\t\tfileWriter.flush();\n\t\t\tfileWriter.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }", "public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }", "public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }", "public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }", "public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }", "public void setWriteUid(Integer writeUid) {\n this.writeUid = writeUid;\n }", "void unlockRead(long stamp);", "public void writeWay(long id, Way way) throws IOException;", "@Override public void run()\n {\n while (wrt)\n {\n System.out.print(\"\");\n }\n\n // Locking Writer and Reader wrt = true;\n mutex = true;\n // Critical section\n BufferedWriter out = null; \n try \n {\n\t\t\t\tout = new BufferedWriter(new FileWriter(\"shared.txt\", false)); \n\t\t\t\tvalue = value + 1;\n\t\t\t\tSystem.out.println(\"Writing: \" + (value)); \n\t\t\t\tout.write(String.valueOf(value)); \n\t\t\t\tout.close();\n } \n catch (IOException e){}\n\n // Leaving Critical section\n wrt = false;\n\tmutex = false;\n\t\t}", "@Override\n public String getNodeId() throws IOException {\n return getFirstLineOfFile(nodeIdPath);\n }", "@Override\n\tpublic void setNodeInfo(String path, Object obj) {\n\t\treentrantReadWriteLock.readLock().lock();\n\t\ttry {\n\t\t\tzookeeper.setData(path, SomeUtil.getByte(obj),\n\t\t\t\t\t-1);\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"更新跟节点数据异常!\", e);\n\t\t} finally {\n\t\t\treentrantReadWriteLock.readLock().unlock();\n\t\t}\n\t}", "public String getNode_pid() {\r\n\t\treturn node_pid;\r\n\t}", "public String getId() {\n return _node_id;\n }" ]
[ "0.6039966", "0.58311385", "0.58238065", "0.57377696", "0.57160646", "0.55903596", "0.55425054", "0.5513911", "0.5509409", "0.54038703", "0.5347353", "0.5334022", "0.53283083", "0.5255964", "0.5236315", "0.5235804", "0.5195259", "0.5119301", "0.5115047", "0.511213", "0.5095903", "0.50928175", "0.5059683", "0.5056071", "0.5047913", "0.50472414", "0.5046886", "0.5006781", "0.4976314", "0.49726287", "0.49489912", "0.49437043", "0.49107182", "0.4904337", "0.48952618", "0.48839843", "0.48822287", "0.4880483", "0.4878634", "0.4875258", "0.48374513", "0.48291734", "0.48010954", "0.47833678", "0.47828564", "0.4780896", "0.4780896", "0.4780896", "0.4780896", "0.4780896", "0.478067", "0.4777173", "0.47705865", "0.47680864", "0.4764782", "0.47485322", "0.47349286", "0.47342935", "0.4728068", "0.47258443", "0.47255513", "0.472351", "0.47176036", "0.47166386", "0.4696392", "0.46942493", "0.4693216", "0.46871656", "0.46833366", "0.46822065", "0.4672006", "0.46708676", "0.4661827", "0.46567622", "0.46543923", "0.46527225", "0.4647951", "0.46448153", "0.46440408", "0.46233347", "0.4623041", "0.4621782", "0.46161094", "0.4613001", "0.46117142", "0.46103466", "0.46046525", "0.4603063", "0.45938239", "0.45938239", "0.45938239", "0.45938239", "0.45938239", "0.45841753", "0.45834398", "0.45779273", "0.45774361", "0.4551702", "0.45499873", "0.4538686" ]
0.48933244
35
Convert cache group ID to WAL state key.
private static String walGroupIdToKey(int grpId, boolean local) { if (local) return WAL_LOCAL_KEY_PREFIX + grpId; else return WAL_GLOBAL_KEY_PREFIX + grpId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static T2<Integer, Boolean> walKeyToGroupIdAndLocalFlag(String key) {\n if (key.startsWith(WAL_LOCAL_KEY_PREFIX))\n return new T2<>(Integer.parseInt(key.substring(WAL_LOCAL_KEY_PREFIX.length())), true);\n else if (key.startsWith(WAL_GLOBAL_KEY_PREFIX))\n return new T2<>(Integer.parseInt(key.substring(WAL_GLOBAL_KEY_PREFIX.length())), false);\n else\n return null;\n }", "public String getGroupKey() {\n StringWriter sw = new StringWriter();\n writeGroupKey(sw);\n return sw.toString();\n }", "public static GroupKey getGroupKey(int groupId) {\n return new DefaultGroupKey((Integer.toString(groupId)).getBytes());\n }", "public String idToState(int id);", "public GroupTrainerCacheKey<Void> key() {\n return key;\n }", "static String makeKey(String id,\n String for_,\n String attrname,\n String attrtype) {\n return format(KEY_FMT, id, for_, attrname, attrtype);\n }", "public static Key createRTCEventStateKey(TournamentId tId) {\n Key parent = convert(tId);\n long id = new CounterDao().nextRTCEventStateLogCounter(tId);\n return createChild(parent, RTCEventJDO.class, id);\n }", "public String getKey(Object d) {\r\n return ((Group) d).key;\r\n }", "public Gateway setGroupId(java.lang.String groupId) {\n return genClient.setOther(groupId, CacheKey.groupId);\n }", "@Override\n\tprotected String getCacheKeyPrefix() {\n\t\treturn super.getCacheKeyPrefix();\n\t}", "private final static String getKey( Integer id ) {\n\t\treturn \"\" + id ;\n\t}", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "Long getStateId(String stateName);", "public String getGroupKey() {\n return groupKey;\n }", "@Override\r\n protected Text generateGroupKey(IntermediateData tmo)\r\n {\n String line = ((Text) tmo.getData()).toString();\r\n String[] tokens = line.split(Main.INPUT_SPLIT);\r\n String groupkey = tokens[0];\r\n return new Text(groupkey);\r\n }", "private String getStringKey(long rawKey) {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }", "private String getKey(String moduleId, String copyId, String ownerId){\n\t\treturn copyId+DELIMITER+moduleId+DELIMITER+ownerId;\n\t}", "private String key(RepositoryModel repository, KeyType key, long id) {\n\t\treturn key(repository, key, \"\" + id);\n\t}", "private String key(RepositoryModel repository, KeyType key, String id) {\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(repository.name).append(':');\n\t\tsb.append(key.name());\n\t\tif (!StringUtils.isEmpty(id)) {\n\t\t\tsb.append(':');\n\t\t\tsb.append(id);\n\t\t}\n\t\treturn sb.toString();\n\t}", "@Override\n\tprotected String _id(String id) {\n\t\tif (id != null) {\n\t\t\tid = id.replaceAll(\"([^a-zA-Z0-9_]{1,1})\", \"_\");\n\n\t\t\tString cacheIdPrefix = (String)_options.get(\"cache_id_prefix\");\n\t\t\tif (cacheIdPrefix != null) {\n\t\t\t\tid = cacheIdPrefix + id;\n\t\t\t}\n\t\t}\n\n\t\treturn id;\n\t}", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "@NonNegative int stateGroupId();", "public String getKey() {\n\t\treturn id + \"\";\n\t}", "@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}", "String getEncryptionKeyId();", "protected abstract CacheKey getCacheKey(CacheKey cacheKey);", "private MapDBLabelToId() {\n\t\tproperties = new ProjectProperties(this.getClass());\n\n\t\tmap = db.getCollection(COLLECTION_NAME);\n\t\t// commitFrequency = properties.getInt(\"mapdb.commit\");\n\t}", "public wsihash fetchByUUID_G(java.lang.String uuid, long groupId);", "public static int group(int group) {\n group = GROUP_MAX & group;\n\n return ((group & 0b10) << 7) | ((group & 1) << 4);\n }", "public String getCacheKey() {\r\n\t\treturn cacheKey;\r\n\t}", "public String getGroupKey() {\n return this.GroupKey;\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "protected String getKey(String namespace, String key){\n \t\tif (namespace != null) {\n \t\t\tkey = namespace + key;\n \t\t}\n \t\tif (key.length() > 24) {\n \t\t\ttry {\n \t\t\t\tkey = StringHelper.sha1Hex(key.getBytes(\"utf8\"));\n \t\t\t} catch (UnsupportedEncodingException e) {\n \t\t\t\tlog.warn(\"Invalid key: \" + key, e);\n \t\t\t}\n \t\t} \n//\t\tlog.info(\"key: \" + key);\n \t\treturn key;\n \t}", "String getKeyFormat();", "private String normalizeKeyId(String keyId) {\n if (keyId.startsWith(\"arn:\") || keyId.startsWith(\"alias/\")) {\n return keyId;\n }\n\n if (!keyId.matches(\"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\")) {\n return \"alias/\" + keyId;\n } else {\n return keyId;\n }\n }", "java.lang.String getFolderId();", "GroupQueryBuilder setKey(String key);", "@Override\n\tpublic void setGroupId(long groupId) {\n\t\t_dictData.setGroupId(groupId);\n\t}", "@Override\n public byte[] getKey() {\n return MetricUtils.concat2(clusterName, topologyName, getTime().getTime()).getBytes();\n\n }", "public abstract String mapItemToKey(String str);", "private String getKey(final String string) {\n String value = string.replace(\"/\", \".\");\n value = value.replace(\"..\", \".\");\n if (value.endsWith(\".\")) {\n value = value + \"root\";\n }\n\n if (value.startsWith(\"_\")) {\n value = value.substring(1);\n }\n\n return value;\n }", "public NetworkMapKey(NetworkMapKey source) {\n this._pid = source._pid;\n }", "public static RoomAuthName makeKey (int playerId)\n {\n return new RoomAuthName(\"\", playerId);\n }", "UUID getGroupId();", "String getGroupId();", "String getGroupId();", "public synchronized static String getRew3GroupId() {\n return \"userId\";\n }", "@Override\n public String getKey()\n {\n return id; \n }", "@Override\n protected String getConversationKey() {\n return this.groupID;\n }", "default String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String key();", "public long getFileGroupId();", "public static Long translateNodeId(String nodeId) {\r\n\t\tif(nodeId == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn KeyFactory.stringToKey(nodeId);\r\n\t}", "protected String generateLockId() {\n return AkkaUtils.nextId();\n }", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "private Integer mapTaskID(Integer id)\r\n {\r\n Integer mappedID = m_clashMap.get(id);\r\n if (mappedID == null)\r\n {\r\n mappedID = id;\r\n }\r\n return (mappedID);\r\n }", "private String buildWalkerGroup(WalkerGroup group, PersistentContext context) {\n final StringBuilder xml = new StringBuilder();\n xml.append(\"<walker_group>\\n\");\n xml.append(tab(walkerBuilder.buildWalker(group, context)));\n xml.append(\"\\t<walker_group_name>\").append(escape(group.getName())).append(\"</walker_group_name>\\n\");\n for (final DiagramWalker walker : group.getDiagramWalkerList()) {\n final String nodeId = context.walkerMap.get(((ERVirtualTable) walker).getRawTable());\n xml.append(\"\\t<diagram_walker>\").append(nodeId).append(\"</diagram_walker>\\n\");\n }\n xml.append(\"</walker_group>\\n\");\n return xml.toString();\n }", "GroupId groupId();", "@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}", "com.google.protobuf.ByteString\n getGroupIdBytes();", "com.google.protobuf.ByteString\n getGroupIdBytes();", "@Override\n protected String getIDPrefix() {\n return \"bc\";\n }", "public static String generateId(String s){\n\t\tString date = LocalDate.now().format(DateTimeFormatter.ofPattern(\"yyMMdd\"));\n\t\tString key = s +\"_\" + date;\n\t\t//com.incr(key);\n\t\tredisTemplate.opsForValue().increment(key);\n\t\tInteger num = redisTemplate.opsForValue().get(key);\n\t\treturn date + \"-\" + String.format(\"%08d\",num);\n\t}", "@java.lang.Override\n public java.lang.String getFolderId() {\n java.lang.Object ref = folderId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n folderId_ = s;\n return s;\n }\n }", "public java.lang.String getXorGroupId() {\n java.lang.Object ref = xorGroupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n xorGroupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String createCacheKey() {\n return \"organization.\" + userEmail;\n }", "@java.lang.Override\n public java.lang.String getXorGroupId() {\n java.lang.Object ref = xorGroupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n xorGroupId_ = s;\n return s;\n }\n }", "public Key getID () {\n\t\treturn id;\n\t}", "@Override\n protected String toCloudEventsKey(final String key) {\n return key.substring(AmqpConstants.CE_PREFIX.length());\n }", "UUID getMonarchId();", "@Override\n public String getCacheId() {\n //no hash on boolean...only parameter so no hash is needed.\n return Boolean.toString(shouldIfail);\n }", "Object getGroupID(String groupName) throws Exception;", "public NodeKey createNodeKey( String sourceName,\n String identifier );", "@java.lang.Override\n public com.google.protobuf.ByteString\n getFolderIdBytes() {\n java.lang.Object ref = folderId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n folderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public interface SKey {\n\n String FAIL_STORE = \"job.fail.store\";\n\n String LOADBALANCE = \"loadbalance\";\n\n String EVENT_CENTER = \"event.center\";\n\n String REMOTING = \"lts.remoting\";\n\n String REMOTING_SERIALIZABLE_DFT = \"lts.remoting.serializable.default\";\n\n String ZK_CLIENT_KEY = \"zk.client\";\n\n String JOB_ID_GENERATOR = \"id.generator\";\n\n String JOB_LOGGER = \"job.logger\";\n\n String JOB_QUEUE = \"job.queue\";\n}", "private String makeStateName(int id, boolean guided) {\n\n\t\tif (guided) {\n\t\t\treturn \"guided\" + id;\n\t\t}\n\n\t\treturn \"state\" + id;\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn _dictData.getGroupId();\n\t}", "java.lang.String getRoutingKey();", "public int keyId() {\n return keyId;\n }", "@Override\n\tpublic Object key() {\n\t\treturn id;\n\t}", "@Override\n public String createRecoveryKey() {\n nextRecoveryKey++;\n return Integer.toString(nextRecoveryKey);\n }" ]
[ "0.57925266", "0.54652625", "0.54049635", "0.5402894", "0.5177131", "0.50669134", "0.5066659", "0.5002434", "0.50007564", "0.49980173", "0.49698678", "0.49385592", "0.4933418", "0.4867884", "0.48662522", "0.48301813", "0.48265502", "0.48163658", "0.47701457", "0.47620508", "0.47550878", "0.47270682", "0.4706803", "0.4705062", "0.47050458", "0.46732914", "0.46505153", "0.4645096", "0.46443644", "0.4643872", "0.4643494", "0.4642773", "0.4642773", "0.46401507", "0.46251297", "0.46202958", "0.461391", "0.45767763", "0.4564111", "0.45617884", "0.45596355", "0.45489147", "0.45439452", "0.45407823", "0.45355514", "0.45339775", "0.45339775", "0.45171276", "0.4515031", "0.45117426", "0.4484995", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.44837877", "0.4479135", "0.4478945", "0.44766796", "0.44751248", "0.4463761", "0.4463761", "0.4463761", "0.4463761", "0.4463761", "0.4463761", "0.44532618", "0.44476318", "0.44442376", "0.44435874", "0.44413808", "0.44413808", "0.44410357", "0.44364616", "0.44246557", "0.441796", "0.4417923", "0.44148275", "0.44125265", "0.44100162", "0.4409865", "0.4407093", "0.44068402", "0.44061002", "0.44032145", "0.43961936", "0.4386642", "0.43781415", "0.43749037", "0.4373561", "0.436895", "0.43688366" ]
0.71281856
0
Convert WAL state key to cache group ID.
private static T2<Integer, Boolean> walKeyToGroupIdAndLocalFlag(String key) { if (key.startsWith(WAL_LOCAL_KEY_PREFIX)) return new T2<>(Integer.parseInt(key.substring(WAL_LOCAL_KEY_PREFIX.length())), true); else if (key.startsWith(WAL_GLOBAL_KEY_PREFIX)) return new T2<>(Integer.parseInt(key.substring(WAL_GLOBAL_KEY_PREFIX.length())), false); else return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String walGroupIdToKey(int grpId, boolean local) {\n if (local)\n return WAL_LOCAL_KEY_PREFIX + grpId;\n else\n return WAL_GLOBAL_KEY_PREFIX + grpId;\n }", "public String getGroupKey() {\n StringWriter sw = new StringWriter();\n writeGroupKey(sw);\n return sw.toString();\n }", "private String getStringKey(long rawKey) {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue((int) (rawKey % cardinality)));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }", "public String getGroupKey() {\n return groupKey;\n }", "public static GroupKey getGroupKey(int groupId) {\n return new DefaultGroupKey((Integer.toString(groupId)).getBytes());\n }", "public String getGroupKey() {\n return this.GroupKey;\n }", "protected static long getId(String key) {\n\t\treturn KeyFactory.stringToKey(key).getId();\n\t}", "public GroupTrainerCacheKey<Void> key() {\n return key;\n }", "@Override\r\n protected Text generateGroupKey(IntermediateData tmo)\r\n {\n String line = ((Text) tmo.getData()).toString();\r\n String[] tokens = line.split(Main.INPUT_SPLIT);\r\n String groupkey = tokens[0];\r\n return new Text(groupkey);\r\n }", "default String normalizeKey(String key) {\r\n\t\treturn key.intern();\r\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn _dictData.getGroupId();\n\t}", "protected abstract CacheKey getCacheKey(CacheKey cacheKey);", "private String normalizeKeyId(String keyId) {\n if (keyId.startsWith(\"arn:\") || keyId.startsWith(\"alias/\")) {\n return keyId;\n }\n\n if (!keyId.matches(\"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$\")) {\n return \"alias/\" + keyId;\n } else {\n return keyId;\n }\n }", "@Override\n protected String getConversationKey() {\n return this.groupID;\n }", "Long getStateId(String stateName);", "GroupQueryBuilder setKey(String key);", "public String getKey(Object d) {\r\n return ((Group) d).key;\r\n }", "private String getStringKey(IntArray rawKey) {\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue(rawKey._elements[0]));\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n groupKeyBuilder.append(_dictionaries[i].getStringValue(rawKey._elements[i]));\n }\n return groupKeyBuilder.toString();\n }", "public static int stringToInt(String aKey){\r\n\t\t\r\n\t\tint pseudoKey = 0;\r\n\t\tint n = 1;\r\n\t\tint cn = 0;\r\n\t\tchar c[] = aKey.toCharArray();\r\n\t\tint grouping = 0;\r\n\t\t\r\n\t\twhile(cn < aKey.length()){\r\n\t\t\t\r\n\t\t\tgrouping = grouping << 8;\r\n\t\t\tgrouping += c[cn];\r\n\t\t\tcn++;\r\n\t\t\t\r\n\t\t\tif(n == 4 || cn == aKey.length()){\r\n\t\t\t\tpseudoKey += grouping;\r\n\t\t\t\tn = 0;\r\n\t\t\t\tgrouping = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tn++;\r\n\t\t\t\r\n\t\t}// End of while loop\r\n\t\treturn Math.abs(pseudoKey);\r\n\t\t\r\n\t}", "private String getStringKey(int rawKey) {\n // Specialize single group-by column case\n if (_numGroupByExpressions == 1) {\n return _dictionaries[0].getStringValue(rawKey);\n } else {\n int cardinality = _cardinalities[0];\n StringBuilder groupKeyBuilder = new StringBuilder(_dictionaries[0].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n for (int i = 1; i < _numGroupByExpressions; i++) {\n groupKeyBuilder.append(GroupKeyGenerator.DELIMITER);\n cardinality = _cardinalities[i];\n groupKeyBuilder.append(_dictionaries[i].getStringValue(rawKey % cardinality));\n rawKey /= cardinality;\n }\n return groupKeyBuilder.toString();\n }\n }", "java.lang.String getGroupId();", "java.lang.String getGroupId();", "@NonNegative int stateGroupId();", "@Override\n public State getState(String key) {\n\n CompositeKey ledgerKey = this.ctx.getStub().createCompositeKey(this.name, State.splitKey(key));\n\n byte[] data = this.ctx.getStub().getState(ledgerKey.toString());\n if (data != null) {\n State state = this.deserializer.deserialize(data);\n return state;\n } else {\n return null;\n }\n }", "protected String getKey(String namespace, String key){\n \t\tif (namespace != null) {\n \t\t\tkey = namespace + key;\n \t\t}\n \t\tif (key.length() > 24) {\n \t\t\ttry {\n \t\t\t\tkey = StringHelper.sha1Hex(key.getBytes(\"utf8\"));\n \t\t\t} catch (UnsupportedEncodingException e) {\n \t\t\t\tlog.warn(\"Invalid key: \" + key, e);\n \t\t\t}\n \t\t} \n//\t\tlog.info(\"key: \" + key);\n \t\treturn key;\n \t}", "public Gateway setGroupId(java.lang.String groupId) {\n return genClient.setOther(groupId, CacheKey.groupId);\n }", "public final Integer getId(final String key){\r\n\t\treturn keyIdMap.get(key);\r\n\t}", "@Override\n\tprotected String getCacheKeyPrefix() {\n\t\treturn super.getCacheKeyPrefix();\n\t}", "GroupId groupId();", "@Override\n protected String toCloudEventsKey(final String key) {\n return key.substring(AmqpConstants.CE_PREFIX.length());\n }", "UUID getGroupId();", "Object getGroupID(String groupName) throws Exception;", "String getKeyFormat();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "public long getGroupId();", "String getGroupId();", "String getGroupId();", "public long getFileGroupId();", "public long getGroup()\r\n { return group; }", "@Override\n\tpublic long getGroupId() {\n\t\treturn _changesetEntry.getGroupId();\n\t}", "public synchronized static String getRew3GroupId() {\n return \"userId\";\n }", "Integer getGroupId();", "@java.lang.Override\n public java.lang.String getXorGroupId() {\n java.lang.Object ref = xorGroupId_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n xorGroupId_ = s;\n return s;\n }\n }", "com.google.protobuf.ByteString\n getGroupIdBytes();", "com.google.protobuf.ByteString\n getGroupIdBytes();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "String getKey();", "SeGroup selectByPrimaryKey(SeGroupKey key);", "public abstract String mapItemToKey(String str);", "public long getGroupId() {\n return groupId;\n }", "private void rebuildKey() {\r\n\r\n final StringBuffer sb = new StringBuffer();\r\n\r\n sb.append(getClassField().getCanonicalName());\r\n for (final Object k : this.keyPartList) {\r\n sb.append(k.toString()).append('|');\r\n }\r\n this.key = sb.toString();\r\n }", "public java.lang.String getXorGroupId() {\n java.lang.Object ref = xorGroupId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n xorGroupId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "public static Key createRTCEventStateKey(TournamentId tId) {\n Key parent = convert(tId);\n long id = new CounterDao().nextRTCEventStateLogCounter(tId);\n return createChild(parent, RTCEventJDO.class, id);\n }", "String key();", "UnderlayTopologyKey getKey();", "@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}", "protected String getKey(String baseKey){\n \treturn getKey(baseKey, id);\n }", "String getEncryptionKeyId();", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapKeyToItem(String key) {\n return key.substring(this.mPrefixLength);\n }", "String getGroupingCode();", "public int getGroupId(int rawKey, int groupIdUpperBound) {\n // NOTE: Key 0 is reserved as the null key. Use (rawKey + 1) as the internal key because rawKey can never be -1.\n int internalKey = rawKey + 1;\n int index = (HashCommon.mix(internalKey) << 1) & _mask;\n int key = _keyValueHolder[index];\n\n // Handle hash hit separately for better performance\n if (key == internalKey) {\n return _keyValueHolder[index + 1];\n }\n if (key == 0) {\n return _size < groupIdUpperBound ? addNewGroup(internalKey, index) : INVALID_ID;\n }\n\n // Hash collision\n while (true) {\n index = (index + 2) & _mask;\n key = _keyValueHolder[index];\n if (key == internalKey) {\n return _keyValueHolder[index + 1];\n }\n if (key == 0) {\n return _size < groupIdUpperBound ? addNewGroup(internalKey, index) : INVALID_ID;\n }\n }\n }", "private String key(RepositoryModel repository, KeyType key, long id) {\n\t\treturn key(repository, key, \"\" + id);\n\t}", "@Override\n public byte[] getKey() {\n return MetricUtils.concat2(clusterName, topologyName, getTime().getTime()).getBytes();\n\n }", "public int keyId() {\n return keyId;\n }", "protected String generateStateId() {\n\t\treturn ServiceBus.crypto.getRandomString();\n\t}", "@Override\n\tpublic void setGroupId(long groupId) {\n\t\t_dictData.setGroupId(groupId);\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic long getGroupId() {\n\t\treturn model.getGroupId();\n\t}", "@Override\n\tpublic long getGroupId();", "@Override\n\tpublic long getGroupId();", "@Override\n\tpublic String getMapKey()\n\t{\n\t\tsbTemp.delete(0, sbTemp.length());\n\t\tsbTemp.append(areaCell.iCityID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreatype);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iAreaID);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iECI);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iTime);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.iInterface);\n\t\tsbTemp.append(\"_\");\n\t\tsbTemp.append(areaCell.kpiSet);\n\t\treturn sbTemp.toString();\n\t}", "public NetworkMapKey(NetworkMapKey source) {\n this._pid = source._pid;\n }", "public static String getKey() {\t\t\n\t\treturn key;\n\t}", "public String getCacheKey() {\r\n\t\treturn cacheKey;\r\n\t}", "public static String normalize(String key, NamespaceContext context) {\n if (key == null || context == null) return key;\n\n StringBuilder builder = new StringBuilder();\n List<Token> tokens = tokenize(key);\n for (int i = 0; i < tokens.size(); i++) {\n Token token = tokens.get(i);\n\n String prefix = token.prefix;\n String namespace = token.namespace;\n String suffix = token.suffix;\n\n if (i > 0) {\n builder.append(IDataKey.SEPARATOR);\n }\n\n if (prefix != null) {\n builder.append(prefix);\n }\n if (namespace != null) {\n String uri = context.getNamespaceURI(namespace);\n if (uri != null) {\n String normalizedNamespace = context.getPrefix(uri);\n if (normalizedNamespace != null) {\n namespace = normalizedNamespace;\n }\n }\n if (!\"\".equals(namespace)) {\n builder.append(namespace);\n builder.append(NAMESPACE_PREFIX_SEPARATOR);\n }\n }\n if (suffix != null) {\n builder.append(suffix);\n }\n }\n\n return builder.toString();\n }", "protected String getGroupId() {\n return getActorPath().name();\n }", "private void saveCacheKey(String key){\n \n if (!saveCacheKeys)\n return;\n \n String cacheKey = VolleyUtils.BitmapCache.getCacheKey(builder, key, 0, 0);\n if (!cacheKeys.contains(cacheKey))\n cacheKeys.add(cacheKey);\n }", "public String groupId() {\n return this.groupId;\n }", "@Override\n\tpublic long getGroupId() {\n\t\treturn _esfTournament.getGroupId();\n\t}", "public Long getGroupID()\n {\n return groupID;\n }", "@Override\n\tpublic long getGroupId(int arg0) {\n\t\treturn arg0;\n\t}", "java.lang.String getClientKey();", "public Long getGroup_id() {\n return group_id;\n }" ]
[ "0.68462807", "0.57568663", "0.55526686", "0.55421203", "0.5416367", "0.53585976", "0.52984834", "0.52547514", "0.5216708", "0.5216232", "0.5093312", "0.5075703", "0.5052296", "0.50454754", "0.5022446", "0.5012016", "0.50105417", "0.4982936", "0.49783188", "0.49668097", "0.4951223", "0.4951223", "0.49419588", "0.49122402", "0.4891403", "0.4884813", "0.4871077", "0.4861161", "0.48605624", "0.48551783", "0.48472586", "0.48288837", "0.4825061", "0.4807102", "0.4807102", "0.4807102", "0.4807102", "0.4807102", "0.4807102", "0.4803963", "0.4803963", "0.47679156", "0.47568473", "0.4754675", "0.47400853", "0.472467", "0.47105414", "0.47024027", "0.47024027", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46991393", "0.46950462", "0.46892577", "0.46884727", "0.46875313", "0.46824342", "0.46766916", "0.46709776", "0.46666372", "0.46621192", "0.46614373", "0.46604893", "0.46584478", "0.46566322", "0.4650087", "0.46423098", "0.4638466", "0.46379045", "0.4637695", "0.4636915", "0.46364135", "0.46349412", "0.46349412", "0.46349412", "0.46286505", "0.46286505", "0.46257487", "0.46199304", "0.46178642", "0.46106043", "0.4605217", "0.46039727", "0.46032608", "0.4585176", "0.4584962", "0.45766312", "0.45684394", "0.45650917", "0.4560999" ]
0.6252722
1
Advance iterator to the next record.
public WALRecord next() throws IgniteCheckedException { try { for (;;) { if (!iterator.hasNextX()) return null; IgniteBiTuple<WALPointer, WALRecord> tup = iterator.nextX(); if (tup == null) return null; WALRecord rec = tup.get2(); WALPointer ptr = tup.get1(); rec.position(ptr); // Filter out records by group id. if (rec instanceof WalRecordCacheGroupAware) { WalRecordCacheGroupAware grpAwareRecord = (WalRecordCacheGroupAware) rec; if (!cacheGroupPredicate.apply(grpAwareRecord.groupId())) continue; } // Filter out data entries by group id. if (rec instanceof DataRecord) rec = filterEntriesByGroupId((DataRecord) rec); return rec; } } catch (IgniteCheckedException e) { boolean throwsCRCError = throwsCRCError(); if (X.hasCause(e, IgniteDataIntegrityViolationException.class)) { if (throwsCRCError) throw e; else return null; } log.error("There is an error during restore state [throwsCRCError=" + throwsCRCError + ']', e); throw e; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }", "public void next() {\n\t\titerator.next();\n\t}", "private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }", "public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }", "public Record next() {\n if (hasNext()) {\n if (nextRecord != null) {\n Record out = nextRecord;\n nextRecord = null;\n return out;\n }\n }\n throw new NoSuchElementException();\n //throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "public boolean onNextRecord(IDataTableRecord record) throws Exception;", "public void setNextRecord()\n {\n currRecord++;\n if (monitor != null)\n monitor.setPercentComplete(currRecord / maxRecords * 100);\n }", "public void next() {\n\t\t}", "public void Next() {\n OCCwrapJavaJNI.Interface_EntityIterator_Next(swigCPtr, this);\n }", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}", "@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "public final void nextRow() {\n this.line++;\n }", "public void nextHard() {\n\t\titerator.next();\n\t}", "public T next(){\r\n return itrArr[position++];\r\n }", "public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}", "public void advance () {\n while (currentGroup == null ||\n (!actionIter.hasNext() && groupIter.hasNext()))\n {\n currentGroup = groupIter.next();\n actionIter = actions.iterator();\n }\n // now get the next action (assuming we're in valid state)\n currentAction = (actionIter.hasNext() ? actionIter.next() : null);\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\treturn arr[index++];\r\n\t\t}", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "public void getNextRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.getNextRecord(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n public Integer next() {\n Integer res = next;\n advanceIter();\n return res;\n }", "@ActionTrigger(action=\"KEY-NXTREC\", function=KeyFunction.NEXT_RECORD)\n\t\tpublic void spriden_NextRecord()\n\t\t{\n\t\t\t\n\t\t\t\tif ( !isInLastRecord(true) )\n\t\t\t\t{\n\t\t\t\t\tnextRecord();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinfoMessage(GNls.Fget(toStr(\"SOAIDNS-0001\"), toStr(\"FORM\"), toStr(\"At last record.\")));\n\t\t\t\t}\n\t\t\t}", "@Override\n public Integer next() {\n Integer result = null;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n while (this.currentIterator.hasNext()) {\n return this.currentIterator.next();\n }\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.next();\n }\n return result;\n }", "public byte[] nextRecord() {\n return (byte[]) resultsEnumeration.nextElement();\n }", "public Record next() {\n throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "@Override\n\tpublic Integer next() {\n\t return iterator.next();\n\t}", "@Override\n\tpublic void next()\n\t{\n\n\t}", "public MapIterator advance()\n {\n this.MapItr = this.MapItr.rest(); \n \n return this;\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "private void advance() {\n assert currentItemState == ItemProcessingState.COMPLETED || currentIndex == -1\n : \"moving to next but current item wasn't completed (state: \" + currentItemState + \")\";\n currentItemState = ItemProcessingState.INITIAL;\n currentIndex = findNextNonAborted(currentIndex + 1);\n retryCounter = 0;\n requestToExecute = null;\n executionResult = null;\n assert assertInvariants(ItemProcessingState.INITIAL);\n }", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}", "@Override\r\n\tpublic void next() {\n\n\t}", "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (super.readLimit > 0 && super.recordCounter > super.readLimit) {\n nextLine = null;\n }\n }\n } catch (Exception ignore) {\n // no more lines\n }\n }", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "@Override\n\tpublic void next() {\n\t\t\n\t}", "public void nextPage() {\n\t\tthis.skipEntries += NUM_PER_PAGE;\n\t\tloadEntries();\n\t}", "private void setNextIterator() {\n\t\t\t\n\t\t\tfor (int i = index; i < inconsistencies.size(); i++){\n\t\t\t\tSet<LPGInconsistency> inconsistencyList = inconsistencies.get(i);\n\t\t\t\tif (!inconsistencyList.isEmpty()) {\n\t\t\t\t\titerator = inconsistencyList.iterator();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tindex++;\n\t\t\t}\n\t\t}", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "@Override\n void advance() {\n }", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public T next(){\n return (T)data[ci++];\n }", "public void next()\n {\n if (size != 0)\n {\n current = current.next();\n }\n }", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "@Override\n E next();", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "public void next() {\n addTracksToQueue();\n player.skipToNext();\n }", "public Object next()\n {\n return _iterator.next();\n }", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "public void next() {\n\t\tSystem.out.println(al.get(pos));\r\n\t\tpos++;\r\n\t}", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public RadarContent next() {\n RadarContent p = pq.arrProfiles[iCursor];\n iCursor++;\n return p;\n }", "public void goNextLine () throws IOException {\n\t\treader.goNextLine();\n\t\tcurrentLine = reader.getCurrentLine();\n\t}", "public TableGenRow nextRow() {\n try {\n if(DBMacros.next(rs)) {\n return this;\n }\n } catch (Exception t) {\n dbg.ERROR(\"nextRow() Exception skipping to the next record!\");\n dbg.Caught(t);\n }\n return null;\n }", "public void next()\n {\n if (mHistoryIdx == mCommandList.size()) {\n return;\n }\n\n mCommandList.get(mHistoryIdx++).redo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "@Override\n public Integer next() {\n if (cur != null) {\n int temp = cur.intValue();\n cur = null;\n return temp;\n }\n\n if (iter.hasNext()) {\n return iter.next();\n }\n\n return null;\n }", "@Override\n protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) {\n if (count == 1) {\n return currentResult.getItems().iterator();\n }\n // subsequent chained iterators will be obtained from dynamoDB\n // pagination\n if ((currentResult.getLastEvaluatedKey() == null)\n || currentResult.getLastEvaluatedKey().isEmpty()) {\n return null;\n } else {\n request.setExclusiveStartKey(currentResult.getLastEvaluatedKey());\n currentResult = dynamoDBClient.query(request);\n return currentResult.getItems().iterator();\n }\n }", "private Token advance() {\n if(!isAtEnd()) current++;\n return previous();\n }", "@Override\n public SingleQuery next() {\n i++;\n current = queries.get(i);\n\n return current;\n }", "public void nextRecord( View v)\n {\n \t//\tClear out the display first\n \tclearBtn( v );\n \t//\tGo get the sheep id of this record\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tcursor.moveToNext();\n \tLog.i(\"in next record\", \"after moving the cursor \");\n \tthissheep_id = cursor.getInt(0);\n \tthissheep_name = cursor.getString(1);\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tLog.i(\"in next record\", \"this sheep name is \" + thissheep_name);\n \trecNo += 1;\n \tfindTagsShowAlert(v, thissheep_id);\n//\t\t// I've moved forward so I need to enable the previous record button\n\t\tButton btn3 = (Button) findViewById( R.id.prev_rec_btn );\n\t\tbtn3.setEnabled(true);\t \t\n \tif (recNo == (nRecs)) {\n \t\t// at end so disable next record button\n \t\tButton btn2 = (Button) findViewById( R.id.next_rec_btn );\n \tbtn2.setEnabled(false); \t\t\n \t}\n }", "public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}", "@Override\n\t\tpublic T next() {\n\t\t\tmoveToNextIndex();\n\t\t\treturn objectAtIndex(_indicesByInsertOrder[_index]);\n\t\t}", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public boolean MoveNext()\r\n { \r\n _index++;\r\n\r\n return _index < Count;\r\n }", "@Override public WALRecord next() throws IgniteCheckedException {\n WALRecord rec = super.next();\n\n if (rec == null)\n return null;\n\n if (rec.type() == CHECKPOINT_RECORD) {\n CheckpointRecord cpRec = (CheckpointRecord)rec;\n\n // We roll memory up until we find a checkpoint start record registered in the status.\n if (F.eq(cpRec.checkpointId(), status.cpStartId)) {\n log.info(\"Found last checkpoint marker [cpId=\" + cpRec.checkpointId() +\n \", pos=\" + rec.position() + ']');\n\n needApplyBinaryUpdates = false;\n }\n else if (!F.eq(cpRec.checkpointId(), status.cpEndId))\n U.warn(log, \"Found unexpected checkpoint marker, skipping [cpId=\" + cpRec.checkpointId() +\n \", expCpId=\" + status.cpStartId + \", pos=\" + rec.position() + ']');\n }\n\n return rec;\n }", "public void next()\n\t{\n\t\tif(this.curseur < this.listeTapis.size() - 1)\n\t\t{\n\t\t\tthis.curseur++;\n\t\t}\n\t}", "public void nextIteration()\n {\n actuelIteration++;\n }", "@Test\n public void testNext() throws SQLException, InputIterationException {\n // Setup\n ResultSet resultSet = twoLinesResultSetFixture.getTestData();\n ResultSetIterator resultSetIterator = new ResultSetIterator(resultSet);\n\n // Check result\n List<Boolean> expectedNextValues = twoLinesResultSetFixture.getExpectedNextValues();\n List<ImmutableList<String>> expectedRecords = twoLinesResultSetFixture.getExpectedRecords();\n for (int i = 0; i < twoLinesResultSetFixture.numberOfRows(); i++) {\n assertEquals(expectedNextValues.get(i), resultSetIterator.hasNext());\n assertEquals(expectedRecords.get(i), resultSetIterator.next());\n }\n assertEquals(expectedNextValues.get(twoLinesResultSetFixture.numberOfRows()),\n resultSetIterator.hasNext());\n // Next should have been called.\n verify(resultSet, times(3)).next();\n\n }", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "public V next()\n {\n if (hasNext())\n {\n V currentEntry = arrayDictionary.dictionary[cursor].getValue();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "@Override\r\n public Object next() {\r\n if (this.hasNext()) {\r\n Object temp = this.nextMatchingFile;\r\n this.nextMatchingFile = this.callNext();\r\n return temp;\r\n } else {\r\n throw new NoSuchElementException(\"There is no other file object in the directory.\");\r\n }\r\n}", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "private void getNext() {\n Node currNode = getScreenplayElem().getChildNodes().item(currPos++);\n while (currNode.getNodeType() != Node.ELEMENT_NODE) {\n currNode = getScreenplayElem().getChildNodes().item(currPos++);\n }\n currElem = (Element) currNode;\n }", "public void next() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getNextMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getNextModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "public SAMRecord next() {\n SAMRecord rec = wrappedIterator.next();\n\n // Always consolidate the cigar string into canonical form, collapsing zero-length / repeated cigar elements.\n // Downstream code (like LocusIteratorByState) cannot necessarily handle non-consolidated cigar strings.\n rec.setCigar(AlignmentUtils.consolidateCigar(rec.getCigar()));\n\n // if we are using default quals, check if we need them, and add if necessary.\n // 1. we need if reads are lacking or have incomplete quality scores\n // 2. we add if defaultBaseQualities has a positive value\n if (defaultBaseQualities >= 0) {\n byte reads [] = rec.getReadBases();\n byte quals [] = rec.getBaseQualities();\n if (quals == null || quals.length < reads.length) {\n byte new_quals [] = new byte [reads.length];\n for (int i=0; i<reads.length; i++)\n new_quals[i] = defaultBaseQualities;\n rec.setBaseQualities(new_quals);\n }\n }\n\n // if we are using original quals, set them now if they are present in the record\n if ( useOriginalBaseQualities ) {\n byte[] originalQuals = rec.getOriginalBaseQualities();\n if ( originalQuals != null )\n rec.setBaseQualities(originalQuals);\n }\n\n return rec;\n }", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }", "@Override\r\n\t\tpublic Key next() {\n\t\t\tKey i=current.item;\r\n\t\t\tcurrent=current.next;\r\n\t\t\treturn i;\r\n\t\t}", "@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }", "@Override\n public E next() throws NoSuchElementException{\n lastItem = it.next();\n nextCount++;\n return(lastItem);\n }", "private void findNext() {\n \tthis.find(true);\n }", "public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public I next(){\n return (I) listI.get(index++);\n }", "private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(2, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public abstract void next();", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public E next() {\n\t\t\tif (mIterModCount != modCount) {\n\t\t\t\tSystem.out.println( mIterModCount + \" : \" + modCount);\n\t\t\t\tthrow new ConcurrentModificationException();\n\t\t\t}\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new java.util.NoSuchElementException();\n\t\t\tmLastNodeReturned = mCurrentNode;\n\t\t\tmCurrentNode = mCurrentNode.next;\n\t\t\tmCurrentIndex++;\n\t\t\tmLastIteration = NEXT;\n\t\t\treturn mLastNodeReturned.data;\n\t\t}", "@Override\n public T next() {\n current = current.next;\n return current.data;\n }" ]
[ "0.73010045", "0.7169512", "0.7070885", "0.69755447", "0.6877343", "0.6801309", "0.674337", "0.6716265", "0.6534677", "0.6436906", "0.6380165", "0.62783647", "0.62716675", "0.62643975", "0.6180814", "0.6154594", "0.6117845", "0.6113476", "0.60872376", "0.6050958", "0.6045977", "0.60224235", "0.60188407", "0.60160875", "0.6006693", "0.6005105", "0.59854335", "0.5980437", "0.5980089", "0.59773254", "0.59683144", "0.5966936", "0.59663224", "0.59384894", "0.5926339", "0.5926124", "0.5910963", "0.59077775", "0.59006554", "0.5900302", "0.5898223", "0.58933884", "0.5882935", "0.5860292", "0.58596003", "0.5832126", "0.5789695", "0.5783904", "0.5782113", "0.57772475", "0.5776727", "0.57763636", "0.5766371", "0.5763199", "0.5759336", "0.57578546", "0.57538795", "0.57420206", "0.5739211", "0.57220304", "0.57178915", "0.5711762", "0.5705129", "0.5703942", "0.56971455", "0.5670413", "0.56671035", "0.5661518", "0.5645286", "0.5642322", "0.56382847", "0.5635213", "0.5622769", "0.56201965", "0.5614851", "0.56097215", "0.5609259", "0.56044364", "0.5600704", "0.5596614", "0.55929935", "0.5590509", "0.55867743", "0.5582022", "0.5581505", "0.557009", "0.55596745", "0.5556263", "0.5546999", "0.55419225", "0.5540253", "0.5534944", "0.55270624", "0.5524832", "0.552263", "0.5520603", "0.5503428", "0.5500458", "0.5491684", "0.5484284" ]
0.5491814
98
Advance iterator to the next record.
@Override public WALRecord next() throws IgniteCheckedException { WALRecord rec = super.next(); if (rec == null) return null; if (rec.type() == CHECKPOINT_RECORD) { CheckpointRecord cpRec = (CheckpointRecord)rec; // We roll memory up until we find a checkpoint start record registered in the status. if (F.eq(cpRec.checkpointId(), status.cpStartId)) { log.info("Found last checkpoint marker [cpId=" + cpRec.checkpointId() + ", pos=" + rec.position() + ']'); needApplyBinaryUpdates = false; } else if (!F.eq(cpRec.checkpointId(), status.cpEndId)) U.warn(log, "Found unexpected checkpoint marker, skipping [cpId=" + cpRec.checkpointId() + ", expCpId=" + status.cpStartId + ", pos=" + rec.position() + ']'); } return rec; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }", "public void next() {\n\t\titerator.next();\n\t}", "private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }", "public IndexRecord getIteratorNext() {\n iter = (iter == next - 1 ? -1: iter + 1);\n return (iter == -1 ? null : data[iter]);\n }", "@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }", "public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }", "public Record next() {\n if (hasNext()) {\n if (nextRecord != null) {\n Record out = nextRecord;\n nextRecord = null;\n return out;\n }\n }\n throw new NoSuchElementException();\n //throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "public boolean onNextRecord(IDataTableRecord record) throws Exception;", "public void setNextRecord()\n {\n currRecord++;\n if (monitor != null)\n monitor.setPercentComplete(currRecord / maxRecords * 100);\n }", "public void next() {\n\t\t}", "public void Next() {\n OCCwrapJavaJNI.Interface_EntityIterator_Next(swigCPtr, this);\n }", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }", "private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}", "@Override\n public Object next() {\n Object retval = this.nextObject;\n advance();\n return retval;\n }", "public Item next() {\n\t\t\tif (!hasNext())\n\t\t\t\treturn null;\n lastAccessed = current;\n Item item = current.item;\n current = current.next; \n index++;\n return item;\n\t\t}", "public final void nextRow() {\n this.line++;\n }", "public void nextHard() {\n\t\titerator.next();\n\t}", "public T next(){\r\n return itrArr[position++];\r\n }", "public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}", "public void advance () {\n while (currentGroup == null ||\n (!actionIter.hasNext() && groupIter.hasNext()))\n {\n currentGroup = groupIter.next();\n actionIter = actions.iterator();\n }\n // now get the next action (assuming we're in valid state)\n currentAction = (actionIter.hasNext() ? actionIter.next() : null);\n }", "@Override\r\n\t\tpublic Item next() {\r\n\t\t\treturn arr[index++];\r\n\t\t}", "public Iterator<OpenERPRecord> iterator() {\r\n\t\treturn records.iterator();\r\n\t}", "@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}", "public void getNextRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.getNextRecord(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n public Integer next() {\n Integer res = next;\n advanceIter();\n return res;\n }", "@ActionTrigger(action=\"KEY-NXTREC\", function=KeyFunction.NEXT_RECORD)\n\t\tpublic void spriden_NextRecord()\n\t\t{\n\t\t\t\n\t\t\t\tif ( !isInLastRecord(true) )\n\t\t\t\t{\n\t\t\t\t\tnextRecord();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tinfoMessage(GNls.Fget(toStr(\"SOAIDNS-0001\"), toStr(\"FORM\"), toStr(\"At last record.\")));\n\t\t\t\t}\n\t\t\t}", "@Override\n public Integer next() {\n Integer result = null;\n if (checkCurrentIterator(this.currentIterator) && this.currentIterator.hasNext()) {\n while (this.currentIterator.hasNext()) {\n return this.currentIterator.next();\n }\n } else if (it.hasNext()) {\n this.currentIterator = getIterator(it);\n return this.next();\n }\n return result;\n }", "public byte[] nextRecord() {\n return (byte[]) resultsEnumeration.nextElement();\n }", "public Record next() {\n throw new UnsupportedOperationException(\"hw3: TODO\");\n }", "@Override\n\tpublic Integer next() {\n\t return iterator.next();\n\t}", "@Override\n\tpublic void next()\n\t{\n\n\t}", "public MapIterator advance()\n {\n this.MapItr = this.MapItr.rest(); \n \n return this;\n }", "public void next(){\n\t\tif(generated)\n\t\t\tcurr++;\n\t}", "private void advance() {\n assert currentItemState == ItemProcessingState.COMPLETED || currentIndex == -1\n : \"moving to next but current item wasn't completed (state: \" + currentItemState + \")\";\n currentItemState = ItemProcessingState.INITIAL;\n currentIndex = findNextNonAborted(currentIndex + 1);\n retryCounter = 0;\n requestToExecute = null;\n executionResult = null;\n assert assertInvariants(ItemProcessingState.INITIAL);\n }", "@Override\n\tpublic Row next(){\n\t\treturn res;\n\t}", "public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}", "@Override\r\n\tpublic void next() {\n\n\t}", "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (super.readLimit > 0 && super.recordCounter > super.readLimit) {\n nextLine = null;\n }\n }\n } catch (Exception ignore) {\n // no more lines\n }\n }", "@Override\n public Integer next() {\n if (next != null) {\n Integer next = this.next;\n this.next = null;\n return next;\n\n }\n\n return iterator.next();\n }", "@Override\n\tpublic void next() {\n\t\t\n\t}", "public void nextPage() {\n\t\tthis.skipEntries += NUM_PER_PAGE;\n\t\tloadEntries();\n\t}", "private void setNextIterator() {\n\t\t\t\n\t\t\tfor (int i = index; i < inconsistencies.size(); i++){\n\t\t\t\tSet<LPGInconsistency> inconsistencyList = inconsistencies.get(i);\n\t\t\t\tif (!inconsistencyList.isEmpty()) {\n\t\t\t\t\titerator = inconsistencyList.iterator();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tindex++;\n\t\t\t}\n\t\t}", "@Override\n public Item next() {\n if(!hasNext()) throw new NoSuchElementException(\"Failed to perform next because hasNext returned false!\");\n Item item = current.data;\n current = current.next;\n return item;\n }", "@Override\n void advance() {\n }", "@Override\n\t\tpublic Item next() {\n\t\t\tItem item=current.item;\n\t\t\tcurrent=current.next;\n\t\t\treturn item;\n\t\t}", "public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }", "public T next(){\n return (T)data[ci++];\n }", "public void next()\n {\n if (size != 0)\n {\n current = current.next();\n }\n }", "@Nonnull\n public Optional<ENTITY> next()\n {\n currentItem = Optional.of(items.get(++index));\n update();\n return currentItem;\n }", "@Override\n E next();", "@Override\r\n\tprotected void doNext() {\n\t\t\r\n\t}", "public void next() {\n addTracksToQueue();\n player.skipToNext();\n }", "public Object next()\n {\n return _iterator.next();\n }", "public Item next() {\r\n if (!hasNext()) throw new NoSuchElementException();\r\n lastAccessed = current;\r\n Item item = current.item;\r\n current = current.next;\r\n index++;\r\n return item;\r\n }", "public void next() {\n\t\tSystem.out.println(al.get(pos));\r\n\t\tpos++;\r\n\t}", "@Override\n public Integer next() {\n if (!isPeeked && hasNext())\n return iterator.next();\n int toReturn = peekedElement;\n peekedElement = -1;\n isPeeked = false;\n return toReturn;\n }", "private E next() {\n\t\tif (hasNext()) {\n\t\t\tE temp = iterator.data;\n\t\t\titerator = iterator.next;\n\t\t\treturn temp;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n public RadarContent next() {\n RadarContent p = pq.arrProfiles[iCursor];\n iCursor++;\n return p;\n }", "public void goNextLine () throws IOException {\n\t\treader.goNextLine();\n\t\tcurrentLine = reader.getCurrentLine();\n\t}", "public TableGenRow nextRow() {\n try {\n if(DBMacros.next(rs)) {\n return this;\n }\n } catch (Exception t) {\n dbg.ERROR(\"nextRow() Exception skipping to the next record!\");\n dbg.Caught(t);\n }\n return null;\n }", "public void next()\n {\n if (mHistoryIdx == mCommandList.size()) {\n return;\n }\n\n mCommandList.get(mHistoryIdx++).redo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }", "@Override\n public Integer next() {\n if (cur != null) {\n int temp = cur.intValue();\n cur = null;\n return temp;\n }\n\n if (iter.hasNext()) {\n return iter.next();\n }\n\n return null;\n }", "@Override\n protected Iterator<? extends Map<String, AttributeValue>> nextIterator(final int count) {\n if (count == 1) {\n return currentResult.getItems().iterator();\n }\n // subsequent chained iterators will be obtained from dynamoDB\n // pagination\n if ((currentResult.getLastEvaluatedKey() == null)\n || currentResult.getLastEvaluatedKey().isEmpty()) {\n return null;\n } else {\n request.setExclusiveStartKey(currentResult.getLastEvaluatedKey());\n currentResult = dynamoDBClient.query(request);\n return currentResult.getItems().iterator();\n }\n }", "private Token advance() {\n if(!isAtEnd()) current++;\n return previous();\n }", "@Override\n public SingleQuery next() {\n i++;\n current = queries.get(i);\n\n return current;\n }", "public void nextRecord( View v)\n {\n \t//\tClear out the display first\n \tclearBtn( v );\n \t//\tGo get the sheep id of this record\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tcursor.moveToNext();\n \tLog.i(\"in next record\", \"after moving the cursor \");\n \tthissheep_id = cursor.getInt(0);\n \tthissheep_name = cursor.getString(1);\n \tLog.i(\"in next record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tLog.i(\"in next record\", \"this sheep name is \" + thissheep_name);\n \trecNo += 1;\n \tfindTagsShowAlert(v, thissheep_id);\n//\t\t// I've moved forward so I need to enable the previous record button\n\t\tButton btn3 = (Button) findViewById( R.id.prev_rec_btn );\n\t\tbtn3.setEnabled(true);\t \t\n \tif (recNo == (nRecs)) {\n \t\t// at end so disable next record button\n \t\tButton btn2 = (Button) findViewById( R.id.next_rec_btn );\n \tbtn2.setEnabled(false); \t\t\n \t}\n }", "public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}", "@Override\n\t\tpublic T next() {\n\t\t\tmoveToNextIndex();\n\t\t\treturn objectAtIndex(_indicesByInsertOrder[_index]);\n\t\t}", "public Data nextData()\r\n\t\t{\r\n\t\t\treturn this.nextData;\r\n\t\t}", "public boolean MoveNext()\r\n { \r\n _index++;\r\n\r\n return _index < Count;\r\n }", "public void next()\n\t{\n\t\tif(this.curseur < this.listeTapis.size() - 1)\n\t\t{\n\t\t\tthis.curseur++;\n\t\t}\n\t}", "public void nextIteration()\n {\n actuelIteration++;\n }", "@Test\n public void testNext() throws SQLException, InputIterationException {\n // Setup\n ResultSet resultSet = twoLinesResultSetFixture.getTestData();\n ResultSetIterator resultSetIterator = new ResultSetIterator(resultSet);\n\n // Check result\n List<Boolean> expectedNextValues = twoLinesResultSetFixture.getExpectedNextValues();\n List<ImmutableList<String>> expectedRecords = twoLinesResultSetFixture.getExpectedRecords();\n for (int i = 0; i < twoLinesResultSetFixture.numberOfRows(); i++) {\n assertEquals(expectedNextValues.get(i), resultSetIterator.hasNext());\n assertEquals(expectedRecords.get(i), resultSetIterator.next());\n }\n assertEquals(expectedNextValues.get(twoLinesResultSetFixture.numberOfRows()),\n resultSetIterator.hasNext());\n // Next should have been called.\n verify(resultSet, times(3)).next();\n\n }", "public void testNext() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n assertTrue(test1.getValue().inRange(0));\n test1.next();\n assertTrue(test1.getValue().inRange(1));\n test1.next();\n assertTrue(test1.getValue().inRange(2));\n for (int i = 0; i < 10; i++) {\n test1.next();\n }\n assertEquals(10, test1.currPos());\n }", "public V next()\n {\n if (hasNext())\n {\n V currentEntry = arrayDictionary.dictionary[cursor].getValue();\n cursor++;\n nextEntry = currentEntry;\n return currentEntry;\n } \n else\n throw new NoSuchElementException();\n // end if\n }", "public void next() throws IOException {\r\n if (hasNext()) {\r\n line = next;\r\n next = null;\r\n\r\n int split = line.indexOf('=');\r\n fid = line.substring(0, split);\r\n text = line.substring(split + 1).split(\"\\\\|\", -1);//use -1 as limit to include empty trailing spaces\r\n if (type.getAttributeCount() != text.length)\r\n throw new DataSourceException(\"format error: expected \" + type.getAttributeCount()\r\n + \" attributes, but found \" + text.length + \". [\" + line + \"]\");\r\n } else {\r\n throw new NoSuchElementException();\r\n }\r\n }", "@Override\r\n public Object next() {\r\n if (this.hasNext()) {\r\n Object temp = this.nextMatchingFile;\r\n this.nextMatchingFile = this.callNext();\r\n return temp;\r\n } else {\r\n throw new NoSuchElementException(\"There is no other file object in the directory.\");\r\n }\r\n}", "private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }", "private void getNext() {\n Node currNode = getScreenplayElem().getChildNodes().item(currPos++);\n while (currNode.getNodeType() != Node.ELEMENT_NODE) {\n currNode = getScreenplayElem().getChildNodes().item(currPos++);\n }\n currElem = (Element) currNode;\n }", "public void next() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getNextMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getNextModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }", "public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }", "public SAMRecord next() {\n SAMRecord rec = wrappedIterator.next();\n\n // Always consolidate the cigar string into canonical form, collapsing zero-length / repeated cigar elements.\n // Downstream code (like LocusIteratorByState) cannot necessarily handle non-consolidated cigar strings.\n rec.setCigar(AlignmentUtils.consolidateCigar(rec.getCigar()));\n\n // if we are using default quals, check if we need them, and add if necessary.\n // 1. we need if reads are lacking or have incomplete quality scores\n // 2. we add if defaultBaseQualities has a positive value\n if (defaultBaseQualities >= 0) {\n byte reads [] = rec.getReadBases();\n byte quals [] = rec.getBaseQualities();\n if (quals == null || quals.length < reads.length) {\n byte new_quals [] = new byte [reads.length];\n for (int i=0; i<reads.length; i++)\n new_quals[i] = defaultBaseQualities;\n rec.setBaseQualities(new_quals);\n }\n }\n\n // if we are using original quals, set them now if they are present in the record\n if ( useOriginalBaseQualities ) {\n byte[] originalQuals = rec.getOriginalBaseQualities();\n if ( originalQuals != null )\n rec.setBaseQualities(originalQuals);\n }\n\n return rec;\n }", "public T nextElement() {\r\n\t\treturn items[currentObject++];\r\n \t}", "public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }", "@Override\r\n\t\tpublic Key next() {\n\t\t\tKey i=current.item;\r\n\t\t\tcurrent=current.next;\r\n\t\t\treturn i;\r\n\t\t}", "@Override\n public T next() {\n if (nextItem == null)\n throw new NoSuchElementException();\n T item = nextItem;\n lastItem = nextItem;\n remainingItemCount.decrement();\n if (remainingItemCount.isZero())\n getNextReady();\n return item;\n }", "@Override\n public E next() throws NoSuchElementException{\n lastItem = it.next();\n nextCount++;\n return(lastItem);\n }", "private void findNext() {\n \tthis.find(true);\n }", "public T next(){\r\n\t\t\tif (expectedModCount != modCount){\r\n\t\t\t\tthrow new ConcurrentModificationException();\r\n\t\t\t}\r\n\t\t\tT passed = current;\r\n\t\t\tif ((currentNode.next==endMarker)&&(currentNode.getLast()==current)){\r\n\t\t\t\tcurrentNode = endMarker;\r\n\t\t\t\tcurrent = null;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\r\n\t\t\tif (currentNode.indexOf(current)==currentNode.getArraySize()-1){\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t\tcurrent = currentNode.getFirst();\r\n\t\t\t\tidx = 0;\r\n\t\t\t\treturn passed;\r\n\t\t\t}\t\r\n\t\t\tidx++;\r\n\t\t\tcurrent = currentNode.get(idx);\r\n\t\t\treturn passed;\r\n\t\t}", "public IndexRecord getIterator() {\n return (iter == -1 ? null : data[iter]);\n}", "public I next(){\n return (I) listI.get(index++);\n }", "private void next() {\n\t\tParcel pc = Parcel.obtain();\n\t\tParcel pc_reply = Parcel.obtain();\n\t\ttry {\n\t\t\tSystem.out.println(\"DEBUG>>>pc\" + pc.toString());\n\t\t\tSystem.out.println(\"DEBUG>>>pc_replay\" + pc_reply.toString());\n\t\t\tib.transact(2, pc, pc_reply, 0);\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public abstract void next();", "@Override\r\n public T next() {\r\n if (hasNext()) {\r\n node = node.next();\r\n nextCalled = true;\r\n return node.getData();\r\n }\r\n else {\r\n throw new NoSuchElementException(\"Illegal call to next(); \"\r\n + \"iterator is after end of list.\");\r\n }\r\n }", "public Object next()\n/* */ {\n/* 93 */ if (this.m_offset < this.m_array.length) {\n/* 94 */ Object localObject = this.m_array[this.m_offset];\n/* 95 */ advance();\n/* 96 */ return localObject;\n/* */ }\n/* 98 */ throw new NoSuchElementException();\n/* */ }", "public WALRecord next() throws IgniteCheckedException {\n try {\n for (;;) {\n if (!iterator.hasNextX())\n return null;\n\n IgniteBiTuple<WALPointer, WALRecord> tup = iterator.nextX();\n\n if (tup == null)\n return null;\n\n WALRecord rec = tup.get2();\n\n WALPointer ptr = tup.get1();\n\n rec.position(ptr);\n\n // Filter out records by group id.\n if (rec instanceof WalRecordCacheGroupAware) {\n WalRecordCacheGroupAware grpAwareRecord = (WalRecordCacheGroupAware) rec;\n\n if (!cacheGroupPredicate.apply(grpAwareRecord.groupId()))\n continue;\n }\n\n // Filter out data entries by group id.\n if (rec instanceof DataRecord)\n rec = filterEntriesByGroupId((DataRecord) rec);\n\n return rec;\n }\n }\n catch (IgniteCheckedException e) {\n boolean throwsCRCError = throwsCRCError();\n\n if (X.hasCause(e, IgniteDataIntegrityViolationException.class)) {\n if (throwsCRCError)\n throw e;\n else\n return null;\n }\n\n log.error(\"There is an error during restore state [throwsCRCError=\" + throwsCRCError + ']', e);\n\n throw e;\n }\n }", "public E next() {\n\t\t\tif (mIterModCount != modCount) {\n\t\t\t\tSystem.out.println( mIterModCount + \" : \" + modCount);\n\t\t\t\tthrow new ConcurrentModificationException();\n\t\t\t}\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new java.util.NoSuchElementException();\n\t\t\tmLastNodeReturned = mCurrentNode;\n\t\t\tmCurrentNode = mCurrentNode.next;\n\t\t\tmCurrentIndex++;\n\t\t\tmLastIteration = NEXT;\n\t\t\treturn mLastNodeReturned.data;\n\t\t}", "@Override\n public T next() {\n current = current.next;\n return current.data;\n }" ]
[ "0.73010045", "0.7169512", "0.7070885", "0.69755447", "0.6877343", "0.6801309", "0.674337", "0.6716265", "0.6534677", "0.6436906", "0.6380165", "0.62783647", "0.62716675", "0.62643975", "0.6180814", "0.6154594", "0.6117845", "0.6113476", "0.60872376", "0.6050958", "0.6045977", "0.60224235", "0.60188407", "0.60160875", "0.6006693", "0.6005105", "0.59854335", "0.5980437", "0.5980089", "0.59773254", "0.59683144", "0.5966936", "0.59663224", "0.59384894", "0.5926339", "0.5926124", "0.5910963", "0.59077775", "0.59006554", "0.5900302", "0.5898223", "0.58933884", "0.5882935", "0.5860292", "0.58596003", "0.5832126", "0.5789695", "0.5783904", "0.5782113", "0.57772475", "0.5776727", "0.57763636", "0.5766371", "0.5763199", "0.5759336", "0.57578546", "0.57538795", "0.57420206", "0.5739211", "0.57220304", "0.57178915", "0.5711762", "0.5705129", "0.5703942", "0.56971455", "0.5670413", "0.56671035", "0.5661518", "0.5645286", "0.5642322", "0.56382847", "0.5635213", "0.56201965", "0.5614851", "0.56097215", "0.5609259", "0.56044364", "0.5600704", "0.5596614", "0.55929935", "0.5590509", "0.55867743", "0.5582022", "0.5581505", "0.557009", "0.55596745", "0.5556263", "0.5546999", "0.55419225", "0.5540253", "0.5534944", "0.55270624", "0.5524832", "0.552263", "0.5520603", "0.5503428", "0.5500458", "0.5491814", "0.5491684", "0.5484284" ]
0.5622769
72
Format a route name.
private static String formatRouteName(Class<?> cls, String actionPath, int index) { String name = actionPath.replaceAll("/", "\\.").replaceAll("\\{", "").replaceAll("\\}", ""); if (".".equals(name)) { name = ".root"; } name = cls.getSimpleName() + name + "." + index; return name.toLowerCase(Locale.US); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String formatName(String name) {\n Character firstCharacter = name.charAt(0);\n firstCharacter = Character.toUpperCase(firstCharacter);\n\n final String remainingCharacters = name.substring(1);\n\n return String.valueOf(firstCharacter) + remainingCharacters;\n }", "public String formatName(String name) {\n return name.substring(0, 1).toUpperCase() + name.substring(1).toLowerCase();\n }", "void formatName(String name) throws NameFormatException;", "private String formatPropertyName(String property) {\r\n property = property.replace( '/', '.' );\r\n property = property.replace( '@', '.' );\r\n return StringExtend.validateString( property, \".\" );\r\n }", "public static String formatEnumName(String name) {\n String[] words = name.replace('_', ' ').split(\"\\\\s\");\n StringBuilder formatted = new StringBuilder(name.length());\n for (String word : words) {\n formatted.append(word.substring(0, 1).toUpperCase());\n formatted.append(word.substring(1).toLowerCase());\n formatted.append(' ');\n }\n return formatted.toString().trim();\n }", "String createRoute(RouteBean route);", "public void generateRouteNameString(){\n switch(routeName){\n case \"1A\": this.routeNameString = \"College Edinburgh\"; break;\n case \"1B\": this.routeNameString = \"College Edinburgh\"; break;\n case \"2A\": this.routeNameString = \"West Loop\"; break;\n case \"2B\": this.routeNameString = \"West Loop\"; break;\n case \"3A\": this.routeNameString = \"East Loop\"; break;\n case \"3B\": this.routeNameString = \"East Loop\"; break;\n case \"4\": this.routeNameString = \"York\"; break;\n case \"5\": this.routeNameString = \"Gordon\"; break;\n case \"6\": this.routeNameString = \"Harvard Ironwood\"; break;\n case \"7\": this.routeNameString = \"Kortright Downey\"; break;\n case \"8\": this.routeNameString = \"Stone Road Mall\"; break;\n case \"9\": this.routeNameString = \"Waterloo\"; break;\n case \"10\": this.routeNameString = \"Imperial\"; break;\n case \"11\": this.routeNameString = \"Willow West\"; break;\n case \"12\": this.routeNameString = \"General Hospital\"; break;\n case \"13\": this.routeNameString = \"Victoria Rd Rec Centre\"; break;\n case \"14\": this.routeNameString = \"Grange\"; break;\n case \"15\": this.routeNameString = \"University College\"; break;\n case \"16\": this.routeNameString = \"Southgate\"; break;\n case \"20\": this.routeNameString = \"NorthWest Industrial\"; break;\n case \"50\": this.routeNameString = \"Stone Road Express\"; break;\n case \"56\": this.routeNameString = \"Victoria Express\"; break;\n case \"57\": this.routeNameString = \"Harvard Express\"; break;\n case \"58\": this.routeNameString = \"Edinburgh Express\"; break;\n default: this.routeNameString = \"Unknown Route\"; break;\n }\n }", "public String getRouteName() {\n return routeName;\n }", "public static String camelify(String name) {\n int dash = name.indexOf('-');\n return dash < 0? name : camelify(name, dash);\n }", "static private String formats(String target)\n\t{\n\t\tString tmp = target.trim();\n\t\tif (tmp.length() < 1) return \"NaName\";\n\t\treturn (Character.toString(tmp.charAt(0)).toUpperCase()) + tmp.substring(1,tmp.length()).toLowerCase();\n\t}", "@Override\n public String toParamName(String name) {\n name = name.replaceAll(\"-\", \"_\");\n\n // if it's all uppper case, do nothing\n if (name.matches(\"^[A-Z_]*$\")) {\n return name;\n }\n\n // camelize(lower) the variable name\n // pet_id => petId\n name = camelize(name, true);\n\n // for reserved word or word starting with number, append _\n if (reservedWords.contains(name) || name.matches(\"^\\\\d.*\")) {\n name = escapeReservedWord(name);\n }\n\n return name;\n }", "private String printRoute() {\n String r = String.valueOf(this.route.get(0));\n int index = 1;\n while (index < this.route.size()) {\n r = r + \" - \" + this.route.get(index);\n index++;\n }\n return r;\n }", "private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}", "protected String getMetricName(MetricName metricName) {\n return format(\"%s.%s\", metricName.group(), metricName.name());\n }", "@Override\n public String toString() {\n String name = this.name().substring(0,1);\n if (this.name().length() > 1) {\n for (int i = 1; i < this.name().length(); i++) {\n String charAt = this.name().substring(i, i + 1);\n if (charAt.equals(\"_\"))\n charAt = \" \";\n name += charAt.toLowerCase();\n }\n }\n return name;\n }", "private static String capName(String name) { return name.substring(0, 1).toUpperCase() + name.substring(1); }", "private String printRoute(Rota r) {\n StringBuilder s = new StringBuilder();\n\n for (String d : r.getPontos()) {\n s.append(d + \"->\");\n }\n s = s.replace(s.length() - 2, s.length(), \".\");\n\n return s.toString();\n }", "private String printName() {\n \t\treturn GPSFilterTextUtils.printName( this.getResources(), this.area.getName() );\n \t}", "public RouteInterface setName(String name);", "private String toPropertyName(String element) {\n String refPropertyName = handleRefProperty(element);\n if (refPropertyName != null) {\n return refPropertyName;\n }\n\n StringBuilder sb = new StringBuilder();\n char[] chars = element.toCharArray();\n boolean upper = true;\n for (char c : chars) {\n if (c == '_' || c == '-' || c == '.') {\n upper = true;\n } else if (upper) {\n sb.append(Character.toUpperCase(c));\n upper = false;\n } else {\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public static String underscoreName(String name) {\n\t\treturn name.substring(0, 1).toLowerCase() + name.substring(1).replaceAll(\"([A-Z])\", \"_$1\").toLowerCase();\n\t}", "public String normalizePathName( final String name );", "public static String formatRelationship(String relationship) {\n\t\tDate asofToday = ErdUtils.asOfToday();\n\t\tPsTranslationItem psXlatItem = PsTranslationItem.findByFieldNameAndFieldValueAndEffectiveDate(\"RELATIONSHIP\", relationship, asofToday);\n\t\trelationship = psXlatItem.getXlatLongName();\n\t\tif(relationship != null) {\n\t\t\trelationship = relationship.toUpperCase();\n\t\t\tif(relationship.length() > 20) {\n\t\t\t\trelationship = relationship.substring(0, 20);\n\t\t\t}\n\t\t}\n\t\treturn relationship;\n\t}", "private static String createNameForProperty(String prop) {\r\n if (prop == null)\r\n return \"property\";\r\n String theProp = prop;\r\n\r\n // remove last \"AnimationProperties\"\r\n if (theProp.length() > 10\r\n && theProp.substring(theProp.length() - 10).equalsIgnoreCase(\r\n \"properties\"))\r\n theProp = theProp.substring(0, theProp.length() - 10);\r\n // first char is lowercase\r\n if (theProp.length() > 0)\r\n theProp = theProp.toLowerCase().charAt(0) + theProp.substring(1);\r\n return theProp;\r\n }", "public static String adviceName(String nameAsIdentifier, AdviceKind kind, int adviceSeqNumber,int pcdHash) {\n \t\tString newname = makeName(\n \t\t\tkind.getName(),\n \t\t\tnameAsIdentifier,\n \t\t\tInteger.toString(adviceSeqNumber),\n \t\t\tInteger.toHexString(pcdHash));\n \t\treturn newname;\n \t}", "String formatPhoneNumber(String phoneNumber);", "@Override\n public String name(String name, Meter.Type type, @Nullable String baseUnit) {\n String conventionName = NamingConvention.snakeCase.name(name, type, baseUnit);\n\n switch (type) {\n case COUNTER:\n case DISTRIBUTION_SUMMARY:\n case GAUGE:\n if (baseUnit != null && !conventionName.endsWith(\"_\" + baseUnit))\n conventionName += \"_\" + baseUnit;\n break;\n }\n\n switch (type) {\n case COUNTER:\n if (!conventionName.endsWith(\"_total\"))\n conventionName += \"_total\";\n break;\n case TIMER:\n case LONG_TASK_TIMER:\n if (conventionName.endsWith(timerSuffix)) {\n conventionName += \"_seconds\";\n }\n else if (!conventionName.endsWith(\"_seconds\"))\n conventionName += timerSuffix + \"_seconds\";\n break;\n }\n\n String sanitized = nameChars.matcher(conventionName).replaceAll(SEPARATOR);\n if (!Character.isLetter(sanitized.charAt(0))) {\n sanitized = \"m_\" + sanitized;\n }\n return sanitized;\n }", "public static String genMethodName(String name, String prefix, String suffix) {\n StringBuilder b = new StringBuilder();\n if (prefix != null)\n b.append(prefix);\n\n int l = name.length();\n int start = 0;\n while (true) {\n int index = name.indexOf('_', start);\n int end = index == -1 ? l : index;\n if (end > start) {\n if (b.length() > 0)\n b.append(Character.toUpperCase(name.charAt(start++)));\n if (end > start)\n b.append(name, start, end);\n }\n if (index == -1)\n break;\n else\n start = index + 1;\n }\n\n if (suffix != null)\n b.append(suffix);\n return b.toString();\n }", "private String shortPrefix(String name) {\r\n StringBuilder b = new StringBuilder();\r\n String[] splits = name.split(\"_\");\r\n for (int i = 0; i < splits.length; ++i) {\r\n if (splits[i].length() > 0) {\r\n b.append(splits[i].charAt(0));\r\n }\r\n }\r\n if (b.length() < 3) {\r\n b.append(Integer.toString(name.length() % 10));\r\n }\r\n return b.toString().toLowerCase();\r\n }", "public static String getValidName(String name) {\n return name.toLowerCase(Locale.getDefault()).replace(\"_\", \"-\").replace(\".\", \"-\");\n }", "public String formatName(String artName){\n\t\tif (game.getArtist().equals(\"Michael Jackson\"))\n\t\t\treturn \"MichaelJackson\";\n\t\telse if (game.getArtist().equals(\"Whitney Houston\"))\n\t\t\treturn \"WhitneyHouston\";\n\t\telse if (game.getArtist().equals(\"Mariah Carey\"))\n\t\t\treturn \"MariahCarey\";\n\t\telse if (game.getArtist().equals(\"Carrie Underwood\"))\n\t\t\treturn \"CarrieUnderwood\";\n\t\telse if (game.getArtist().equals(\"Taylor Swift\"))\n\t\t\treturn \"TaylorSwift\";\n\t\telse if (game.getArtist().equals(\"The Beatles\"))\n\t\t\treturn \"TheBeatles\";\n\t\telse\n\t\t\treturn artName;\n\t}", "public static String formatRouteId(String routeId) { //routeId must be in format AAXXX where A represents an uppercase letter and X represents a number. Can have 1 to 3 X's. \r\n String temp;\r\n char toCompare; //char for comparing; only needs to be loaded once per comparison\r\n \r\n try {\r\n if (routeId.length() >= ROUTEID_MIN_LEN && routeId.length() <= ROUTEID_MAX_LEN) { //check if routeId is the right length; >=3 and <= 6\r\n routeId = routeId.toUpperCase(); //changes ALL lowercase chars to uppercase\r\n for (int i = 0; i < 2; i++) { //check first two chars\r\n toCompare = routeId.charAt(i); //get toCompare from the routeId String (doing this way only needs to call String.charAt(int) once instead of twice in the if statement)\r\n if (toCompare < 'A' || toCompare > 'Z') { //check if the char is NOT from A to Z\r\n throw new InputMismatchException(); //throw error\r\n }\r\n //do nothing if char toCompare is valid\r\n }\r\n for (int i = 2; i < routeId.length(); i++) { //check remaining chars\r\n toCompare = routeId.charAt(i);\r\n if (toCompare < '0' || toCompare > '9') { //if char toCompare is NOT from 0-9\r\n throw new InputMismatchException(); //throw error\r\n }\r\n //do nothing if char toCompare is valid\r\n }\r\n }\r\n else { //string length incorrect\r\n throw new InputMismatchException(); //throw error\r\n }\r\n return routeId; //return a correctly formated routeId after routeId has passed all checks\r\n }\r\n catch (InputMismatchException ime) { //routeId is bad\r\n System.out.println(\"Route ID is not of the correct format.\"); //output error message\r\n return null; //return null String\r\n }\r\n }", "private static String padActorName(String name) {\n\t\tif(name.length() >= 29) {\n\t\t\tname = name.substring(0, 25);\n\t\t\tname += \"...\";\n\t\t}\n\t\twhile(name.length() != 28) {\n\t\t\tname += \" \";\n\t\t}\n\t\treturn name;\n\t}", "private static String buildName(String title)\n {\n // The name is based on the title, but with underscores\n String name = title.replace(' ', '_');\n name = name.replaceAll(\"\\\"\", \"%22\");\n name = name.replaceAll(\"[*]\", \"%2a\");\n name = name.replaceAll(\"<\", \"%3c\");\n name = name.replaceAll(\">\", \"%3e\");\n name = name.replaceAll(\":\", \"%3a\");\n name = name.replaceAll(\"([.]?[.]+$)\", \"%2e\");\n return name;\n }", "private String toCamelCaseUnderscore(String concept) {\n\t\tStringBuffer newConcept = new StringBuffer(\"\");\n\t\t// concept = concept.replace(\" \", \"_\");\n\t\tStringTokenizer token = new StringTokenizer(concept, \" \");\n\t\tboolean firstTest = true;\n\t\twhile (token.hasMoreTokens()) {\n\t\t\tif (!firstTest) {\n\t\t\t\tnewConcept.append(\"_\");\n\t\t\t}\n\t\t\tfirstTest = false;\n\t\t\tString str = (String) token.nextElement();\n\t\t\tstr = str.substring(0, 1).toUpperCase()\n\t\t\t\t\t+ str.substring(1).toLowerCase();\n\t\t\tnewConcept.append(str);\n\t\t}\n\n\t\tconcept = newConcept.toString();\n\n\t\treturn concept;\n\t}", "@Override\r\n public String toString() {\r\n String prettyName = this.name();\r\n prettyName = prettyName.toLowerCase();\r\n prettyName = Utils.capitalizeFirstLetter(prettyName);\r\n \r\n return prettyName;\r\n }", "public String chName(String address) {\n\n if (Locale.getDefault().getLanguage() == \"en\") {//Check System Language\n\n if (address.contains(\"Hang Hau\")) {\n newName = \"HangHau\";\n } else if (address.contains(\"Po Lam\")) {\n newName = \"PoLam\";\n } else {\n newName = \"HangHau\";\n }//default, prevent error\n\n } else if (Locale.getDefault().getLanguage() == \"zh\") {\n\n\n if (address.contains(\"坑口\")) {\n newName = \"HangHau_ZH\";\n } else if (address.contains(\"寶琳\")) {\n newName = \"PoLam_ZH\";\n } else {\n newName = \"HangHau_ZH\";\n }//default, prevent error\n }\n return newName;\n }", "public static String toCamelCase(String name)\r\n {\r\n StringBuffer buffer = new StringBuffer();\r\n String[] tokens = name.split(\"_\");\r\n if (tokens != null && tokens.length > 0)\r\n {\r\n for (int ctr = 0; ctr < tokens.length; ctr++)\r\n {\r\n buffer.append(StringUtils.capitalize(tokens[ctr].toLowerCase()));\r\n }\r\n }\r\n else\r\n {\r\n buffer.append(StringUtils.capitalize(name.toLowerCase()));\r\n }\r\n return buffer.toString();\r\n }", "String normalizeName(String tag) {\n\t\tStringBuffer buf = new StringBuffer();\n\t\t\n\t\tboolean newWord = true;\n\t\t// capitalize first letter of each word\n\t\t// remove -'s and _'s\n\t\tfor (int i = 0; i < tag.length(); i++) {\n\t\t\tchar c = tag.charAt(i);\n\t\t\tif (c == '-' || c == '_') {\n\t\t\t\tnewWord=true;\n\t\t\t} else if (newWord) {\n\t\t\t\tbuf.append(Character.toUpperCase(c));\n\t\t\t\tnewWord = false;\n\t\t\t} else {\n\t\t\t\tbuf.append(c);\n\t\t\t\tnewWord = false;\n\t\t\t}\n\t\t}\n\t\treturn buf.toString().trim();\n\t}", "private String formatServletRoute(String pluginBase, String servletRelative) {\n\t\tif (pluginBase.startsWith(\"/\")) {\n\t\t\tpluginBase = pluginBase.substring(1);\n\t\t}\n\t\tif (pluginBase.endsWith(\"/\")) {\n\t\t\tpluginBase = pluginBase.substring(0, pluginBase.length() - 1);\n\t\t}\n\n\t\tif (servletRelative == null || servletRelative.isEmpty()) {\n\t\t\treturn String.format(\"/%s/\", pluginBase);\n\t\t}\n\n\t\tif (servletRelative.startsWith(\"/\")) {\n\t\t\tservletRelative = servletRelative.substring(1);\n\t\t}\n\t\tif (servletRelative.endsWith(\"/\")) {\n\t\t\tservletRelative = servletRelative.substring(0,\n\t\t\t\t\tservletRelative.length() - 1);\n\t\t}\n\n\t\treturn String.format(ROUTE_REGEX, pluginBase, servletRelative);\n\t}", "public static String repairName(ITPerson person) {\n String[] toRepairName = person.getName().split(\"_\");\n String correctedName = toRepairName[0]+ \" \" + toRepairName[1];\n return correctedName;\n }", "private String methodNameMask(String name) {\n\t\tString[] words = name\n\t\t\t\t.replaceAll(\"[\\\\d\\\\'\\\\+\\\\-\\\\:\\\\;\\\\(\\\\)\\\\[\\\\]\\\\{\\\\}\\\\~\\\\^\\\\*\\\\&\\\\#\\\\@\\\\$\\\\<\\\\>\\\\,\\\\_\\\\.\\\\\\\"]\", \"\")\n\t\t\t\t.split(\" \");\n\t\tString forReturn = words[0];\n\t\tfor (int i = 1; i < words.length; i++) {\n\t\t\tif (words[i].isEmpty())\n\t\t\t\tcontinue;\n\t\t\tif (Character.isDigit(words[i].charAt(0)))\n\t\t\t\tforReturn = forReturn + words[i];\n\t\t\telse\n\t\t\t\tforReturn = forReturn + words[i].replaceFirst(String.valueOf(words[i].charAt(0)),\n\t\t\t\t\t\tString.valueOf(words[i].charAt(0)).toUpperCase());\n\t\t}\n\t\treturn forReturn;\n\t}", "public String getName(){\n \treturn this.name().replace(\"_\", \" \");\n }", "public String getNewName(String oldName) {\n\t\t\t// test for a matching pattern\n\t\t\tPattern p = Pattern.compile(pattern);\n\t\t\tMatcher m = p.matcher(oldName);\n\t\t\tif (m.matches()) {\n\t\t\t\tswitch (remapType) {\n\t\t\t\tcase ADD_PREFIX: return opStr + oldName;\n\t\t\t\tcase ADD_SUFFIX: return oldName + opStr;\n\t\t\t\tcase REGEX_GROUPS:\n\t\t\t\t\tString newName = oldName;\n\t\t\t\t\tfor (int gidx=1; gidx<=m.groupCount(); gidx++)\n\t\t\t\t\t\tnewName = newName.replaceFirst(\"%\" + gidx, m.group(gidx));\n\t\t\t\t\treturn newName;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private String format(String text) {\n if(text != null && !text.isEmpty())\n return text.substring(0, 1).toUpperCase(Locale.ENGLISH) + text.substring(1);\n else\n return \"\";\n }", "private String formatDirections(RouteFormatter formatter)\n {\n \tif(currDirections == null){\n \t\tthrow new IllegalStateException(\"directions object should not be null at this point\");\n \t}\n \t\n\t\t// start the string\n \tStringBuilder instruct = new StringBuilder();\n\t\tinstruct.append(\"Start at \"+currDirections.getStart()+\"\\n\");\n\t\t\n\t\tIterator<String> iter = currDirections.iterator();\n\t\twhile(iter.hasNext()){\n\t\t\tinstruct.append(iter.next()+\"\\n\");\n\t\t}\n\t\t//distinguish between miles and minutes\n\t\tif(formatter instanceof WalkingRouteFormatter){\n\t\t\t//output.println(\"Trip time: \" + (Math.round(navigate.getLength()) * 20) + \" minutes\");\n\t\t\t\n\t\t\tinstruct.append(\"Trip time: \"+Math.round(currDirections.getLength()*20)+\" minutes\\n\\n\\n\");\n\t\t}else if(formatter instanceof DrivingRouteFormatter){\n\t\t\t//DecimalFormat printer = new DecimalFormat(\"#.#\"); // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\t\t\t\n\t\t\tinstruct.append(\"Trip length: \"+(Math.round(currDirections.getLength()*10))/10.0+\" miles\\n\\n\\n\");\n\t\t}else{\n\t\t\tthrow new IllegalArgumentException(\"Directions implementor class not recognized\");\n\t\t}\n\t\treturn instruct.toString();\n }", "private static String formatTime(String time) {\n\t\treturn String.format(\"%s:%s\", time.substring(0, 2), time.substring(2));\n\t}", "static String normalizePropertyName(String name, String... ignorePrefixes) {\n if (ignorePrefixes.length > 0) {\n return normalizePropertyName(stripPrefixes(name, ignorePrefixes));\n }\n if (name == null || name.isEmpty()) {\n return name;\n } else if (!name.contains(\".\") && !name.contains(\"-\")) {\n return name;\n } else {\n String[] parts = name.replaceAll(\" \", \"\").split(\"-|\\\\.\");\n StringBuilder sb = new StringBuilder();\n if (parts.length > 0) {\n sb.append(parts[0]);\n for (int i = 1; i < parts.length; i++) {\n String s = parts[i-1].length() > 0 ?\n parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1) :\n parts[i];\n sb.append(s);\n }\n }\n return sb.toString();\n }\n }", "public static String formatMonthName(Month month) {\n if(month == null) {\n return null;\n }\n\n String m = month.toString();\n return m.substring(0, 1).toUpperCase() + m.substring(1,3).toLowerCase();\n }", "public static String mungeNamespace (String name) {\r\n\t\treturn name.replaceFirst(\"^([^:]*):\", \"_$1_\");\r\n\t}", "private String formatGroupName (String groupName) {\n\t\treturn groupName;\n\t}", "public static final String javaName(String s) {\n StringBuffer n = new StringBuffer(s);\n for (int i = 0; i < s.length(); ++i) {\n if (i == 0) n.setCharAt(i, Character.toUpperCase(n.charAt(i)));\n if (!Character.isLetterOrDigit(n.charAt(i))) \n\tn.setCharAt(i, '_');\n }\n return n.toString();\n }", "public String provideFullName( )\r\n {\r\n return String.format( \"%s %s\",\r\n getFirstNm( ),\r\n getLastNm( ) );\r\n }", "static String m33126a(String name, String separator) {\n StringBuilder translation = new StringBuilder();\n int length = name.length();\n for (int i = 0; i < length; i++) {\n char character = name.charAt(i);\n if (Character.isUpperCase(character) && translation.length() != 0) {\n translation.append(separator);\n }\n translation.append(character);\n }\n return translation.toString();\n }", "public String generateRuleName(AbstractGenerateParms genParams) {\r\n\t\t// rule number\r\n\t\tnextRuleNumber++;\r\n\t\t// date string\r\n\t\tDate date = new Date();\r\n\t\tString datestr = (new SimpleDateFormat(\"'D'dd-MM-yyyy-'T'HH-mm-ss\")).format(date);\r\n\t\tString ruleNameSeed = getSeedName(genParams.getUsage());\r\n\r\n\t\treturn ruleNameSeed + \"-\" + genParams.getID() + \"-R\" + genParams.getRowNum() + \"-\" + nextRuleNumber + \"-\" + datestr;\r\n\t}", "public static String formatTitle(String title)\n {\n char[] temp = title.trim().toCharArray();\n int count = 0;\n for (char c : temp) {\n if (c == ' ') {\n temp[count] = '_';\n } else if (c == '_') {\n temp[count] = ' ';\n }\n count++;\n }\n \n return String.valueOf(temp);\n \n }", "private String formatLoggerName(LogRecord record)\n\t{\n\t\tString loggerName = record.getLoggerName();\n\t\tif(loggerName.startsWith(LOG_SOURCE_PREFIX))\n\t\t{\n\t\t\tloggerName = loggerName.substring(LOG_SOURCE_PREFIX.length());\n\t\t}\n\t\treturn loggerName;\n\t}", "public String newHumanName() {\n return String.format(\"%s %s\", newName(4, 6), newName(4, 8));\n }", "private String transformName(String originName,String prefix,String separator){\n if(StringUtils.isNotBlank(originName)){\n originName = StringUtils.removeStart(originName,prefix);\n }\n if(StringUtils.isNotBlank(separator)){\n List<String> names = Splitter.on(separator).omitEmptyStrings().trimResults().splitToList(originName);\n List<String> javaStyleNames = Lists.transform(names, new Function<String, String>() {\n public String apply(String input) {\n return ContextUtil.onlyFirstLetterIsUp(input);\n }\n });\n originName = Joiner.on(\"\").join(javaStyleNames);\n }else {\n originName = ContextUtil.onlyFirstLetterIsUp(originName);\n }\n return ContextUtil.upperFirstLetter(originName);\n }", "public String toString() {return name().charAt(0) + name().substring(1).toLowerCase();}", "private void formatPhoneNum() {\n\t\tthis.phoneNum = \"(\" + this.phoneNum.substring(0, 3) + \") \" + this.phoneNum.substring(3, 6) + \" \"\n\t\t\t\t+ this.phoneNum.substring(6);\n\t}", "String printName(String input);", "String getSegmentName();", "public String getRoutename() {\r\n return routename;\r\n }", "@Nonnull\n String formatTypeName(@Nonnull String unformattedTypeName);", "@Override\n public String generateLayoutName(String objectName){\n Scanner in = new Scanner(objectName);\n String out = \"\";\n String x = in.next();\n int z = x.length();\n for(int y = 0; y < z; y++){\n if(Character.isUpperCase(x.charAt(y))){\n out = out+\"_\"+(Character.toLowerCase(x.charAt(y)));\n\n }else{\n out = out+x.charAt(y);\n }\n }\n return \"activity\"+out;\n }", "String getRouteID();", "private String escape(String name) {\n return name.replaceAll(\"[^a-zA-Z0-9.-]\", \"_\");\n }", "public static String fNameFromABIName(String name) {\n String nameWithout_I = name.substring(2);\n int _idx = nameWithout_I.lastIndexOf('_');\n return _idx == -1 ? nameWithout_I : nameWithout_I.substring(0, _idx);\n }", "java.lang.String getRoomName();", "private String centerName(int totalLength) {\n\t\tString name = getHotel().getName().toUpperCase();\n\t\tint spaces = totalLength - name.length();\n\t\tif (!(spaces % 2 == 1)) {\n\t\t\tspaces--;\n\t\t\tname += \" \";\n\t\t}\n\t\tfor (int i = 0; i < spaces / 2; i++) {\n\t\t\tname = \" \" + name + \" \";\n\t\t}\n\t\treturn \" \" + name;\n\t}", "private String getAbbreviatedName(String name) {\n if (!isTooLarge(name)) {\n return name;\n }\n\n String[] partNames = name.split(\" \");\n\n // Abbreviate middle names:\n for (int i = 1; i < partNames.length - 1 && isTooLarge(Utils.join(\" \", partNames)); i++) {\n partNames[i] = partNames[i].charAt(0) + \".\";\n }\n\n // Remove middle names:\n while (partNames.length > 2 && isTooLarge(Utils.join(\" \", partNames))) {\n String[] newPartNames = new String[partNames.length - 1];\n newPartNames[0] = partNames[0];\n for (int i = 1; i < newPartNames.length; i++) {\n newPartNames[i] = partNames[i + 1];\n }\n partNames = newPartNames;\n }\n\n if (!isTooLarge(Utils.join(\" \", partNames))) {\n return Utils.join(\" \", partNames);\n } else if (!isTooLarge(partNames[0].charAt(0) + \". \" + partNames[1])) {\n return partNames[0].charAt(0) + \". \" + partNames[1];\n } else if (!isTooLarge(partNames[0] + \" \" + partNames[1].charAt(0) + \".\")) {\n return partNames[0] + \" \" + partNames[1].charAt(0) + \".\";\n } else {\n return partNames[0].charAt(0) + \". \" + partNames[1].charAt(0) + \".\";\n }\n }", "public static String getNameFormattedString(String string) {\n if (string != null && string.length() > 0) {\n StringBuilder formatted = new StringBuilder(string.toLowerCase());\n formatted.setCharAt(0, Character.toUpperCase(formatted.charAt(0)));\n return formatted.toString();\n }\n return \"\";\n }", "public static final String getRouteName(Microcks microcks) {\n return microcks.getMetadata().getName();\n }", "private String escapeGraphiteMetricName(String metricName) {\n String metric = escape(metricName, \".\").replaceAll(\"%\", \"Percent\").replaceAll(\"-\", \".\").replaceAll(\"\\\\.+\", \".\").replaceAll(\"@\",\".\");\n\n if(metric.charAt(metric.length() -1 ) == '.'){\n metric = metric.substring(0, metric.length() - 1 );\n }\n if(metric.charAt(0) == '.'){\n metric = metric.substring(1, metric.length());\n }\n //String escapedMetric = (prefix + \".\" + metric).replaceAll(\"-\", \".\").replaceAll(\"\\\\.+\", \".\");\n return metric;\n }", "private static String getRoute(String route){\n\t\tString link = (isLocal ? url_local : url_prod) + route;\n\t\treturn link;\n\t}", "Caseless getName();", "static String generateTaskName(final Request<?> request) {\n return request.getBaseUriTemplate() + \" \"\n + OperationNameGenerator.generate(request.getMethod(), request.getMethodName());\n }", "public static String checkNameFormat(String str, String name, String error, String format) {\r\n String rep = \"\"; // contain one word to using for Uppercase\r\n StringTokenizer temp = new StringTokenizer(name, \" \");//Help split off words for rep to Uppercase words\r\n name = \"\";\r\n while (temp.hasMoreTokens()) {\r\n rep = temp.nextToken().trim();// Spliting off\r\n boolean match = rep.matches(format);// check if right format\r\n if (match == false) {\r\n name = name + \" \" + rep.substring(0, 1).toUpperCase() + rep.substring(1);//Upper case first character\r\n rep = \"\"; //reset to null for next word\r\n } else {\r\n System.out.println(\"Error Name! please input again!\");//if not right format then input again\r\n name = getName(str, error, format);//Re-input\r\n }\r\n }\r\n //if all valid then return name\r\n return name.trim();\r\n }", "@Override\n public final String format(final long eventTimeInMillis) {\n if (eventTimeInMillis < currentFileTime) {\n return doFormat(indexName, eventTimeInMillis);\n }\n\n // rollover\n while (eventTimeInMillis >= nextRolloverTime) {\n if (rollingOver.compareAndSet(false, true)) {\n rollover(indexName, eventTimeInMillis);\n rollingOver.set(false);\n continue;\n }\n break;\n }\n\n // happy path - have to check for pending rollover to avoid race conditions\n if (!rollingOver.get()) {\n return currentName;\n }\n\n // fail-safe for pending rollover\n return doFormat(indexName, eventTimeInMillis);\n\n }", "String getDestinationName();", "private String getCasTypeName(String aTagName) {\n if (aTagName.indexOf(':') == -1 && aTagName.indexOf('-') == -1) {\n return aTagName;\n } else {\n // Note: This is really slow so we avoid if possible. -- RJB\n return StringUtils.replaceAll(StringUtils.replaceAll(aTagName, \":\", \"_colon_\"), \"-\",\n \"_dash_\");\n }\n }", "public void setRoutename(String routename) {\r\n this.routename = routename;\r\n }", "String fullName();", "public static String combineName(String n) {\n\t\tString result = \"\";\n\t\tString[] parts = n.split(\" \");\n\t\tfor (String s : parts) {\n\t\t\tresult += s;\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic String formatEvent(Event event) {\n\t\treturn event.getStartingTime() + \":00 - \"\n\t\t\t + event.getEndingTime() + \":00: \" + event.getEventName() + '\\n';\n\t}", "public static String mangleName(String name, boolean reversible) {\n return Language.mangleName(name, reversible ? 1 : -1);\n }", "private String getFormattedName(String bossName) {\r\n\t\tString[] startingLetters = { \"corporeal\", \"king black\", \"nomad\", \"tormented\", \"avatar\" };\r\n\t\tfor(int i = 0; i < startingLetters.length; i++)\r\n\t\t\tif(bossName.toLowerCase().contains(startingLetters[i].toLowerCase()))\r\n\t\t\t\treturn \"the \"+bossName;\r\n\t\treturn bossName;\r\n\t}", "@Deprecated\r\n\tpublic String mapInvestorName(String s) {\r\n\t\tString s1 = s.replace(' ', '-');\r\n\t\treturn s1;\r\n\t}", "public static String formatText(String t) {\r\n if (t.length() > 0) {\r\n char chars[] = t.toCharArray();\r\n for (int index = 0; index < chars.length; index++)\r\n if (chars[index] == '_') {\r\n chars[index] = ' ';\r\n if (index + 1 < chars.length && chars[index + 1] >= 'a' && chars[index + 1] <= 'z')\r\n chars[index + 1] = (char) ((chars[index + 1] + 65) - 97);\r\n }\r\n\r\n if (chars[0] >= 'a' && chars[0] <= 'z')\r\n chars[0] = (char) ((chars[0] + 65) - 97);\r\n return new String(chars);\r\n } else {\r\n return t;\r\n }\r\n }", "private String fixName(String name, String prefix)\n {\n if (name.startsWith(prefix))\n return name.substring(prefix.length());\n return FIXME_INVALID_PREFIX + name;\n }", "private String getAPNameString(List<AirplaneModel> association,\r\n\t\t\tViewAirplaneModel type, StringBuilder grp) {\r\n\t\tfor(AirplaneModel model:association){\r\n\t\t\tif(type.getAirplaneModelTypeID()==model.getAirplaneModelTypeID().getAirplaneModelTypeID().longValue()){\r\n\t\t\t\tgrp.append(model.getGroupID().getGroupOwner().trim()).append(NEWLINE);\r\n\t\t\t}\r\n\t\t}\r\n\t\tString str=grp.toString();\r\n\t\tif(str.endsWith(NEWLINE)){\r\n\t\t\tstr=str.substring(0, str.length()-1);\r\n\t\t}\r\n\t\tString st[] = new String[WsrdConstants.HUNDRED];\r\n\t\tst= str.split(NEWLINE);\r\n\t\tArrays.sort(st);\r\n\t\r\n\t\tStringBuilder st1= new StringBuilder();\r\n\t\tfor(int j=0;j<=st.length-1;j++){\r\n\t\t\tst1.append(st[j]);\r\n\t\t\tst1.append(NEWLINE);\r\n\t\t}\r\n\t\treturn st1.toString();\r\n\t}", "public static String roomNameToURL(String name) {\n\t\treturn Main.ROOM_IMG_URL_BASE+name.replace(\".\", \"\").toLowerCase();\n \t}", "private static String getCamelCasedPropertyName(String propertyName) {\n return propertyName.substring(0, 1).toUpperCase() +\n propertyName.substring(1);\n }", "@NotNull\n private static String normalize(@NotNull String displayName) {\n int angleIndex = displayName.indexOf('<');\n return angleIndex != -1 ? displayName.substring(0, angleIndex) : displayName;\n }", "public static String name(){\n return \"10.Schneiderman.Lorenzo\"; \n }", "@NotNull\n public static String addNamePrefix(@NotNull String name, @NotNull String prefix) {\n return prefix + Character.toUpperCase(name.charAt(0)) + name.substring(1);\n }", "public static String toAttributeName(String name)\r\n {\r\n return StringUtils.uncapitalize(toClassName(name));\r\n }", "static String normalizedNameOf(SdkField<?> field) {\n String name = field.memberName();\n return name.length() > 1 && Ascii.isLowerCase(name.charAt(1))\n ? Ascii.toLowerCase(name.charAt(0)) + name.substring(1)\n : name.toLowerCase(Locale.ROOT);\n }", "private String upFirstLetter(){\n\t\tString firstLetter = nameField.substring(0,1);\n\t\tfirstLetter = firstLetter.toUpperCase();\n\t\treturn firstLetter + nameField.substring(1,nameField.length());\n\t}" ]
[ "0.6402282", "0.6311041", "0.6186738", "0.59999365", "0.5780912", "0.56845427", "0.56231976", "0.56108415", "0.5560053", "0.5362108", "0.5297265", "0.5296479", "0.52946067", "0.5292643", "0.52832496", "0.52703154", "0.5175323", "0.51154566", "0.5114619", "0.50694716", "0.5046224", "0.50447816", "0.5044491", "0.50337803", "0.50266135", "0.5023784", "0.5016208", "0.5011469", "0.50000936", "0.49897942", "0.49867257", "0.49842095", "0.4974925", "0.49606648", "0.49432966", "0.49290994", "0.4927011", "0.49253535", "0.49212044", "0.49062142", "0.489416", "0.48928154", "0.4891892", "0.488247", "0.48736396", "0.48480132", "0.48361853", "0.4821564", "0.48169607", "0.4811367", "0.4798252", "0.47872818", "0.4783056", "0.47821128", "0.4780438", "0.47756714", "0.4768765", "0.47667623", "0.4760015", "0.47568733", "0.4753493", "0.47414404", "0.47339097", "0.47330365", "0.47309178", "0.472897", "0.4728937", "0.47278866", "0.47148517", "0.471409", "0.47087988", "0.47064835", "0.46964222", "0.46924078", "0.46872988", "0.46848816", "0.46844512", "0.46830624", "0.46738908", "0.4672952", "0.46720028", "0.46258938", "0.46168625", "0.4599615", "0.4599411", "0.45923963", "0.4590712", "0.45847312", "0.45776042", "0.45775893", "0.4574092", "0.45734334", "0.45687968", "0.4565772", "0.4563864", "0.45580128", "0.45495552", "0.45439702", "0.4541933", "0.45370576" ]
0.69355404
0
/ Should be over ridden by any object that implements BeatingHeart. Not strictly needed as the logic could be implemented in run(). However, this represents the Heart Beat.
void beat();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void beat() {\n\t\t\tSystem.out.println(\"Heart beating\");\n\t\t}", "@Override\r\n public String toString() {\r\n return \"Heart\";\r\n }", "public interface Heart extends BodyPart {\n\n\t/**\n\t * Reports how the heart is feeling in a way that may be understood by\n\t * humans.\n\t * \n\t * @return A human-readable version of the heart's current state\n\t */\n\tpublic Signal stateDescription();\n\n\t/**\n\t * Process the thought, potentially changing the heart's current state.\n\t * \n\t * @param thought\n\t * The thought to process\n\t */\n\tpublic void processThought(Thought thought);\n\n\t/**\n\t * Reprot the emotions being managed by this heart.\n\t * @return\n\t * \tList of emotions\n\t */\n\tpublic List<Emotion> getEmotions();\n}", "@Override\n public void heartRate(int valueHr, int timestamp) {\n }", "public void heartBeat();", "public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }", "public Heart() {\n super();\n }", "public void sendHearBeat() {\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"type\", WsMessage.MessageType.HEART_BEAT_REQ);\n this.wsManager.sendMessage(WsMessage.MessageType.HEART_BEAT_REQ, jsonObject.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public Heart(Pair position) {\n //set position to current position\n this.position = position;\n //Loads heart image\n try {\n imageHeart = ImageIO.read(new File(\"heart.png\"));\n } catch (Exception e) {\n System.out.println(e);\n }\n\n }", "int getHeartRate();", "public static int measureHeartRate() {\n\t\treturn HeartRateSensor.getRate(currentRate);\n\t}", "public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }", "public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }", "public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}", "public edu.usfca.cs.dfs.StorageMessages.HeartBeat getHeartBeatMsg() {\n if (heartBeatMsgBuilder_ == null) {\n if (msgCase_ == 3) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeat) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeat.getDefaultInstance();\n } else {\n if (msgCase_ == 3) {\n return heartBeatMsgBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeat.getDefaultInstance();\n }\n }", "int getBeat();", "public edu.usfca.cs.dfs.StorageMessages.HeartBeat getHeartBeatMsg() {\n if (msgCase_ == 3) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeat) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeat.getDefaultInstance();\n }", "public void heartBeat() throws InterruptedException {\n // 1) schedule the heartbeat on one thread in pool\n synchronized (txnBatchLock) {\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws Exception {\n try {\n LOG.info(\"Sending heartbeat on batch \" + txnBatch);\n txnBatch.heartbeat();\n } catch (StreamingException e) {\n LOG.warn(\"Heartbeat error on batch \" + txnBatch, e);\n }\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (Exception e) {\n LOG.warn(\"Unable to send heartbeat on Txn Batch \" + txnBatch, e);\n // Suppressing exceptions as we don't care for errors on heartbeats\n }\n }\n }", "public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }", "public void triggerHeartBeat() {\n\t\tif (this.postman==null) return;\n\t\tthis.postman.sendHeartBeatAt = 0;\n\t}", "edu.usfca.cs.dfs.StorageMessages.HeartBeat getHeartBeatMsg();", "public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }", "@Override\n public void heartRateInterval(int valueHri, int timestamp) {\n }", "private void scheduleHeartBeatThread() {\n if (scheduler == null) {\n scheduler = Executors.newSingleThreadScheduledExecutor(\n Threads.createDaemonThreadFactory(\"program-heart-beat\"));\n scheduler.scheduleAtFixedRate(\n () -> {\n Map<String, String> properties = new HashMap<>();\n properties.put(ProgramOptionConstants.PROGRAM_RUN_ID, GSON.toJson(programRunId));\n properties.put(ProgramOptionConstants.HEART_BEAT_TIME,\n String.valueOf(System.currentTimeMillis()));\n // publish as heart_beat type, so it can be handled appropriately at receiver\n programStatePublisher.publish(Notification.Type.PROGRAM_HEART_BEAT, properties);\n LOG.trace(\"Sent heartbeat for program {}\", programRunId);\n }, heartBeatIntervalSeconds,\n heartBeatIntervalSeconds, TimeUnit.SECONDS);\n }\n }", "public HeartBeat.Req getHeartBeatReq() {\n if (reqCase_ == 5) {\n return (HeartBeat.Req) req_;\n }\n return HeartBeat.Req.getDefaultInstance();\n }", "@Override\n public void drawHeatFlux() {\n }", "@Override\n public void feedingMeat() {\n\n }", "public interface Heater {\n void on();\n void off();\n boolean isHot();\n}", "public HeartBeat.Res getHeartBeatRes() {\n if (rspCase_ == 5) {\n return (HeartBeat.Res) rsp_;\n }\n return HeartBeat.Res.getDefaultInstance();\n }", "@Override\n\tpublic void run() {\n\n\t\tprogressivNumber++;\n\t\tStoRMStatus status = detective.haveaLook();\n\t\tstatus.setPulseNumber(progressivNumber);\n\t\tHEALTH_LOG.debug(\"*** HEARTHBEAT ***\");\n\t\tHEALTH_LOG.info(status.toString());\n\t}", "public interface HealingObject {}", "public HeartBeat.Req getHeartBeatReq() {\n return instance.getHeartBeatReq();\n }", "public edu.usfca.cs.dfs.StorageMessages.HeartBeat.Builder getHeartBeatMsgBuilder() {\n return getHeartBeatMsgFieldBuilder().getBuilder();\n }", "public Builder setHeartRate(int value) {\n extraCase_ = 5;\n extra_ = value;\n onChanged();\n return this;\n }", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse getHeartBeatResponse() {\n if (heartBeatResponseBuilder_ == null) {\n if (msgCase_ == 4) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n } else {\n if (msgCase_ == 4) {\n return heartBeatResponseBuilder_.getMessage();\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n }\n }", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatOrBuilder getHeartBeatMsgOrBuilder() {\n if ((msgCase_ == 3) && (heartBeatMsgBuilder_ != null)) {\n return heartBeatMsgBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 3) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeat) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeat.getDefaultInstance();\n }\n }", "public void update(Entity e1, double heartBeat, double dt) {\n\t\t\r\n\t}", "public void eat() {\n\t\tSystem.out.println(this.name + \" the \" + this.type + \" ate their rabbit meat.\");\n\t}", "public boolean hasHeartBeatResponse() {\n return msgCase_ == 4;\n }", "@Override\n\tpublic void setEnableHeartBeat(boolean arg0) {\n\n\t}", "public final void bHT() {\n AppMethodBeat.m2504i(21893);\n C7060h.pYm.mo8381e(12931, Long.valueOf(this.nyK), Long.valueOf(this.nyL), Long.valueOf(this.nzg), Long.valueOf(this.nzh), Long.valueOf(this.nzi), Long.valueOf(this.nzj));\n AppMethodBeat.m2505o(21893);\n }", "public static String getHeartRateValue() {\n return heartRateValue;\n }", "boolean hasHeartBeatMsg();", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse getHeartBeatResponse() {\n if (msgCase_ == 4) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n }", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponseOrBuilder getHeartBeatResponseOrBuilder() {\n if ((msgCase_ == 4) && (heartBeatResponseBuilder_ != null)) {\n return heartBeatResponseBuilder_.getMessageOrBuilder();\n } else {\n if (msgCase_ == 4) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n }\n }", "public int getHealingNumber() {\n return healingNumber;\n }", "public boolean hasHeartBeatResponse() {\n return msgCase_ == 4;\n }", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatOrBuilder getHeartBeatMsgOrBuilder() {\n if (msgCase_ == 3) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeat) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeat.getDefaultInstance();\n }", "@Override\n public void stress() {\n _brain.heart.accelerate(2);\n }", "public HeartBeat.Res getHeartBeatRes() {\n return instance.getHeartBeatRes();\n }", "@Override\n\tpublic String fly() {\n\t\treturn \"Flying High\";\n\t}", "@Override\r\n\tpublic void autoSeatHeat() {\n\t\t\r\n\t}", "edu.usfca.cs.dfs.StorageMessages.HeartBeatOrBuilder getHeartBeatMsgOrBuilder();", "private void selfHeal() {\n\t\t\n\t\t//IF the Droid is carrying an item...\n\t\tif (this.getItemCarried() != null){\n\t\t\t\n\t\t\t//If the item is an oil can...\n\t\t\tif (this.getItemCarried().getShortDescription() == \"an oil can\" ) {\n\t\t\t\n\t\t\t\t//If the Droids health is LOWER than half...\n\t\t\t\tif((this.getInitialHP()/2) > this.getHitpoints()) {\n\t\t\t\t\tsay(this.getShortDescription() + \" is at or below half HP. \"\n\t\t\t\t\t\t\t+ \" Healing itself...\");\n\t\t\t\t\t\n\t\t\t\t\t//Implementing a new HealDroid method (Droid heals on itself)\n\t\t\t\t\t//public HealDroid(SWEntityInterface theTarget, MessageRenderer m) {\n\t\t\t\t\tHealDroid droidHeal = new HealDroid(this, messageRenderer);\n\t\t\t\t\t\n\t\t\t\t\tscheduler.schedule(droidHeal, this, 1);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponseOrBuilder getHeartBeatResponseOrBuilder() {\n if (msgCase_ == 4) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n }", "private void drawHealthPoints() {\n int i = 0;\n for (; i < Math.floor(gameWorld.getHero().getHealthPoints()); i++) {\n hudBatch.draw(heartFull, i * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n if (gameWorld.getHero().getHealthPoints() % 1 != 0) {\n hudBatch.draw(heartHalf, i++ * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n for (; i < gameWorld.getHero().getMaxHealthPoints(); i++) {\n hudBatch.draw(heartEmpty, i * HEART_SIZE, VIRTUAL_HEIGHT - HEART_SIZE, HEART_SIZE, HEART_SIZE);\n }\n }", "public Builder setHeartBeatMsg(edu.usfca.cs.dfs.StorageMessages.HeartBeat value) {\n if (heartBeatMsgBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n msg_ = value;\n onChanged();\n } else {\n heartBeatMsgBuilder_.setMessage(value);\n }\n msgCase_ = 3;\n return this;\n }", "protected SoundEvent getHurtSound()\n {\n return MCSoundEvents.ENTITY_BUM_HURT;\n }", "public void eatHay(Hay hay) {\n raiseFoodLevel(20);\n }", "private void startHeartbeats() {\r\n\t\tClientProperties props = ClientProperties.getInstance();\r\n\t\tint heartbeatInterval = Integer.parseInt(props.getProperty(ClientProperties.HEARTBEAT_INTERVAL));\r\n\t\theartbeatProducer.startHeartbeats(heartbeatInterval);\r\n\t}", "int getEndBeat() {\n return this.endBeat;\n }", "public void makeHappy() {\n while (statusEnum() != TamagotchiMood.HAPPY) {\n if (!isHungry() && !isTired()) {\n play();\n } else if (isHungry() && !isTired()) {\n eat();\n } else {\n sleep();\n }\n }\n\n if (!muted) {\n System.out.println(\"I can do thing on my own now and will rule the world! MUHAHAHA!\");\n }\n }", "protected abstract float _getGrowthChance();", "public void eat() {\n if (!isTired()) {\n hunger -= 3;\n fatigue += 2;\n\n if (!muted) {\n System.out.println(\"eat\\t\\t|\\tYummy this is tasty!\");\n }\n }\n }", "public Bee(ContinuousSpace<Object> s, Grid<Object> g, Hive h, Clock c, List<Flower> f) {\n \t\t\n \t\t// initialize properties of bee\n\t\tspace = s;\n\t\tgrid = g;\n\t\tfood = startingCrop;\n\t\ttargetFlower = null;\n\t\tstate = \"SLEEPING\";\n\t\thive = h;\n\t\tclock = c;\n\t\tflowers = f;\n\t\t\n\t\t// define semi-random preferred foraging times for bee\n\t\tstartForagingTime = RandomHelper.nextDoubleFromTo(avgStartForagingTime - 2.0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tavgStartForagingTime + 2.0);\n\t\tendForagingTime = RandomHelper.nextDoubleFromTo(avgEndForagingTime - 2.0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tavgEndForagingTime + 2.0);\n\t}", "private void heat() throws InterruptedException {\n\t\tInteger delta = new Double((rest.getTemperature() - temperatureSensor.getTemperature()) * 10).intValue();\n\t\tfor (Integer rTemp : temperatureAdjust.keySet()) {\n\t\t\tif (delta > rTemp) {\n\t\t\t\tInteger percent = new Double(new Double(temperatureAdjust.get(rTemp)) / 100 * timeIntervalInMS).intValue();\n\t\t\t\theater.off();\n\t\t\t\tThread.sleep(timeIntervalInMS - percent);\n\t\t\t\theater.on();\n\t\t\t\tThread.sleep(percent);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// we are above all limits, switch heater off and wait!\n\t\theater.off();\n\t\tThread.sleep(timeIntervalInMS);\n\t}", "@Override\n public void chew() {\n MessageUtility.logSound(name,\"Bleats and Stomps its legs, then chews\");\n }", "@Override\n public int getRunHeat() {\n return engine.getRunHeat();\n }", "protected float getHealthPoint() {\n\t\treturn healthPoint;\n\t}", "public void livingTick() {\n super.livingTick();\n this.oFlap = this.wingRotation;\n this.oFlapSpeed = this.destPos;\n this.destPos = (float)((double)this.destPos + (double)(this.onGround ? -1 : 4) * 0.3D);\n this.destPos = MathHelper.clamp(this.destPos, 0.0F, 1.0F);\n if (!this.onGround && this.wingRotDelta < 1.0F) {\n this.wingRotDelta = 1.0F;\n }\n\n this.wingRotDelta = (float)((double)this.wingRotDelta * 0.9D);\n Vec3d vec3d = this.getMotion();\n if (!this.onGround && vec3d.y < 0.0D) {\n this.setMotion(vec3d.mul(1.0D, 0.6D, 1.0D));\n }\n\n this.wingRotation += this.wingRotDelta * 2.0F;\n if (!this.world.isRemote && this.isAlive() && !this.isChild() && getGender()==Gender.FEMALE && --this.timeUntilNextEgg <= 0) {\n this.playSound(SoundEvents.ENTITY_CHICKEN_EGG, 1.0F, (this.rand.nextFloat() - this.rand.nextFloat()) * 0.2F + 1.0F);\n this.entityDropItem(Items.EGG);\n this.timeUntilNextEgg = this.rand.nextInt(6000) + 6000;\n }\n\n ++this.eatTicks;\n ItemStack itemstack = this.getItemStackFromSlot(EquipmentSlotType.MAINHAND);\n if (this.canEatItem(itemstack)) {\n if (this.eatTicks > 600) {\n ItemStack itemstack1 = itemstack.onItemUseFinish(this.world, this);\n if (!itemstack1.isEmpty()) {\n this.setItemStackToSlot(EquipmentSlotType.MAINHAND, itemstack1);\n }\n\n this.eatTicks = 0;\n } else if (this.eatTicks > 560 && this.rand.nextFloat() < 0.1F) {\n this.playSound(this.getEatSound(itemstack), 1.0F, 1.0F);\n this.world.setEntityState(this, (byte)45);\n }\n }\n\n }", "public void drawHearts(Graphics g){\n \n if(player.getScore()>= 10000*heartScore ){\n hearts.add(new Heart());\n heartScore++;\n } \n \n for(int i=0; i<hearts.size(); i++){\n Heart currentHeart = hearts.get(i);\n boolean test = currentHeart.test(player.getX(), player.getY(), player.getW(), player.getH(),-5); \n //If touched add a life, if player has 3 lives, do nothing\n if(test){\n if(player.getLives()<3){\n player.addLife();\n }\n hearts.remove(currentHeart);\n \n } \n \n g.drawImage(currentHeart.getImage(), currentHeart.getX(), currentHeart.getY(), this); \n \n } \n \n }", "public Boolean isLevelBeat() {\r\n\t\tif (this.coinCount == 0)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "public static void playFHigh() throws InterruptedException\n\t{\n\t\tchannels[channel].noteOn( 77, volume );//E\n\t\tThread.sleep(200);\n\t}", "@Nullable\n Heat getHeat();", "public void sleep() {\n hunger += 1;\n fatigue = 0;\n\n if (isHungry()) {\n mood -= 1;\n } else {\n mood += 1;\n }\n\n if (!muted) {\n System.out.println(\"sleep\\t|\\tzzzZZZ *sheep*\");\n }\n }", "public Builder clearHeartRate() {\n if (extraCase_ == 5) {\n extraCase_ = 0;\n extra_ = null;\n onChanged();\n }\n return this;\n }", "private void drawHeart (float sx, float sy, float sz, Appearance[] app)\n {\n\tfloat x, y, z, r;\n\n BranchGroup tBG = new BranchGroup();\n\ttBG.setCapability (BranchGroup.ALLOW_DETACH);\n\n\tx = sx+0f; y = sy+0.04f; z = sz+0f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[0]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+0,sy+1.1,sz+0), \"AP\"));\n\t\n\tx = sx-0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[1]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz+1.5), \"IS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz+0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[2]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz+1.5), \"IL\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[3]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz+0.5), \"SI\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz+0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[4]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz+0.5), \"LI\"));\n\n\tx = sx-0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[5]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2.5,sy+0,sz-0.5), \"SA\"));\n\n\tx = sx+0.32f; y = sy-0.1f; z = sz-0.1f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[6]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2.5,sy+0,sz-0.5), \"LA\"));\n\n\tx = sx-0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[7]);\n\tsceneBG.addChild (makeText (new Vector3d (sx-2,sy+0,sz-1.5), \"AS_\"));\n\n\tx = sx+0.2f; y = sy-0.1f; z = sz-0.2f; r = 1;\n\tdrawSphere (tBG, x, y, z, r, app[8]);\n\tsceneBG.addChild (makeText (new Vector3d (sx+2,sy+0,sz-1.5), \"AL\"));\n\n\tsceneBG.addChild (tBG);\n }", "public double getHigh(){\n return /*home*/ this.high /*and eat everything*/;\r\n //then go to sleep for a day or three \r\n }", "int getStartBeat() {\n return this.startBeat;\n }", "private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}", "public interface HeartRateView {\n void currentHeartRate(int heartRate);\n void currentCalories(int currentCalories);\n void currentAvgHeartRate(int avgHeartRate);\n void currentHrMaxPercentage(int hrMaxPercentage);\n}", "HeartBeat.Req getHeartBeatReq();", "@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}", "public interface Heartbeat {\n\n void pulse();\n\n}", "@SuppressWarnings(\"rawtypes\")\n\tprivate void registerHeartFurnace(){\n\t\tMap<Direction, BlockModelBuilder> models = new HashMap<Direction, BlockModelBuilder>();\n\t\tMap<Direction, BlockModelBuilder> litModels = new HashMap<Direction, BlockModelBuilder>();\n\t\tfor(boolean lit : new boolean[]{true, false}){\n\t\t\tfor(Direction dir : Direction.values()){\n\t\t\t\tString modelName = \"heart_furnace_\" + dir.toString();\n\t\t\t\tif(lit){\n\t\t\t\t\tmodelName += \"_on\";\n\t\t\t\t}\n\t\t\t\tBlockModelBuilder model = models().withExistingParent(modelName, mcLoc(BLOCK_DIR + \"/block\"));\n\t\t\t\t//Create furnace element\n\t\t\t\tmodel.element().from(0, 0, 0).to(16, 16, 16).allFaces((faceDir, faceBuilder) -> {\n\t\t\t\t\tswitch(faceDir){\n\t\t\t\t\t\tcase NORTH:\n\t\t\t\t\t\t\tfaceBuilder.cullface(faceDir).texture(\"#front\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase UP:\n\t\t\t\t\t\tcase DOWN:\n\t\t\t\t\t\t\tfaceBuilder.cullface(faceDir).texture(\"#top\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tfaceBuilder.cullface(faceDir).texture(\"#side\");\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t//Create overlay element\n\t\t\t\tElementBuilder overlayElement = model.element().from(0, 0, 0).to(16, 16, 16);\n\t\t\t\tswitch(dir){\n\t\t\t\t\tcase UP:\n\t\t\t\t\t\toverlayElement.face(Direction.UP).cullface(Direction.UP).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.NORTH).cullface(Direction.NORTH).texture(\"#overlay_side\").end()\n\t\t\t\t\t\t.face(Direction.EAST).cullface(Direction.EAST).texture(\"#overlay_side\").end()\n\t\t\t\t\t\t.face(Direction.SOUTH).cullface(Direction.SOUTH).texture(\"#overlay_side\").end()\n\t\t\t\t\t\t.face(Direction.WEST).cullface(Direction.WEST).texture(\"#overlay_side\").end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DOWN:\n\t\t\t\t\t\toverlayElement.face(Direction.DOWN).cullface(Direction.DOWN).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.NORTH).cullface(Direction.NORTH).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end()\n\t\t\t\t\t\t.face(Direction.EAST).cullface(Direction.EAST).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end()\n\t\t\t\t\t\t.face(Direction.SOUTH).cullface(Direction.SOUTH).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end()\n\t\t\t\t\t\t.face(Direction.WEST).cullface(Direction.WEST).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase EAST:\n\t\t\t\t\t\toverlayElement.face(Direction.EAST).cullface(Direction.EAST).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.UP).cullface(Direction.UP).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.NORTH).cullface(Direction.NORTH).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.DOWN).cullface(Direction.DOWN).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.SOUTH).cullface(Direction.SOUTH).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase NORTH:\n\t\t\t\t\t\toverlayElement.face(Direction.NORTH).cullface(Direction.NORTH).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.UP).cullface(Direction.UP).texture(\"#overlay_side\").rotation(FaceRotation.ZERO).end()\n\t\t\t\t\t\t.face(Direction.EAST).cullface(Direction.EAST).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.DOWN).cullface(Direction.DOWN).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end()\n\t\t\t\t\t\t.face(Direction.WEST).cullface(Direction.WEST).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase SOUTH:\n\t\t\t\t\t\toverlayElement.face(Direction.SOUTH).cullface(Direction.SOUTH).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.UP).cullface(Direction.UP).texture(\"#overlay_side\").rotation(FaceRotation.UPSIDE_DOWN).end()\n\t\t\t\t\t\t.face(Direction.EAST).cullface(Direction.EAST).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.DOWN).cullface(Direction.DOWN).texture(\"#overlay_side\").rotation(FaceRotation.ZERO).end()\n\t\t\t\t\t\t.face(Direction.WEST).cullface(Direction.WEST).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase WEST:\n\t\t\t\t\t\toverlayElement.face(Direction.WEST).cullface(Direction.WEST).texture(\"#overlay_top\").end()\n\t\t\t\t\t\t.face(Direction.UP).cullface(Direction.UP).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.NORTH).cullface(Direction.NORTH).texture(\"#overlay_side\").rotation(FaceRotation.CLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.DOWN).cullface(Direction.DOWN).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end()\n\t\t\t\t\t\t.face(Direction.SOUTH).cullface(Direction.SOUTH).texture(\"#overlay_side\").rotation(FaceRotation.COUNTERCLOCKWISE_90).end();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Assign textures\n\t\t\t\tmodel.texture(\"front\", mcLoc(BLOCK_DIR + (lit ? \"/furnace_front_on\" : \"/furnace_front\")))\n\t\t\t\t\t.texture(\"top\", mcLoc(BLOCK_DIR + \"/furnace_top\"))\n\t\t\t\t\t.texture(\"side\", mcLoc(BLOCK_DIR + \"/furnace_side\"))\n\t\t\t\t\t.texture(\"overlay_top\", modLoc(BLOCK_DIR + \"/flesh_block\")) //TODO: Placeholder texture\n\t\t\t\t\t.texture(\"overlay_side\", modLoc(BLOCK_DIR + \"/furnace_overlay\"))\n\t\t\t\t\t.texture(\"particle\", mcLoc(BLOCK_DIR + \"/furnace_front\"));\n\t\t\t\t//Add to respective map\n\t\t\t\tif(lit){\n\t\t\t\t\tlitModels.put(dir, model);\n\t\t\t\t}else{\n\t\t\t\t\tmodels.put(dir, model);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//Create map of directions for offsetting rotations\n\t\tMap<Direction, Orientation> yRotationOffsets = new HashMap<Direction, Orientation>();\n\t\tyRotationOffsets.put(Direction.NORTH, Orientation.IDENTITY);\n\t\tyRotationOffsets.put(Direction.EAST, Orientation.ROT_90_Y_POS);\n\t\tyRotationOffsets.put(Direction.SOUTH, Orientation.ROT_180_FACE_XZ);\n\t\tyRotationOffsets.put(Direction.WEST, Orientation.ROT_90_Y_NEG);\n\t\t//Build multipart json\n\t\tgetVariantBuilder(OrganicTechBlocks.HEART_FURNACE.get()).forAllStates(state -> {\n\t\t\t//Get BlockState property values\n\t\t\tDirection connectionDir = state.get(HeartFurnaceBlock.CONNECTION_FACING);\n\t\t\tDirection facingDir = state.get(HeartFurnaceBlock.FACING);\n\t\t\tboolean lit = state.get(HeartFurnaceBlock.LIT);\n\t\t\t//Get blockstate JSON builder\n\t\t\tConfiguredModel.Builder builder = ConfiguredModel.builder();\n\t\t\tswitch(connectionDir){\n\t\t\t\tcase UP:\n\t\t\t\tcase DOWN:\n\t\t\t\t\tbuilder.modelFile((lit ? litModels.get(connectionDir) : models.get(connectionDir)))\n\t\t\t\t\t\t.rotationY(getYRotationFromFacing(facingDir));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tDirection adjustedDir = yRotationOffsets.get(facingDir).func_235530_a_(connectionDir);\n\t\t\t\t\tbuilder.modelFile((lit ? litModels.get(adjustedDir) : models.get(adjustedDir)))\n\t\t\t\t\t\t.rotationY(getYRotationFromFacing(facingDir));\n\t\t\t}\n\t\t\treturn builder.build();\n\t\t});\n\t}", "@Override\r\n\tprotected double getHealth() \r\n\t{\r\n\t\treturn this._health;\r\n\t}", "public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.Builder getHeartBeatResponseBuilder() {\n return getHeartBeatResponseFieldBuilder().getBuilder();\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n if (timerFlag) {\n sendInfo(\"heart\", (sim_flag ? bpm/sim_scale : bpm));\n timerFlag = false;\n\n HR_i++;\n if(HR_i>9) {\n HR_i = 0;\n over = true;\n }\n\n if (over)\n {\n HeartRateAvg = 0;\n for (int i=0;i<10;i++)\n {\n HeartRateAvg = HeartRateAvg + HeartRate[i];\n }\n HeartRateAvg = HeartRateAvg/10;\n if ((bpm>HeartRateAvg*1.3 || bpm<HeartRateAvg*0.7) && !sendAttackFlag && sendAttackFlagCnt>15)\n {\n sendInfo(\"attack\",0);\n sendAttackFlag = true;\n Toast.makeText(getApplicationContext(), \"HeartAttack\", Toast.LENGTH_SHORT).show();\n }\n sendAttackFlagCnt++;\n if (sendAttackFlag) {\n sendAttackFlagCnt++;\n if (sendAttackFlagCnt>10)\n {\n sendAttackFlagCnt=0;\n sendAttackFlag = false;\n }\n }\n }\n HeartRate[HR_i] = bpm;\n sendInfo (\"avg\", HeartRateAvg);\n }\n\n // Update the accelerometer\n if (flag) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n final float alpha = (float) 0.8;\n // Isolate the force of gravity with the low-pass filter.\n gravity[0] = alpha * gravity[0] + (1 - alpha) * event.values[0];\n gravity[1] = alpha * gravity[1] + (1 - alpha) * event.values[1];\n gravity[2] = alpha * gravity[2] + (1 - alpha) * event.values[2];\n\n // Remove the gravity contribution with the high-pass filter.\n linear_acceleration[0] = event.values[0] - gravity[0];\n linear_acceleration[1] = event.values[1] - gravity[1];\n linear_acceleration[2] = event.values[2] - gravity[2];\n\n totAcc = Math.sqrt(linear_acceleration[0] * linear_acceleration[0] +\n linear_acceleration[1] * linear_acceleration[1] +\n linear_acceleration[2] * linear_acceleration[2]);\n\n fallAcc = linear_acceleration[2];\n }\n\n // Update the heart rate\n if (event.sensor.getType() == Sensor.TYPE_HEART_RATE) {\n bpm = event.values[0];\n if (sim_flag)\n bpm = bpm/sim_scale;\n\n String message = String.valueOf ((int) bpm) + \" bpm\";\n heart.setText(message);\n }\n\n flag = false;\n\n FallCounter = ((totAcc > threshold) ? FallCounter + 1 : 0);\n\n if (FallCounter == 5 && !detected) {\n fallDetectionAction();\n }\n }\n }", "private float horisontalTicker() {\n\t\t\t\treturn (ticker_horisontal += 0.8f);\n\t\t\t}", "void setBeat(int beat);", "public void tick() {\n if (this.entity.hurtResistantTime == 19) {\n this.entity.resetActiveHand();\n }\n LivingEntity target = this.entity.getAttackTarget();\n if (target != null) {\n boolean isSee = this.entity.getEntitySenses().canSee(target);\n boolean isSeeTimeFound = this.seeTime > 0;\n if (isSee != isSeeTimeFound) {\n this.seeTime = 0;\n }\n\n if (isSee) {\n ++this.seeTime;\n } else {\n --this.seeTime;\n }\n\n this.entity.getLookController().setLookPositionWithEntity(target, 30.0F, 30.0F);\n\n if (this.entity.isHandActive()) {\n if (!isSee && this.seeTime < -10) {\n this.entity.resetActiveHand();\n } else if (isSee) {\n int i = this.entity.getItemInUseMaxCount();\n if (i >= 20) {\n this.entity.resetActiveHand();\n this.entity.attackEntityWithRangedAttack(target, BowItem.getArrowVelocity(i));\n this.attackTime = this.attackCooldown;\n }\n }\n } else if (--this.attackTime <= 0 && this.seeTime >= -10) {\n this.entity.setActiveHand(ProjectileHelper.getHandWith(this.entity, Items.BOW));\n }\n\n }\n }", "public void sendHeartbeat();", "@Override\n public void run() {\n final long currentTimeMillis = System.currentTimeMillis();\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(heartbeat + \" HeartbeatProcessor ...\");\n }\n if (!heartbeat.getSkillState().equals(State.READY)) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"No heartbeat because this skill has not yet joined the network.\");\n }\n return;\n }\n\n // send heartbeats after waiting at least the specified duration\n final long outboundHeartbeatReceivedThresholdMillis = currentTimeMillis - OUTBOUND_HEARTBEAT_PERIOD_MILLIS;\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\" \" + outboundParentHeartbeatInfo);\n }\n if (outboundParentHeartbeatInfo.heartbeatSentMillis < outboundHeartbeatReceivedThresholdMillis) {\n sendHeartbeat(outboundParentHeartbeatInfo, heartbeat);\n }\n }", "private void m29985m() {\n String str = \"com.tencent.android.tpush.service.channel.heartbeatIntent\";\n String str2 = \"TpnsChannel\";\n try {\n if (this.f23299z == null) {\n C6973b.m29776f().registerReceiver(new BroadcastReceiver() {\n public void onReceive(Context context, Intent intent) {\n C7005b.m29964a().m29983k();\n }\n }, new IntentFilter(str));\n this.f23299z = PendingIntent.getBroadcast(C6973b.m29776f(), 0, new Intent(str), 134217728);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23279n > f23278m) {\n f23279n = f23278m;\n }\n if (XGPushConfig.isForeignWeakAlarmMode(C6973b.m29776f())) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"scheduleHeartbeat WaekAlarmMode heartbeatinterval: \");\n sb.append(f23280o);\n sb.append(\" ms\");\n C6864a.m29305f(str2, sb.toString());\n f23279n = f23280o;\n }\n f23279n = C7055h.m30166a(C6973b.m29776f(), \"com.tencent.android.xg.wx.HeartbeatIntervalMs\", f23279n);\n C7045d.m30117a().mo34149a(0, currentTimeMillis + ((long) f23279n), this.f23299z);\n } catch (Throwable th) {\n C6864a.m29302d(str2, \"scheduleHeartbeat error\", th);\n }\n }", "private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }", "@Override\n public float getHeating() {\n\n int wart = 0;\n if (!roomList.isEmpty()){\n for (Room room : roomList){\n if (room instanceof Localization){\n wart += room.getHeating();\n }\n }\n }\n return wart;\n }", "public void cheat() {\r\n announce( \"cheat\" );\r\n }", "private void eat() {\r\n\t\tthis.energy = this.baseEnergy;\r\n\t\tArrayList<Block> foodNeighbors = (ArrayList<Block>)this.getBlock().getAdjacent(prey, \"2457\");\r\n\t\twhile (foodNeighbors.size() > 0) {\r\n\t\t\tint randomNeighbor = r.nextInt(foodNeighbors.size());\r\n\t\t\tBlock b = this.getBlock();\r\n\t\t\tBlock t = foodNeighbors.get(randomNeighbor);\r\n\t\t\tif (!t.getNextCell().getNextState().equals(predator)) {\r\n\t\t\t\tmoveCell(this, b, t, new WaTorCell(this.getBlock(), new WaTorState(State.EMPTY_STATE),\r\n\t\t\t\t\t\tthis.ageToReproduce, this.baseEnergy));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tfoodNeighbors.remove(t);\r\n\t\t}\r\n\t\tcellPreyRules(new WaTorState(WaTorState.WATOR_PREDATOR));\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tick() {\n\t\t\r\n\t}" ]
[ "0.7756645", "0.75587326", "0.6927775", "0.67176825", "0.6680335", "0.65663743", "0.6535104", "0.64170533", "0.63996994", "0.6374784", "0.6327763", "0.6265496", "0.6213676", "0.62084794", "0.619958", "0.6128907", "0.6092193", "0.604493", "0.602807", "0.60212666", "0.6017017", "0.5959502", "0.59578204", "0.5948216", "0.59350055", "0.59173083", "0.59065557", "0.5900457", "0.5876742", "0.58717424", "0.5856341", "0.58381194", "0.5813803", "0.58068514", "0.58013", "0.5797659", "0.5794594", "0.57925254", "0.577128", "0.5764062", "0.57632184", "0.5758892", "0.5755329", "0.57499194", "0.57355297", "0.57163024", "0.57046026", "0.56950897", "0.5691331", "0.56854814", "0.56834024", "0.5670221", "0.56642365", "0.5641741", "0.56377506", "0.563177", "0.562295", "0.56192964", "0.5613077", "0.56110966", "0.5608017", "0.5598875", "0.5597794", "0.55794823", "0.5564247", "0.5556144", "0.55556464", "0.55510724", "0.5543478", "0.5527724", "0.55248827", "0.55181134", "0.5514582", "0.55138004", "0.5511714", "0.5507484", "0.5506877", "0.55040115", "0.5500981", "0.54950094", "0.54898995", "0.54841584", "0.54808944", "0.5478743", "0.54785746", "0.54688543", "0.54660887", "0.5464748", "0.5451446", "0.5442603", "0.54325795", "0.54325694", "0.543167", "0.54292554", "0.5428503", "0.5421808", "0.5420791", "0.5419253", "0.5415841", "0.5415841" ]
0.5901628
27
return the id number
public int getID() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getIdNumber();", "public static int getIdNumber() {\n return idNumber;\n }", "int getIdNum();", "public int id() {\n return _num;\n }", "Integer getID();", "Integer getID();", "public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }", "public static int getIdentifier(){\n\t\tif(index > ids.size() - 1){\n\t\t\tindex = 0;\n\t\t}\n\t\t// Post increment is used here, returns index then increments index\n\t\treturn ids.get(index++);\n\t}", "Integer getId();", "Integer getId();", "Integer getId();", "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "public java.lang.Integer getId () {\n\t\treturn _id;\n\t}", "public int getidnumber() {\r\n return idnumber;\r\n }", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "public int getID() {\r\n\t\treturn idNumber;\r\n\t}", "public Number getID();", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\r\n return id;\r\n }", "public int getId() {\n//\t\tif (!this.isCard())\n//\t\t\treturn 0;\n\t\treturn id;\n\t}", "public int getID() {\n this.use();\n\n return ID;\n }", "public int obtId() {\r\n\t\treturn id;\r\n\t}", "private long getIDnumber() {\n\t\treturn IDnumber;\n\t}", "public String getIdNumber() {\n return idNumber;\n }", "java.lang.String getID();", "public int getId()\n {\n return m_nId;\n }", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public int getNumID() {\n return numID;\n }", "public long getID();", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public java.lang.Integer getId()\r\n {\r\n return id;\r\n }", "public java.lang.Integer getId()\n {\n return id;\n }", "public abstract long id();", "public long getId() {\n\t\treturn(id);\n\t}", "public java.lang.Integer getId() {\n\t\treturn id;\n\t}", "public java.lang.Integer getId() {\n\t\treturn id;\n\t}", "public java.lang.Integer getId() {\n return id;\n }", "@Override\r\n\tpublic int getID() {\n\t\treturn jID()*100+ID();\r\n\t}", "public int generateId(){\n return repository.getCount()+1;\n }", "int getMyId();", "public String getId_number() {\n return id_number;\n }", "public java.lang.Integer getId() {\n return id;\n }", "public long getId() {\n\t\treturn getTo(true).getId();\n\t}", "public long getId()\n\t{\n\t\treturn id;\n\t}", "public long id() {\n return id;\n }", "public java.lang.Integer getId() {\n return id;\n }", "public int get_id() {\n return _id;\n }", "public static String id()\n {\n return _id;\n }", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public long getId();", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }", "public int getId() {\n return id_;\n }" ]
[ "0.84856504", "0.8146191", "0.80881494", "0.80403584", "0.7985269", "0.7985269", "0.7943867", "0.7846898", "0.78356224", "0.78356224", "0.78356224", "0.78097016", "0.78001016", "0.7797922", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7739424", "0.7732893", "0.7714531", "0.76781714", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.767801", "0.76500857", "0.7626389", "0.76076466", "0.76057476", "0.75921196", "0.7572736", "0.75727135", "0.7571553", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7571084", "0.7566428", "0.7533974", "0.7529138", "0.7515043", "0.751479", "0.7513006", "0.74934554", "0.7489631", "0.7488901", "0.7488901", "0.74877846", "0.74844795", "0.7464265", "0.7463044", "0.7453433", "0.74463356", "0.7429158", "0.74291235", "0.74274987", "0.7427305", "0.74263436", "0.742494", "0.7408047", "0.7408047", "0.7408047", "0.7408047", "0.7408047", "0.7408047", "0.739982", "0.73859483", "0.73859483", "0.73859483", "0.73859483", "0.73859483", "0.73859483" ]
0.0
-1
create a new object
public static void testStudent() { Student test = new Student(-1930026144, "Simon"); // test the id number System.out.println(test.getID() == 0); System.out.println(test.getName() == "Simon"); // reset a name test.setName("John"); // test the new name System.out.println(test.getName() == "John"); // set a grade test.setGrade('A'); System.out.println(test.getGrade() == 'A'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "OBJECT createOBJECT();", "public void create(){}", "public CMObject newInstance();", "Object create(Object source);", "public abstract T create(T obj);", "public void create() {\n\t\t\n\t}", "T create();", "T create();", "Instance createInstance();", "RentalObject createRentalObject();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "Reproducible newInstance();", "For createFor();", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public abstract void create();", "T crear(T obj);", "@Override\n\tpublic void create() {\n\n\t}", "Foco createFoco();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "Oracion createOracion();", "private SingleObject(){}", "@Override\n\tpublic void create () {\n\n\t}", "private SingleObject()\r\n {\r\n }", "@Test\n public void Constructor_ObjectValues_InstanceCreated() {\n\t\ttry {\n Position position = make_PositionWithIntegerPoints(xCoordinate, yCoordinate, direction);\n Surface surface = make_SurfaceWithGivenDimensions(xDimension, yDimension);\n\t\t\tRover rover = make_RoverWithObjectValues(position, surface);\n\t\t}\n\t\tcatch (AssertionError assErr) {\n\t\t\t// Test passed.\n\t\t\treturn;\n\t\t}\n }", "public RubyObject createObject() {\n\t\treturn (RubyObject) RGSSProjectHelper.getInterpreter(project).runScriptlet(\"return RPG::Troop::Page.new\");\n\t}", "public T newInstance();", "public ObjectFactory() {\n super(grammarInfo);\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "protected abstract void construct();", "@Override\r\n\tpublic void create() {\n\r\n\t}", "void create(T t);", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "protected abstract Object makeNew(final String prefix, final int seqno);", "private static Object createObject(String className, String namespace) {\n try {\n // get constructor\n Constructor<?> constructor = Class.forName(className).getConstructor(new Class[] {String.class});\n // create object\n return constructor.newInstance(new Object[] {namespace});\n } catch (ClassNotFoundException cnfe) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", cnfe);\n } catch (NoSuchMethodException nsme) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", nsme);\n } catch (InstantiationException ie) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ie);\n } catch (IllegalAccessException iae) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", iae);\n } catch (InvocationTargetException ite) {\n throw new ReviewerStatisticsConfigurationException(\n \"error occurs when trying to create object via reflection.\", ite);\n }\n }", "protected abstract DBObject getNewObject();", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\r\n\t}", "@Override\n \t\t\t\tpublic void doNew() {\n \n \t\t\t\t}", "protected abstract T newObject(Handle<T> paramHandle);", "Object build();", "public LocalObject() {}", "ObjectElement createObjectElement();", "static Obj NewObj (String name,int kind) {\r\n\t\tObj p, obj = new Obj();\r\n obj.name = new String(name); \r\n\t\tobj.type = null; obj.kind = kind;\r\n\t\tobj.level = curLevel;\r\n\t\tp = topScope.locals;\r\n\t\t/*Para buscar si el nb de la variable nueva ya esta!!!*/\r\n\t\twhile (p != null) { \r\n \t \tif (p.name.equals(name)) Parser.SemError(1);\r\n\t\t\tp = p.next;\r\n\t\t}\r\n \t//FILO!!\r\n obj.next = topScope.locals; \r\n\t\ttopScope.locals = obj;\r\n \t//if (kind == vars) {}\r\n \t//obj.adr = topScope.nextAdr; topScope.nextAdr++;\r\n \t//obj.view();\r\n\t\treturn obj;\r\n }", "Book createBook();", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "Compuesta createCompuesta();", "Compleja createCompleja();", "abstract Object build();", "Person createPerson();", "Thing createThing();", "Simple createSimple();", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "private SingleObject(){\n }", "Klassenstufe createKlassenstufe();", "@Override\n\tpublic boolean create(Langues obj) {\n\t\treturn false;\n\t}", "CsticModel createInstanceOfCsticModel();", "private ConfigurationObject createObject(String name, String type) throws Exception {\r\n ConfigurationObject object = new DefaultConfigurationObject(name);\r\n object.setPropertyValue(PROPERTY_TYPE, type);\r\n\r\n return object;\r\n }", "public Entity newEntity() { return newMyEntity(); }", "public Entity newEntity() { return newMyEntity(); }", "public void crearPersona(){\r\n persona = new Persona();\r\n persona.setNombre(\"Jose\");\r\n persona.setCedula(12345678);\r\n }", "public abstract <T> T create(Object object, Class<T> clazz);", "Entity createEntity();", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "P createP();", "public abstract Object create(ElementMapping elementMapping, ReadContext context);", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.76757616", "0.7396078", "0.7341544", "0.7107673", "0.7019211", "0.69562685", "0.6947802", "0.6947802", "0.6876438", "0.6771298", "0.67712814", "0.6721741", "0.6696268", "0.6694516", "0.66841406", "0.6677444", "0.6645699", "0.66332906", "0.663125", "0.6629969", "0.6615", "0.6578824", "0.6556647", "0.6554769", "0.6519578", "0.65184367", "0.6506612", "0.6499171", "0.6499171", "0.6499171", "0.6461209", "0.64519596", "0.6441111", "0.6435952", "0.64292896", "0.6415149", "0.6403782", "0.64020085", "0.63840973", "0.6377248", "0.63694394", "0.63659346", "0.6348845", "0.6311514", "0.62917155", "0.628976", "0.6287799", "0.62858737", "0.6281432", "0.62798715", "0.6268488", "0.6267192", "0.62377197", "0.6234362", "0.62190783", "0.6217936", "0.621082", "0.6210529", "0.62033254", "0.6197561", "0.6193028", "0.61922497", "0.61910087", "0.61910087", "0.6185801", "0.6163854", "0.61571807", "0.6156997", "0.61536044", "0.6148776", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825", "0.61396825" ]
0.0
-1
used when a department is already assigned to an existing task its used to select the previously chosen department for that task
public int getPositionForItemId(int depId) { if (mDepartmentEntryList == null) return 0; return mDepartmentEntryList.indexOf(new DepartmentEntry(depId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Department selectDepartment()\n {\n Department selectedDepartment = null;\n if(listViewSelectedHospital != null){\n listViewSelectedHospital = listViewSelectedHospital.trim();\n String hospitalName = listViewSelectedHospital.split(\" \")[0];\n selectedDepartment = getDepartment(hospitalName);\n }\n return selectedDepartment;\n }", "public void assignDepartment(String departmentName);", "private String setDepartment() {\r\n\t\tSystem.out.println(\"New worker: \" + firstName + \".Department Codes\\n1 for Sales\\n2 for Development\\n3 for Accounting\\n0 for none\\nEnter department code:\");\r\n\t\tScanner in=new Scanner(System.in);\r\n\t\tint depChoice=in.nextInt();\r\n\t\tif(depChoice == 1) {\r\n\t\t\treturn \"sales\";\r\n\t\t}\r\n\t\telse if(depChoice == 2) {\r\n\t\t\treturn \"dev\";\r\n\t\t}\r\n\t\telse if (depChoice == 3) {\r\n\t\t\treturn \"acct\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public static int selectDepartment() {\r\n\t\tSystem.out.println(\"ENTER THE DEPARTMENT\");\r\n\t\tSystem.out.println(\"1.MECH\");\r\n\t\tSystem.out.println(\"2.CIVIL\");\r\n\t\tSystem.out.println(\"3.CSE\");\r\n\t\treturn 0;\r\n\t}", "private String setDepartment() {\n\t\tSystem.out.println(\"Department codes\\n1 for Sales \\n2 for Development \"\n\t\t\t\t+ \"\\n3 for Accounting \\n0 for Other\\nEnter the department code: \");\n\t\tScanner sc = new Scanner(System.in);\n\t\tint deptChoice = sc.nextInt();\n\t\tsc.close();\n\t\tif (deptChoice == 1) return \"sales\";\n\t\telse if (deptChoice == 2) return \"development\";\n\t\telse if (deptChoice == 3) return \"accounting\";\n\t\telse return \"other\";\n\t}", "private String setDepartment() {\r\n\t\tSystem.out.print(\"Enter the Department:\\n1. For sales\\n2. For Development\\n3. For Accounting\\n0. For none\\n\");\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tint choice = in.nextInt();\r\n\t\tif(choice == 1) { return \"sales\"; }\r\n\t\telse if(choice == 2) { return \"dev\"; }\r\n\t\telse if(choice == 3) { return \"acctg\"; }\r\n\t\telse { return \"\"; }\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n JComboBox jc = (JComboBox)e.getSource();\n \n if(jc.getSelectedItem().equals(\"SELECT\")){\n SCRView.setDepartmentId(0);\n \n }\n else{\n for(Object[] data:SCRModel.getRespectiveDepartment(mainview.getUserId())){\n if(data[1].equals(jc.getSelectedItem())){\n SCRView.setDepartmentId(Integer.parseInt(data[0].toString()));\n// IRView.refreshTableIssueStockReport(IRModel.getSalesList(IRView.getDepartmentId()));\n }\n }\n }\n }\n catch(Exception se){\n JOptionPane.showMessageDialog(SCRView , se+\"from ComboDepartmentListener\"+getClass().getName());\n }\n }", "public void setDepartment(Department d) {\r\n department = d;\r\n }", "public void assignDepartment() {\n\n Scanner stdin = new Scanner(System.in);\n try {\n ConnectToSqlDB.connectToSqlDatabase();\n System.out.println(\"You're about to transfer an employee to another Department \\nPlease state ID of employee: \");\n String inputEmployeeId = stdin.next();\n System.out.println(\"Please state the employee's new department: \");\n String inputDepartment = stdin.next();\n\n while ( (!inputDepartment.equals(\"Executive\")) && (!inputDepartment.equals(\"Development\")) &&\n (!inputDepartment.equals(\"Accounting\")) && (!inputDepartment.equals(\"Human_Resources\")) )\n {\n System.out.println(\"Please Enter a Valid Department\");\n inputDepartment = stdin.next();\n }\n stdin.close();\n\n ConnectToSqlDB.ps = ConnectToSqlDB.connect.prepareStatement(\"UPDATE employees SET department = '\" + inputDepartment + \"' WHERE employee_id = '\" +\n inputEmployeeId + \"';\");\n ConnectToSqlDB.ps.executeUpdate();\n\n System.out.println(\"Employee ID#\" + inputEmployeeId + \" is now a part of the \" + inputDepartment + \" Department.\");\n\n } catch (IOException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n }", "public void prepareIdDepartamento(ActionEvent event) {\n Municipio selected = this.getSelected();\n if (selected != null && idDepartamentoController.getSelected() == null) {\n idDepartamentoController.setSelected(selected.getIdDepartamento());\n }\n }", "public static void updateDept() {\n\t}", "private void handleTransferDepartment()\n {\n\n Department selectedDepartment = selectDepartment();\n Doctor selectedDoctor = selectDoctor();\n if(selectedDoctor != null && !selectedDoctor.isOccupied() && selectedDepartment != null)\n {\n if(selectedDepartment.getName().equals(selectedDoctor.get_affiliation()))\n {\n String result = \"The doctor has already in the department.\\n\";\n printResult.add(result);\n updateListViewLogWindow();\n }\n else\n {\n selectedDoctor.transferToDepartment(selectedDepartment);\n selectedDoctor.endTurn();\n updateListViewDoctorItems();\n String result = selectedDoctor.getName() + \" transfers to \" + selectedDepartment.getName() + \"\\n\";\n printResult.add(result);\n listViewSelectedDoctor = null;\n listViewSelectedHospital = null;\n }\n\n }\n else\n {\n String result = \"You have to select a unoccupied doctor or a department.\\n\";\n printResult.add(result);\n updateListViewLogWindow();\n }\n\n }", "@Override\n\tpublic List<?> selectDepartment() throws Exception {\n\t\treturn deptMapperr.selectDepartment();\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n if(e.getActionCommand().equalsIgnoreCase(\"comboDepartmentName\")){\n Object[][] departmentdata= issueReturnModel.getRespectiveDepartment(mainview.getUserId());\n JComboBox dep = (JComboBox)e.getSource();\n if(dep.getSelectedItem().equals(\"SELECT\")){\n issueReturnView.setDepartmentId(0);\n issueReturnView.refreshJTable(new DefaultTableModel());\n \n }\n else{\n for(Object[] dat:departmentdata){\n if(dat[1].equals(dep.getSelectedItem())){\n issueReturnView.setDepartmentId(Integer.parseInt(dat[0].toString()));\n //loading the repective item according to department \n issueReturnView.refreshJTable(issueReturnModel.getResturantItemList(issueReturnView.getDepartmentId()));\n break;\n \n }\n }\n }\n }\n }\n catch(Exception se){\n JOptionPane.showMessageDialog(issueReturnView, se+\"from ComboListener\"+getClass().getName());\n }\n }", "public void setDepartment(String dept) {\r\n\t\tdepartment = dept;\r\n\t}", "public void selectOptionInDepartment(String department, String optionsLinkText) {\r\n\t\tint departmentCode;\r\n\t\tint optionsListCode;\r\n\t\tswitch (department) {\r\n\t\tcase \"Amazon Prime\":\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tbreak;\r\n\t\tcase \"Amazon Prime Video\":\r\n\t\t\tdepartmentCode = 2;\r\n\t\t\toptionsListCode = 2;\r\n\t\t\tbreak;\r\n\t\tcase \"Prime Music\":\r\n\t\t\tdepartmentCode = 3;\r\n\t\t\toptionsListCode = 3;\r\n\t\t\tbreak;\r\n\t\tcase \"Savings Programs\":\r\n\t\t\tdepartmentCode = 4;\r\n\t\t\toptionsListCode = 4;\r\n\t\t\tbreak;\r\n\t\tcase \"Appstore for Android\":\r\n\t\t\tdepartmentCode = 5;\r\n\t\t\toptionsListCode = 5;\r\n\t\t\tbreak;\r\n\t\tcase \"Echo & Alexa\":\r\n\t\t\tdepartmentCode = 7;\r\n\t\t\toptionsListCode = 6;\r\n\t\t\tbreak;\r\n\t\tcase \"Fire Tablets & Fire TV\":\r\n\t\t\tdepartmentCode = 8;\r\n\t\t\toptionsListCode = 7;\r\n\t\t\tbreak;\r\n\t\tcase \"Kindle\":\r\n\t\t\tdepartmentCode = 9;\r\n\t\t\toptionsListCode = 8;\r\n\t\t\tbreak;\r\n\t\tcase \"Books & Audible\":\r\n\t\t\tdepartmentCode = 11;\r\n\t\t\toptionsListCode = 9;\r\n\t\t\tbreak;\r\n\t\tcase \"Video Games & Twitch Prime\":\r\n\t\t\tdepartmentCode = 12;\r\n\t\t\toptionsListCode = 10;\r\n\t\t\tbreak;\r\n\t\tcase \"Music, Movies & TV Shows\":\r\n\t\t\tdepartmentCode = 13;\r\n\t\t\toptionsListCode = 11;\r\n\t\t\tbreak;\r\n\t\tcase \"Electronics\":\r\n\t\t\tdepartmentCode = 14;\r\n\t\t\toptionsListCode = 12;\r\n\t\t\tbreak;\r\n\t\tcase \"Home, Garden, Pets & Tools\":\r\n\t\t\tdepartmentCode = 15;\r\n\t\t\toptionsListCode = 13;\r\n\t\t\tbreak;\r\n\t\tcase \"Grocery & Whole Foods Market\":\r\n\t\t\tdepartmentCode = 16;\r\n\t\t\toptionsListCode = 14;\r\n\t\t\tbreak;\r\n\t\tcase \"Health & Beauty\":\r\n\t\t\tdepartmentCode = 17;\r\n\t\t\toptionsListCode = 15;\r\n\t\t\tbreak;\r\n\t\tcase \"Toys, Kids, Baby & STEM\":\r\n\t\t\tdepartmentCode = 18;\r\n\t\t\toptionsListCode = 16;\r\n\t\t\tbreak;\r\n\t\tcase \"Clothing, Shoes & Jewelry\":\r\n\t\t\tdepartmentCode = 19;\r\n\t\t\toptionsListCode = 17;\r\n\t\t\tbreak;\r\n\t\tcase \"Handmade\":\r\n\t\t\tdepartmentCode = 20;\r\n\t\t\toptionsListCode = 18;\r\n\t\t\tbreak;\r\n\t\tcase \"Sports & Outdoors\":\r\n\t\t\tdepartmentCode = 21;\r\n\t\t\toptionsListCode = 19;\r\n\t\t\tbreak;\r\n\t\tcase \"Automotive & Industrial\":\r\n\t\t\tdepartmentCode = 22;\r\n\t\t\toptionsListCode = 20;\r\n\t\t\tbreak;\r\n\t\tcase \"Boutiques Francophones\":\r\n\t\t\tdepartmentCode = 23;\r\n\t\t\toptionsListCode = 21;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tdepartmentCode = 1;\r\n\t\t\toptionsListCode = 1;\r\n\t\t\tLog.info(\" The given Department Name: \" + department\r\n\t\t\t\t\t+ \" is either incorrect or is not defined in the method: selectDepartmentByHoveringMouse\"\r\n\t\t\t\t\t+ \" of NavBarAmazonHomePage.class,Please Check.\");\r\n\t\t}\r\n\r\n\t\tWebElement desiredDepartment = driver.findElement(By.cssSelector(\r\n\t\t\t\t\"#nav-flyout-shopAll > div.nav-template.nav-flyout-content.nav-tpl-itemList > span:nth-child(\"\r\n\t\t\t\t\t\t+ departmentCode + \")\"));\r\n\t\tseHoverOnElement(NavBarAmazonHomePage.get().btnNavbarShopByDepartment, \"btnNavbarShopByDepartment\");\r\n\t\tseWaitForClickableWebElement(driver, desiredDepartment, 20);\r\n\t\tseHoverOnElement(desiredDepartment, department);\r\n\t\tselectOptionByLinkText(optionsListCode, optionsLinkText);\r\n\t}", "public void setDepartment(String department) {\n this.department = department;\n }", "public void setDepartment(Department department) {\n this.department = department;\n }", "public void setDepartment(String department) {\r\n\t\tthis.department=department;\r\n\t}", "public void setDepartmentId(int value) {\n this.departmentId = value;\n }", "private Department getDepartment(String departmentName)\n {\n for(Department department:humanPlayer.getDepartments())\n {\n if(department.getName().equals(departmentName))\n {\n return department;\n }\n }\n return null;\n }", "public void setDepartment(String department) {\r\n\t\tthis.department = department;\r\n\t}", "public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }", "public void setDepartmentid(Integer departmentid) {\n this.departmentid = departmentid;\n }", "public void setDept(String dept) {\n this.dept = dept;\n }", "public void setDeptTable(Departments value);", "@Override\r\n\tpublic Dept queryByID(Dept t) {\n\t\treturn null;\r\n\t}", "public void assignTask(String employee, String taskName) {\n \tSystem.out.println(\"Inside assignDeadline()\");\n \t//Task t = new Task();\n \tint count = 0;\n \tfor(Task task : toDoList) {\n \t\tif(task.getTaskName().equals(taskName)) {\n \t\t\t//t = task;\n \t\t\ttask.setEmployee(employee);\n \t\t\ttoDoList.set(count, task);\n \t\t}\n \t\tcount++;\n \t}\n \tSystem.out.println(\"Task Assigned to Employee Sucessfully\");\n \t\n \tdisplay();\n }", "public void setDept_name(java.lang.String dept_name) {\r\n this.dept_name = dept_name;\r\n }", "@Override\n public Department getDepartment(int departmentId) {\n return null;\n }", "public void addemp(Dept dept);", "public void openDepartmentDialog(ActionEvent ae)\r\n {\r\n UIComponent source = ae.getComponent();\r\n\r\n ParticipantUserObject participantUserObject = (ParticipantUserObject) source.getAttributes().get(\"userObject\");\r\n if (participantUserObject.isReferencesDepartment())\r\n {\r\n parentNodeToRefresh = (DefaultMutableTreeNode) participantUserObject.getWrapper().getParent();\r\n selectedDepartment = participantUserObject.getDepartment();\r\n if (selectedDepartment != null)\r\n {\r\n createMode = false;\r\n modifyMode = true;\r\n\r\n this.departmentBean = new DepartmentBean(selectedDepartment);\r\n }\r\n }\r\n else\r\n {\r\n modifyMode = false;\r\n createMode = false;\r\n\r\n Department parentDepartment = null;\r\n OrganizationInfo assignedOrganization = null;\r\n\r\n if (participantUserObject.isReferencesScopedOrganization())\r\n {\r\n parentNodeToRefresh = (DefaultMutableTreeNode) participantUserObject.getWrapper();\r\n assignedOrganization = participantUserObject.getScopedOrganization();\r\n\r\n TreeNode node = participantUserObject.getWrapper().getParent();\r\n if (node instanceof DefaultMutableTreeNode)\r\n {\r\n createMode = true;\r\n\r\n DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode) node;\r\n if (parentNode.getUserObject() instanceof ParticipantUserObject)\r\n {\r\n ParticipantUserObject parentParticipantUserObject = (ParticipantUserObject) parentNode\r\n .getUserObject();\r\n if (parentParticipantUserObject.isReferencesDepartment())\r\n {\r\n parentDepartment = parentParticipantUserObject.getDepartment();\r\n }\r\n else if (parentParticipantUserObject.isReferencesImplicitlyScopedOrganization())\r\n {\r\n DepartmentInfo parentDepartmentInfo = parentParticipantUserObject.getQualifiedModelParticipantInfo()\r\n .getDepartment();\r\n AdministrationService adminService = workflowFacade.getServiceFactory().getAdministrationService();\r\n parentDepartment = adminService.getDepartment(parentDepartmentInfo.getOID());\r\n }\r\n }\r\n }\r\n }\r\n this.departmentBean = new DepartmentBean(parentDepartment, assignedOrganization);\r\n }\r\n\r\n if (createMode || modifyMode)\r\n {\r\n super.openPopup();\r\n }\r\n }", "public void setDeptId(Integer deptId) {\r\n this.deptId = deptId;\r\n }", "void assign (int departmentId, AssignEmployeeRequest empList);", "public Department employeeDepartment(String employeeName) {\n\n String departmentOfEmployee = \"\";\n\n try {\n Connection conn = ConnectToSqlDB.connectToSqlDatabase();\n String query = \"SELECT * FROM employees;\";\n\n ConnectToSqlDB.statement = conn.createStatement();\n\n ConnectToSqlDB.resultSet = ConnectToSqlDB.statement.executeQuery(query);\n\n while (ConnectToSqlDB.resultSet.next()) {\n int idField = ConnectToSqlDB.resultSet.getInt(\"employee_id\");\n String nameField = ConnectToSqlDB.resultSet.getString(\"employee_name\");\n String salaryField = ConnectToSqlDB.resultSet.getString(\"employee_salary\");\n String departmentField = ConnectToSqlDB.resultSet.getString(\"department\");\n\n if (nameField.equals(employeeName)) {\n departmentOfEmployee = departmentField;\n }\n }\n\n } catch (SQLException e) {\n e.printStackTrace();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n System.out.print(\"This employee belongs to the following department: \");\n if (departmentOfEmployee.equals(Department.Executive.toString())) {\n return Department.Executive;\n }\n if (departmentOfEmployee.equals(Department.Development.toString())) {\n return Department.Development;\n }\n if (departmentOfEmployee.equals(Department.Accounting.toString())) {\n return Department.Accounting;\n }\n if (departmentOfEmployee.equals(Department.Human_Resources.toString())) {\n return Department.Human_Resources;\n }\n else return Department.No_Department;\n\n }", "@Override\n\tpublic Departamento modificar(Departamento t) {\n\t\treturn null;\n\t}", "public static void removeDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\t\tSystem.out.println(\"Enter Department Id: \");\n\t\tint deptId = sc.nextInt();\n\t\tboolean deletion = false;\n\t\tDepartment d = null;\n\t\tsc.nextLine();\n\n\t\t// loop thru all dept obj of the deptInfo list\n\t\tfor (Department dept : deptInfo) {\n\t\t\tif (dept.getDeptId() == deptId) {\n\t\t\t\tdeletion = true;\n\t\t\t\td = dept;\n\t\t\t}\n\t\t}\n\t\tif (deletion) {\n\t\t\tdeptInfo.remove(d);\n\t\t\tSystem.out.println(\"Department removed\");\n\t\t}\n\t}", "public void setDepartment(String department) {\n if(department==null){\n department = \"\";\n }\n this.department = department;\n }", "public void setDepartmentname(java.lang.String newDepartmentname) {\n\tdepartmentname = newDepartmentname;\n}", "public synchronized String getDepartment()\r\n {\r\n return department;\r\n }", "public void chooseOptionAssignToAssigneeOnBulkActionsDropDownWithName(String assigneeName) {\n getLogger().info(String.format(\"Choose Assignee '%s' in Bulk Dropdown list\", assigneeName));\n try {\n String listUser = \"\";\n boolean result = false;\n clickElement(optionAssignTo, \"Assign To Option\");\n for (int i = 0; i < childItemAssigneeBulkDrpEle.size(); i++) {\n listUser = childItemAssigneeBulkDrpEle.get(i).getText();\n if (listUser.contains(assigneeName)) {\n result = clickElement(childItemAssigneeBulkDrpEle.get(i), \"Child Item Assignee\");\n NXGReports.addStep(\"Choose first assignee(any) to assign.\", LogAs.PASSED, null);\n break;\n }\n }\n if (result) {\n NXGReports.addStep(\"Choose first assignee(any) to assign.\", LogAs.PASSED, null);\n } else {\n // getDriver().findElement(By.xpath(\"//button[contains(text(),'\" + assigneeName + \"')]\")).click();\n getLogger().info(String.format(\"Cannot choose assignee '%s' in Bulk Dropdown list\", assigneeName));\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"Fail: Choose first assignee(any) to assign.\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n } catch (Exception ex) {\n getLogger().info(ex);\n AbstractService.sStatusCnt++;\n NXGReports\n .addStep(\"Fail: Choose first assignee(any) to assign.\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }", "public void setDeptid(Integer deptid) {\n this.deptid = deptid;\n }", "int insertSelective(Dept record);", "public void setDeptId(Integer deptId) {\n this.deptId = deptId;\n }", "public void setDeptId(Integer deptId) {\n this.deptId = deptId;\n }", "public void setDeptId(Integer deptId) {\n this.deptId = deptId;\n }", "public void setDeptId(Integer deptId) {\n this.deptId = deptId;\n }", "CrmDept selectByPrimaryKey(String deptCode);", "public void apply()\r\n {\r\n try\r\n {\r\n UserService service = workflowFacade.getServiceFactory().getUserService();\r\n AdministrationService adminService = workflowFacade.getServiceFactory().getAdministrationService();\r\n if (!modifyMode)\r\n {\r\n if (service != null && departmentBean != null)\r\n {\r\n adminService.createDepartment(departmentBean.getId(), departmentBean.getName(), departmentBean\r\n .getDescription(), departmentBean.getParentDepartment(), departmentBean.getOrganization());\r\n }\r\n }\r\n else\r\n {\r\n if (selectedDepartment != null && departmentBean != null)\r\n {\r\n adminService.modifyDepartment(departmentBean.getOID(), departmentBean.getName(), departmentBean\r\n .getDescription());\r\n }\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n ExceptionHandler.handleException(e);\r\n }\r\n\r\n closePopup();\r\n ParticipantManagementBean.getInstance().getParticipantTree().refreshParticipantNode(parentNodeToRefresh,\r\n EnumSet.of(NODE_TYPE.DEPARTMENT, NODE_TYPE.DEPARTMENT_DEFAULT));\r\n }", "public String GetDept()\r\n {\r\n return Department;\r\n }", "public Department findDepartment(String num)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_FIND_DEPARTMENT_REQUEST, num, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_FIND_DEPARTMENT_RESPONSE)\n\t\t{\n\t\t\tint DepNum = ((Department)envelop.getPassingObject()).getDepartmentId();\n\t\t\tString DepName = ((Department)envelop.getPassingObject()).getDepartmentName();\n\n\t\t\tDepartment dep = new Department(DepNum, DepName);\n\t\t\treturn dep;\n\t\t\t\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t\treturn null;\n\t\t}\n\t}", "public void createTask()\n {\n boolean copy = false;\n if(check.checkTask(taskName.getText()))\n {\n // Go through list and make sure task isnt already there\n // If there is one already in list, then tell user there it is on list\n if(!(Item.getToDoList().isEmpty()))\n {\n for(Item task : Item.getToDoList())\n {\n if(task.getTask().equals(taskName.getText()))\n {\n status.setText(\"Task is already on the list. \");\n copy = true;\n }\n }\n\n if(!copy)\n {\n // If not copy, add the task to the list by calling method\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n }\n\n // If list is empty, then no need to check if task is copy\n else\n {\n addTaskAndDisplay(taskName.getText(), completionDate.getText(), taskCompletedCheckBox.isSelected());\n }\n\n }\n\n // If task is invalid, alert user\n else\n {\n status.setText(\"Task invalid. Try again. \");\n }\n\n }", "public Departmentdetails getDepartmentByName(String departmentName);", "public void setDept(springboot_academic_system.department.DatabaseDepartment dept) {\n this.dept = dept;\n this.deptName = dept.getDeptName();\n }", "int insertDptTask(DptTaskInfo dptTaskInfo);", "private void checkAndSetTempOrgEntitySet(OrganizationalEntity orgObj) {\n String id = orgObj.getId();\n if(tempOrgEntitySet.contains(id))\n return;\n synchronized(tempOrgEntitySet){\n if(!tempOrgEntitySet.contains(id)){\n TaskServiceSession taskSession = null;\n try {\n taskSession = taskService.createSession();\n if(orgObj instanceof User)\n taskSession.addUser((User)orgObj);\n else\n taskSession.addGroup((Group)orgObj);\n }catch (Exception e) {\n throw new RuntimeException(e);\n }finally {\n if(taskSession != null)\n taskSession.dispose();\n }\n log.info(\"addTask() adding following userId to tempOrgEntitySet to avoid possible duplicate entry complaints: \"+id);\n try{Thread.sleep(1000);}catch(Exception x){x.printStackTrace();}\n tempOrgEntitySet.add(id);\n }\n }\n }", "@Test\n @IfProfileValue(name=\"dept-test-group\", values={\"all\",\"department\"})\n public void _2_1_3_addExistDept() throws Exception {\n Department dept = new Department();\n dept.setName(d_1_1.getName());\n dept.setDescription(\"测试新增重复部门\");\n dept.setParent(d_1.getId());\n try {\n RequestBuilder request = post(\n \"/api/v1.0/companies/\"+\n d_1.getCompany()+\n \"/departments\")\n .contentType(CONTENT_TYPE)\n .header(AUTHORIZATION, ACCESS_TOKEN)\n .content(json(dept));\n this.mockMvc.perform(request)\n .andDo(print())\n .andExpect(status().isConflict());\n } catch(Exception e) {\n throw(e);\n } finally {\n cleanNode(LdapNameBuilder.newInstance(d_1.getId())\n .add(\"ou\",dept.getName())\n .build().toString());\n }\n }", "@Override\n public void setEmployeeDepartment(int employeeId, int departmentId) {\n\n }", "public void setDeptId(Long deptId) {\n this.deptId = deptId;\n }", "@Override\n\t\t\tpublic boolean insert(Dept dept) {\n\t\t\t\treturn false;\n\t\t\t}", "public void AddDep(Department dep) {\n\t\tddi.Add(dep);\n\t\t\n\t}", "public String checkDepartment(String departmentName);", "public boolean assignProjectToEmployee(EmployeeTask empTask) throws EmployeeDbFailure {\n\t\tEmployeeTaskDAO emp = new EmployeeTaskDAOImpl();\n\t\tboolean isAssign = emp.assignProjectToEmployee(empTask);\n\t\treturn isAssign;\n\t}", "public void SetDepartmentID(String DepartmentID)\n {\n this.DepartmentID=DepartmentID;\n }", "public static void addDept() {\n\t\tScanner sc = ReadFromConsole.sc;\n\n\t\tSystem.out.println(\"Enter Department name: \");\n\t\tString deptName = sc.nextLine();\n\n\t\tsc.nextLine(); // had to add this in to prevent input lines with different data types from\n\t\t\t\t\t\t// printing simultaneously, if you know a better solution, let me know\n\n\t\tSystem.out.println(\"Enter Department phone number: \");\n\t\tString deptPhoneNum = sc.nextLine();\n\n\t\tDepartment dept1 = new Department(deptName, deptPhoneNum);\n\t\t// pass in the info for each department\n\t\t// dept1 is the reference to the newly created obj\n\t\t// new Department = creates a new department obj and the Department constructor has a\n\t\t// counter variable which increments the id# and assigns it as new department id\n\n\t\tdeptInfo.add(dept1);\n\t\t// adding the newly created obj ref into arrlist\n\n\t}", "public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }", "public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }", "public void setDepartmentId(Integer departmentId) {\n this.departmentId = departmentId;\n }", "public void setDepartmentName(String departmentName) {\n this.departmentName = departmentName;\n }", "public void setDept_code(java.lang.String dept_code) {\r\n this.dept_code = dept_code;\r\n }", "@Override\n public Employee updateEmployeeDepartment(int employeeId, int departmentId) {\n return null;\n }", "public void setdeptName(String deptName) {\n\t\t_deptName = deptName;\n\t}", "public SelectorDepartment getDepartmentSelector() {\n return departmentSelector;\n }", "@Override\n\tpublic long getEmployeeDepartmentId() {\n\t\treturn _candidate.getEmployeeDepartmentId();\n\t}", "public AUndertaking getSelectedTask()\n {\n String errorMsg;\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n if (taskIt.hasNext()) {\n AUndertaking selectedTask = taskIt.next();\n\n if (! taskIt.hasNext()) {\n return selectedTask;\n }\n\n errorMsg = \"Selection is multiple\";\n }\n else {\n errorMsg = \"Nothing is selected\";\n }\n\n throw new IllegalStateException(errorMsg);\n }", "@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }", "public void setDepartmentName(String departmentName)\r\n\t{\r\n\t\tthis.departmentName = departmentName;\r\n\t}", "public void addDepartment(IBaseDTO dto) {\n\t\tSysDepartment sd=new SysDepartment();\n\t\t\n\t\tsd.setName((String)dto.get(\"name\"));\n\t\tsd.setParentId((String)dto.get(\"parentId\"));\n\t\tsd.setRemarks((String)dto.get(\"remark\"));\n\t\tsd.setTagShow((String)dto.get(\"tagShow\"));\n\t\tsd.setId(ks.getNext(\"sys_department\"));\n\t\t\n\t\tdao.saveEntity(sd);\n\t\tcts.reload();\n\t}", "public void prepareIdEmpleado(ActionEvent event) {\n Rentadevolucion selected = this.getSelected();\n if (selected != null && idEmpleadoController.getSelected() == null) {\n idEmpleadoController.setSelected(selected.getIdEmpleado());\n }\n }", "private void processDeptsAndCollections(Map<String, String> row, Map<String, Dept> deptsAdded,\n Map<String, Collection> collectionsAdded) {\n String deptName = sanitizeString(row.get(departmentHeading));\n String collName = sanitizeString(row.get(collectionHeading));\n //if (deptName.isEmpty()) {\n // // Don't add anything if the department field was empty\n // return;\n //}\n Dept dept;\n Collection coll;\n\n if (failedDeptAttempts >= maxDeptAttempts) {\n throw new RuntimeException(\"Aborting: too many failed attempts to add Departments\");\n }\n if (failedCollAttempts >= maxCollAttempts) {\n throw new RuntimeException(\"Aborting: too many failed attempts to add Collections\");\n }\n //System.out.println(deptsAdded.get(deptName));\n if (deptsAdded.get(deptName) == null) {\n dept = new Dept();\n // id is auto-generated\n dept.setName(deptName);\n try {\n deptRepo.saveAndFlush(dept);\n deptsAdded.put(deptName, dept);\n }\n catch (Exception exception) {\n System.out.println(\"Skipped Dept: duplicate or malformed entry\");\n System.out.println(exception.toString());\n failedDeptAttempts++;\n }\n }\n // How to handle null deptsAdded.get(deptName)?\n if (collectionsAdded.get(collName) == null) {\n coll = new Collection();\n // id is auto-generated\n coll.setName(collName);\n coll.setDept(deptsAdded.get(deptName));\n try {\n collectionRepo.saveAndFlush(coll);\n collectionsAdded.put(collName, coll);\n } catch (Exception exception) {\n System.out.println(\"Skipped Collection: duplicate or malformed entry, or missing Dept\");\n System.out.println(exception.toString());\n failedCollAttempts++;\n }\n }\n }", "int insertSelective(CrmDept record);", "@Override\n\tpublic String selectqueryDeptDeptTransferForNameByCode(String code) {\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic boolean addDept(Dept dept) {\n\t\t\t\treturn false;\n\t\t\t}", "public void setDepartmentcode(java.lang.Integer newDepartment) {\n\tdepartmentcode = newDepartment;\n}", "public String getDepartment() {\r\n return department;\r\n }", "public String getDeptForCode(String code) {\n return departmentMap.get(code);\n }", "public ResultSet getDepartmentByID(int dept_no);", "public String getDepartmentid() {\n return departmentid;\n }", "public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }", "public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }", "public void setDepartmentId(Long departmentId) {\n this.departmentId = departmentId;\n }", "public Department findByNameDepartment(String nameDepartment);", "public void AddEmployeeToDepartement(String nameDepartement , Employee emp)\n\t{\n\t\tfor(Department depart : departments)\n\t\t{\n\t\t\tif(depart.getNameDepartment().equals(nameDepartement)) \n\t\t\t{\n\t\t\t\tdepart.addEmployee(emp);\n\t\t\t}\n\t\t}\n\t}", "public Department(String name){\n this.name = name;\n }", "public void add(Department dep)\n\t{\n\t\tHRProtocol envelop = null;\n\t\tenvelop = new HRProtocol(HRPROTOCOL_ADD_DEPARTMENT_REQUEST, dep, null);\n\t\tsendEnvelop(envelop);\n\t\tenvelop = receiveEnvelop();\n\t\tif(envelop.getPassingCode() == HRPROTOCOL_ADD_DEPARTMENT_RESPONSE)\n\t\t{\t//Success in transition\n\t\t}else\n\t\t{\n\t\t\t//Error in transition. or other error codes.\n\t\t}\n\t}", "int insertSelective(Depart record);", "public String getDepartment(){\n\t\treturn departName;\n\t}", "public void updateDepartment(IBaseDTO dto) {\n\t\tString id=(String)dto.get(\"id\");\n\t\tSysDepartment sd=(SysDepartment)dao.loadEntity(SysDepartment.class,id);\n\t\tif(sd!=null)\n\t\t{\n\t\t\t\n\t\t\tsd.setName((String)dto.get(\"name\"));\n\t\t\tsd.setParentId((String)dto.get(\"parentId\"));\n\t\t\tsd.setRemarks((String)dto.get(\"remark\"));\n\t\t\tsd.setTagShow((String)dto.get(\"tagShow\"));\n\t\t\tsd.setAdmin((String)dto.get(\"admin\"));\n\t\t}\n\t\tcts.reload();\n\t\tdao.saveEntity(sd);\n\t}", "public void prepareFrecuenciaServicioIdTipoDemanda(ActionEvent event) {\n if (this.getSelected() != null && frecuenciaServicioIdTipoDemandaController.getSelected() == null) {\n frecuenciaServicioIdTipoDemandaController.setSelected(this.getSelected().getFrecuenciaServicioIdTipoDemanda());\n }\n }", "public ResultSet getDepartmentByName(String dept_name);", "public static void main(String[] args) {\n ArrayList saleEmployees = new ArrayList<>();\n saleEmployees.add(\"Irene\");\n saleEmployees.add(\"Mihael\");\n\n // emplyees list for service\n ArrayList purchaseEmployees = new ArrayList<>();\n purchaseEmployees.add(\"Eric\");\n purchaseEmployees.add(\"Irene\");\n\n\n Department direction = new Department(\"Alfred Boss\", \"Vorstand\");\n Department sale = new Department(\"Mustermann Max\", \"Vertrieb\", direction, saleEmployees);\n Department salePrivat = new Department(\"Musterfrau Angela\", \"Vertrieb Privatkunden\", sale);\n Department saleB2B = new Department(\"Muste Alfons\", \"Vertrieb Firmenkunden\", sale);\n Department purchase = new Department(\"Kufmann Alois\", \"Einkauf\", direction);\n Department purchaseMechanic = new Department(\"Gunz Herlinde\", \"Einkauf Mechanik\", purchase, purchaseEmployees);\n Department purchaseMechanicSmall = new Department(\"Friedrich Hermann\", \"Einkauf Kleinteile\", purchaseMechanic);\n Department purchaseMechanicBig = new Department(\"Peter Hannelore\", \"Einkauf Großteile\", purchaseMechanic);\n Department purchaseMechanicBigEU = new Department(\"But Moritz\", \"Einkauf Europa\", purchaseMechanicBig);\n Department service = new Department(\"Gyula H\", \"Service\");\n\n service.switchDepartment(saleB2B);\n service.switchDepartment(purchase);\n\n service.removeDepartment();\n\n sale.switchEmployees(\"Mihael\", purchaseMechanicBigEU);\n\n purchaseMechanicBigEU.switchDepartment(direction);\n direction.printOrganisation(\" \", \"- \", 1);\n\n }" ]
[ "0.6782877", "0.65993005", "0.64364356", "0.6359019", "0.6232218", "0.61265165", "0.6048543", "0.6011682", "0.5978197", "0.59627634", "0.5909939", "0.5892056", "0.58090824", "0.57915896", "0.5779316", "0.57506216", "0.5736882", "0.57213575", "0.56676507", "0.56106627", "0.55804133", "0.55707806", "0.55695575", "0.55695575", "0.5556728", "0.5500558", "0.5498338", "0.5482952", "0.54718566", "0.5462313", "0.54570365", "0.54387033", "0.5436182", "0.5429067", "0.5425033", "0.5420903", "0.5407189", "0.540525", "0.5402127", "0.5398138", "0.5397029", "0.5394292", "0.5381735", "0.53712225", "0.53712225", "0.53712225", "0.53712225", "0.537118", "0.5357867", "0.5357238", "0.5348356", "0.53236544", "0.5322872", "0.5305302", "0.5291644", "0.5277939", "0.52761245", "0.5275324", "0.5274987", "0.5268968", "0.5263017", "0.5255083", "0.5255081", "0.5254371", "0.52489674", "0.52465963", "0.52465963", "0.52465963", "0.52457464", "0.5239995", "0.5229184", "0.5227187", "0.52242297", "0.522321", "0.521093", "0.5209975", "0.5208991", "0.520573", "0.52037454", "0.5199762", "0.5199174", "0.5192967", "0.5176624", "0.5167532", "0.5162725", "0.51607984", "0.51593024", "0.515207", "0.5149836", "0.5149836", "0.5149836", "0.51473886", "0.5145759", "0.5144511", "0.51359993", "0.5135448", "0.513288", "0.51232207", "0.5122974", "0.5118238", "0.5114819" ]
0.0
-1
The publicly listed buy orders (Required)
@JsonProperty("bids") public List<org.example.api.beans.OrderBookLevel> getBids() { return bids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }", "void getMarketOrders();", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "void getOrders();", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "public List<Order> getOrders(){\n return this.orders;\n }", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "public List<OrderReport> getAllOrdersAcrossStores();", "List<CustomerOrder> getAllCustomerOrder();", "List<OrderDto> getOrders();", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "List<Order> getAll();", "private List<PurchasingOrder> getLoggedInCustomerAirlineTicketOrders() {\r\n final Customer loggedInCustomer = usersComponent.getLoggedInCustomer();\r\n return loggedInCustomer.getAirlineTicketOrders();\r\n }", "public List<Order> getOrders() {\n return _orders;\n }", "List<Order> getByUser(User user);", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "@GetMapping(path = \"/orders/assigned\")\n Iterable<ShopOrder> getOrdersToDeliver(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "List<Product> getProducts(Order order);", "public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "List<transactionsProducts> purchasedProducts();", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "public ArrayList<Order> getOrders() {\n return this.listOrder;\n }", "public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}", "public ParcelBuyList getParcelBuyList() {\r\n/* 201 */ return this._parcelBuyList;\r\n/* */ }", "private String marketBuyAmounts() {\r\n\t\tint[] amounts= market.getBuyAmounts();\r\n\t\tString out = \"Buy Requests Are: \";\r\n\t\tfor(int i=0; i<amounts.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+amounts[i]+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "int getNumOfBuyOrders();", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public List<Order> getOrder() {\n return order;\n }", "public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "Collection<Order> getAll();", "@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}", "List<Order> getUserOrderList(int userId) throws ServiceException;", "@Override\n public List<OrderSummary> summary() throws EmptyOrderListException {\n logger.info(\"Displaying Order Summary\");\n if(registeredOrders.size() > 0) {\n return registeredOrders.stream().\n collect(groupingBy(Bid::forOrder, mapping(Order::quantity, toList()))).\n entrySet().stream().\n map(toOrderSummary()).\n sorted(byTypeAndPrice).\n collect(toList());\n }\n else {\n throw new EmptyOrderListException(\"Empty Order List. Size: \" + registeredOrders.size());\n }\n }", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "public List<Order> getOrders() throws AlpacaAPIException {\n Type listType = new TypeToken<List<Order>>() {\n }.getType();\n\n AlpacaRequestBuilder urlBuilder =\n new AlpacaRequestBuilder(apiVersion, baseAccountUrl, AlpacaConstants.ORDERS_ENDPOINT);\n\n HttpResponse<JsonNode> response = alpacaRequest.invokeGet(urlBuilder);\n\n if (response.getStatus() != 200) {\n throw new AlpacaAPIException(response);\n }\n\n return alpacaRequest.getResponseObject(response, listType);\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "public List<Buy> getAll() throws PersistException;", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "public List<Weborders> getWeborders() {\r\n List<Weborders> webordersListe = null;\r\n Transaction tx = null;\r\n try {\r\n tx = sessionH.beginTransaction();\r\n Query q = this.sessionH.createQuery(\"from Weborders ORDER BY weborderId\");\r\n webordersListe = q.list();\r\n tx.commit();\r\n } catch (HibernateException e) {\r\n if (tx != null) {\r\n tx.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n sessionH.close();\r\n }\r\n return webordersListe;\r\n }", "List<List<Order>> getOrdersByQuantity(Integer quantity) throws \n OrderBookOrderException;", "public String getOpenOrders() {\n\n\t\treturn getOpenOrders(\"\");\n\t}", "@Override\n public List<Order> getAllOrders(LocalDate date) throws PersistenceException{\n return new ArrayList<Order>(orders.values());\n }", "public ArrayList<OrderItem> getOrderArray(){return orderInfo;}", "public void setOrders(ArrayList<Order> orders) {\n this.orders = orders;\n }", "@Test\n\tpublic void getAllClientOrders() {\n\t\tString email = \"[email protected]\";\n\t\t\n\t\tservice.insertClient(\"devtestuser\", \"test\", email, \"devpass\");\n\t\t\n\t\tint clientId = service.getClient(email).getClient();\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"Apple\", \"APPL\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"BT Group\", \"BT\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\t\n\t\tList<OrderDTO> clientOrders = service.getClientOrders(clientId);\n\t\t\n\t\tassertEquals(4, clientOrders.size());\n\t\t\n\t\t\n\t\tfor(OrderDTO orderDTO : clientOrders) {\n\t\t\tservice.deleteOrder(orderDTO.getOrderId());\n\t\t}\n\t\t\n\t\tservice.deleteClient(email);\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public JSONArray getOrders() throws Exception;", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);", "@GetMapping(\"/orders\")\n public List<AgentOrderList> findAllAgentsOrderList() {\n return agentRepo.findAllAgentOrderListBy();\n }", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "List<OrderModel> getAllLoggedInCustomerTickets() {\r\n final List<PurchasingOrder> purchasingOrders = getLoggedInCustomerAirlineTicketOrders();\r\n return OrderModel.mapFromPurchasingOrders(purchasingOrders);\r\n }", "public List<OrderItem> getOrderItems() {\n List<OrderItem> actual = new ArrayList<>();\n for (OrderItem i : orderItems) {\n if (i.getOrderQuantity() != 0.0) {\n actual.add(i);\n }\n }\n return actual;\n }", "public boolean isSetOrders() {\n return this.orders != null;\n }", "@Override\r\n\tpublic List<PurchaseOrder> getAllPurchaseOrders() {\n\t\treturn ht.loadAll(PurchaseOrder.class);\r\n\t}", "List<Order> findWaitingActionOrders() throws DaoProjectException;", "List<OrderDTO> getAllOrdersDTO();", "public abstract List<CustomerOrder> findAll();", "@Override\n\tpublic List<Order> getOrdersAroundMe() {\n\t\treturn null;\n\t}", "public static List<Order> allOrders() throws LegoHouseException {\n try {\n Connection con = Connector.connection();\n String SQL = \"SELECT * FROM orders\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n List<Order> allOrders = new ArrayList();\n do {\n int ordernumber = rs.getInt(1);\n int height = rs.getInt(3);\n int width = rs.getInt(4);\n int length = rs.getInt(5);\n String status = rs.getString(6);\n Order order = new Order(ordernumber, height, length, width, status);\n allOrders.add(order);\n }\n while (rs.next());\n return allOrders;\n }\n else {\n throw new LegoHouseException(\"No orders has been placed in the shop\", \"employeepage\");\n }\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException ex) {\n throw new LegoHouseException(ex.getMessage(), \"index\");\n }\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "@Override\n public int getItemCount() {\n return ordersList.size();\n }", "@Override\n public int getItemCount() {\n return orders.size();\n }", "public List<ComplexOrderTO> getOutstandingOrders(long storeID) throws NotInDatabaseException;", "List<Cargo> getCargoesForOrder(OrderDTO orderDTO);", "public static List<modelPurchasesI> purchasesList(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tDataBaseSearch query = DataBaseSearch.queryDaTabella(\"Acquisti\");\r\n\t\t\ttry {\r\n\t\t\t\treturn query.find().stream()\r\n\t\t\t\t\t\t.map(e -> new modelPurchases(e))\r\n\t\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}", "public List<Orders> findAccepted2(int userID);", "@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}", "@Override\n\tpublic List<WxOrder> queryOrderByExpressList() {\n\t\treturn orderMapper.queryOrderByExpressList();\n\t}", "int getNumOfSellOrders();", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "public List<Order> getOrderHistory();", "@GET\n @Path(\"orderlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "public boolean showOrders(Connection conn) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX\");\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t return false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public List<Order> getAllUsersOrdersById(long userId);", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public List<Product> getPurchases() {\n return purchases;\n }", "public List getOrderDetails(OrderDetail orderDetail);", "private static List<String> getSessionsWithPurchases(\r\n Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<Buy>> buysFromSessions\r\n )\r\n {\r\n // Initializes the session list.\r\n List<String> sessionList = new LinkedList<>();\r\n\r\n // Loops over all possible sessions, and finds ones for which purchases exist.\r\n for (Map.Entry<String, List<String>> entry: sessionsFromCustomer.entrySet()) {\r\n\r\n for (String sessionId: entry.getValue()) {\r\n if (buysFromSessions.containsKey(sessionId)) {\r\n sessionList.add(sessionId);\r\n }\r\n }\r\n\r\n }\r\n return sessionList;\r\n }" ]
[ "0.7069238", "0.70026845", "0.68518406", "0.68099385", "0.6550359", "0.6443695", "0.64097893", "0.63671994", "0.6363024", "0.62672675", "0.62219495", "0.62219495", "0.61923075", "0.6185041", "0.6182173", "0.6167252", "0.61396134", "0.61241347", "0.6108061", "0.61068094", "0.6084974", "0.60669273", "0.60669273", "0.6058618", "0.60551375", "0.6054342", "0.6029971", "0.60136", "0.60056484", "0.59920144", "0.59899485", "0.5964479", "0.5932101", "0.58883834", "0.5880027", "0.58710444", "0.5867117", "0.585539", "0.5847693", "0.5839725", "0.5835327", "0.58238727", "0.5818969", "0.58155656", "0.58122605", "0.57885826", "0.5785946", "0.5774423", "0.5769459", "0.57586193", "0.5754553", "0.5753816", "0.5752601", "0.5751003", "0.5740842", "0.5739134", "0.57243145", "0.57114774", "0.57113355", "0.5701751", "0.569905", "0.5697636", "0.5693494", "0.56933516", "0.5690972", "0.5690429", "0.56785446", "0.56774426", "0.56698495", "0.5665722", "0.56450903", "0.56372994", "0.5637012", "0.56331784", "0.5632553", "0.5630747", "0.5629993", "0.56285244", "0.562849", "0.5628279", "0.56278944", "0.56209606", "0.56054187", "0.5598125", "0.55914044", "0.55901456", "0.55763847", "0.55728626", "0.5572306", "0.557091", "0.5565624", "0.5565329", "0.5561909", "0.5561777", "0.55603224", "0.555896", "0.5549682", "0.5549145", "0.55485654", "0.5535705", "0.55344224" ]
0.0
-1
The publicly listed buy orders (Required)
@JsonProperty("bids") public void setBids(List<org.example.api.beans.OrderBookLevel> bids) { this.bids = bids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }", "void getMarketOrders();", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "void getOrders();", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "public List<Order> getOrders(){\n return this.orders;\n }", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "public List<OrderReport> getAllOrdersAcrossStores();", "List<CustomerOrder> getAllCustomerOrder();", "List<OrderDto> getOrders();", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "List<Order> getAll();", "private List<PurchasingOrder> getLoggedInCustomerAirlineTicketOrders() {\r\n final Customer loggedInCustomer = usersComponent.getLoggedInCustomer();\r\n return loggedInCustomer.getAirlineTicketOrders();\r\n }", "public List<Order> getOrders() {\n return _orders;\n }", "List<Order> getByUser(User user);", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "@GetMapping(path = \"/orders/assigned\")\n Iterable<ShopOrder> getOrdersToDeliver(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "List<Product> getProducts(Order order);", "public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "List<transactionsProducts> purchasedProducts();", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "public ArrayList<Order> getOrders() {\n return this.listOrder;\n }", "public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}", "public ParcelBuyList getParcelBuyList() {\r\n/* 201 */ return this._parcelBuyList;\r\n/* */ }", "private String marketBuyAmounts() {\r\n\t\tint[] amounts= market.getBuyAmounts();\r\n\t\tString out = \"Buy Requests Are: \";\r\n\t\tfor(int i=0; i<amounts.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+amounts[i]+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "int getNumOfBuyOrders();", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public List<Order> getOrder() {\n return order;\n }", "public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "Collection<Order> getAll();", "@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}", "List<Order> getUserOrderList(int userId) throws ServiceException;", "@Override\n public List<OrderSummary> summary() throws EmptyOrderListException {\n logger.info(\"Displaying Order Summary\");\n if(registeredOrders.size() > 0) {\n return registeredOrders.stream().\n collect(groupingBy(Bid::forOrder, mapping(Order::quantity, toList()))).\n entrySet().stream().\n map(toOrderSummary()).\n sorted(byTypeAndPrice).\n collect(toList());\n }\n else {\n throw new EmptyOrderListException(\"Empty Order List. Size: \" + registeredOrders.size());\n }\n }", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "public List<Order> getOrders() throws AlpacaAPIException {\n Type listType = new TypeToken<List<Order>>() {\n }.getType();\n\n AlpacaRequestBuilder urlBuilder =\n new AlpacaRequestBuilder(apiVersion, baseAccountUrl, AlpacaConstants.ORDERS_ENDPOINT);\n\n HttpResponse<JsonNode> response = alpacaRequest.invokeGet(urlBuilder);\n\n if (response.getStatus() != 200) {\n throw new AlpacaAPIException(response);\n }\n\n return alpacaRequest.getResponseObject(response, listType);\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "public List<Buy> getAll() throws PersistException;", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "public List<Weborders> getWeborders() {\r\n List<Weborders> webordersListe = null;\r\n Transaction tx = null;\r\n try {\r\n tx = sessionH.beginTransaction();\r\n Query q = this.sessionH.createQuery(\"from Weborders ORDER BY weborderId\");\r\n webordersListe = q.list();\r\n tx.commit();\r\n } catch (HibernateException e) {\r\n if (tx != null) {\r\n tx.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n sessionH.close();\r\n }\r\n return webordersListe;\r\n }", "List<List<Order>> getOrdersByQuantity(Integer quantity) throws \n OrderBookOrderException;", "public String getOpenOrders() {\n\n\t\treturn getOpenOrders(\"\");\n\t}", "@Override\n public List<Order> getAllOrders(LocalDate date) throws PersistenceException{\n return new ArrayList<Order>(orders.values());\n }", "public ArrayList<OrderItem> getOrderArray(){return orderInfo;}", "public void setOrders(ArrayList<Order> orders) {\n this.orders = orders;\n }", "@Test\n\tpublic void getAllClientOrders() {\n\t\tString email = \"[email protected]\";\n\t\t\n\t\tservice.insertClient(\"devtestuser\", \"test\", email, \"devpass\");\n\t\t\n\t\tint clientId = service.getClient(email).getClient();\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"Apple\", \"APPL\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"VODAFONE\", \"VOD\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\tservice.insertOrder(\"BT Group\", \"BT\", clientId, random.nextInt(200), random.nextInt(1000), \"BUY\");\n\t\t\n\t\tList<OrderDTO> clientOrders = service.getClientOrders(clientId);\n\t\t\n\t\tassertEquals(4, clientOrders.size());\n\t\t\n\t\t\n\t\tfor(OrderDTO orderDTO : clientOrders) {\n\t\t\tservice.deleteOrder(orderDTO.getOrderId());\n\t\t}\n\t\t\n\t\tservice.deleteClient(email);\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public JSONArray getOrders() throws Exception;", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);", "@GetMapping(\"/orders\")\n public List<AgentOrderList> findAllAgentsOrderList() {\n return agentRepo.findAllAgentOrderListBy();\n }", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "List<OrderModel> getAllLoggedInCustomerTickets() {\r\n final List<PurchasingOrder> purchasingOrders = getLoggedInCustomerAirlineTicketOrders();\r\n return OrderModel.mapFromPurchasingOrders(purchasingOrders);\r\n }", "public List<OrderItem> getOrderItems() {\n List<OrderItem> actual = new ArrayList<>();\n for (OrderItem i : orderItems) {\n if (i.getOrderQuantity() != 0.0) {\n actual.add(i);\n }\n }\n return actual;\n }", "public boolean isSetOrders() {\n return this.orders != null;\n }", "@Override\r\n\tpublic List<PurchaseOrder> getAllPurchaseOrders() {\n\t\treturn ht.loadAll(PurchaseOrder.class);\r\n\t}", "List<Order> findWaitingActionOrders() throws DaoProjectException;", "List<OrderDTO> getAllOrdersDTO();", "public abstract List<CustomerOrder> findAll();", "@Override\n\tpublic List<Order> getOrdersAroundMe() {\n\t\treturn null;\n\t}", "public static List<Order> allOrders() throws LegoHouseException {\n try {\n Connection con = Connector.connection();\n String SQL = \"SELECT * FROM orders\";\n PreparedStatement ps = con.prepareStatement(SQL);\n ResultSet rs = ps.executeQuery();\n if (rs.next()) {\n List<Order> allOrders = new ArrayList();\n do {\n int ordernumber = rs.getInt(1);\n int height = rs.getInt(3);\n int width = rs.getInt(4);\n int length = rs.getInt(5);\n String status = rs.getString(6);\n Order order = new Order(ordernumber, height, length, width, status);\n allOrders.add(order);\n }\n while (rs.next());\n return allOrders;\n }\n else {\n throw new LegoHouseException(\"No orders has been placed in the shop\", \"employeepage\");\n }\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException | SQLException ex) {\n throw new LegoHouseException(ex.getMessage(), \"index\");\n }\n }", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }", "public List<OrderItem> findAllOrderItems()\n\t{\n\t\tList<OrderItem> list=orderItemDAO.findAll();\n\t\treturn list;\n\t}", "@Override\n public int getItemCount() {\n return ordersList.size();\n }", "@Override\n public int getItemCount() {\n return orders.size();\n }", "public List<ComplexOrderTO> getOutstandingOrders(long storeID) throws NotInDatabaseException;", "List<Cargo> getCargoesForOrder(OrderDTO orderDTO);", "public static List<modelPurchasesI> purchasesList(){\r\n\t\tif(modelUsersI.isLogged()){\r\n\t\t\tDataBaseSearch query = DataBaseSearch.queryDaTabella(\"Acquisti\");\r\n\t\t\ttry {\r\n\t\t\t\treturn query.find().stream()\r\n\t\t\t\t\t\t.map(e -> new modelPurchases(e))\r\n\t\t\t\t\t\t.collect(Collectors.toList());\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn new ArrayList<modelPurchasesI>();\r\n\t}", "public List<Orders> findAccepted2(int userID);", "@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}", "@Override\n\tpublic List<WxOrder> queryOrderByExpressList() {\n\t\treturn orderMapper.queryOrderByExpressList();\n\t}", "int getNumOfSellOrders();", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "public List<Order> getOrderHistory();", "@GET\n @Path(\"orderlist\")\n @Produces(MediaType.TEXT_PLAIN)\n public String getOrderList(@QueryParam(\"jsonpcallback\") String jsonpcallback) {\n return jsonpcallback + \"(\" + os.getAllOrders().toJSONString() + \")\";\n }", "public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }", "public boolean showOrders(Connection conn) {\r\n\t\ttry {\r\n\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\tResultSet rset = stmt.executeQuery(\"select * from order_XXXX\");\r\n\r\n\t\t\t// Print the no and name\r\n\t\t\tSystem.out.println(\"Order No\\t\\t\\tItem No\\t\\t\\tOrder Quantity\\t\\t\\tOrder Date\\t\\t\\tCustomer No\");\r\n\t\t\tSystem.out.println(\"_________________________________________________________________\");\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\\t\" + rset.getInt(2) + \"\\t\\t\\t\" + rset.getInt(3) + \"\\t\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getString(4) + \"\\t\\t\\t\" + rset.getString(5));\r\n\t\t\t\t}\r\n\t\t\t return false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public List<Order> getAllUsersOrdersById(long userId);", "private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }", "public List<Product> getPurchases() {\n return purchases;\n }", "public List getOrderDetails(OrderDetail orderDetail);", "private static List<String> getSessionsWithPurchases(\r\n Map<String, List<String>> sessionsFromCustomer,\r\n Map<String, List<Buy>> buysFromSessions\r\n )\r\n {\r\n // Initializes the session list.\r\n List<String> sessionList = new LinkedList<>();\r\n\r\n // Loops over all possible sessions, and finds ones for which purchases exist.\r\n for (Map.Entry<String, List<String>> entry: sessionsFromCustomer.entrySet()) {\r\n\r\n for (String sessionId: entry.getValue()) {\r\n if (buysFromSessions.containsKey(sessionId)) {\r\n sessionList.add(sessionId);\r\n }\r\n }\r\n\r\n }\r\n return sessionList;\r\n }" ]
[ "0.7069238", "0.70026845", "0.68518406", "0.68099385", "0.6550359", "0.6443695", "0.64097893", "0.63671994", "0.6363024", "0.62672675", "0.62219495", "0.62219495", "0.61923075", "0.6185041", "0.6182173", "0.6167252", "0.61396134", "0.61241347", "0.6108061", "0.61068094", "0.6084974", "0.60669273", "0.60669273", "0.6058618", "0.60551375", "0.6054342", "0.6029971", "0.60136", "0.60056484", "0.59920144", "0.59899485", "0.5964479", "0.5932101", "0.58883834", "0.5880027", "0.58710444", "0.5867117", "0.585539", "0.5847693", "0.5839725", "0.5835327", "0.58238727", "0.5818969", "0.58155656", "0.58122605", "0.57885826", "0.5785946", "0.5774423", "0.5769459", "0.57586193", "0.5754553", "0.5753816", "0.5752601", "0.5751003", "0.5740842", "0.5739134", "0.57243145", "0.57114774", "0.57113355", "0.5701751", "0.569905", "0.5697636", "0.5693494", "0.56933516", "0.5690972", "0.5690429", "0.56785446", "0.56774426", "0.56698495", "0.5665722", "0.56450903", "0.56372994", "0.5637012", "0.56331784", "0.5632553", "0.5630747", "0.5629993", "0.56285244", "0.562849", "0.5628279", "0.56278944", "0.56209606", "0.56054187", "0.5598125", "0.55914044", "0.55901456", "0.55763847", "0.55728626", "0.5572306", "0.557091", "0.5565624", "0.5565329", "0.5561909", "0.5561777", "0.55603224", "0.555896", "0.5549682", "0.5549145", "0.55485654", "0.5535705", "0.55344224" ]
0.0
-1
The publicly listed sell orders (Required)
@JsonProperty("asks") public List<org.example.api.beans.OrderBookLevel> getAsks() { return asks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }", "void getMarketOrders();", "void getOrders();", "public List<OrderReport> getAllOrdersAcrossStores();", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "@GetMapping(path = \"/orders/assigned\")\n Iterable<ShopOrder> getOrdersToDeliver(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public List<Order> getOrders(){\n return this.orders;\n }", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "List<Product> getProducts(Order order);", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "List<OrderDto> getOrders();", "public List<ComplexOrderTO> getOutstandingOrders(long storeID) throws NotInDatabaseException;", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }", "public List<OrderReport> getAllOrders(@Param(\"storeid\") String storeid);", "@Override\n public List<OrderSummary> summary() throws EmptyOrderListException {\n logger.info(\"Displaying Order Summary\");\n if(registeredOrders.size() > 0) {\n return registeredOrders.stream().\n collect(groupingBy(Bid::forOrder, mapping(Order::quantity, toList()))).\n entrySet().stream().\n map(toOrderSummary()).\n sorted(byTypeAndPrice).\n collect(toList());\n }\n else {\n throw new EmptyOrderListException(\"Empty Order List. Size: \" + registeredOrders.size());\n }\n }", "List<Order> getByUser(User user);", "public List<Order> getOrders() {\n return _orders;\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "List<Order> getAll();", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "List<transactionsProducts> purchasedProducts();", "int getNumOfSellOrders();", "private String marketSellAmounts() {\r\n\t\tint[] amounts= market.getSellAmounts();\r\n\t\tString out = \"Sell Requests Are: \";\r\n\t\tfor(int i=0; i<amounts.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+amounts[i]+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "List<CustomerOrder> getAllCustomerOrder();", "public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }", "public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}", "public List getOrderDetails(OrderDetail orderDetail);", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "Trade matchOrder(List<Order> buyList, List<Order> sellList) throws \n OrderBookOrderException, OrderBookTradeException;", "public List<Product> getSales() {\n return sales;\n }", "public void ExecuteSellOrder() throws SQLException, InvalidOrderException, InvalidAssetException, NegativePriceException, UnitException {\n // Current asset instance\n Asset currentAsset = Asset.findAsset(this.assetID);\n\n // Check if just ordered asset has corresponding order\n\n // Find buy orders of same asset\n Statement smt = connection.createStatement();\n String sqlFindOrder\n = \"SELECT * FROM orders WHERE assetID = '\" + assetID + \"' and orderType = 'BUY' \" +\n \"and orderStatus = 'INCOMPLETE' and unitID != '\" + this.unitID + \"' \" +\n \"ORDER BY orderTime;\";\n ResultSet buyOrders = smt.executeQuery(sqlFindOrder);\n\n // List to store corresponding buy orders of the same asset\n ArrayList<Order> matchingOrders = new ArrayList<>();\n\n // Add queried rows as new Buy Orders in list\n while (buyOrders.next()) {\n matchingOrders.add(\n new BuyOrder(\n buyOrders.getString(\"orderID\"),\n buyOrders.getString(\"userID\"),\n buyOrders.getString(\"unitID\"),\n buyOrders.getString(\"assetID\"),\n buyOrders.getString(\"orderTime\").substring(0,19),\n OrderStatus.valueOf(buyOrders.getString(\"orderStatus\")),\n OrderType.valueOf(buyOrders.getString(\"orderType\")),\n buyOrders.getDouble(\"orderPrice\"),\n buyOrders.getInt(\"orderQuantity\"),\n buyOrders.getInt(\"quantFilled\"),\n buyOrders.getInt(\"quantRemain\")\n )\n );\n }\n\n // Remove orders if the buy bid is less than the sell ask\n matchingOrders.removeIf(buys -> (buys.orderPrice < this.orderPrice));\n\n // List to store required orders that can fully/partially or completely not fill order\n ArrayList<Order> requiredOrders = new ArrayList<>();\n\n // Required asset amount to facilitate quantity of this order\n int requiredQuant = this.quantRemain;\n\n // Loop through orders matching conditions and append as many orders possible to\n // fully/partially facilitate this order\n for (int i = 0; i < matchingOrders.size(); i++) {\n // Stores quantity of current order in matchingOrders list\n int quantity = matchingOrders.get(i).quantRemain;\n if (requiredQuant > 0) {\n requiredOrders.add(matchingOrders.get(i));\n requiredQuant -= quantity;\n } else if (requiredQuant <= 0) {\n break;\n }\n }\n\n // If requiredOrders is filled it can either\n // - Have enough buy orders to fully facilitate the sell order\n // * Complete sell order (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Update buyer and seller inventory numbers\n // * Change buy order (INCOMPLETE, quantFilled, quantRemain)\n // - Have enough buy orders to partially fill the sell order\n // * Complete the corresponding buy order/s (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Change sell order (INCOMPLETE, change quant remain, change quant filled)\n // * Add inventory entry and update corresponding inventory numbers\n\n for (int i = 0; i < requiredOrders.size(); i++) {\n // How much this order has remaining to fill\n int sellQuant = this.quantRemain;\n // How much can this corresponding order faciliate of this order\n int buyQuant = requiredOrders.get(i).quantRemain;\n\n // Track executed quantity\n int executed = 0;\n\n if (buyQuant > sellQuant) {\n // When this order has more than the quantity required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n\n } else if (buyQuant == sellQuant) {\n // When this order has exactly the same amount required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n this.ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n } else {\n // When this order has less than required amount to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += requiredOrders.get(i).quantRemain;\n this.quantRemain -= requiredOrders.get(i).quantRemain;\n\n assert this.quantRemain + this.quantFilled == this.orderQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= buyQuant;\n requiredOrders.get(i).quantFilled += buyQuant;\n executed = buyQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n ChangeStatus(OrderStatus.INCOMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n }\n\n // Change asset price\n currentAsset.SetPrice(requiredOrders.get(i).orderPrice);\n\n // Change inventory amounts\n new InventoryItem(this.unitID, this.assetID, requiredOrders.get(i).orderPrice, -executed, this.orderID);\n new InventoryItem(requiredOrders.get(i).unitID, requiredOrders.get(i).assetID, requiredOrders.get(i).orderPrice, executed, requiredOrders.get(i).orderID);\n\n // Set credit balance of units\n Unit sellerUnit = Unit.getUnit(this.unitID);\n sellerUnit.ChangeUnitBalance(this.unitID, requiredOrders.get(i).orderPrice * executed);\n Unit buyerUnit = Unit.getUnit(requiredOrders.get(i).unitID);\n buyerUnit.ChangeUnitBalance(requiredOrders.get(i).unitID, -requiredOrders.get(i).orderPrice * executed);\n }\n\n // If requiredOrders is empty, no current buy orders are able to facilitate sell order\n\n // Modify watchlist balances\n\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "public ArrayList<String> getSellers(String productName);", "@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public void setOrders(ArrayList<Order> orders) {\n this.orders = orders;\n }", "public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "List<Order> getUserOrderList(int userId) throws ServiceException;", "public ArrayList<Order> getOrders() {\n return this.listOrder;\n }", "public List<Orders> findAccepted2(int userID);", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "List<Inventory> executeOrder(OrderForm orderForm) throws Exception;", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss(boolean ignoreNonPending,boolean ignoreDisableSubmit)\n {\n if (__ordersProductss == null)\n {\n __ordersProductss = ru.terralink.mvideo.sap.Products.getOrdersProductss_for_Orders(new java.lang.Long(getSurrogateKey()));\n }\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products>)filterChildren(__ordersProductss, ignoreNonPending, ignoreDisableSubmit, new com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products>());\n }", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "List<List<Order>> getOrdersByQuantity(Integer quantity) throws \n OrderBookOrderException;", "public JSONArray getOrders() throws Exception;", "private List<PurchasingOrder> getLoggedInCustomerAirlineTicketOrders() {\r\n final Customer loggedInCustomer = usersComponent.getLoggedInCustomer();\r\n return loggedInCustomer.getAirlineTicketOrders();\r\n }", "@GetMapping(\"/checkOrder\")\n public String fetchOderList(Model model){\n List<OrderDetails> orderList = sportyShoesService.fetchOderList();\n model.addAttribute(\"orderList\", orderList);\n model.addAttribute(\"appName\", appName);\n return \"fetchOrderDetails\";\n }", "public ArrayList<SimpleResList> getSellOrList() {\r\n\t\treturn new ArrayList<SimpleResList>(sellOrList); // may be shallow copy\r\n\t}", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "public String[] getOffers() {return offers;}", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "@Override\n\tpublic List<Goods> GetGoodsBySell() {\n\t\treturn null;\n\t}", "public List<Share> getPrices()\r\n\t{\r\n\t\treturn this.prices;\r\n\t}", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "public List<Trade> getTrades();", "@JsonIgnore public Collection<Participant> getSellers() {\n final Object current = myData.get(\"seller\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Participant>) current;\n }\n return Arrays.asList((Participant) current);\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public ArrayList<OrderItem> getOrderArray(){return orderInfo;}", "@ResponseBody\r\n\t@RequestMapping(\"/list\")\r\n\tpublic PageModel list(HttpServletRequest request, HttpServletResponse response) {\n\t\tPageModel page = PageUtil.getPageModel(Order.class, \"sql.order/getOrderlist\", request);\r\n\t\treturn page;\r\n\t}", "List<PurchaseLine> getAllPurchaseOrderOfProduct(long prodId);", "public final java.util.List<p035ru.unicorn.ujin.data.realm.marketplace.CartOffer> getOrderedOfferList(java.lang.String r5) {\n /*\n r4 = this;\n io.realm.Realm r0 = r4.realm\n java.lang.Class<ru.unicorn.ujin.data.realm.marketplace.CartItem> r1 = p035ru.unicorn.ujin.data.realm.marketplace.CartItem.class\n io.realm.RealmQuery r0 = r0.where(r1)\n io.realm.RealmResults r0 = r0.findAll()\n java.lang.String r1 = \"cartItemList\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)\n java.lang.Iterable r0 = (java.lang.Iterable) r0\n java.util.Iterator r0 = r0.iterator()\n L_0x0017:\n boolean r1 = r0.hasNext()\n r2 = 0\n if (r1 == 0) goto L_0x0036\n java.lang.Object r1 = r0.next()\n r3 = r1\n ru.unicorn.ujin.data.realm.marketplace.CartItem r3 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r3\n ru.unicorn.ujin.data.realm.marketplace.CartCompany r3 = r3.getCompany()\n if (r3 == 0) goto L_0x002f\n java.lang.String r2 = r3.getId()\n L_0x002f:\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r5)\n if (r2 == 0) goto L_0x0017\n goto L_0x0037\n L_0x0036:\n r1 = r2\n L_0x0037:\n ru.unicorn.ujin.data.realm.marketplace.CartItem r1 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r1\n if (r1 == 0) goto L_0x004a\n io.realm.RealmList r5 = r1.getOffers()\n if (r5 == 0) goto L_0x004a\n java.lang.Iterable r5 = (java.lang.Iterable) r5\n java.util.List r5 = kotlin.collections.CollectionsKt.filterNotNull(r5)\n if (r5 == 0) goto L_0x004a\n goto L_0x004e\n L_0x004a:\n java.util.List r5 = kotlin.collections.CollectionsKt.emptyList()\n L_0x004e:\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p035ru.unicorn.ujin.market.repository.MarketLocalRepository.getOrderedOfferList(java.lang.String):java.util.List\");\n }", "List<OrderDTORest> getAllOrdersDTORest();", "public List<StockItem> getStockList();", "public List<Order> getOrder() {\n return order;\n }", "@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}", "Collection<Order> getAll();", "@GetMapping(\"/orders\")\n public List<AgentOrderList> findAllAgentsOrderList() {\n return agentRepo.findAllAgentOrderListBy();\n }", "public static List<Offer> offerList() {\n OfferDAO offerDAO = getOfferDAO();\n List<Offer> offerList = offerDAO.offerList();\n return offerList;\n }", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "public MarketOrderBookImpl(\n String marketId, List<MarketOrder> sellOrders, List<MarketOrder> buyOrders) {\n this.marketId = marketId;\n this.sellOrders = sellOrders;\n this.buyOrders = buyOrders;\n }", "ImmutableList<SchemaOrgType> getOffersList();", "Price[] getTradePrices();", "private ArrayList<TY_SaleEligibleItems> getTentativeSellItems(TY_Scrip_PositionModel posModel, Date sellDate) throws EX_General\n\t{\n\t\tArrayList<TY_SaleEligibleItems> allItems = null;\n\t\t// 2. Get Buy Positions Items with ETQ > 0\n\t\tArrayList<OB_Positions_Item> buyItemsposETQ = posModel.getScPosItems().stream().filter(x -> x.getTxnType().equals(SCEenums.txnType.BUY))\n\t\t .filter(w -> w.getETQ() > 0).collect(Collectors.toCollection(ArrayList::new));\n\t\tif (buyItemsposETQ != null && dateSrv != null)\n\t\t{\n\t\t\t// 3.Calculate Days difference for Each of the Items thus obtained\n\t\t\tallItems = new ArrayList<TY_SaleEligibleItems>();\n\n\t\t\tfor ( OB_Positions_Item posItem : buyItemsposETQ )\n\t\t\t{\n\t\t\t\tint daysDiff = 0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdaysDiff = dateSrv.getNumDaysbwSqlSysDates(posItem.getTxnDate(), sellDate);\n\t\t\t\t}\n\t\t\t\tcatch (ParseException e)\n\t\t\t\t{\n\t\t\t\t\tEX_General egen = new EX_General(\"ERR_DATE_PARSE\", new Object[]\n\t\t\t\t\t{ e.getMessage()\n\t\t\t\t\t});\n\t\t\t\t\tthrow egen;\n\t\t\t\t}\n\n\t\t\t\tTY_SaleEligibleItems eligItem = new TY_SaleEligibleItems(posItem.getPrimaryKey_Int(), daysDiff, posItem.getETQ(), 0);\n\t\t\t\tallItems.add(eligItem);\n\t\t\t}\n\t\t}\n\t\treturn allItems;\n\t}", "public ArrayList<TradeRequest> getTradeRequests(){return tradeRequests;}", "@Override\n public int getItemCount() {\n return orders.size();\n }", "public static String getSells() {\n if(DatabaseMethods.sales_analaysis()){\r\n return DatabaseMethods.get_total_sales();\r\n }\r\n else{\r\n return null; \r\n }\r\n \r\n\t}", "@Override\n\tpublic List<Order> getOrdersAroundMe() {\n\t\treturn null;\n\t}", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }" ]
[ "0.7109904", "0.69467473", "0.66212577", "0.66150963", "0.64771855", "0.640566", "0.63893706", "0.6370394", "0.6207422", "0.6192652", "0.6192652", "0.618917", "0.6131342", "0.611773", "0.6109268", "0.6089102", "0.59922844", "0.59922844", "0.59863144", "0.59143454", "0.59126544", "0.58909714", "0.5852568", "0.58294195", "0.5808548", "0.58018315", "0.57864296", "0.5770409", "0.5767701", "0.57615155", "0.57480735", "0.573747", "0.57266283", "0.5714636", "0.5711782", "0.57115275", "0.5708017", "0.5690958", "0.56826895", "0.56708467", "0.5658489", "0.5657312", "0.5646419", "0.5642539", "0.563136", "0.56085736", "0.5607077", "0.56063646", "0.55970645", "0.55897564", "0.55891687", "0.5588947", "0.5574212", "0.5564889", "0.5561909", "0.5552986", "0.5540386", "0.55386066", "0.55238247", "0.5512092", "0.55074555", "0.5498725", "0.54981774", "0.5489085", "0.5476166", "0.5465079", "0.5462231", "0.5461129", "0.5452776", "0.54525924", "0.54522544", "0.5451972", "0.5446997", "0.54453486", "0.5441029", "0.5439899", "0.54367", "0.54304653", "0.5424939", "0.5421089", "0.54068154", "0.5399584", "0.53988457", "0.5398711", "0.5398247", "0.538863", "0.5384516", "0.53752875", "0.5362996", "0.5356446", "0.53527176", "0.5351574", "0.53444207", "0.5337654", "0.5324044", "0.5310237", "0.530432", "0.53036976", "0.53011334", "0.5299938", "0.5293711" ]
0.0
-1
The publicly listed sell orders (Required)
@JsonProperty("asks") public void setAsks(List<org.example.api.beans.OrderBookLevel> asks) { this.asks = asks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSellOrders(List<MarketOrder> sellOrders) {\n this.sellOrders = sellOrders;\n }", "void getMarketOrders();", "void getOrders();", "public List<OrderReport> getAllOrdersAcrossStores();", "List<List<Order>> getAllOrdersByPrice() throws OrderBookOrderException;", "@RequestMapping(\"/api/salesOrders\")\n\tpublic List<SalesOrder> salesOrders() throws ODataException {\n\n\t\tLOGGER.info(\"Method entry {}\", salesOrderMethod);\n\n\t\t// The soldToParty is hardcoded since we only want to show orders for the\n\t\t// on-time customer and it must not be changed in the UI layer\n\n\t\tSalesOrderFluentHelper query = ProcessSalesOrdersService.getAllSalesOrder().filter(SOLD_TO_PARTY.eq(\"10401010\"))\n\t\t\t\t.select(SALES_ORDER, SALES_ORDER_TYPE, DISTRIBUTION_CHANNEL, ORGANIZATION_DIVISION, SOLD_TO_PARTY,\n\t\t\t\t\t\tPURCHASE_ORDER_BY_CUSTOMER, TOTAL_NET_AMOUNT, TRANSACTION_CURRENCY, CREATION_DATE);\n\n\t\tList<SalesOrder> orderList = query.execute(new ErpConfigContext(s4cldDestinationName));\n\n\t\tLOGGER.info(\"Method exit {}\", salesOrderMethod);\n\n\t\treturn orderList;\n\t}", "public void setBuyOrders(List<MarketOrder> buyOrders) {\n this.buyOrders = buyOrders;\n }", "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "@Override\r\npublic List<Order> getallorders() {\n\treturn productdao.getalloderds();\r\n}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getMarketOrders() {\n\t\t\n\t}", "List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;", "@GetMapping(path = \"/orders/assigned\")\n Iterable<ShopOrder> getOrdersToDeliver(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public List<Order> getOrders(){\n return this.orders;\n }", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss()\n {\n return getOrdersProductss(false,false);\n }", "List<Product> getProducts(Order order);", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "@Override\n\tpublic void getSpecificOrders() {\n\t\t\n\t}", "List<OrderDto> getOrders();", "public List<ComplexOrderTO> getOutstandingOrders(long storeID) throws NotInDatabaseException;", "@Override\n\tpublic void getOrders() {\n\t\t\n\t}", "@RequestMapping(\"/getAllOrders\")\n public List<Order> getAllOrders(){\n System.out.println(\"getAllOrders\");\n System.out.println(SessionUtil.getAuth());\n return orderService.getAllOrders();\n }", "public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }", "@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }", "public List<OrderReport> getAllOrders(@Param(\"storeid\") String storeid);", "@Override\n public List<OrderSummary> summary() throws EmptyOrderListException {\n logger.info(\"Displaying Order Summary\");\n if(registeredOrders.size() > 0) {\n return registeredOrders.stream().\n collect(groupingBy(Bid::forOrder, mapping(Order::quantity, toList()))).\n entrySet().stream().\n map(toOrderSummary()).\n sorted(byTypeAndPrice).\n collect(toList());\n }\n else {\n throw new EmptyOrderListException(\"Empty Order List. Size: \" + registeredOrders.size());\n }\n }", "List<Order> getByUser(User user);", "public List<Order> getOrders() {\n return _orders;\n }", "@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}", "List<Order> getAll();", "@RequestMapping(\"/getOrderItems\")\n public List<OrderItem> getOrderItems(@RequestParam(\"order_id\") int order_id){\n return orderService.getOrderItems(order_id);\n }", "public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}", "@GetMapping(path = \"/orders\")\n Iterable<ShopOrder> getOrdersByUser(@RequestHeader(HttpHeaders.AUTHORIZATION) String token);", "public void findAllMyOrders() {\n log.info(\"OrdersBean : findAllMyOrders\");\n FacesContext context = FacesContext.getCurrentInstance();\n\n ordersEntities = ordersServices.findAllByIdUsersAndStatusIsValidateOrCanceled(usersBean.getUsersEntity().getId());\n if (ordersEntities.isEmpty()) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.modalContractsOrder.listOrderEmpty\"), null));\n } else {\n deadlineLeasing();\n }\n }", "List<transactionsProducts> purchasedProducts();", "int getNumOfSellOrders();", "private String marketSellAmounts() {\r\n\t\tint[] amounts= market.getSellAmounts();\r\n\t\tString out = \"Sell Requests Are: \";\r\n\t\tfor(int i=0; i<amounts.length;i++) {\r\n\t\t\tout=out.concat(i+\": \"+amounts[i]+\" || \");\r\n\t\t}\r\n\t\treturn out;\r\n\t}", "List<CustomerOrder> getAllCustomerOrder();", "public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }", "public static void accessoriesorderlist(){\r\n\t\t\r\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tif(a != null){\r\n\t\t\tList<OrderAccessories> l = OrderAccessories.find(\"byDealerId\",d ).fetch();\r\n\t\t\trender(l);\r\n\t\t}\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\r\n\t}", "public List getOrderDetails(OrderDetail orderDetail);", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "public List<OrderItem> findAllOrderItem(){\n List<OrderItem> orderItems=findAll();\n return orderItems;\n }", "Trade matchOrder(List<Order> buyList, List<Order> sellList) throws \n OrderBookOrderException, OrderBookTradeException;", "public List<Product> getSales() {\n return sales;\n }", "public void ExecuteSellOrder() throws SQLException, InvalidOrderException, InvalidAssetException, NegativePriceException, UnitException {\n // Current asset instance\n Asset currentAsset = Asset.findAsset(this.assetID);\n\n // Check if just ordered asset has corresponding order\n\n // Find buy orders of same asset\n Statement smt = connection.createStatement();\n String sqlFindOrder\n = \"SELECT * FROM orders WHERE assetID = '\" + assetID + \"' and orderType = 'BUY' \" +\n \"and orderStatus = 'INCOMPLETE' and unitID != '\" + this.unitID + \"' \" +\n \"ORDER BY orderTime;\";\n ResultSet buyOrders = smt.executeQuery(sqlFindOrder);\n\n // List to store corresponding buy orders of the same asset\n ArrayList<Order> matchingOrders = new ArrayList<>();\n\n // Add queried rows as new Buy Orders in list\n while (buyOrders.next()) {\n matchingOrders.add(\n new BuyOrder(\n buyOrders.getString(\"orderID\"),\n buyOrders.getString(\"userID\"),\n buyOrders.getString(\"unitID\"),\n buyOrders.getString(\"assetID\"),\n buyOrders.getString(\"orderTime\").substring(0,19),\n OrderStatus.valueOf(buyOrders.getString(\"orderStatus\")),\n OrderType.valueOf(buyOrders.getString(\"orderType\")),\n buyOrders.getDouble(\"orderPrice\"),\n buyOrders.getInt(\"orderQuantity\"),\n buyOrders.getInt(\"quantFilled\"),\n buyOrders.getInt(\"quantRemain\")\n )\n );\n }\n\n // Remove orders if the buy bid is less than the sell ask\n matchingOrders.removeIf(buys -> (buys.orderPrice < this.orderPrice));\n\n // List to store required orders that can fully/partially or completely not fill order\n ArrayList<Order> requiredOrders = new ArrayList<>();\n\n // Required asset amount to facilitate quantity of this order\n int requiredQuant = this.quantRemain;\n\n // Loop through orders matching conditions and append as many orders possible to\n // fully/partially facilitate this order\n for (int i = 0; i < matchingOrders.size(); i++) {\n // Stores quantity of current order in matchingOrders list\n int quantity = matchingOrders.get(i).quantRemain;\n if (requiredQuant > 0) {\n requiredOrders.add(matchingOrders.get(i));\n requiredQuant -= quantity;\n } else if (requiredQuant <= 0) {\n break;\n }\n }\n\n // If requiredOrders is filled it can either\n // - Have enough buy orders to fully facilitate the sell order\n // * Complete sell order (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Update buyer and seller inventory numbers\n // * Change buy order (INCOMPLETE, quantFilled, quantRemain)\n // - Have enough buy orders to partially fill the sell order\n // * Complete the corresponding buy order/s (set COMPLETE flag, 0 quant remain, max quant fill)\n // * Change sell order (INCOMPLETE, change quant remain, change quant filled)\n // * Add inventory entry and update corresponding inventory numbers\n\n for (int i = 0; i < requiredOrders.size(); i++) {\n // How much this order has remaining to fill\n int sellQuant = this.quantRemain;\n // How much can this corresponding order faciliate of this order\n int buyQuant = requiredOrders.get(i).quantRemain;\n\n // Track executed quantity\n int executed = 0;\n\n if (buyQuant > sellQuant) {\n // When this order has more than the quantity required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n\n } else if (buyQuant == sellQuant) {\n // When this order has exactly the same amount required to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += sellQuant;\n this.quantRemain -= sellQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= sellQuant;\n requiredOrders.get(i).quantFilled += sellQuant;\n executed = sellQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n this.ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n this.ChangeStatus(OrderStatus.COMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n } else {\n // When this order has less than required amount to fill remaining units\n\n // Stores how many more units the buy order has over this sell order\n this.quantFilled += requiredOrders.get(i).quantRemain;\n this.quantRemain -= requiredOrders.get(i).quantRemain;\n\n assert this.quantRemain + this.quantFilled == this.orderQuant;\n\n // Deduct the amount remaining of the sell order from the quantity remaining in the buy order\n requiredOrders.get(i).quantRemain -= buyQuant;\n requiredOrders.get(i).quantFilled += buyQuant;\n executed = buyQuant;\n\n assert requiredOrders.get(i).quantRemain == 0;\n assert requiredOrders.get(i).quantFilled == requiredOrders.get(i).orderQuant;\n\n // Change quantities in database\n ChangeQuantRemainFilled(this.quantRemain, this.quantFilled);\n requiredOrders.get(i).ChangeQuantRemainFilled(requiredOrders.get(i).quantRemain, requiredOrders.get(i).quantFilled);\n\n // Set complete status of this order\n ChangeStatus(OrderStatus.INCOMPLETE);\n requiredOrders.get(i).ChangeStatus(OrderStatus.COMPLETE);\n\n }\n\n // Change asset price\n currentAsset.SetPrice(requiredOrders.get(i).orderPrice);\n\n // Change inventory amounts\n new InventoryItem(this.unitID, this.assetID, requiredOrders.get(i).orderPrice, -executed, this.orderID);\n new InventoryItem(requiredOrders.get(i).unitID, requiredOrders.get(i).assetID, requiredOrders.get(i).orderPrice, executed, requiredOrders.get(i).orderID);\n\n // Set credit balance of units\n Unit sellerUnit = Unit.getUnit(this.unitID);\n sellerUnit.ChangeUnitBalance(this.unitID, requiredOrders.get(i).orderPrice * executed);\n Unit buyerUnit = Unit.getUnit(requiredOrders.get(i).unitID);\n buyerUnit.ChangeUnitBalance(requiredOrders.get(i).unitID, -requiredOrders.get(i).orderPrice * executed);\n }\n\n // If requiredOrders is empty, no current buy orders are able to facilitate sell order\n\n // Modify watchlist balances\n\n }", "List<Trade> getMyTrades(MyTradeRequest request);", "public ArrayList<String> getSellers(String productName);", "@GetMapping(\"/order\")\r\n\tprivate ResponseEntity<Object> getAllOrder() \r\n\t{\tOrderDetailsResponse response = new OrderDetailsResponse();\r\n\t\tList<OrderDetailsRequest> ordersDetails = new ArrayList<OrderDetailsRequest>();\r\n\t\tList<OrderDetails> orders = orderService.getAllOrder();\r\n\t\t\r\n\t\tfor(OrderDetails order : orders) {\r\n\t\t\t\r\n\t\t\tOrderDetailsRequest details = new OrderDetailsRequest();\r\n\t\t\tconstructResponseData(order,details);\r\n\t\t\tList<OrderItemDetails> items = restClientService.findByOrderid(order.getId());\r\n\t\t\tdetails.setProductDetails(items);\r\n\t\t\tordersDetails.add(details);\r\n\t\t}\r\n\t\tresponse.setOrders(ordersDetails);\r\n\t\tresponse.setMessage(\"SUCCESS\");\r\n\t\tresponse.setStatus((long) 200);\r\n\t\treturn new ResponseEntity<Object>(response, HttpStatus.OK);\r\n\t}", "public ArrayList<SalesOrder> getSalesOrders() {\n\t\treturn salesOrders;\n\t}", "public void setOrders(ArrayList<Order> orders) {\n this.orders = orders;\n }", "public static void cylinderorderlist(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\t\r\n\t\t\r\n\t\tList<OrderCylinder> o = OrderCylinder.findAll();\r\n\t\t\r\n\t\tSystem.out.println(\"The Dealers for Whom Order has beed placed \"+ o);\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Current Dealer Logged in\"+a);\r\n\t\t\r\n\t\t// Get the Dealer Details of him\r\n\t\tDealer d = Dealer.find(\"byDealershipId\",a.uniquenumber).first();\r\n\t\t\r\n\t\tSystem.out.println(\"Dealer for the Account\"+d);\r\n\t\t// Now, get the Ordered Cylinders\r\n\t\tList<OrderCylinder> l = OrderCylinder.find(\"byDealerId\", d).fetch();\r\n\t\t\r\n\t\t//Orders placed for the Dealer are as follows\r\n\t\t\r\n\t\tSystem.out.println(\"Orders Placed for Dealer are as follows\"+l);\r\n\t\t\r\n\t\trender(a,l);\r\n\t\t\r\n\t}", "public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }", "List<Order> getUserOrderList(int userId) throws ServiceException;", "public ArrayList<Order> getOrders() {\n return this.listOrder;\n }", "public List<Orders> findAccepted2(int userID);", "public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}", "List<Inventory> executeOrder(OrderForm orderForm) throws Exception;", "public com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products> getOrdersProductss(boolean ignoreNonPending,boolean ignoreDisableSubmit)\n {\n if (__ordersProductss == null)\n {\n __ordersProductss = ru.terralink.mvideo.sap.Products.getOrdersProductss_for_Orders(new java.lang.Long(getSurrogateKey()));\n }\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products>)filterChildren(__ordersProductss, ignoreNonPending, ignoreDisableSubmit, new com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Products>());\n }", "@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }", "public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }", "List<List<Order>> getOrdersByQuantity(Integer quantity) throws \n OrderBookOrderException;", "public JSONArray getOrders() throws Exception;", "private List<PurchasingOrder> getLoggedInCustomerAirlineTicketOrders() {\r\n final Customer loggedInCustomer = usersComponent.getLoggedInCustomer();\r\n return loggedInCustomer.getAirlineTicketOrders();\r\n }", "@GetMapping(\"/checkOrder\")\n public String fetchOderList(Model model){\n List<OrderDetails> orderList = sportyShoesService.fetchOderList();\n model.addAttribute(\"orderList\", orderList);\n model.addAttribute(\"appName\", appName);\n return \"fetchOrderDetails\";\n }", "public ArrayList<SimpleResList> getSellOrList() {\r\n\t\treturn new ArrayList<SimpleResList>(sellOrList); // may be shallow copy\r\n\t}", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "public ArrayList<SaleVO> showSale() {\n\t\treturn sale.show();\r\n\t}", "@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}", "public ComplexOrderEntryTO[] getStockItems(long storeID, ProductTO[] requiredProductTOs) throws NotImplementedException;", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public String[] getOffers() {return offers;}", "@Override\n\tpublic List<Goods> GetGoodsBySell() {\n\t\treturn null;\n\t}", "public List<Share> getPrices()\r\n\t{\r\n\t\treturn this.prices;\r\n\t}", "@Override\n public List<PurchaseOrderLine> getOrderlines() {\n return orderLines;\n }", "public List<Trade> getTrades();", "@JsonIgnore public Collection<Participant> getSellers() {\n final Object current = myData.get(\"seller\");\n if (current == null) return Collections.emptyList();\n if (current instanceof Collection) {\n return (Collection<Participant>) current;\n }\n return Arrays.asList((Participant) current);\n }", "public static ArrayList<SalesOrder> getSalesOrderSets() throws OnlineODataStoreException\n {\n\n\n //Get the open online store\n ODataOpenListener openListener = ODataOpenListener.getInstance();\n OnlineODataStore store = openListener.getStore();\n\n if (store!=null)\n {\n SalesOrder salesOrder;\n ODataProperty property;\n ODataPropMap properties;\n String resourcePath;\n\n try\n {\n /**\n * Build the initial OData resource path and query options string from:\n * Collection ID: EntitySet Name\n * ?$orderby= : query option that specifies the order (sorting) of the response\n * SalesOrderID : sort key for the orderby directive\n *\n * Instead of SalesOrderID, you can specify Collections.NOTE to have all SalesOrderSet\n * returned alphabetically (and by default displayed that way in the list view).\n *\n * The christianschneider service enforces server-side paging and will return 20 entities per\n * request. To view the paging size (\"$skiptoken=\") value, paste the first URL below into a\n * browser window, and scroll to the bottom of the response. You do not have to\n * track the number of entities received in your code. The SDK will create the\n * next resource path string for you (as seen in the code below). When the returned\n * string is `null' you have received all entities.\n *\n * Since there are 77 entities in the OData service we are calling, the do-while loop\n * will end up issuing the four requests below to receive all the data (20 entities at a time).\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=20,20\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=40,40\n * - http://192.168.0.76:8080/Workorder/SalesOrderSet?$orderby=SalesOrderID&$skiptoken=60,60\n */\n\n // Build initial resource path and query options string\n resourcePath = Collections.SALES_ORDER_SET + \"?$top=5&$skip=\" + skipValue + \"&$orderby=\" + Collections.SALES_ORDER_ID;\n // Loop until resourcePath is null\n Log.d(\"resourcePath\", resourcePath);\n// do\n// {\n Log.d(TAG, \"Requesting: \" + resourcePath);\n\n //Executor method for reading an Entity set\n ODataResponseSingle resp = store.executeReadEntitySet(resourcePath, null);\n\n //Get the response payload\n ODataEntitySet feed = (ODataEntitySet) resp.getPayload();\n\n //Get the list of ODataEntity\n List<ODataEntity> entities = feed.getEntities();\n\n //Loop to retrieve the information from the response and store in the SalesOrder Object\n for (ODataEntity entity : entities)\n {\n properties = entity.getProperties();\n property = properties.get(com.christianschneider.model.Collections.SALES_ORDER_ID);\n salesOrder = new SalesOrder(property.getValue().toString());\n property = properties.get(Collections.NOTE);\n salesOrder.setNote(property.getValue().toString());\n property = properties.get(Collections.NOTE_LANGUAGE);\n salesOrder.setNoteLanguage(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_ID);\n salesOrder.setCustomerId(property.getValue().toString());\n property = properties.get(Collections.CUSTOMER_NAME);\n salesOrder.setCustomerName(property.getValue().toString());\n property = properties.get(Collections.CURRENCY_CODE);\n salesOrder.setCurrencyCode(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS);\n salesOrder.setLifecycleStatus(property.getValue().toString());\n property = properties.get(Collections.LIFECYCLE_STATUS_DESCRIPTION);\n salesOrder.setLifecycleStatusDescription(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS);\n salesOrder.setBillingStatus(property.getValue().toString());\n property = properties.get(Collections.BILLING_STATUS_DESCRIPTION);\n salesOrder.setBillingStatusDescription(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS);\n salesOrder.setDeliveryStatus(property.getValue().toString());\n property = properties.get(Collections.DELIVERY_STATUS_DESCRIPTION);\n salesOrder.setDeliveryStatusDescription(property.getValue().toString());\n property = properties.get(Collections.CREATED_AT);\n salesOrder.setCreatedAt(property.getValue().toString());\n property = properties.get(Collections.CHANGED_AT);\n salesOrder.setChangedAt(property.getValue().toString());\n\n /**\n * The unit price value from the christianschneider OData service has\n * four decimal places, we'll round to two decimal places before storing the data\n */\n property = properties.get(Collections.GROSS_AMOUNT);\n Float price = Float.valueOf(property.getValue().toString());\n salesOrder.setGrossAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.NET_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setNetAmount(String.format(\"%.2f\", price));\n\n property = properties.get(Collections.TAX_AMOUNT);\n price = Float.valueOf(property.getValue().toString());\n salesOrder.setTaxAmount(String.format(\"%.2f\", price));\n\n // Add this entity to the array\n pList.add(salesOrder);\n SalesOrderItemDataSingleton.initialize(openListener, salesOrder);\n\n }\n\n // Get the next resource path from the OData SDK. The call to getNextResourcePath()\n // will return the appropriate string based on the server's skiptoken value.\n // resourcePath = feed.getNextResourcePath();\n\n// }\n // Short circuit evaluation of the string to see if we should loop again.\n // When all entities have been received, resourcePath will be null\n// while (resourcePath != null && !resourcePath.isEmpty());\n\n SalesOrder.logSalesOrderArrayList(pList);\n\n // Save a reference to the list in ITEMS.\n ITEMS = pList;\n\n // Store all items in ITEMS (ArrayList) in ITEM_MAP (HashMap) for rapid retrieval\n storeData();\n skipValue += 5;\n\n }\n catch (Exception e)\n {\n Log.e(TAG, appContext.getString(R.string.online_odata_store_exception));\n throw new OnlineODataStoreException(e);\n }\n }\n else\n Log.e(TAG, \"Store not open\");\n\n return pList;\n }", "java.util.List<com.google.cloud.channel.v1.PurchasableOffer> \n getPurchasableOffersList();", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "public ArrayList<OrderItem> getOrderArray(){return orderInfo;}", "List<PurchaseLine> getAllPurchaseOrderOfProduct(long prodId);", "@ResponseBody\r\n\t@RequestMapping(\"/list\")\r\n\tpublic PageModel list(HttpServletRequest request, HttpServletResponse response) {\n\t\tPageModel page = PageUtil.getPageModel(Order.class, \"sql.order/getOrderlist\", request);\r\n\t\treturn page;\r\n\t}", "List<OrderDTORest> getAllOrdersDTORest();", "public final java.util.List<p035ru.unicorn.ujin.data.realm.marketplace.CartOffer> getOrderedOfferList(java.lang.String r5) {\n /*\n r4 = this;\n io.realm.Realm r0 = r4.realm\n java.lang.Class<ru.unicorn.ujin.data.realm.marketplace.CartItem> r1 = p035ru.unicorn.ujin.data.realm.marketplace.CartItem.class\n io.realm.RealmQuery r0 = r0.where(r1)\n io.realm.RealmResults r0 = r0.findAll()\n java.lang.String r1 = \"cartItemList\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r0, r1)\n java.lang.Iterable r0 = (java.lang.Iterable) r0\n java.util.Iterator r0 = r0.iterator()\n L_0x0017:\n boolean r1 = r0.hasNext()\n r2 = 0\n if (r1 == 0) goto L_0x0036\n java.lang.Object r1 = r0.next()\n r3 = r1\n ru.unicorn.ujin.data.realm.marketplace.CartItem r3 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r3\n ru.unicorn.ujin.data.realm.marketplace.CartCompany r3 = r3.getCompany()\n if (r3 == 0) goto L_0x002f\n java.lang.String r2 = r3.getId()\n L_0x002f:\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r5)\n if (r2 == 0) goto L_0x0017\n goto L_0x0037\n L_0x0036:\n r1 = r2\n L_0x0037:\n ru.unicorn.ujin.data.realm.marketplace.CartItem r1 = (p035ru.unicorn.ujin.data.realm.marketplace.CartItem) r1\n if (r1 == 0) goto L_0x004a\n io.realm.RealmList r5 = r1.getOffers()\n if (r5 == 0) goto L_0x004a\n java.lang.Iterable r5 = (java.lang.Iterable) r5\n java.util.List r5 = kotlin.collections.CollectionsKt.filterNotNull(r5)\n if (r5 == 0) goto L_0x004a\n goto L_0x004e\n L_0x004a:\n java.util.List r5 = kotlin.collections.CollectionsKt.emptyList()\n L_0x004e:\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p035ru.unicorn.ujin.market.repository.MarketLocalRepository.getOrderedOfferList(java.lang.String):java.util.List\");\n }", "public List<StockItem> getStockList();", "public List<Order> getOrder() {\n return order;\n }", "@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}", "Collection<Order> getAll();", "@GetMapping(\"/orders\")\n public List<AgentOrderList> findAllAgentsOrderList() {\n return agentRepo.findAllAgentOrderListBy();\n }", "@Override\n\tpublic List<OrderVO> orderList() throws Exception {\n\t\treturn session.selectList(\"orderMapper.orderList\");\n\t}", "public static List<Offer> offerList() {\n OfferDAO offerDAO = getOfferDAO();\n List<Offer> offerList = offerDAO.offerList();\n return offerList;\n }", "public MarketOrderBookImpl(\n String marketId, List<MarketOrder> sellOrders, List<MarketOrder> buyOrders) {\n this.marketId = marketId;\n this.sellOrders = sellOrders;\n this.buyOrders = buyOrders;\n }", "ImmutableList<SchemaOrgType> getOffersList();", "Price[] getTradePrices();", "private ArrayList<TY_SaleEligibleItems> getTentativeSellItems(TY_Scrip_PositionModel posModel, Date sellDate) throws EX_General\n\t{\n\t\tArrayList<TY_SaleEligibleItems> allItems = null;\n\t\t// 2. Get Buy Positions Items with ETQ > 0\n\t\tArrayList<OB_Positions_Item> buyItemsposETQ = posModel.getScPosItems().stream().filter(x -> x.getTxnType().equals(SCEenums.txnType.BUY))\n\t\t .filter(w -> w.getETQ() > 0).collect(Collectors.toCollection(ArrayList::new));\n\t\tif (buyItemsposETQ != null && dateSrv != null)\n\t\t{\n\t\t\t// 3.Calculate Days difference for Each of the Items thus obtained\n\t\t\tallItems = new ArrayList<TY_SaleEligibleItems>();\n\n\t\t\tfor ( OB_Positions_Item posItem : buyItemsposETQ )\n\t\t\t{\n\t\t\t\tint daysDiff = 0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tdaysDiff = dateSrv.getNumDaysbwSqlSysDates(posItem.getTxnDate(), sellDate);\n\t\t\t\t}\n\t\t\t\tcatch (ParseException e)\n\t\t\t\t{\n\t\t\t\t\tEX_General egen = new EX_General(\"ERR_DATE_PARSE\", new Object[]\n\t\t\t\t\t{ e.getMessage()\n\t\t\t\t\t});\n\t\t\t\t\tthrow egen;\n\t\t\t\t}\n\n\t\t\t\tTY_SaleEligibleItems eligItem = new TY_SaleEligibleItems(posItem.getPrimaryKey_Int(), daysDiff, posItem.getETQ(), 0);\n\t\t\t\tallItems.add(eligItem);\n\t\t\t}\n\t\t}\n\t\treturn allItems;\n\t}", "public ArrayList<TradeRequest> getTradeRequests(){return tradeRequests;}", "@Override\n public int getItemCount() {\n return orders.size();\n }", "@Override\n\tpublic List<Order> getOrdersAroundMe() {\n\t\treturn null;\n\t}", "public static String getSells() {\n if(DatabaseMethods.sales_analaysis()){\r\n return DatabaseMethods.get_total_sales();\r\n }\r\n else{\r\n return null; \r\n }\r\n \r\n\t}", "public ResultSet getItemListForSold() throws IllegalStateException{\n\t \n\t if(!isLoggedIn())\n\t throw new IllegalStateException(\"MUST BE LOGGED IN FIRST!\");\n\t try{\n\t \t stmt = con.createStatement();\n String queryString = \"SELECT INUMBER , INAME , auc_start, auc_end_date , startbid , currentbid , CURRENTBID-STARTBID \" \n \t\t+ \"FROM ITEM \"\n + \" WHERE SELLERNO = '\" + this.id +\"' AND STATUS = 'SOLD' \"\n \t+\"GROUP BY SELLERNO, INUMBER, INAME, auc_start, auc_end_date,\"+ \n \t\t\" startbid, currentbid, CURRENTBID-STARTBID\";\n\n result = stmt.executeQuery(queryString);\n \n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t }\n\t return result; \n\t }" ]
[ "0.71097857", "0.69476974", "0.6622939", "0.661695", "0.64794207", "0.6407125", "0.63895684", "0.63726294", "0.62089247", "0.619347", "0.619347", "0.6191518", "0.61323464", "0.6119238", "0.6110186", "0.60908306", "0.5993989", "0.5993989", "0.59881634", "0.5916266", "0.59142894", "0.5892491", "0.5854718", "0.58303493", "0.58099186", "0.58012843", "0.5789268", "0.5771491", "0.5768795", "0.5763502", "0.57500786", "0.5738311", "0.5728301", "0.57171017", "0.5712952", "0.5711844", "0.570611", "0.56938255", "0.5684579", "0.5671056", "0.56608397", "0.56592846", "0.5648832", "0.5643524", "0.56312245", "0.5609374", "0.5607991", "0.5605713", "0.559904", "0.55903506", "0.5590151", "0.5588605", "0.55757606", "0.55676967", "0.55627555", "0.5555906", "0.55416673", "0.5539753", "0.5526039", "0.55142766", "0.5508923", "0.5501381", "0.5500587", "0.54900044", "0.54765636", "0.54648", "0.54630154", "0.54613507", "0.5455177", "0.54547155", "0.54533577", "0.5451512", "0.54455656", "0.5444509", "0.54433525", "0.5440213", "0.54359245", "0.54324716", "0.5423231", "0.5422467", "0.54084265", "0.5401231", "0.5400804", "0.54006296", "0.54003435", "0.5388143", "0.53854686", "0.5376958", "0.5365454", "0.53575724", "0.5354123", "0.535229", "0.53450894", "0.53381914", "0.5325092", "0.5312092", "0.5305456", "0.5303737", "0.5300304", "0.52997315", "0.5294263" ]
0.0
-1
The timestamp associated for this order book
@JsonProperty("timestamp") public Double getTimestamp() { return timestamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Long getTimestamp() {\n return timestamp;\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public long getTimeStamp() {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n\t\treturn lTimestamp;\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp();", "public long getTimestamp();", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "public Instant getTimestamp() {\n\t\treturn this.timestamp;\n\t}", "public int getTimeStamp() {\n return timeStamp;\n }", "public Long getTimeStamp() {\n return this.TimeStamp;\n }", "public OffsetDateTime getTimestamp() {\n return this.timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public String getTimeStamp() {\n return timeStamp;\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getStamp() {\n return stamp;\n }", "public Date getTimestamp() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_timestamp;\n\t}", "public String getKeyTimestamp()\n\t{\n\t\treturn keyTimestamp;\n\t}", "public long getTimeStamp() {return timeStamp;}", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "int getTimestamp();", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public int getTimeStamp() {\r\n return fTimeStamp;\r\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}" ]
[ "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.77330446", "0.77330446", "0.7719212", "0.7719212", "0.76701194", "0.7661757", "0.76578754", "0.7602258", "0.75868237", "0.75868237", "0.7578472", "0.7566078", "0.7566078", "0.7537877", "0.7505145", "0.7505145", "0.7505145", "0.74943185", "0.7463627", "0.7426772", "0.7381646", "0.7376794", "0.7364734", "0.7340225", "0.7340225", "0.7340225", "0.7302646", "0.72953475", "0.72901326", "0.72901326", "0.7266515", "0.72641844", "0.72641844", "0.725514", "0.725514", "0.7208392", "0.7208392", "0.72062165", "0.71831083", "0.71831083", "0.717608", "0.7175333", "0.71572685", "0.71284515", "0.71138656", "0.7101639", "0.7068204", "0.7039144", "0.7039144", "0.703378", "0.7033625", "0.6979266", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6910121", "0.6901554", "0.6899635", "0.6893581", "0.6872533", "0.68522257", "0.6813596", "0.6792972", "0.6788999", "0.6785648", "0.6779279", "0.6754762", "0.6750208", "0.6750208", "0.6741321", "0.6741321", "0.6738212", "0.6698322" ]
0.0
-1
The timestamp associated for this order book
@JsonProperty("timestamp") public void setTimestamp(Double timestamp) { this.timestamp = timestamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Long getTimestamp() {\n return timestamp;\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public long getTimeStamp() {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n\t\treturn lTimestamp;\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp();", "public long getTimestamp();", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "public Instant getTimestamp() {\n\t\treturn this.timestamp;\n\t}", "public int getTimeStamp() {\n return timeStamp;\n }", "public Long getTimeStamp() {\n return this.TimeStamp;\n }", "public OffsetDateTime getTimestamp() {\n return this.timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public String getTimeStamp() {\n return timeStamp;\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getStamp() {\n return stamp;\n }", "public Date getTimestamp() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_timestamp;\n\t}", "public String getKeyTimestamp()\n\t{\n\t\treturn keyTimestamp;\n\t}", "public long getTimeStamp() {return timeStamp;}", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "int getTimestamp();", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public int getTimeStamp() {\r\n return fTimeStamp;\r\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}" ]
[ "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.77330446", "0.77330446", "0.7719212", "0.7719212", "0.76701194", "0.7661757", "0.76578754", "0.7602258", "0.75868237", "0.75868237", "0.7578472", "0.7566078", "0.7566078", "0.7537877", "0.7505145", "0.7505145", "0.7505145", "0.74943185", "0.7463627", "0.7426772", "0.7381646", "0.7376794", "0.7364734", "0.7340225", "0.7340225", "0.7340225", "0.7302646", "0.72953475", "0.72901326", "0.72901326", "0.7266515", "0.72641844", "0.72641844", "0.725514", "0.725514", "0.7208392", "0.7208392", "0.72062165", "0.71831083", "0.71831083", "0.717608", "0.7175333", "0.71572685", "0.71284515", "0.71138656", "0.7101639", "0.7068204", "0.7039144", "0.7039144", "0.703378", "0.7033625", "0.6979266", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6910121", "0.6901554", "0.6899635", "0.6893581", "0.6872533", "0.68522257", "0.6813596", "0.6792972", "0.6788999", "0.6785648", "0.6779279", "0.6754762", "0.6750208", "0.6750208", "0.6741321", "0.6741321", "0.6738212", "0.6698322" ]
0.0
-1
The timestamp associated for this order book
@JsonProperty("datetime") public Date getDatetime() { return datetime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Long getTimestamp() {\n return timestamp;\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public long getTimeStamp() {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n\t\treturn lTimestamp;\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp();", "public long getTimestamp();", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "public Instant getTimestamp() {\n\t\treturn this.timestamp;\n\t}", "public int getTimeStamp() {\n return timeStamp;\n }", "public Long getTimeStamp() {\n return this.TimeStamp;\n }", "public OffsetDateTime getTimestamp() {\n return this.timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public String getTimeStamp() {\n return timeStamp;\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getStamp() {\n return stamp;\n }", "public Date getTimestamp() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_timestamp;\n\t}", "public String getKeyTimestamp()\n\t{\n\t\treturn keyTimestamp;\n\t}", "public long getTimeStamp() {return timeStamp;}", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "int getTimestamp();", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public int getTimeStamp() {\r\n return fTimeStamp;\r\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}" ]
[ "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.77330446", "0.77330446", "0.7719212", "0.7719212", "0.76701194", "0.7661757", "0.76578754", "0.7602258", "0.75868237", "0.75868237", "0.7578472", "0.7566078", "0.7566078", "0.7537877", "0.7505145", "0.7505145", "0.7505145", "0.74943185", "0.7463627", "0.7426772", "0.7381646", "0.7376794", "0.7364734", "0.7340225", "0.7340225", "0.7340225", "0.7302646", "0.72953475", "0.72901326", "0.72901326", "0.7266515", "0.72641844", "0.72641844", "0.725514", "0.725514", "0.7208392", "0.7208392", "0.72062165", "0.71831083", "0.71831083", "0.717608", "0.7175333", "0.71572685", "0.71284515", "0.71138656", "0.7101639", "0.7068204", "0.7039144", "0.7039144", "0.703378", "0.7033625", "0.6979266", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6910121", "0.6901554", "0.6899635", "0.6893581", "0.6872533", "0.68522257", "0.6813596", "0.6792972", "0.6788999", "0.6785648", "0.6779279", "0.6754762", "0.6750208", "0.6750208", "0.6741321", "0.6741321", "0.6738212", "0.6698322" ]
0.0
-1
The timestamp associated for this order book
@JsonProperty("datetime") public void setDatetime(Date datetime) { this.datetime = datetime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\r\n return timestamp_;\r\n }", "public long getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public int getTimestamp() {\n return timestamp_;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\n return this.timestamp;\n }", "public long getTimestamp() {\r\n return timestamp;\r\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp_() {\n return timestamp_;\n }", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public long getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Long getTimestamp() {\n return timestamp;\n }", "public int getTimestamp(){\r\n\t\treturn timestamp;\r\n\t}", "public long getTimeStamp() {\n return timestamp;\n }", "public Date getTimestamp() {\r\n return this.timestamp;\r\n }", "public String getTimestamp()\n {\n return timestamp;\n }", "public Integer getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public Date getTimestamp() {\n return timestamp;\n }", "public long getTimestamp() {\n\t\treturn lTimestamp;\n\t}", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.String getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public java.lang.Long getTimestamp() {\n return timestamp;\n }", "public long getTimestamp();", "public long getTimestamp();", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Timestamp getTimestamp() {\n\t\treturn timestamp;\n\t}", "public Double getTimestamp() {\r\n\t\treturn timestamp;\r\n\t}", "java.lang.String getTimestamp();", "java.lang.String getTimestamp();", "@Override\n public long getTimestamp() {\n return timestamp;\n }", "private String getTimestamp() {\n return Calendar.getInstance().getTime().toString();\n }", "public Date getTimestamp() {\r\n return mTimestamp;\r\n }", "public Instant getTimestamp() {\n\t\treturn this.timestamp;\n\t}", "public int getTimeStamp() {\n return timeStamp;\n }", "public Long getTimeStamp() {\n return this.TimeStamp;\n }", "public OffsetDateTime getTimestamp() {\n return this.timestamp;\n }", "String getTimestamp();", "String getTimestamp();", "@NonNull\n public Date getTimestamp() {\n return timestamp;\n }", "public String getTimeStamp() {\n return timeStamp;\n }", "public long getTimestamp()\r\n {\r\n return safeConvertLong(getAttribute(\"timestamp\"));\r\n }", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "long getTimestamp();", "public long getTimeStamp() {return attributes.getLongValue(TIMESTAMP,-1);}", "public long getStamp() {\n return stamp;\n }", "public Date getTimestamp() throws SQLException {\n\t\tloadFromDB();\n\t\treturn rev_timestamp;\n\t}", "public String getKeyTimestamp()\n\t{\n\t\treturn keyTimestamp;\n\t}", "public long getTimeStamp() {return timeStamp;}", "public Timestamp getTimestamp() {\n\n\t\treturn new Timestamp(new Date().getTime());\n\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public Date getTimestamp() {\n return new Date(timestamp.getTime()); // clone\n }", "public int getOrder_time()\n\t{\n\t\treturn order_time;\n\t}", "public String getTimestamp() {\n Object ref = timestamp_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "int getTimestamp();", "public long getTimeStamp() {\n return 1370918376296L;\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public java.lang.String getTimestamp() {\n java.lang.Object ref = timestamp_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n timestamp_ = s;\n return s;\n }\n }", "public int getTimeStamp() {\r\n return fTimeStamp;\r\n }", "public static String getTimestamp() {\r\n\t\t\r\n\t\treturn new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t}" ]
[ "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7749513", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.7746442", "0.77330446", "0.77330446", "0.7719212", "0.7719212", "0.76701194", "0.7661757", "0.76578754", "0.7602258", "0.75868237", "0.75868237", "0.7578472", "0.7566078", "0.7566078", "0.7537877", "0.7505145", "0.7505145", "0.7505145", "0.74943185", "0.7463627", "0.7426772", "0.7381646", "0.7376794", "0.7364734", "0.7340225", "0.7340225", "0.7340225", "0.7302646", "0.72953475", "0.72901326", "0.72901326", "0.7266515", "0.72641844", "0.72641844", "0.725514", "0.725514", "0.7208392", "0.7208392", "0.72062165", "0.71831083", "0.71831083", "0.717608", "0.7175333", "0.71572685", "0.71284515", "0.71138656", "0.7101639", "0.7068204", "0.7039144", "0.7039144", "0.703378", "0.7033625", "0.6979266", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6947949", "0.6910121", "0.6901554", "0.6899635", "0.6893581", "0.6872533", "0.68522257", "0.6813596", "0.6792972", "0.6788999", "0.6785648", "0.6779279", "0.6754762", "0.6750208", "0.6750208", "0.6741321", "0.6741321", "0.6738212", "0.6698322" ]
0.0
-1
/ release resources if necessary
@Override // close resources if necessary public void close() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}", "public void releaseResources();", "@Override\n\tpublic void releaseResouces() {\n\t\tsuper.releaseResouces();\n\t}", "private void dispose() {\n\n\t}", "@Override\n public void release() {\n }", "@Override\n\tpublic void releaseAllResources() {\n\t}", "@Override\n public void release() {\n \n }", "@Override\r\n\tpublic void release()\r\n\t{\n\t}", "public void release() {\r\n return;\r\n }", "protected abstract void disposeResources();", "@Override\r\n\tpublic void release() {\n\r\n\t}", "@Override\n public void releaseResources() {\n if (cluster != null) {\n cluster.close();\n }\n if (cpds != null) {\n cpds.close();\n }\n }", "@Override\n public void release() {\n }", "public static void release() {\n\t}", "public void release() {\n\t\t\n\t}", "@Override\n\tpublic void release() {\n\t\t\n\t}", "@Override\n public void release() {\n super.release();\n init();\n }", "@Override\n\tpublic void release() {\n\t}", "public void release() {\n }", "@Override\n\tpublic void release() {\n\n\t}", "@Override\n\tpublic void release() {\n\n\t}", "protected void release()\n {\n }", "@Override\r\n\tprotected void dispose() {\n\t\t\r\n\t}", "@Override\n\t\tpublic void dispose() {\n\t\t \n\t\t}", "@Override\n\t\t\tpublic void dispose() {\n\t\t\t}", "public void release()\r\n\t{\r\n\t\tsuper.release();\r\n\t\t_href = null;\r\n\t\t_box = null;\r\n\t\t_bracket = null;\r\n\t\t_bracketFont = null;\r\n\r\n\t}", "@Override\n \t\t\tpublic void dispose() {\n \n \t\t\t}", "public void release();", "public void release();", "public void release() throws IOException;", "@Override\n public void cleanup() {\n \n }", "@Override\n public void cleanup() {\n \n }", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\t\t\r\n\t}", "public static void closeResources() {\n try {\n if (inputStream != null) {\n inputStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (inputStreamReader != null) {\n inputStreamReader.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (reader != null) {\n reader.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (outputStream != null) {\n outputStream.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (outputStreamWriter != null) {\n outputStreamWriter.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "protected void releaseReferences() {\r\n\r\n\t}", "public void finalize() {\r\n byteBuffer2 = null;\r\n byteBuffer4 = null;\r\n byteBuffer8 = null;\r\n progressBar = null;\r\n tagBuffer = null;\r\n\r\n if (raFile != null) {\r\n\r\n try {\r\n raFile.close();\r\n } catch (final IOException ioe) {\r\n // Do nothing\r\n }\r\n }\r\n\r\n raFile = null;\r\n }", "void dispose() {}", "public void release()\n \t{\n \t\tif( iterator == null )\n \t\t{\n \t\t\tindex = new SpatialIndex();\n \t\t\tedgeAllocator = 0;\n \t\t\tmergeOps = null;\n \t\t\t\n \t\t\tSystem.gc();\n \t\t}\n \t}", "public void release()\r\n throws IOException\r\n {\r\n // nothing needs to be done\r\n }", "public void release() {\n }", "public void release() {\r\n pageEL = null;\r\n params = null;\r\n super.release();\r\n }", "@Override\n public void dispose() {\n \n }", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "public void release() {\n\t\tsuper.release();\r\n\t\tinnerContent = null;\r\n\t\tlabelHead = null;\r\n\t\tscroll = null;\r\n\t}", "@Override\n\tprotected void doDispose() {\n\t}", "@Override\n public void release() {\n output = null;\n super.release();\n }", "void _release();", "public void dispose() {\n\t\t\r\n\t}", "public void dispose() {\n\t\t\r\n\t}", "public void dispose() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dispose()\r\n\t{}", "public void dispose() {\n\t\t\t\r\n\t\t}", "protected void cleanup() {\n try {\n if (_in != null) {\n _in.close();\n _in = null;\n }\n if (_out != null) {\n _out.close();\n _out = null;\n }\n if (_socket != null) {\n _socket.close();\n _socket = null;\n }\n } catch (java.io.IOException e) {\n }\n }", "private void releaseResources(LogbookEntry data) {\n\n if (this.database != null && this.database.isOpen()){\n this.database.close();\n }\n if (this.databaseSchemaHelper != null) {\n this.databaseSchemaHelper.close();\n }\n }", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\n\tpublic void dispose() {\n\t\t\n\t}", "@Override\r\n public void cleanup() {\n }", "@Override\n public void dispose() {\n\n }", "public void dispose() {\n\t\t\n\t}", "@Override\r\n\tpublic void dispose() {\n\t}", "@Override\r\n\tpublic void dispose() {\n\t}", "@Override\r\n\tpublic void dispose() {\r\n\t\t// TODO Auto-generated method stub\r\n\r\n\t}", "@Override\n public void cleanup() {\n }", "public void dispose() ;", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}", "@Override\r\n\tpublic void dispose() {\n\r\n\t}" ]
[ "0.7734581", "0.7637033", "0.74043584", "0.72819436", "0.72580355", "0.7231523", "0.71967137", "0.71644056", "0.71641016", "0.71529335", "0.71509403", "0.71330667", "0.7119903", "0.7116672", "0.70906216", "0.7089613", "0.7081778", "0.70709115", "0.70520216", "0.7045624", "0.7045624", "0.70407265", "0.70406336", "0.70346063", "0.7017386", "0.70118815", "0.69975185", "0.69728833", "0.69728833", "0.6972611", "0.6961119", "0.6961119", "0.6959637", "0.6959637", "0.6959637", "0.6959637", "0.6959637", "0.6959637", "0.6959637", "0.6959637", "0.69522077", "0.6942193", "0.6934139", "0.6924526", "0.6920363", "0.69039094", "0.69012004", "0.6898315", "0.6872637", "0.686909", "0.6866379", "0.68620473", "0.6842572", "0.6837732", "0.6836517", "0.6834884", "0.6834884", "0.6834884", "0.68246424", "0.6821786", "0.68069494", "0.68059975", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.68031734", "0.6800234", "0.679993", "0.6798918", "0.6786625", "0.6786625", "0.6777795", "0.67617536", "0.67505753", "0.67477125", "0.67477125", "0.67477125", "0.67477125", "0.67477125", "0.67477125", "0.67477125" ]
0.0
-1
interface for database side connection protocols
public interface PrcseSource extends Connectable { public abstract ArrayList<Object> getFrontPage() throws Exception; public abstract CustomerInfo login(CustomerInfo request) throws Exception; public abstract CustomerInfo syncCustomer(CustomerInfo request) throws Exception; public abstract CustomerForm getCustomerFormData(CustomerForm request) throws Exception; public abstract CustomerBooking createBooking(CustomerBooking request) throws Exception; public abstract CustomerBooking cancelBooking(CustomerBooking request) throws Exception; public abstract ArrayList<HashMap<Long, SeatingArea>> getEventSeatingMap(long eventId) throws Exception; public abstract AvailableSeats getEventAvailability(AvailableSeats request) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface Connection extends java.sql.Connection {\n\n\t/**\n\t * Get the database credentials required to gain access to the remote database server.\n\t *\n\t * @return A one way hash that includes this Connections database login details\n\t * as supplied when this Connection was created.\n\t */\n\tpublic String getCredentials();\n\n\t/**\n\t * Returns the database's numeric type as defined in this Connections Driver class.<br />\n\t * The numeric type is set based on the request url used to create this Connection.\n\t *\n\t * @return The numeric typeName for this Connection.\n\t */\n\tpublic int getDbType();\n\n\t/**\n\t * Gets the remote URL this Connection is connected to.\n\t *\n\t * @return The URL this Connection instance is using.\n\t */\n\tpublic String getUrl();\n\n\t/**\n\t *\n\t * @return this HttpClient\n\t */\n\tpublic HttpClient getClient();\n\n\t/**\n\t *\n\t * @return get the current timeout in ms\n\t */\n\tpublic int getTimeOut();\n\n\t/**\n\t *\n\t * @param timeOut the timeout period in ms\n\t */\n\tpublic void setTimeOut(int timeOut);\n\n\t/**\n\t *\n\t * @return current Session limit\n\t */\n\tpublic boolean getSessLimit();\n\n\t/**\n\t *\n\t * @param sessLimit\n\t */\n\tpublic void setSessLimit(boolean sessLimit);\n\n\t/**\n\t * Returns the name of the requested database that was used when this Connection was created.\n\t *\n\t * @return the active database's name that this Connection Object is using.\n\t */\n\tpublic String getDatabase();\n}", "public abstract Connection getConnection();", "public interface IDbConnection extends IDisposable {\r\n\r\n // Gets or sets the string used to open a database.\r\n // Returns:\r\n // A string containing connection settings.\r\n //String connectionString; // { get; set; }\r\n public String getConnectionString();\r\n public void setConnectionString(String connectionString);\r\n\r\n // Gets the time to wait while trying to establish a connection before terminating\r\n // the attempt and generating an error.\r\n //\r\n // Returns:\r\n // The time (in seconds) to wait for a connection to open. The default value\r\n // is 15 seconds.\r\n //int connectionTimeout; // { get; }\r\n public int getConnectionTimeout();\r\n\r\n // Gets the name of the current database or the database to be used after a\r\n // connection is opened.\r\n //\r\n // Returns:\r\n // The name of the current database or the name of the database to be used once\r\n // a connection is open. The default value is an empty string.\r\n //String database; // { get; }\r\n public String getDatabase();\r\n\r\n // Gets the current state of the connection.\r\n //\r\n // Returns:\r\n // One of the System.Data.ConnectionState values.\r\n //ConnectionState state; // { get; }\r\n public ConnectionState getState();\r\n\r\n // Begins a database transaction.\r\n //\r\n // Returns:\r\n // An object representing the new transaction.\r\n IDbTransaction beginTransaction();\r\n\r\n // Begins a database transaction with the specified System.Data.IsolationLevel\r\n // value.\r\n //\r\n // Parameters:\r\n // il:\r\n // One of the System.Data.IsolationLevel values.\r\n //\r\n // Returns:\r\n // An object representing the new transaction.\r\n IDbTransaction beginTransaction(IsolationLevel il);\r\n\r\n // Changes the current database for an open Connection object.\r\n //\r\n // Parameters:\r\n // databaseName:\r\n // The name of the database to use in place of the current database.\r\n void changeDatabase(String databaseName);\r\n\r\n // Closes the connection to the database.\r\n void close();\r\n\r\n // Creates and returns a Command object associated with the connection.\r\n //\r\n // Returns:\r\n // A Command object associated with the connection.\r\n IDbCommand createCommand();\r\n\r\n // Opens a database connection with the settings specified by the ConnectionString\r\n // property of the provider-specific Connection object.\r\n void open();\r\n}", "abstract Connection getConnection() throws SQLException;", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public\n Connection getConnection();", "public abstract Connection getConnection(String user, String password) throws SQLException;", "public interface DBAccessInterface {\r\n\tpublic ConnectionPoolDataSource getDataSource () throws DBAccessException ;\r\n\t//public PooledConnection getDataSource () throws DBAccessException ;\r\n\tpublic Connection getConnection() throws DBAccessException;\r\n\tpublic void reconnect()throws DBAccessException;\r\n\tpublic void dbConnect()throws DBAccessException;\r\n\t\r\n}", "public DatabaseConnection newConnection();", "Connection createConnection();", "public interface DatabaseAccessor {\n\n Connection getConnection() throws SQLException;\n}", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "public interface CompiereDatabase\n{\n\t/**\n\t * Get Database Name\n\t * @return database short name\n\t */\n\tpublic String getName();\n\n\t/**\n\t * Get Database Description\n\t * @return database long name and version\n\t */\n\tpublic String getDescription();\n\n\t/**\n\t * Get Database Driver\n\t * @return Driver\n\t */\n\tpublic Driver getDriver();\n\n\n\t/**\n\t * Get Standard JDBC Port\n\t * @return standard port\n\t */\n\tpublic int getStandardPort();\n\n\t/**\n\t * Get Database Connection String\n\t * @param connection Connection Descriptor\n\t * @return connection String\n\t */\n\tpublic String getConnectionURL (CConnection connection);\n\n\t/**\n\t * Supports BLOB\n\t * @return true if BLOB is supported\n\t */\n\tpublic boolean supportsBLOB();\n\n\t/**\n\t * String Representation\n\t * @return info\n\t */\n\tpublic String toString();\n\n\t/**************************************************************************\n\t * Convert an individual Oracle Style statements to target database statement syntax\n\t *\n\t * @param oraStatement oracle statement\n\t * @return converted Statement\n\t * @throws Exception\n\t */\n\tpublic String convertStatement (String oraStatement);\n\n\t/**************************************************************************\n\t * Set the RowID\n\t * @param pstmt prepared statement\n\t * @param pos position\n\t * @param rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic void setRowID (PreparedStatement pstmt, int pos, Object rowID) throws SQLException;\n\n\t/**\n\t * Get rhe RowID\n\t * @param rs result set\n\t * @param pos position\n\t * @return rowID ROWID\n\t * @throws SQLException\n\t */\n\tpublic Object getRowID (ResultSet rs, int pos) throws SQLException;\n\n\t/**\n\t * Get RowSet\n\t * \t@param rs result set\n\t * @return RowSet\n\t * @throws SQLException\n\t */\n\tpublic RowSet getRowSet (ResultSet rs) throws SQLException;\n\n\t/**\n\t * \tGet Cached Connection on Server\n\t *\t@param connection info\n\t *\t@return connection or null\n\t */\n\tpublic Connection getCachedConnection (CConnection connection);\n\n\t/**\n\t * \tCreate DataSource (Client)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic DataSource createDataSource(CConnection connection);\n\n\t/**\n\t * \tCreate Pooled DataSource (Server)\n\t *\t@param connection connection\n\t *\t@return data dource\n\t */\n\tpublic ConnectionPoolDataSource createPoolDataSource(CConnection connection);\n\n}", "public String getConnection();", "public interface Database {\n\n /**\n * connect mongo\n */\n public void connect();\n\n\n public void load();\n\n\n /**\n * close connection\n */\n public void close();\n\n\n\n}", "public interface DatabaseAPI {\n\n /**\n * Подключиться к базе данных.\n * Этот метод должен использоваться единожды и его результат нужно хранить, как зеницу ока.\n * @param host адрес\n * @param port порт\n * @param username имя пользователя\n * @param password пароль\n * @param databaseName имя базы данных\n * @param threads максимальное количество потоков, которое может использоваться для асинхронного доступа\n * к базе данных. Этот параметр может быть проигнорирован на серверах, где мы не предусматриваем\n * многопоточного доступа к базе данных.\n * Если не уверены, что сюда ставить, пишите двойку.\n * @return держатель подключения к базе данных.\n */\n DatabaseConnectionHolder getDatabaseConnection(String host, int port, String username, String password, String databaseName, int threads);\n\n}", "public interface Database\r\n{\r\n\t/**\r\n\t * Opens a new database session.\r\n\t *\r\n\t * @return a database session\r\n\t */\r\n\tDatabaseSession openSession();\r\n}", "abstract public void openConnection();", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "InstrumentedConnection getConnection();", "String getConnection();", "String getConnection();", "String getConnection();", "String getConnection();", "public interface DBConnector {\n\n /**\n * Initializer for storage driver\n */\n default void init() {\n System.out.println(\"Init connector object...\");\n }\n\n /**\n * Connect with data-storage\n * @return true if connected, false if not connected\n */\n boolean connect();\n\n /**\n * Disconnect from data-storage\n */\n void disconnect();\n}", "public interface ConnectionFactory {\n\n public abstract Connection createConnection();\n\n}", "public interface RemoteDBConnection extends Remote, DBConnection {\n\n\t/**\n\t * Key the database connection in registered with in RMI registry.\n\t */\n\tpublic static final String REGISTRY_KEY = \"DBConnection\";\n}", "public interface DbConnectService {\r\n\t\r\n\tpublic void GetDbConnectSSO() throws Exception;\r\n\tpublic Connection getConnection();\r\n\tpublic boolean executeSqlBatch(List<String> sqlBatch);\r\n\tpublic boolean executeSql(String sqlBatch);\r\n\t\r\n\tpublic boolean GetDbConnectState();\r\n\t\r\n\tpublic List<ConnectorTable> getAllConnector();\r\n\tpublic PageInfo<ConnectorTable> findSqlPageFilter(int pageNum, int pageSize);\r\n\tpublic int addSelective(ConnectorTable connectorTable);\r\n\tpublic int editSelective(ConnectorTable connectorTable);\r\n\tpublic boolean deleteByConIds(List<String> dbIds);\r\n\r\n}", "@Override\n public Connection getConnection() throws SQLException\n {\n return connection;\n }", "public interface IAdaptor {\n\t/**\n\t * @param connectionString\n\t * @param user\n\t * @param pwd\n\t * @return\n\t * @throws SQLException\n\t */\n\tpublic boolean connect();\n}", "void getConnection() {\n }", "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "InstrumentedConnectionProvider getConnectionProvider();", "public interface Sql {\n public java.sql.Connection InitConnection() throws RmodelException.CommonException, RmodelException.SqlException;\n public void setConnection(Connection connection);\n public void CloseConnection() throws RmodelException.SqlException;\n public java.sql.Connection getSqlConnection() throws RmodelException.SqlException;\n}", "void createConnection();", "<P> ConnectionService<P> getConnectionService();", "Connection getConnection() throws PersistentException;", "public interface ConnectionFactory {\r\n\r\n /**\r\n * Creates a connection instance based on the given parameters.\r\n * \r\n * @param context\r\n * the context\r\n * @param <T>\r\n * the type of the objects that are handled by the connection.\r\n * @return the connection instance\r\n * @throws ConnectionBuildException\r\n * if creating the connection fails\r\n */\r\n public <T> Connection<T> createConnection( ConnectionContext<T> context ) throws ConnectionBuildException;\r\n\r\n}", "public Connection getConnection() throws DBAccessException;", "public interface ConnectionManager {\n\tConnection getConnection();\n\tvoid releaseConnection(Connection con);\n}", "private void openConnection(){}", "public interface ConnectionMaker{\n public Connection makeConnection() throws ClassNotFoundException, SQLException;\n\n\n}", "private void connectDatabase(){\n }", "public interface IDatabaseManager {\n\tString USERNAME = \"spring.datasource.username\";\n\n\tString PASSWORD = \"spring.datasource.password\";\n\n\tString URL = \"spring.datasource.url\";\n\n\tpublic Connection getConnection() throws SQLException ;\n\t\n\t}", "@VTID(10)\n @ReturnValue(type=NativeType.VARIANT)\n java.lang.Object getConnection();", "abstract public boolean createConnection(String database);", "abstract public boolean createConnection();", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "public void setConn(Connection conn) {this.conn = conn;}", "public static interface PersistentConnection$Delegate\n{\n\n\tpublic abstract void onAuthStatus(boolean flag);\n\n\tpublic abstract void onConnect();\n\n\tpublic abstract void onDataUpdate(String s, Object obj, boolean flag, Tag tag);\n\n\tpublic abstract void onDisconnect();\n\n\tpublic abstract void onRangeMergeUpdate(Path path, List list, Tag tag);\n\n\tpublic abstract void onServerInfoUpdate(Map map);\n}", "DBConnect() {\n \n }", "public interface IDataBaseOperation{\r\n\r\n boolean prepare();\r\n\r\n void close();\r\n\r\n\r\n}", "public interface DatabaseAccessInterface {\n\t\n\t/**\n\t * Closes the database connection.\n\t * @throws SQLException\n\t */\n\tpublic void closeConnection() throws SQLException;\n\t\n\t/**\n\t * Registers the action on Raspberry Pi into database.\n\t * @param rpiId\n\t * @param time\n\t * @param action\n\t * @param level\n\t * @throws SQLException\n\t */\n\tpublic void addRpiAction(String rpiId, String time, String action, String level) throws SQLException;\n\t\n\t/**\n\t * Adds photo to the database.\n\t * @param rpiId\n\t * @param time\n\t * @param name\n\t * @param photo\n\t * @throws SQLException\n\t */\n\tpublic void addRpiPhoto(String rpiId, String time, String name, byte[] photo) throws SQLException, IOException;\n\t\n\t/**\n\t * Registers the user for the given Raspberry Pi.\n\t * @param rpiId\n\t * @param user\n\t * @throws SQLException\n\t */\n\tpublic void addRpiUserRelation(String rpiId, String user) throws SQLException;\n\t\n\t\n\t/**\n\t * Adds user credentials to the database.\n\t * @param login\n\t * @param password\n\t */\n\tpublic void addUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Adds user token for communication authorization with the token.\n\t * @param login\n\t * @param token\n\t */\n\tpublic void addUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Deletes photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @throws SQLException\n\t */\n\tpublic void deleteRpiPhoto(String rpiId, String time) throws SQLException;\n\t\n\t/**\n\t * Deletes user credentials and all data connected to the user from the database.\n\t * @param login\n\t */\n\tpublic void deleteUserCredentials(String login) throws SQLException;\n\t\n\t/**\n\t * Returns the time of most recent action on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic String getLatestDateOnActions(String rpiId) throws SQLException, IOException;\n\t\n\t/**\n\t * Returns the time of most recent photo on Raspberry Pi registered in the database.\n\t * @param rpiId\n\t * @return formatted date String\n\t * @throws SQLException\n\t */\n\tpublic String getLatestDateOnPhotos(String rpiId) throws SQLException;\n\t\n\t/**\n\t * Gets the photo from the database.\n\t * @param rpiId\n\t * @param time\n\t * @return byte array\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhoto(String rpiId, String time) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent photos before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfDates\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getPhotoTimesBefore(String rpiId, String time, int numberOfDates) throws SQLException, IOException;\n\t\n\t/**\n\t * Gets the list of time stamps of most recent actions before the given date.\n\t * @param rpiId\n\t * @param time\n\t * @param numberOfActions\n\t * @return byte array of JSON string\n\t * @throws SQLException\n\t * @throws IOException when converting the database output.\n\t */\n\tpublic byte[] getRpiActionsBefore(String rpiId, String time, int numberOfActions) throws SQLException, IOException;\n\t\n\t/**\n\t * Retrieves information about user and Rpi relation.\n\t * @param user\n\t * @return Rpi ID for the given user\n\t * @throws SQLException\n\t */\n\tpublic String getRpiByUser(String user) throws SQLException;\n\t\n\t/**\n\t * Gets the user, which is identified be the token.\n\t * @param token\n\t * @return user name or empty string, if the user does not exist.\n\t */\n\tpublic String getUserByToken(String token) throws SQLException;\n\t\n\t\n\t/**\n\t * Validates user's login and password.\n\t * @param login\n\t * @param password\n\t * @return true, if data are valid, false otherwise.\n\t */\n\tpublic boolean validateUserCredentials(String login, String password) throws SQLException;\n\t\n\t/**\n\t * Validates user's token for communication.\n\t * @param login\n\t * @param token\n\t * @return true, if token is valid, false otherwise.\n\t */\n\tpublic boolean validateUserToken(String login, String token) throws SQLException;\n\t\n\t/**\n\t * Validates that such Raspberry Pi is registered.\n\t * @param rpiId\n\t * @return true, if such id exists in the database and device is active.\n\t */\n\tpublic boolean verifyRpiRegistration(String rpiId) throws SQLException;\n\t\n}", "public void setConnection(Connection conn);", "public Connection getConn() {return conn;}", "public interface DAO {\n Connection getConexion() throws SQLException;\n void close() throws SQLException;\n}", "public interface IConnectionProvider\n{\n /**\n * Returns a new {@link Connection}. The caller is in charge of calling\n * {@link Connection#close()} when finished.\n * \n * @return\n * @throws Exception\n */\n Connection newConnection() throws Exception;\n}", "public interface Connectible extends QueryExecutor {\n\n CompletableFuture<Connection> getConnection();\n\n CompletableFuture<Void> close();\n}", "public void setDatabase(Connection _db);", "public interface DBConfig_I {\r\n\r\n /**\r\n * Dateformat the user sends<br/>\r\n * If the DAO receives a DTO that has a column of type DATE/TIMESTAMP\r\n * then it looks up this format to \"know\" the syntax.\r\n * \r\n * @return Java Dateformat\r\n */\r\n public String getGUIDateFormat();\r\n \r\n/**\r\n * This is how the SQL database wants a date to be<br/>\r\n * This depends on the datasource one is using.<br/>\r\n * And it only applies, if one uses a String coded Date,\r\n * recommended is *always* to use a PreparedStatement and a\r\n * setDate()<br/>\r\n * \r\n * @return format of the SQL date\r\n */\r\n public String getSQLDateFormat();\r\n \r\n /**\r\n * User set a Timestamp (as String) inside a DTO<br/>\r\n * \r\n * @return Java Dateformat \r\n */\r\n \r\n public String getGUITimestampFormat();\r\n \r\n/**\r\n * This is how the database \"wants\" a Timestamp in String representation\r\n * \r\n * @return sql timestamp format, *very* database and country dependend...\r\n */\r\n public String getSQLTimestampFormat();\r\n \r\n public String getSQLTimestampFormatQuery();\r\n \r\n/**\r\n * java.sql.Connection\r\n * \r\n * For each instance of this class -> only one connection\r\n * \r\n * This means every call to \"getConnection\" will return the *same*\r\n * Connection object.\r\n * \r\n * This saves massively ressources, but has some other severe drawbacks!\r\n * \r\n * @return instance of java.sql.Connection\r\n */\r\n public Connection getConnection();\r\n \r\n public String getDatabaseType();\r\n \r\n/**\r\n * Class that creates a unique primary key<br/>\r\n * \r\n * Needed, since almost every database has its own mechanism\r\n * to provide a unique numeric value (Autonum, Sequence...)\r\n * \r\n * @return fully qualified classname of the primary key creator\r\n */\r\n public String getPKCClass();\r\n \r\n}", "@Override\n public Connection getConnection() throws SQLException {\n final Props info = new Props();\n if (this.user != null) {\n info.setProperty(\"user\", this.user);\n }\n if (this.pass != null) {\n info.setProperty(\"password\", this.pass);\n }\n\n // 其它参数\n final Properties connProps = this.connProps;\n if (MapUtil.isNotEmpty(connProps)) {\n info.putAll(connProps);\n }\n\n return DriverManager.getConnection(this.url, info);\n }", "@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }", "public synchronized Connection getConnection() throws SQLException {\n/* 158 */ return getConnection(true, false);\n/* */ }", "public abstract ODatabaseInternal<?> openDatabase();", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }", "public DatabaseConnection(Connection c){\n\t\tconn = c;\n\t}", "public interface DBContext {\n <E> boolean persist(E entity) throws SQLException, IllegalAccessException;\n\n <E> Iterable<E> find(Class<E> table) throws SQLException, IllegalAccessException, ClassNotFoundException, InstantiationException;\n\n <E> Iterable<E> find(Class<E> table, String where) throws SQLException, IllegalAccessException, ClassNotFoundException, InstantiationException;\n\n <E> E findFirst(Class<E> table) throws SQLException, IllegalAccessException, InstantiationException;\n\n <E> E findFirst(Class<E> table, String where) throws SQLException, IllegalAccessException, InstantiationException;\n\n void closeConn() throws SQLException ;\n}", "public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}", "public GcJdbcConnectionBean connectionBean() throws SQLException;", "public interface ConnectionFactory\r\n{\r\n /**\r\n * Create the ManagedConnection. \r\n * <b>Only used by ConnectionManager so do not call this.</b>\r\n * @param ec ExecutionContext that the connection is bound to during its lifecycle (if any)\r\n * @param transactionOptions the Transaction options this connection will be enlisted to, null if non existent\r\n * @return The ManagedConnection.\r\n */\r\n ManagedConnection createManagedConnection(ExecutionContext ec, Map<String, Object> transactionOptions);\r\n\r\n /**\r\n * Release any resources that have been allocated.\r\n */\r\n void close();\r\n\r\n /**\r\n * Type of resource that this ConnectionFactory represents. See ConnectionResourceType.\r\n * @return Resource type (\"JTA\", \"RESOURCE_LOCAL\")\r\n */\r\n String getResourceType();\r\n\r\n /**\r\n * Accessor for the resource name (e.g \"jdbc/tx\").\r\n * @return The resource name\r\n */\r\n String getResourceName();\r\n}", "DatabaseConnector getConnector() {return db;}", "public interface BerkeleydbDao<T> {\n\n /**\n * open database\n * */\n public void openConnection(String filePath, String databaseName) throws DatabaseException;\n\n /**\n * 关闭数据库\n * */\n public void closeConnection() throws DatabaseException;\n\n /**\n * insert\n * */\n public void save(String name, T t) throws DatabaseException;\n\n /**\n * delete\n * */\n public void delete(String name) throws DatabaseException;\n\n /**\n * update\n * */\n public void update(String name, T t) throws DatabaseException;\n\n /**\n * select\n * */\n public T get(String name) throws DatabaseException;\n\n}", "private Connection dbacademia() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public interface FluentJdbc {\n /**\n * Creates a Query API on a connection provided by the ConnectionProvider. Fails if no ConnectionProvider is set.\n * @return Query API on a connection provided by the ConnectionProvider\n */\n Query query();\n\n /**\n * Creates a Query API using a given managed connection\n *\n * @param connection managed sql Connection\n * @return Query API for the given connection\n */\n Query queryOn(Connection connection);\n}", "public interface DatabaseConfiguration {\n\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:38): escrever javadoc\n\t *\n\t * @return\n\t */\n\tDatabaseTypes getDatabaseType();\n\t\n\t/**\n\t * TODO (paulo 21/01/2011 14:52:40): escrever javadoc\n\t *\n\t * @return\n\t * @throws DatabaseConfigurationException {@link RuntimeException} throw when not retrieve connection.\n\t */\n\tConnection getConnection();\n\t\n}", "protected Connection getConnection () {\n \t\treturn connection;\n \t}", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "io.netifi.proteus.admin.om.Connection getConnection(int index);", "public interface DAOjdbc\n{\n Boolean admin_log(String u,String p) throws SQLException, ClassNotFoundException;\n Boolean add_topic(String l,String n,String r) throws SQLException, ClassNotFoundException;\n List<Topic> topic(String t) throws SQLException, ClassNotFoundException;\n List<Topic> Select_topic(String i) throws SQLException, ClassNotFoundException;\n Boolean add_tou(String p) throws SQLException, ClassNotFoundException;\n Boolean add_Info(String n,String c,String t,String m) throws SQLException, ClassNotFoundException;\n Boolean add_user(String n,String p,String pw,String t,String m) throws SQLException, ClassNotFoundException;\n User select_user(String u,String p) throws SQLException, ClassNotFoundException;\n}", "protected void connectionEstablished() {}", "public IConnection getConnection () { \n\t\treturn connection;\n\t}", "public ConnectDBReservering(Connection c){\r\n\t\tcon = c;\r\n\t}", "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "messages.Databaseinterface.DatabaseInterface getDatabase();", "public interface LocalDatabase {\n void start();\n void stop();\n boolean isAvailable();\n\n String getUrl();\n String getDriver();\n String getUsername();\n String getPassword();\n String getDialect();\n}", "@Override\n public abstract void connect();", "void setConnection(Connection con);", "@Override\r\n\tpublic void connect() {\n\t\tport=\"tastecard\";\r\n\t\tSystem.out.println(\"This is the implementation of db for the taste card\"+port);\r\n\t}", "public DatabaseInterface(String url) throws SQLException {\n sql = DriverManager.getConnection(url);\n }", "public interface ConnectionFactory {\r\n\r\n\t/**\r\n\t * Get a connection used for interacting with a given table.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tTableIndexDAO getConnection(String tableId);\r\n\t\r\n\t/**\r\n\t * Get a connection used for interacting with a given tables current version cache.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tCurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);\r\n\r\n\t/**\r\n\t * Get a connection used for interacting with a given tables current row cache.\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tCurrentRowCacheDao getCurrentRowCacheConnection(Long tableId);\r\n\r\n\t/**\r\n\t * Get all unique connections used for interacting current tables\r\n\t * \r\n\t * @param tableId\r\n\t * @return\r\n\t */\r\n\tIterable<CurrentVersionCacheDao> getCurrentVersionCacheConnections();\r\n\r\n\t/**\r\n\t * Drop all tables in every database connectoin.\r\n\t * \r\n\t */\r\n\tvoid dropAllTablesForAllConnections();\r\n}", "public interface OpenNetworkDB extends Database, CRUD<OpenNetwork, Integer>{\r\n\r\n Collection<OpenNetwork> getAllFromCity( String city ) throws DatabaseException;\r\n}", "public interface Pool {\n public PooledConnection getConnection();\n\n public void createConnection(int ocunt);\n}", "public ConnectDB(){\r\n\r\n\t}", "public interface TestableDatabase {\n\n\tString getJdbcUrl();\n\n\tString getUri();\n\n \t/**\n\t * @return the database scheme for the connection. Example: {@code mysql:}\n\t */\n\tdefault String getScheme() {\n\t\treturn dbType().name().toLowerCase() + \":\";\n\t}\n\n\tdefault String getNativeDatatypeQuery(String tableName, String columnName) {\n\t\treturn \"select data_type from information_schema.columns where table_name = '\" + tableName + \"' and column_name = '\" + columnName + \"'\";\n\t}\n\n\tString getExpectedNativeDatatype(Class<?> dataType);\n\n\tdefault String createJdbcUrl(String host, int port, String database, Map<String, String> params) {\n\t\tfinal StringBuilder paramsBuilder = new StringBuilder();\n\t\tif ( params != null && !params.isEmpty() ) {\n\t\t\tparams.forEach( (key, value) -> {\n\t\t\t\tparamsBuilder.append( jdbcParamDelimiter() );\n\t\t\t\tparamsBuilder.append( key );\n\t\t\t\tparamsBuilder.append( \"=\" );\n\t\t\t\tparamsBuilder.append( value );\n\t\t\t} );\n\t\t}\n\t\tString url = \"jdbc:\" + getScheme() + \"//\" + host;\n\t\tif ( port > -1 ) {\n\t\t\turl += \":\" + port;\n\t\t}\n\t\turl += \"/\";\n\t\tif ( database != null ) {\n\t\t\turl += database;\n\t\t}\n\t\tif ( paramsBuilder.length() > 0 ) {\n\t\t\turl += jdbcStartQuery() + paramsBuilder.substring( 1 );\n\t\t}\n\t\treturn url;\n\t}\n\n\tdefault String jdbcStartQuery() {\n\t\treturn \"?\";\n\t}\n\n\tdefault String jdbcParamDelimiter() {\n\t\treturn \"&\";\n\t}\n}", "public interface GcJdbcConnectionProvider {\n\n /**\n * if the provider requires jdbc data in the subject.properties\n * @return true if provider requires data in subject.properties\n */\n public boolean requiresJdbcConfigInSourcesXml();\n \n /** \n * init the pool \n * @param properties \n * @param sourceId mainly for logging\n * @param driver driver\n * @param maxActive max active connection if pool\n * @param defaultMaxActive if max active is needed, and blank, then use this\n * @param maxIdle max idle connections if pool\n * @param defaultMaxIdle if max is needed, and blank, then use this\n * @param maxWaitSeconds max wait if pool empty in seconds. -1 means long time\n * @param defaultMaxWaitSeconds if max wait is needed, and blank, then use this, -1 mean long time\n * @param dbUrl jdbc url of the database\n * @param dbUser user to login to the database\n * @param dbPassword password for the database (unencrypted)\n * @param readOnly if conn should be readonly\n * @param readOnlyDefault default if not specified and needed\n * @param jdbcConfigId if blank or \"grouper\" then its the grouper database, otherwise its the configId\n * in the grouper-loader.properties database entry\n * @throws SourceUnavailableException if something is not right or not available\n */\n public void init(Properties properties, String sourceId, String driver, Integer maxActive, int defaultMaxActive, Integer maxIdle, int defaultMaxIdle,\n Integer maxWaitSeconds, int defaultMaxWaitSeconds, String dbUrl, String dbUser, \n String dbPassword, Boolean readOnly, boolean readOnlyDefault, String jdbcConfigId);\n \n /**\n * get a connection (dont close this when done, just call \"doneWithConnection()\"\n * @return the connection\n * @throws SQLException if there is a problem\n */\n public GcJdbcConnectionBean connectionBean() throws SQLException;\n \n}", "public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }", "abstract T connect();" ]
[ "0.78810155", "0.78279424", "0.76103413", "0.7430414", "0.7371506", "0.7371506", "0.7371506", "0.73650324", "0.733424", "0.7311945", "0.72218716", "0.7221363", "0.72187865", "0.7182121", "0.7182121", "0.7177669", "0.7102427", "0.70497495", "0.70255274", "0.7007016", "0.699327", "0.699327", "0.69609654", "0.6945579", "0.6945579", "0.6945579", "0.6945579", "0.69164395", "0.69004756", "0.6883469", "0.68660504", "0.6863622", "0.68472046", "0.68454623", "0.6840552", "0.68221277", "0.6800129", "0.6798164", "0.67947215", "0.6792155", "0.67764527", "0.6768389", "0.6768272", "0.6763942", "0.6696023", "0.668621", "0.66672766", "0.66605127", "0.6636766", "0.6621645", "0.661049", "0.66076577", "0.6606255", "0.657866", "0.65742946", "0.6572162", "0.6551441", "0.6527202", "0.6526496", "0.6516431", "0.65148336", "0.6512277", "0.6498653", "0.64968413", "0.646836", "0.64633936", "0.64477086", "0.64433783", "0.64420193", "0.64415896", "0.64316756", "0.64141816", "0.64085937", "0.6406455", "0.64015627", "0.6396987", "0.63956004", "0.6381967", "0.63762057", "0.6368291", "0.6354919", "0.63538367", "0.6347109", "0.6347109", "0.6343844", "0.6331905", "0.6329685", "0.632549", "0.6317632", "0.6310842", "0.6283453", "0.6275878", "0.62715346", "0.6270278", "0.626923", "0.62608695", "0.6238038", "0.6237846", "0.6230133", "0.62219983", "0.6221359" ]
0.0
-1
Serialize the given Java object into JSON string.
public String serialize(Object obj) throws PdfFillerAPIException { try { if (obj != null) return mapper.toJson(obj); else return null; } catch (Exception e) { throw new PdfFillerAPIException(400, e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String toJSON(final Object object) {\r\n\t\tString jsonString = null;\r\n\t\ttry\t{\r\n\t\t\tif (object != null)\t{\r\n\t\t\t\tjsonString = SERIALIZER.serialize(object);\r\n\t\t\t}\r\n\t\t} catch (SerializeException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in serializing to json\",\r\n\t\t\t\t\tex);\r\n\t\t\tjsonString = null;\r\n\r\n\t\t}\r\n\t\treturn jsonString;\r\n\t}", "public String toJson(Object obj){\n return new Gson().toJson(obj);\n }", "String toJSON();", "String toJSONString(Object data);", "private static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String toJson(Object obj) {\n\t\treturn toJson(obj, true, true);\n\t}", "public static String object2Json(Object object) {\n\t\treturn JSON.toJSONString(object, features);\n\t}", "public static String toJSON(final Object object) {\n return gson.toJson(object);\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (JsonProcessingException e) {\n throw new RuntimeException(e);\n }\n }", "public static String getJson(final Object obj)\n\t{\n\t\tString json = null;\n\t\ttry\n\t\t{\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.setSerializationInclusion(Include.ALWAYS);\n\t\t\tjson = mapper.writer().writeValueAsString(obj);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting Java object to json string. Exception message: \", exception);\n\t\t}\n\t\treturn json;\n\t}", "public static <T> String object2String(T obj){\n\t\treturn JSON.toJSONString(obj);\n\t}", "public abstract String toJsonString();", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "public static String ConvertToJsonString(final Object obj) {\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tfinal String jsonContent = mapper.writeValueAsString(obj);\n\t\t\treturn jsonContent;\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper()\n .registerModule(new JavaTimeModule())\n .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)\n .writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public String objectToJson(Object o){\n Gson gson = new Gson();\n String json = gson.toJson(o);\n return json;\n }", "public final static String toJson(final Object src) {\n\t\treturn gson.toJson(src);\n\t}", "public String writeAsJson(final Object object) {\n String jsonRepresentation = null;\n try {\n if (object != null) {\n jsonRepresentation = jsonMapper.writeValueAsString(object);\n }\n } catch (final JsonProcessingException e) {\n // LOGGER.error(\"Failed writing object as json\", e);\n }\n\n if (applyMasking) {\n jsonRepresentation = jsonMaskingUtil.mask(jsonRepresentation);\n }\n return jsonRepresentation;\n }", "public static String getJsonString(Object object) throws Exception {\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\r\n\t\treturn mapper.writeValueAsString(object);\t\r\n\t}", "private String stringify(Object object) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(object);\n }", "public abstract Object toJson();", "public static String toJson(Object o)\n {\n return g.toJson(o);\n }", "private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n public String toJson(Object object) {\n if (null == object) {\n return null;\n }\n return JSON.toJSONString(object, SerializerFeature.DisableCircularReferenceDetect);\n }", "public static String obj2json(Object obj) throws Exception {\n return objectMapper.writeValueAsString(obj);\n }", "public String serialize(final Object object)\n {\n StringBuffer buffer;\n\n buffer = new StringBuffer();\n serializeObject(object, buffer);\n return buffer.toString();\n }", "String parseObjectToJson(Object obj);", "public abstract String toJson();", "public static String getJsonString(Object obj) {\n\t\tString res = \"{}\";\n\t\tStringWriter out = new StringWriter();\n\t\ttry {\n\t\t\tJSONValue.writeJSONString(obj, out);\n\t\t\tres = out.toString();\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Error converting obj to string\", e);\n\t\t}\n\t\treturn res;\n\t}", "public String serialize(Object object) {\n\t\treturn serialize(object, false);\n\t}", "public String toJSON() throws JSONException;", "private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }", "public static String convertObjectToJsonString(Object object) {\n\t\ttry {\n\t\t\tString jsonText = mapper.writeValueAsString(object);\n\n\t\t\treturn jsonText;\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"Error converting object to Json String [\" + object + \"]\",\n\t\t\t\t\te);\n\t\t}\n\t}", "public static String toJson(Object o) {\r\n\t\ttry {\r\n\t\t\treturn mapper.writeValueAsString(o);\r\n\t\t} catch (JsonGenerationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (JsonMappingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String toJson() {\n try{\n return new JsonSerializer().getObjectMapper().writeValueAsString(this);\n } catch (IOException e){\n throw new RuntimeException(e);\n }\n }", "public String toJson(Object src) {\n return getGson().toJson(src);\n }", "@Override\n\tpublic String encode(Message object) throws EncodeException {\n\t\treturn new Gson().toJson(object);\n\t}", "public String toJsonString() {\n\t\tString json = null;\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\n\t\tmapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\n\t\ttry {\n\t\t\tjson = mapper.writeValueAsString(this);\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn json;\n\t}", "public static String toJsonString(final Object object) {\n try {\n return writeValueAsString(object);\n } catch (JsonProcessingException e) {\n LOGGER.error(\"toJsonString::JsonProcessingException={}\", e.getMessage(), e);\n throw new MapperException(e.getMessage(), e);\n }\n\n }", "String toJson() throws IOException;", "public static String ToJsonString(AsonValue obj,boolean format) {\n return new JsonSerializer().serialize(obj,format);\n }", "JSONObject toJson();", "JSONObject toJson();", "public final native String toJson() /*-{\n // Safari 4.0.5 appears not to honor the replacer argument, so we can't do this:\n \n // var replacer = function(key, value) {\n // if (key == '__key') {\n // return;\n // }\n // return value;\n // }\n // return $wnd.JSON.stringify(this, replacer);\n \n var key = this.__key;\n delete this.__key;\n var rf = this.__rf;\n delete this.__rf;\n var gwt = this.__gwt_ObjectId;\n delete this.__gwt_ObjectId;\n // TODO verify that the stringify() from json2.js works on IE\n var rtn = $wnd.JSON.stringify(this);\n this.__key = key;\n this.__rf = rf;\n this.__gwt_ObjectId = gwt;\n return rtn;\n }-*/;", "public String toJsonString() {\n return JsonUtils.getGson().toJson(toJson());\n }", "@Override\r\n public byte[] toBinary(Object obj) {\r\n return JSON.toJSONBytes(obj, SerializerFeature.WriteClassName);\r\n }", "public static String getJsonString(Object o) {\n\n\t\ttry {\n\t\t\tObjectMapper om = new ObjectMapper();\n\t\t\treturn om.writeValueAsString(o);\n\t\t} catch (JsonProcessingException e) {\n\t\t\treturn \"\";\n\t\t}\n\t}", "byte[] toJson(Object object) throws Exception {\r\n return this.mapper.writeValueAsString(object).getBytes();\r\n }", "public static String toJSON (Object obj) throws AndroidAgentException {\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\treturn mapper.writeValueAsString(obj);\n\t\t} catch (JsonMappingException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while mapping class to json\", e);\n\t\t} catch (JsonGenerationException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while generating json\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while reading the stream\", e);\n\t\t}\n\t}", "public String parseObjectToJson(Object object) {\n\n return gson.toJson(object);\n }", "public String toJSON(){\n Gson gson = new Gson();\n return gson.toJson(this);\n }", "public JsonObject toJson();", "public <T> String SerializeJson(T obj, String pathToRoot) {\n this.lastPath = pathToRoot + obj.getClass().getSimpleName().toLowerCase() + \"_object-\" + Math.abs(new Random().nextLong()) + \".json\";\n File file = new File(this.lastPath);\n ObjectMapper mapper = new ObjectMapper();\n\n mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n mapper.registerModule(new JavaTimeModule());\n mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n try {\n file.createNewFile();\n mapper.writeValue(file, obj);\n System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj));\n return mapper.writeValueAsString(obj);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public String toJson(final String object) {\n if (object != null && (object.startsWith(\"[\") || object.startsWith(\"{\")\n || (object.startsWith(\"\\\"[\") || object.startsWith(\"\\\"{\")))) {\n return object;\n } else\n return \"{\\\"\" + \"{\\\"success\\\" : 1}\" + \"\\\":\\\"\" + object + \"\\\"}\";\n }", "private static String jsonToString(final Object obj) throws JsonProcessingException {\n String result;\n try {\n final ObjectMapper mapper = new ObjectMapper();\n final String jsonContent = mapper.writeValueAsString(obj);\n result = jsonContent;\n } catch (JsonProcessingException e) {\n result = \"Json processing error\";\n }\n return result;\n }", "public static String getString(Object object){\n return JSON.toJSONString(object);\n }", "public static String convertObjToString(Object clsObj) {\n String jsonSender = new Gson().toJson(clsObj, new TypeToken<Object>() {\n }.getType());\n return jsonSender;\n }", "public static String toJson(Object obj, boolean withId, boolean withClass) {\n\t\ttry {\n\t\t\treturn JSONSerializer.toString(obj, withId, withClass, false);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Exception serializing \" + obj, e);\n\t\t}\n\t}", "@Override\n\tpublic String putObjectCore(Object object) {\n\t\treturn JSON.encode(object);\n\t}", "static <T extends JSONSerializable> String serialize(T serializable) throws Exception { return serializable.jsonSerialize(); }", "public static String toString(Object obj) {\n try {\n return TOSTRINGMAPPER.writeValueAsString(obj);\n } catch (JsonProcessingException ex) {\n throw new RuntimeException(ex);\n }\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public String toJson() {\n return JSON.getGson().toJson(this);\n }", "public static String convertOb2String(Object ob) throws JsonProcessingException {\n ObjectMapper om = new ObjectMapper();\n return om.writerWithDefaultPrettyPrinter().writeValueAsString(ob);\n }", "public static String toJson(Object o) throws JsonProcessingException {\n var mapper = new ObjectMapper();\n mapper.setDateFormat(new SimpleDateFormat(\"yyyy-MM-dd\"));\n mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, false);\n var ow = mapper.writer();\n return ow.writeValueAsString(o);\n }", "<T> String toJson(T source);", "String encode(Object obj);", "public String toJson() { return new Gson().toJson(this); }", "private static String nativeObjectToJSONString(NativeObject nativeObject) throws Exception \n { \n \tMap<String, String> mapJson = new LinkedHashMap<String, String>();\n \tMap<String, Class<?>> mapTypeJson = new LinkedHashMap<String, Class<?>>();\n \t\n Object[] ids = nativeObject.getIds(); \n for (Object id : ids) \n { \n String key = id.toString();\n Object value = nativeObject.get(key, nativeObject);\n if(!(value instanceof Undefined)) {\n Object json = toJson(value);\n mapJson.put(key, json+\"\");\n if(!(json instanceof String) && json!=null) mapTypeJson.put(key, json.getClass()); \n }\n } \n \n return HAPUtilityJson.buildMapJson(mapJson, mapTypeJson); \n }", "public String toJson()\n\t{\n\t\tJsonStringEncoder encoder = JsonStringEncoder.getInstance();\n\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append('{');\n\n\t\tboolean needComma = true;\n\t\tif (m_Message != null)\n\t\t{\n\t\t\tchar [] message = encoder.quoteAsString(m_Message.toString());\n\t\t\tbuilder.append(\"\\n \\\"message\\\" : \\\"\").append(message).append('\"').append(',');\n\t\t\tneedComma = false;\n\t\t}\n\n\t\tif (m_ErrorCode != null)\n\t\t{\n\t\t\tbuilder.append(\"\\n \\\"errorCode\\\" : \").append(m_ErrorCode.getValueString());\n\t\t\tneedComma = true;\n\t\t}\n\n\t\tif (m_Cause != null)\n\t\t{\n\t\t\tif (needComma)\n\t\t\t{\n\t\t\t\tbuilder.append(',');\n\t\t\t}\n\t\t\tchar [] cause = encoder.quoteAsString(m_Cause.toString());\n\t\t\tbuilder.append(\"\\n \\\"cause\\\" : \\\"\").append(cause).append('\"');\n\t\t}\n\n\t\tbuilder.append(\"\\n}\\n\");\n\n\t\treturn builder.toString();\n\t}", "public JSONObject toJson() {\n }", "public static void writeJSONString(@Nullable Object value, Appendable out) throws IOException {\n if (value == null) {\n out.append(\"null\");\n\n } else if (value instanceof CharSequence) {\n out.append('\\\"');\n escape((CharSequence) value, out);\n out.append('\\\"');\n\n } else if (value instanceof Double) {\n if (((Double) value).isInfinite() || ((Double) value).isNaN()) {\n out.append(\"null\");\n } else {\n out.append(value.toString());\n }\n\n } else if (value instanceof Float) {\n if (((Float) value).isInfinite() || ((Float) value).isNaN()) {\n out.append(\"null\");\n } else {\n out.append(value.toString());\n }\n\n } else if ((value instanceof Number) || (value instanceof Boolean)) {\n out.append(value.toString());\n\n } else if (value instanceof Map<?, ?>) {\n writeJSONString((Map<?, ?>) value, out);\n\n } else if (value instanceof Path) {\n // Path is also an Iterable, but typically desired to be written as a single String.\n writeJSONString(value.toString(), out);\n\n } else if (value instanceof Iterable<?>) {\n writeJSONString((Iterable<?>) value, out);\n\n } else {\n throw new NotSerializableException(\n \"Object of class \" + value.getClass().getName() + \" cannot be written as JSON\");\n }\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "public String toJson() throws JsonProcessingException {\n return JSON.getMapper().writeValueAsString(this);\n }", "void generateJSON(JSONObject object, String name);", "void serialize(Object obj, OutputStream stream) throws IOException;", "@Override\n public String toString() {\n return jsonString;\n }", "@Override\r\n\tpublic String toJsonString() {\n\t\treturn null;\r\n\t}", "public String serialize(Object obj, String contentType) throws PdfFillerAPIException {\n if (contentType.startsWith(\"application/json\")) {\n return this.serialize(obj);\n } else {\n throw new PdfFillerAPIException(400, \"can not serialize object into Content-Type: \" + contentType);\n }\n }", "public String toJson() {\r\n\r\n\treturn new Gson().toJson(this);\r\n }", "String objectWrite();", "public static String jsonPrint(final Object object, final Class clazz) {\n\t\tfinal ObjectMapper objectMapper = new ObjectMapper();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tfinal Object jsonObj = objectMapper.readValue(objectMapper.writeValueAsString(object), clazz);\n\t\t\tjsonStr = objectMapper.writeValueAsString(jsonObj);\n\t\t} catch (final Exception exception) {\n\t\t}\n\t\treturn jsonStr;\n\t}", "public String serialize(Object object, boolean prettyFormat) {\n\t\tlong time = System.currentTimeMillis();\n\t\ttry {\n\t\t\tlogger.debug(\"Serializer Json Instance: \" + this);\n\t\t\tif (prettyFormat) {\n\t\t\t\treturn prettyWriter.writeValueAsString(object);\n\t\t\t}\n\t\t\treturn writer.writeValueAsString(object);\n\t\t} catch (JsonProcessingException ex) {\n\t\t\tlogger.error(\"Error serializing the given object: \", ex);\n\t\t} finally {\n\t\t\tlogger.info(\"Serialize in \" + (System.currentTimeMillis() - time) + \" ms.\");\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public String encode() {\n JsonObject tmp = new JsonObject();\n addIfSet(tmp, \"id\", id);\n addIfSet(tmp, \"courseId\", courseId);\n addIfSet(tmp, \"sheetId\", sheetId);\n addIfSet(tmp, \"maxPoints\", maxPoints);\n addIfSet(tmp, \"type\", type);\n addIfSet(tmp, \"link\", link);\n addIfSet(tmp, \"bonus\", bonus);\n addIfSet(tmp, \"linkName\", linkName);\n addIfSet(tmp, \"submittable\", submittable);\n addIfSet(tmp, \"resultVisibility\", resultVisibility);\n tmp = super.encodeToObject(tmp);\n return tmp.toString();\n }", "@Override\n\tprotected String toJSON()\n\t{\n\t\treturn getJSON(null);\n\t}", "private static String valueToJSONString(Object value) throws Exception \n {\n\t\t JSONObject json = new JSONObject(); \n\t if (value instanceof IdScriptableObject && \n\t ((IdScriptableObject)value).getClassName().equals(\"Date\") == true) \n\t { \n\t // Get the UTC values of the date \n\t Object year = NativeObject.callMethod((IdScriptableObject)value, \"getUTCFullYear\", null); \n\t Object month = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMonth\", null); \n\t Object date = NativeObject.callMethod((IdScriptableObject)value, \"getUTCDate\", null); \n\t Object hours = NativeObject.callMethod((IdScriptableObject)value, \"getUTCHours\", null); \n\t Object minutes = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMinutes\", null); \n\t Object seconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCSeconds\", null); \n\t Object milliSeconds = NativeObject.callMethod((IdScriptableObject)value, \"getUTCMilliseconds\", null); \n\t \n\t // Build the JSON object to represent the UTC date \n\t \n\t json.put(\"zone\",\"UTC\"); \n\t json.put(\"year\",year); \n\t json.put(\"month\",month); \n\t json.put(\"date\",date); \n\t json.put(\"hours\",hours); \n\t json.put(\"minutes\",minutes); \n\t json.put(\"seconds\",seconds); \n\t json.put(\"milliseconds\",milliSeconds); \n\t return json.toString(); \n\t } \n\t else if (value instanceof NativeJavaObject) \n\t { \n\t Object javaValue = Context.jsToJava(value, Object.class); \n\t return javaValue.toString(); \n\t } \n\t else if (value instanceof NativeArray) \n\t { \n\t // Output the native array \n\t return nativeArrayToJSONString((NativeArray)value); \n\t } \n\t else if (value instanceof NativeObject) \n\t { \n\t // Output the native object \n\t return nativeObjectToJSONString((NativeObject)value); \n\t } \n\t else if( value instanceof Function){\n\t \treturn Context.toString(value);\n\t }\n\t else \n\t { \n\t return value.toString(); \n\t } \n }", "public synchronized String getJSONString() {\n\n return getJSONObject().toString();\n }", "public String serialize() {\n Gson gson = new Gson();\n return gson.toJson(this);\n }" ]
[ "0.74418426", "0.7273888", "0.72715527", "0.7246464", "0.723993", "0.7210548", "0.7210548", "0.7210548", "0.7202018", "0.7192811", "0.71485007", "0.7128196", "0.7113706", "0.7079336", "0.7067694", "0.7025614", "0.70143455", "0.7013808", "0.6984024", "0.6940978", "0.69113654", "0.69064564", "0.6882479", "0.6872776", "0.6862059", "0.68495864", "0.6788278", "0.67844194", "0.6782202", "0.67540056", "0.67505836", "0.6745082", "0.67375785", "0.6711123", "0.6702822", "0.66936", "0.6692143", "0.6692019", "0.6670291", "0.66396034", "0.66331565", "0.6625403", "0.6613547", "0.6608952", "0.66081697", "0.65999854", "0.65999854", "0.6595763", "0.6566366", "0.65565044", "0.6545514", "0.6538412", "0.6507336", "0.6487685", "0.6480553", "0.6468982", "0.64574516", "0.64475614", "0.6423372", "0.6421565", "0.63869214", "0.6367171", "0.6357854", "0.6348065", "0.6306733", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.62690246", "0.6250758", "0.6245911", "0.6236484", "0.6223994", "0.6223966", "0.6215399", "0.62068504", "0.6197167", "0.6197165", "0.61948943", "0.61948943", "0.61941916", "0.6171968", "0.61551857", "0.61486804", "0.6141621", "0.610777", "0.60877556", "0.6086064", "0.60842305", "0.6072221", "0.60706097", "0.6063969", "0.60618675", "0.6061412" ]
0.6219921
80
Deserialize the given JSON string to Java object.
public <T> T deserialize(String body, Type returnType) throws PdfFillerAPIException { return mapper.fromJson(body, returnType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> T parseJSON(final String jsonString, Class<T> type) {\r\n\t\tT retObject = null;\r\n\t\ttry {\r\n\t\t\tretObject = PARSER.parse(jsonString, type);\r\n\t\t} catch (ParseException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in de-serializing to object\", ex);\r\n\t\t\tretObject = null;\r\n\t\t}\r\n\t\treturn retObject;\r\n\t}", "public native Object parse( Object json );", "<T> T fromJson(String json, Class<T> type);", "<T> T fromJson(String source, JavaType type);", "public static <T> T json2pojo(String jsonStr, Class<T> clazz)\n throws Exception {\n return objectMapper.readValue(jsonStr, clazz);\n }", "T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;", "public @Nullable <T> T fromJson(@Nullable String jsonString, @NonNull Class<T> clazz) {\n return gson.fromJson(jsonString, clazz);\n }", "public void fromJSON(String json) throws JSONException;", "<T> T fromJson(String source, Class<T> type);", "public void deserialize(JsonObject src);", "public static <T> T fromJson(final String jsonString, final Class<T> clazz) {\n\t\treturn gson.fromJson(jsonString, clazz);\n\t}", "public static JinyouTestOne fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, JinyouTestOne.class);\n }", "public <T> T fromJson(String json, Class<T> clazz) {\n return getGson().fromJson(json, clazz);\n }", "static <T extends JSONSerializable> T deserialize(String json, Class<T> type) throws Exception {\n T result = type.newInstance();\n result.jsonDeserialize(json);\n return result;\n }", "public static <T> T fromJSON(final String json, final Class<T> clazz) {\n return gson.fromJson(json, clazz);\n }", "<T> T parseToObject(Object json, Class<T> classObject);", "public static SofortInfo fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, SofortInfo.class);\n }", "public static ArticleInfo fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, ArticleInfo.class);\n }", "public static <T> T fromJson(String json, Class<T> type)\n {\n return g.fromJson(json, type);\n }", "<T> T toJsonPOJO(String jsonString, Class<T> classType);", "protected <T> Object fromJson(String jsonString, Class<T> classInstance) {\n\n\t\tSystem.out.println(\"jsonString = \" + jsonString);\n\t\treturn gson.fromJson(jsonString, classInstance);\n\n\t}", "public <T> T fromJson(String json, Type type) {\n return getGson().fromJson(json, type);\n }", "public <T> T deserialize(String jsonString, Class<T> valueType) {\n\t\tlong time = System.currentTimeMillis();\n\t\ttry {\n\t\t\tlogger.debug(\"Deserializer Json Instance: \" + this);\n\t\t\treturn mapper.readValue(jsonString, valueType);\n\t\t} catch (IOException ex) {\n\t\t\tlogger.error(\"Error deserializing the given json: \", ex);\n\t\t} finally {\n\t\t\tlogger.info(\"Deserialize in \" + (System.currentTimeMillis() - time) + \" ms.\");\n\t\t}\n\t\treturn null;\n\t}", "T fromJson(Object source);", "public static <T> T string2Object(String source, Class<T> type){\n\t\treturn JSON.parseObject(source, type);\n\t}", "public static <T> T convertJsonStringToObject(String json,\n\t\t\tClass<T> valueType) {\n\t\ttry {\n\t\t\treturn mapper.readValue(json, valueType);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Error converting Json String [\" + json\n\t\t\t\t\t+ \"] to [\" + valueType.getCanonicalName() + \"]\", e);\n\t\t}\n\t}", "public static final <V> V toObject(String json, Type type) {\n return gson.fromJson(json, type);\n }", "public static <T> T mapJsonToObject(String json, Class<T> classType) {\n\t\tT obj = null;\n\t\tif (StringUtils.isBlank(json)) {\n\t\t\treturn null;\n\t\t}\n\t\ttry {\n\t\t\tobj = jsonMapper.readValue(json, classType);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"error mapJsonToObject: \" + e.getMessage());\n\t\t}\n\t\treturn obj;\n\t}", "public static RoyaltyEntity fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, RoyaltyEntity.class);\n }", "public Object parseJsonToObject(String response, Class<?> modelClass) {\n\n try {\n return gson.fromJson(response, modelClass);\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public static TestWebhookRequest fromJson(String jsonString) throws JsonProcessingException {\n return JSON.getMapper().readValue(jsonString, TestWebhookRequest.class);\n }", "public static Kaizen fromJson(String jsonString) {\n return new Gson().fromJson(jsonString, Kaizen.class);\n }", "public static JSONObject parseJSON(String jsonString) throws JSONException\n {\n return new JSONObject(jsonString);\n }", "Map<String, Object> parseToMap(String json);", "public <V> V readValue(String jsonString, Type valueType) throws JsonException {\n try (StringReader reader = new StringReader(jsonString)) {\n return readValue(reader, valueType);\n }\n }", "public static JsonElement stringToJSON2(String json) {\n try {\n JsonElement parser = new JsonPrimitive(json);\n System.out.println(parser.getAsString());\n //JsonObject Jso = new JsonObject();\n //Jso = (JsonObject) parser.p(json);\n return parser;\n } catch (Exception e) {\n return new JsonObject();\n }\n }", "public abstract Object deserialize(Object object);", "@Override\r\n public Object fromBinaryJava(byte[] bytes, Class<?> clazz) {\r\n return JSON.parseObject(bytes, clazz);\r\n }", "public static JsonObject stringToJSON(String json) {\n try {\n JsonParser parser = new JsonParser();\n JsonObject Jso = parser.parse(json).getAsJsonObject();\n return Jso;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return new JsonObject();\n }\n }", "@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }", "public abstract void fromJson(JSONObject jsonObject);", "public static Object decode(String content) {\n JsonElement obj = new JsonParser().parse(String.join(\"\", content));\n if (obj.isJsonNull()) {\n return null;\n }\n JsonObject newObj = obj.getAsJsonObject();\n return new exercise(newObj);\n }", "protected <T> T deserialize(final String value, final Class<T> type) throws JsonDeserializationException {\n return json.deserialize(value, type);\n }", "GistUser deserializeUserFromJson(String json);", "private <T> T getObjectFromJsonObject(JSONObject j, Class<T> clazz) throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n T t = null;\n t = mapper.readValue(j.toString(), clazz);\n\n return t;\n }", "private FieldDocument _fromJson (String json) {\n try {\n FieldDocument fd = this.mapper.readValue(json, FieldDocument.class);\n return fd;\n }\n catch (IOException e) {\n log.error(\"File json not found or unmappable: {}\",\n e.getLocalizedMessage());\n };\n return (FieldDocument) null;\n }", "public Object stringToObject(String s, Class c){\n Gson gson = new Gson();\n Object o = gson.fromJson(s, c);\n return o;\n }", "public static Example stringToJSON(String s){\n Gson gson = new Gson();\n JsonReader reader = new JsonReader(new StringReader(s));\n reader.setLenient(true);\n\n Example ex = gson.fromJson(reader, Example.class);\n\n return ex;\n }", "public interface JsonParser {\n\n /**\n * convert string to POJO\n *\n * @param jsonString - string to convert to POJO\n * @param classType - POJO Type / Class Type to use for the deserialization\n * @param <T> the returned desirialized POJO\n * @return desiarilized POJO\n */\n <T> T toJsonPOJO(String jsonString, Class<T> classType);\n\n /**\n * convert from POJO to json string\n * @param data POJO to convert to json String\n * @return json string\n */\n String toJSONString(Object data);\n}", "public Metadata(String _JSONString) {\n mJSONObject = new JSONObject();\n mJSONObject = (JSONObject) JSONValue.parse(_JSONString);\n\n // TODO: Maybe raise a 'malformed json string exception'\n if (mJSONObject == null) {\n \tLOGGER.info(\"Invalid JSON String received. new object was created, but its NULL.\");\n }\n }", "private <T> T convert(String json, Type resultObject) {\n\t\tGson gson = new GsonBuilder().create();\n\t\treturn gson.fromJson(json, resultObject);\n\t}", "public static <T> T loadJson(String content, Class<T> valueType){\n return (T)JsonMapper.fromJsonString(content, valueType);\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "GistComment deserializeCommentFromJson(String json);", "public static <T> T pasarAObjeto(String json, Class<T> tipo) {\r\n try {\r\n ObjectMapper mapper = getBuilder().build();\r\n return mapper.readValue(json, tipo);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n return null;\r\n }", "@Override\n public void parse(String json) {\n JSONObject object = new JSONObject(json);\n id = object.getInt(\"dataset id\");\n name = object.getString(\"dataset name\");\n maxNumOfLabels = object.getInt(\"maximum number of labels per instance\");\n\n JSONArray labelsJSON = object.getJSONArray(\"class labels\");\n labels = new ArrayList<>();\n for (int i = 0; i < labelsJSON.length(); i++) {\n labels.add(new Label(labelsJSON.getJSONObject(i).toString()));\n }\n\n JSONArray instancesJSON = object.getJSONArray(\"instances\");\n instances = new ArrayList<>();\n for (int i = 0; i < instancesJSON.length(); i++) {\n instances.add(new Instance(instancesJSON.getJSONObject(i).toString()));\n }\n }", "@Test\n public void readSystemObjectClassAppointment() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Appointment\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Appointment properly\", object.getClass(), actual.getClass());\n }", "Gist deserializeGistFromJson(String json);", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\treturn (T) Helper.createItemFromJSON(json);\n\t\t} else if(json.has(\"triple_pattern\")) {\n\t\t\treturn (T) Helper.createTriplePatternFromJSON(json);\n\t\t} else if(json.has(\"histogram\")) {\n\t\t\treturn (T) Helper.createVarBucketFromJSON(json);\n\t\t} else {\n\t\t\tSystem.err.println(\"lupos.distributed.operator.format.Helper.createObjectFromJSON(...): Unknown type stored in JSON object, returning null!\");\n\t\t\treturn null;\n\t\t}\n\t}", "public void loadJson(String json) throws Exception {\r\n\t\tsetJsonToken(SimpleJson.textToHashMap(json));\r\n\t}", "public static Anuncio fromJson(String json) throws JsonParseException{\n Gson gson = new Gson();\n return gson.fromJson(json, Anuncio.class);\n }", "public <ENTITY extends IDomainResource> ENTITY parse(final String jsonString, final Class<ENTITY> targetClass)\n throws WebApplicationException\n {\n ENTITY entity = parseWithoutValidation(jsonString, targetClass);\n validate(entity);\n\n return entity;\n }", "@Test\n public void readSystemObjectClassDoctorFeedback() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"DoctorFeedback\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return DoctorFeedback properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void readSystemObjectClassAccDelRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AccountDeletionRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AccountDeletionRequest properly\", object.getClass(), actual.getClass());\n }", "public static <T> T getJSONObject(final String json, final Class<T> typeReference)\n\t{\n\t\tT obj = null;\n\t\ttry\n\t\t{\n\t\t\tobj = new ObjectMapper().readValue(json, typeReference);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting string into object. Exception message: \", exception);\n\t\t}\n\t\treturn obj;\n\t}", "public static JSONObject parseStringToJSon(String jsonData) throws JSONException {\n final String trimmed = jsonData.trim ();\n final JSONTokener tokener = new JSONTokener (trimmed);\n JSONObject jsonObject = new JSONObject (tokener);\n return jsonObject;\n }", "boolean deserialize(String inputString);", "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "public static JSONObject strToJson(String jsonstring) {\n JSONParser parser = new JSONParser();\n JSONObject json = null;\n try {\n json = (JSONObject) parser.parse(jsonstring);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return json;\n }", "public <T> T deserialize(String jsonString, TypeReference<T> valueTypeRef) {\n\t\tlong time = System.currentTimeMillis();\n\t\ttry {\n\t\t\tlogger.debug(\"Deserializer Json Instance: \" + this);\n\t\t\treturn mapper.readValue(jsonString, valueTypeRef);\n\t\t} catch (IOException ex) {\n\t\t\tlogger.error(\"Error deserializing the given json: \", ex);\n\t\t} finally {\n\t\t\tlogger.info(\"Deserialize in \" + (System.currentTimeMillis() - time) + \" ms.\");\n\t\t}\n\t\treturn null;\n\t}", "public interface JSONDeserializer<T> {\n\t\n\t/**\n\t * Deserialize a json string\n\t * @param json object to deserialize\n\t * @return JSON representation as {@link JsonObject}\n\t */\n\tJsonObject deserialise(String json);\n\t\n\t/**\n\t * Unmarshall 'meta' section of the response\n\t * @param meta section represented as {@link JsonObject}\n\t * @return object of generic type T\n\t */\n\tT unmarshallMeta(JsonObject meta);\n\t\n\t/**\n\t * Unmarshall 'response' section of the response\n\t * @param response section represented as {@link JsonObject}\n\t * @return list of objects of generic type T\n\t */\n\tCollection<T> unmarshallResponse(JsonObject response);\n\n}", "public native Object parse( Object json, String texturePath );", "public static BankAccount fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, BankAccount.class);\n }", "public static Schema fromJSON(String json) throws IOException {\n return BackwardCompatibleSchemaDe.fromJSON(json);\n }", "public abstract T deserialize(String serial);", "@Test\n public void readUserClassPatient() throws UnsupportedEncodingException, IOException {\n testJson = gson.toJson(Factory.createUser(\"Patient\"));\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n IUser actual = DataHandler.readUserClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Patient properly\", Factory.createUser(\"Patient\").getClass(), actual.getClass());\n }", "public static VoucherPackageSalesInfo fromJson(String jsonString) throws IOException {\n return JSON.getGson().fromJson(jsonString, VoucherPackageSalesInfo.class);\n }", "public static void parseMessage(String jsonString) {\n\t\n\t\tJSONRPC2Message msg;\n\t\t\n\t\ttry {\n\t\t\tmsg = JSONRPC2Message.parse(jsonString);\n\t\t\t\n\t\t} catch (JSONRPC2ParseException e) {\n\t\t\tSystem.err.println(e);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (msg instanceof JSONRPC2Request) {\n\t\t\tSystem.out.println(\"The message is a Request\");\n\t\t}\n\t\telse if (msg instanceof JSONRPC2Notification) {\n\t\t\tSystem.out.println(\"The message is a Notification\");\n\t\t}\n\t\telse if (msg instanceof JSONRPC2Response) {\n\t\t\tSystem.out.println(\"The message is a Response\");\n\t\t}\n\t}", "public static <T> T loadJson(String input, Class<T> classOfT) {\n Gson gson = new GsonBuilder().create();\n return gson.fromJson(input, classOfT);\n }", "public static Object deserialize(String s){\n\t\tObject m = null;\n\t\ttry\n\t\t{\n\t\t\tFileInputStream fileIn = new FileInputStream(s + \".ser\");\n\t\t\tObjectInputStream in = new ObjectInputStream(fileIn);\n\t\t\tm = in.readObject();\n\t\t\tin.close();\n\t\t\tfileIn.close();\n\t\t}catch(IOException i)\n\t\t{\n\t\t\ti.printStackTrace();\n\n\t\t}catch(ClassNotFoundException c)\n\t\t{\n\t\t\tSystem.out.println(\"Map class not found\");\n\t\t\tc.printStackTrace();\n\n\t\t}\n\t\treturn m;\n\t}", "public static ResponseWrapper fromJson(String json)\n\t{ \n\t\tResponseWrapper response = new ResponseWrapper();\n\t\tresponse.fromJsonCore(json, \"response\", (type) -> type.getResponseContentType()); \n\t\treturn response;\n\t}", "public static <T> T getObject(final String json, final TypeReference<T> typeReference)\n\t{\n\t\tT obj = null;\n\t\ttry\n\t\t{\n\t\t\tobj = new ObjectMapper().readValue(json, typeReference);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting string into object. Exception message: \", exception);\n\t\t}\n\t\treturn obj;\n\t}", "@Test\n public void readSystemObjectClassMedicineOrderRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"MedicineOrderRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return MedicineOrderRequest properly\", object.getClass(), actual.getClass());\n }", "public static JsonObject convertStringToJsonObject(final String str) {\n return JsonParser.parseString(str).getAsJsonObject();\n }", "public static <T> T jsonToBean(String json, Class<T> clazz, boolean isSnakeCase) {\n ObjectMapper mapper = new ObjectMapper();\n // mapper的configure方法可以设置多种配置(例如:多字段 少字段的处理)\n //mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n\n if (isSnakeCase) {\n mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);\n }\n\n try {\n return mapper.readValue(json, clazz);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}", "T deserialize(InputStream stream) throws IOException;", "public FilterItems jsonToObject(String json){\n json = json.replace(\"body=\",\"{ \\\"body\\\" : \");\n json = json.replace(\"&oil=\",\", \\\"oil\\\" : \");\n json = json.replace(\"&transmission=\",\", \\\"transmission\\\" :\");\n json = json + \"}\";\n json = json.replace(\"[]\",\"null\");\n ObjectMapper mapper = new ObjectMapper();\n FilterItems itemSearch = null;\n try {\n itemSearch = mapper.readValue(json, FilterItems.class);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return itemSearch;\n }", "public static Object parse(String s) throws ParseException {\n try {\n return parse(new StringReader(s));\n } catch (IOException e) {\n // We cannot get an IOException when reading from String.\n throw new AssertionError(e);\n }\n }", "private static Object m7292a(String str) throws JSONException {\n Object obj = null;\n String trim = str.trim();\n if (trim.startsWith(\"{\") || trim.startsWith(\"[\")) {\n obj = new JSONTokener(trim).nextValue();\n }\n return obj == null ? trim : obj;\n }", "public @NotNull T read(@NotNull final JsonObject object) throws JsonException;", "@Test\n public void readSystemObjectClassPrescription() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Prescription\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Prescription properly\", object.getClass(), actual.getClass());\n }", "@Test\n public void serializeDeserializeTest() throws IOException\n {\n StringWriter stringWriter = new StringWriter();\n objectMapper.writeValue(stringWriter, student);\n\n String json = stringWriter.toString();\n log.info(json);\n\n // Deserialize JSON to Java object\n Student s = objectMapper.readValue(json, Student.class);\n\n assertThat(s.equals(student)).isTrue(); // can do this b/c of @EqualsAndHashCode in Student.\n\n // Alternatively, using StringReader\n s = objectMapper.readValue(new StringReader(json), Student.class);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T extends Serializable> T deserializeObject(final byte[] str) {\n\t\tfinal ObjectInputStream in;\n\t\tfinal ByteArrayInputStream inputStream = new ByteArrayInputStream(str);\n\t\tfinal T ret;\n\n\t\ttry {\n\t\t\tin = new ObjectInputStream(inputStream);\n\n\t\t\tret = (T) in.readObject();\n\t\t} catch (final Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\n\t\treturn ret;\n\t}", "public static Message parse(JSONObject json) throws JSONException {\n\t\tString text = json.getString(\"text\");\n\t\tDate createdDate = null;\n\t\tif(json.has(\"created_at\")) createdDate = DateParser.parse(json.getString(\"created_at\"));\n\t\tPerson person = Person.parse(json.getJSONObject(\"person\"));\n\t\tString url = null;\n\t\tif(json.has(\"url\")) url = json.getString(\"url\");\n\t\treturn new Message(text, person, createdDate, url);\n\t}", "static <T extends SyntheticOptions> T optionsFromString(String json, Class<T> type)\n throws IOException {\n ObjectMapper mapper = new ObjectMapper();\n T result = mapper.readValue(json, type);\n result.validate();\n return result;\n }", "public static <T> T toBean(String json, Class<T> clazz) {\n if (!StringUtils.isEmpty(json)) {\n ObjectMapper mapper = getObjectMapper();\n try {\n return mapper.readValue(json, clazz);\n } catch (Exception e) {\n logger.error(\"JSONString : \" + json, e);\n }\n }\n return null;\n }", "@Test\n public void readSystemObjectClassMedicine() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"Medicine\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return Medicine properly\", object.getClass(), actual.getClass());\n }", "public static <T> Map<String, Object> json2map(String jsonStr)\n throws Exception {\n return objectMapper.readValue(jsonStr, Map.class);\n }", "public static JSONObject saveStringToJSONObject(final String json) {\n JSONObject jsonObject = null;\n try {\n jsonObject = new JSONObject(json);\n } catch (final JSONException e) {\n Log.e(TAG, \"\" + e.getMessage());\n }\n return jsonObject;\n }", "public @Nullable <T> T fromJson(@NonNull Reader reader, @NonNull Class<T> clazz) {\n return gson.fromJson(reader, clazz);\n }" ]
[ "0.7234892", "0.7143029", "0.7032451", "0.6937447", "0.68182313", "0.67717105", "0.67384917", "0.6713766", "0.6697324", "0.6688793", "0.66886866", "0.6648571", "0.66052747", "0.65793276", "0.6578199", "0.6562504", "0.654125", "0.6503381", "0.6486463", "0.6465495", "0.6457636", "0.64503247", "0.6415798", "0.63800186", "0.6344149", "0.6340879", "0.63328445", "0.6312", "0.6288885", "0.62815166", "0.62167734", "0.6211556", "0.6204343", "0.61839414", "0.6110853", "0.61062646", "0.6098106", "0.60819525", "0.60767835", "0.6076089", "0.60372084", "0.5979735", "0.5944917", "0.59231395", "0.5910491", "0.5886078", "0.58747166", "0.5873506", "0.58725464", "0.58621085", "0.58373594", "0.5800003", "0.579467", "0.5791542", "0.57907224", "0.5787996", "0.578614", "0.5773086", "0.57607406", "0.57580173", "0.5751153", "0.5733608", "0.5697229", "0.5696065", "0.56879646", "0.5680009", "0.5676365", "0.5675842", "0.56742346", "0.56704015", "0.566981", "0.56672335", "0.56556743", "0.5653014", "0.5652563", "0.564903", "0.56432164", "0.5625393", "0.5616332", "0.56130433", "0.5608357", "0.5604449", "0.558635", "0.5573408", "0.5564788", "0.55606246", "0.55582434", "0.55574214", "0.554565", "0.5543972", "0.5537058", "0.5530026", "0.55172956", "0.5515296", "0.5514651", "0.549621", "0.54863834", "0.5483226", "0.54823434", "0.5479747", "0.5476718" ]
0.0
-1
Serialize the given Java object into string according the given ContentType (only JSON is supported for now).
public String serialize(Object obj, String contentType) throws PdfFillerAPIException { if (contentType.startsWith("application/json")) { return this.serialize(obj); } else { throw new PdfFillerAPIException(400, "can not serialize object into Content-Type: " + contentType); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <T> String object2String(T obj){\n\t\treturn JSON.toJSONString(obj);\n\t}", "public String serialize(Object object) {\n\t\treturn serialize(object, false);\n\t}", "String toJSONString(Object data);", "static <T extends JSONSerializable> String serialize(T serializable) throws Exception { return serializable.jsonSerialize(); }", "public String serialize() {\n switch (type) {\n case LIST:\n return serializeList();\n\n case OBJECT:\n return serializeMap();\n\n case UNKNOWN:\n return serializeUnknown();\n }\n return \"\";\n }", "String encode(Object obj);", "public String serialize(final Object object)\n {\n StringBuffer buffer;\n\n buffer = new StringBuffer();\n serializeObject(object, buffer);\n return buffer.toString();\n }", "public <T> void serialize(T obj, Class<T> type, OutputStream os) throws SerializationException;", "@Override\n public final void writeTo(final Object object, final Class<?> type,\n final Type genericType, final Annotation[] annotations,\n final MediaType mediaType,\n final MultivaluedMap<String, Object> httpHeaders,\n final OutputStream entityStream) throws IOException {\n OutputStreamWriter writer = new OutputStreamWriter(entityStream,\n \"UTF-8\");\n try {\n Type jsonType;\n if (type.equals(genericType)) {\n jsonType = type;\n } else {\n jsonType = genericType;\n }\n getGson().toJson(object, jsonType, writer);\n } finally {\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (IOException e) {\n // ignore, nothing to be done here anyway\n }\n }\n }", "@Override\n\tpublic String encode(Message object) throws EncodeException {\n\t\treturn new Gson().toJson(object);\n\t}", "public abstract String toJsonString();", "String serialize();", "Object encodeObject(Object value);", "@Override\n public JsonElement serialize(Object src, Type typeOfSrc,\n JsonSerializationContext context) {\n\n JsonObject res = new JsonObject();\n String type = src.getClass().getCanonicalName();\n res.addProperty(FIELD_NAME__TYPE, type);\n JsonElement elem = context.serialize(src); \n res.add(FIELD_NAME__CONTENT, elem);\n return res;\n }", "String toJSON();", "private static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public <T> String SerializeJson(T obj, String pathToRoot) {\n this.lastPath = pathToRoot + obj.getClass().getSimpleName().toLowerCase() + \"_object-\" + Math.abs(new Random().nextLong()) + \".json\";\n File file = new File(this.lastPath);\n ObjectMapper mapper = new ObjectMapper();\n\n mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);\n mapper.registerModule(new JavaTimeModule());\n mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n\n try {\n file.createNewFile();\n mapper.writeValue(file, obj);\n System.out.println(mapper.writerWithDefaultPrettyPrinter().writeValueAsString(obj));\n return mapper.writeValueAsString(obj);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "ByteString encode(T object) throws Exception;", "public <T extends ObjectBase> String serializeObject(final String pFormat,\r\n final T pObject) {\r\n if (pFormat == null || pObject == null) {\r\n throw new IllegalArgumentException(\"Format or Object is an empty\");\r\n }\r\n final ObjectBaseSerializer objectBaseSerializer = mSerializers.get(pFormat);\r\n if (objectBaseSerializer == null) {\r\n throw ServiceException.aNew(pFormat, \"No such format available\");\r\n }\r\n return objectBaseSerializer.serializeObject(pObject);\r\n }", "public String writeAsJson(final Object object) {\n String jsonRepresentation = null;\n try {\n if (object != null) {\n jsonRepresentation = jsonMapper.writeValueAsString(object);\n }\n } catch (final JsonProcessingException e) {\n // LOGGER.error(\"Failed writing object as json\", e);\n }\n\n if (applyMasking) {\n jsonRepresentation = jsonMaskingUtil.mask(jsonRepresentation);\n }\n return jsonRepresentation;\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public void serialize(OutputStream stream, BaseType o) throws IOException {\n Class c = o.getClass();\n val si = this.serializersByType.get(c);\n ensureCondition(si != null, \"No serializer found for %s.\", c.getName());\n si.serializer.beforeSerialization(o);\n\n // Encode the Serialization Format Version.\n stream.write(SERIALIZER_VERSION);\n\n // Encode the Object type; this will be used upon deserialization.\n stream.write(si.id);\n\n // Write contents.\n si.serializer.serializeContents(stream, o);\n }", "private String stringify(Object object) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(object);\n }", "public abstract void serialize(OutputStream stream, T object) throws IOException;", "public String toJsonfrmObject(Object object) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n mapper.setDateFormat(simpleDateFormat);\n return mapper.writeValueAsString(object);\n } catch (IOException e) {\n logger.error(\"Invalid JSON!\", e);\n }\n return \"\";\n }", "void serialize(Object obj, OutputStream stream) throws IOException;", "private static String asJsonString(final Object obj) {\n try {\n ObjectMapper objectToJsonMapper = new ObjectMapper();\n objectToJsonMapper.registerModule(new JavaTimeModule());\n objectToJsonMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);\n return objectToJsonMapper.writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "@Override\n\tpublic String putObjectCore(Object object) {\n\t\treturn JSON.encode(object);\n\t}", "private static String asJsonWithType(AntMessage msg, Action action) {\n\t\tmsg.setType(action.toString());\n\t\tString json = GSON.toJson(msg, AntMessage.class);\n\t\treturn json;\n\t}", "public interface Serializer {\r\n /**\r\n * Gets the value which indicates the encoding mechanism used.\r\n */\r\n String getContentEncoding();\r\n\r\n /**\r\n * Gets the MIME-type suffix\r\n */\r\n String getContentFormat();\r\n\r\n /**\r\n * Serializes the object graph provided and writes a serialized\r\n * representation to the output stream provided.\r\n */\r\n void serialize(OutputStream output, Object graph);\r\n\r\n /**\r\n * Deserializes the stream provided and reconstructs the corresponding\r\n * object graph.\r\n */\r\n Object deserialize(InputStream input, Class type, String format,\r\n String contentEncoding);\r\n}", "public static String toString(final Object object, final String tagName) throws JSONException {\n StringBuilder sb = new StringBuilder();\n JSONArray ja;\n JSONObject jo;\n String string;\n\n if (object instanceof JSONObject) {\n\n // Prepend with tagName.\n if (tagName != null) {\n sb.append('<');\n sb.append(tagName);\n sb.append('>');\n }\n\n // Loop through the keys.\n jo = (JSONObject) object;\n for (final String key : jo.keySet()) {\n // Sanitize the key using restricted version of the XML spec.\n final String sanitizedKey = key.replaceFirst(invalidFirstCharacterRegex, \"\").replaceAll(invalidCharacterRegex, \"\");\n\n // Get the value; convert if not JSONObject.\n Object value = jo.get(key);\n if (value == null) {\n value = \"\";\n } else if (value.getClass().isArray()) {\n value = new JSONArray(value);\n }\n\n // Emit content in body.\n if (\"content\".equals(key)) {\n if (value instanceof JSONArray) {\n ja = (JSONArray) value;\n int i = 0;\n for (Object val : ja) {\n if (i > 0) {\n sb.append('\\n');\n }\n sb.append(escape(val.toString()));\n i++;\n }\n } else {\n sb.append(escape(value.toString()));\n }\n\n // Emit an array of similar keys.\n } else if (value instanceof JSONArray) {\n ja = (JSONArray) value;\n for (Object val : ja) {\n if (val instanceof JSONArray) {\n sb.append('<');\n sb.append(sanitizedKey);\n sb.append('>');\n sb.append(toString(val));\n sb.append(\"</\");\n sb.append(sanitizedKey);\n sb.append('>');\n } else {\n sb.append(toString(val, sanitizedKey));\n }\n }\n // Give us a />'d version of the tag if the value is empty.\n } else if (\"\".equals(value)) {\n sb.append('<');\n sb.append(sanitizedKey);\n sb.append(\"/>\");\n\n // Emit a new tag using the sanitized key.\n } else {\n sb.append(toString(value, sanitizedKey));\n }\n }\n\n // Close the tag if we must.\n if (tagName != null) {\n sb.append(\"</\");\n sb.append(tagName);\n sb.append('>');\n }\n\n // Return the XML string we've built.\n return sb.toString();\n }\n\n // If this is a JSONArray, create an array of elements.\n if (object != null && (object instanceof JSONArray || object.getClass().isArray())) {\n if (object.getClass().isArray()) {\n ja = new JSONArray(object);\n } else {\n ja = (JSONArray) object;\n }\n for (Object val : ja) {\n // XML does not have good support for arrays. If an array\n // appears in a place where XML is lacking, synthesize an\n // <array> element.\n sb.append(toString(val, tagName == null ? \"array\" : tagName));\n }\n // Return the XML string we've built.\n return sb.toString();\n }\n\n // If this is just a string, we've hit the bottom of the iterator and can\n // just write an element.\n string = (object == null) ? \"null\" : escape(object.toString());\n return (tagName == null) ? \"\\\"\" + string + \"\\\"\"\n : (string.length() == 0) ? \"<\" + tagName + \"/>\" : \"<\" + tagName\n + \">\" + string + \"</\" + tagName + \">\";\n }", "public abstract String serialise();", "public interface Serialize {\n\n String serialize(Object obj);\n\n <T> T deSerialize(String content, Class<T> t);\n\n}", "public abstract <T> SerializationStream writeObject(T t);", "public DocumentLifecycleWorkflowRequest setContentTypeJson() {\n\t\tthis.headerContentType = HttpRequestConnector.HTTP_CONTENT_TYPE_JSON;\n\t\treturn this;\n\t}", "public static String ConvertToJsonString(final Object obj) {\n\t\ttry {\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tfinal String jsonContent = mapper.writeValueAsString(obj);\n\t\t\treturn jsonContent;\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public abstract String toJson();", "String objectWrite();", "public static String toJSON(final Object object) {\r\n\t\tString jsonString = null;\r\n\t\ttry\t{\r\n\t\t\tif (object != null)\t{\r\n\t\t\t\tjsonString = SERIALIZER.serialize(object);\r\n\t\t\t}\r\n\t\t} catch (SerializeException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in serializing to json\",\r\n\t\t\t\t\tex);\r\n\t\t\tjsonString = null;\r\n\r\n\t\t}\r\n\t\treturn jsonString;\r\n\t}", "public String serialize(Object obj) throws PdfFillerAPIException {\n try {\n if (obj != null)\n return mapper.toJson(obj);\n else\n return null;\n } catch (Exception e) {\n throw new PdfFillerAPIException(400, e.getMessage());\n }\n }", "public static void writeJSONString(@Nullable Object value, Appendable out) throws IOException {\n if (value == null) {\n out.append(\"null\");\n\n } else if (value instanceof CharSequence) {\n out.append('\\\"');\n escape((CharSequence) value, out);\n out.append('\\\"');\n\n } else if (value instanceof Double) {\n if (((Double) value).isInfinite() || ((Double) value).isNaN()) {\n out.append(\"null\");\n } else {\n out.append(value.toString());\n }\n\n } else if (value instanceof Float) {\n if (((Float) value).isInfinite() || ((Float) value).isNaN()) {\n out.append(\"null\");\n } else {\n out.append(value.toString());\n }\n\n } else if ((value instanceof Number) || (value instanceof Boolean)) {\n out.append(value.toString());\n\n } else if (value instanceof Map<?, ?>) {\n writeJSONString((Map<?, ?>) value, out);\n\n } else if (value instanceof Path) {\n // Path is also an Iterable, but typically desired to be written as a single String.\n writeJSONString(value.toString(), out);\n\n } else if (value instanceof Iterable<?>) {\n writeJSONString((Iterable<?>) value, out);\n\n } else {\n throw new NotSerializableException(\n \"Object of class \" + value.getClass().getName() + \" cannot be written as JSON\");\n }\n }", "public static <T> String serizalize(T entity) {\n\t\t\n\t\tif (entity != null) {\n\t\t\tGson gson = new GsonBuilder()\n\t\t\t\t\t// .setPrettyPrinting() // uncomment this line to turn on debugging\n\t\t\t\t\t.registerTypeAdapterFactory(new EnumAdapterFactory())\n\t\t\t\t\t.registerTypeAdapter(Date.class, new JSONDateTypeAdapter())\n\t\t\t\t\t.create();\n\n\t\t\treturn gson.toJson(entity);\n\t\t}\n\n\t\treturn null;\n\t}", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper()\n .registerModule(new JavaTimeModule())\n .configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)\n .writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String getSerializedJsonStringFromBody(Object dto) {\n return new Gson().toJson(dto);\n }", "public static String getJsonString(Object object) throws Exception {\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\t\tmapper.setSerializationInclusion(Include.NON_NULL);\r\n\t\treturn mapper.writeValueAsString(object);\t\r\n\t}", "public static native String serializeToString(JavaScriptObject node) /*-{\n\t\treturn Titanium.XML.serializeToString(node);\n\t}-*/;", "public String serializeJSON () {\n ObjectMapper mapper = new ObjectMapper();\n String jsonString = null;\n \n try {\n jsonString = mapper.writeValueAsString(this);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n return jsonString;\n }", "private <T> T formatObject(String objectName, JSONObject object, Class objectClass){\n Gson gson = new Gson();\n String stringObject = object.getJSONObject(objectName).toString();\n T formattedObject = (T) gson.fromJson(stringObject,objectClass);\n return formattedObject;\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public void setContentType(java.lang.Object contentType) {\r\n this.contentType = contentType;\r\n }", "public static String jsonPrint(final Object object, final Class clazz) {\n\t\tfinal ObjectMapper objectMapper = new ObjectMapper();\n\t\tString jsonStr = \"\";\n\t\ttry {\n\t\t\tfinal Object jsonObj = objectMapper.readValue(objectMapper.writeValueAsString(object), clazz);\n\t\t\tjsonStr = objectMapper.writeValueAsString(jsonObj);\n\t\t} catch (final Exception exception) {\n\t\t}\n\t\treturn jsonStr;\n\t}", "public abstract Object toJson();", "@Override\n public String encode() {\n JsonObject tmp = new JsonObject();\n addIfSet(tmp, \"id\", id);\n addIfSet(tmp, \"courseId\", courseId);\n addIfSet(tmp, \"sheetId\", sheetId);\n addIfSet(tmp, \"maxPoints\", maxPoints);\n addIfSet(tmp, \"type\", type);\n addIfSet(tmp, \"link\", link);\n addIfSet(tmp, \"bonus\", bonus);\n addIfSet(tmp, \"linkName\", linkName);\n addIfSet(tmp, \"submittable\", submittable);\n addIfSet(tmp, \"resultVisibility\", resultVisibility);\n tmp = super.encodeToObject(tmp);\n return tmp.toString();\n }", "public void writeObject(OutputStream stream, Object object, int format) throws IOException;", "public static String asJsonString(final Object obj) {\n try {\n return new ObjectMapper().writeValueAsString(obj);\n } catch (JsonProcessingException e) {\n throw new RuntimeException(e);\n }\n }", "public static String getString(Object object){\n return JSON.toJSONString(object);\n }", "public static String convertObjToString(Object clsObj) {\n String jsonSender = new Gson().toJson(clsObj, new TypeToken<Object>() {\n }.getType());\n return jsonSender;\n }", "public static String getJsonString(Object o) {\n\n\t\ttry {\n\t\t\tObjectMapper om = new ObjectMapper();\n\t\t\treturn om.writeValueAsString(o);\n\t\t} catch (JsonProcessingException e) {\n\t\t\treturn \"\";\n\t\t}\n\t}", "private static String jsonToString(final Object obj) throws JsonProcessingException {\n String result;\n try {\n final ObjectMapper mapper = new ObjectMapper();\n final String jsonContent = mapper.writeValueAsString(obj);\n result = jsonContent;\n } catch (JsonProcessingException e) {\n result = \"Json processing error\";\n }\n return result;\n }", "public static String ToJsonString(AsonValue obj,boolean format) {\n return new JsonSerializer().serialize(obj,format);\n }", "public Object encode(Object obj) throws EncoderException {\n/* 316 */ if (obj == null)\n/* 317 */ return null; \n/* 318 */ if (obj instanceof byte[])\n/* 319 */ return encode((byte[])obj); \n/* 320 */ if (obj instanceof String) {\n/* 321 */ return encode((String)obj);\n/* */ }\n/* 323 */ throw new EncoderException(\"Objects of type \" + obj.getClass().getName() + \" cannot be URL encoded\");\n/* */ }", "<T> String toJson(T source);", "private String object2String (final Serializable object)\n throws IOException, SecurityException {\n\n String str; // to be returned;\n\n ObjectOutputStream objectOutputStream = null;\n\n try {\n\n final ByteArrayOutputStream byteArrayOutputStream =\n new ByteArrayOutputStream();\n\n // might throw an IO-, Security- or NullPointerException\n // (NullPointerException should never happen here);\n objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);\n\n // might throw an InvalidClass-, NotSerializable- or IOException;\n // (all these types denote IOExceptions);\n objectOutputStream.writeObject(object);\n\n str = new String(Base64Coder.encode(\n byteArrayOutputStream.toByteArray()));\n } finally {\n\n if (objectOutputStream != null) {\n\n try {\n\n // might throw an IOException;\n objectOutputStream.close();\n\n } catch (final IOException ex) {\n\n // ignore exception, since this is the \"finally\" block;\n // TODO: exception message should be written to log file;\n }\n }\n }\n\n return str;\n }", "public interface CustomObjectSerializer <T> {\n\n Class<T> type();\n\n void serializeObject(JsonSerializerInternal serializer, T instance, CharBuf builder );\n\n}", "public void writeTo(Object obj, String mimeType, OutputStream os)\n\t throws IOException;", "@Override\n\tpublic java.lang.String toString()\n\t{\n\t\treturn \"JAV_PutObject\";\n\t}", "private void serializeObject(String filename, Object content)\n throws IOException\n {\n synchronized(filename)\n {\n FileOutputStream fileOut = new FileOutputStream(filename);\n ObjectOutputStream out = new ObjectOutputStream(fileOut);\n out.writeObject(content);\n out.close();\n fileOut.close();\n }\n }", "private String convertToJSON(Object o) throws JsonProcessingException {\n return new ObjectMapper().writeValueAsString(o);\n }", "private String converttoJson(Object medicine) throws JsonProcessingException {\r\n ObjectMapper objectMapper = new ObjectMapper();\r\n return objectMapper.writeValueAsString(medicine);\r\n }", "@Override\n public JsonElement serialize(FrontPageContentResponse src, Type typeOfSrc, JsonSerializationContext context) {\n\treturn null;\n }", "@Override\n public String toJson() {\n return \"{'content':'\" + this.content + \"'}\";\n }", "public static String toJSON (Object obj) throws AndroidAgentException {\n\t\ttry {\n\t\t\tObjectMapper mapper = new ObjectMapper();\n\t\t\treturn mapper.writeValueAsString(obj);\n\t\t} catch (JsonMappingException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while mapping class to json\", e);\n\t\t} catch (JsonGenerationException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while generating json\", e);\n\t\t} catch (IOException e) {\n\t\t\tthrow new AndroidAgentException(\"Error occurred while reading the stream\", e);\n\t\t}\n\t}", "String getContentType();", "String getContentType();", "String getContentType();", "@Override\n public byte[] serialize(T object) {\n if (object == null) {\n return null;\n }\n\n if (glueSchemaRegistryJsonSchemaCoder == null) {\n glueSchemaRegistryJsonSchemaCoder = glueSchemaRegistryJsonSchemaCoderProvider.get();\n }\n return glueSchemaRegistryJsonSchemaCoder.registerSchemaAndSerialize(object);\n }", "public synchronized String getJSONString() {\n\n return getJSONObject().toString();\n }", "public String serialize(Object object) {\n\t\tboolean collectionRoot = object instanceof Collection;\n\t\toutputStack = new Stack<StringBuilder>();\n\t\toutputStack.push(new StringBuilder());\n\t\tinputStack = new Stack<Object>();\n\t\tinputStack.push(object);\n\t\tpathStack = new Stack<Map<String, Object>>();\n\t\tpathStack.push(includePaths);\n\n\t\tif (collectionRoot) {\n\t\t\tCollection col = (Collection) object;\n\n\t\t\tif (isSimpleCollection(col)) {\n\t\t\t\taddKVPCollection(null, col);\n\t\t\t} else {\n\t\t\t\tIterator iterator = col.iterator();\n\t\t\t\tStringBuilder currentOutput = outputStack.peek();\n\t\t\t\tboolean first = true;\n\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\tObject obj = iterator.next();\n\t\t\t\t\trecursiveSerialize(obj, pathStack.peek());\n\t\t\t\t\tcurrentOutput.append(first ? \"{\" : \",{\").append(outputStack.pop()).append('}');\n\t\t\t\t\tfirst = false;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn finish(true);\n\t\t} else {\n\t\t\tfor (String includePath : includePaths.keySet()) {\n\t\t\t\tserializeProperty(includePath);\n\t\t\t}\n\t\t\treturn finish(false);\n\t\t}\n\t}", "@PUT\r\n @Consumes(\"application/json\")\r\n public void putJson(String content) {\r\n }", "@Override\n public String toString() {\n return jsonString;\n }", "String parseObjectToJson(Object obj);", "public String toJSON() throws JSONException;", "public String getContentType();", "public String getContentType();", "@JsonProperty(\"contentType\")\n public void setContentType(String contentType) {\n this.contentType = contentType;\n }", "@AutoEscape\n\tpublic String getContentType();", "@PUT\n @Consumes(MediaType.APPLICATION_JSON)\n public void putJson(String content) {\n }", "@PUT\n @Consumes(MediaType.APPLICATION_JSON)\n public void putJson(String content) {\n }", "@PUT\n @Consumes(MediaType.APPLICATION_JSON)\n public void putJson(String content) {\n }", "@PUT\n @Consumes(MediaType.APPLICATION_JSON)\n public void putJson(String content) {\n }", "public String objectToJson(Object o){\n Gson gson = new Gson();\n String json = gson.toJson(o);\n return json;\n }", "public static String getJson(final Object obj)\n\t{\n\t\tString json = null;\n\t\ttry\n\t\t{\n\t\t\tfinal ObjectMapper mapper = new ObjectMapper();\n\t\t\tmapper.setSerializationInclusion(Include.ALWAYS);\n\t\t\tjson = mapper.writer().writeValueAsString(obj);\n\t\t}\n\t\tcatch (final Exception exception)\n\t\t{\n\t\t\tLOG.error(\"Exception occured when converting Java object to json string. Exception message: \", exception);\n\t\t}\n\t\treturn json;\n\t}", "byte[] serialize(Serializable object);", "public abstract JsonElement serialize();", "public String toJson(Object obj){\n return new Gson().toJson(obj);\n }", "@PUT\n @Consumes(\"application/json\")\n public void putJson(String content) {\n }", "@PUT\n @Consumes(\"application/json\")\n public void putJson(String content) {\n }", "@PUT\n @Consumes(\"application/json\")\n public void putJson(String content) {\n }", "@PUT\n @Consumes(\"application/json\")\n public void putJson(String content) {\n }" ]
[ "0.5871444", "0.58019954", "0.57772565", "0.5738044", "0.5729618", "0.57282156", "0.5723264", "0.56826854", "0.56148", "0.5609157", "0.5606126", "0.5602346", "0.5561671", "0.5558451", "0.548064", "0.5479366", "0.54665774", "0.54585004", "0.54547167", "0.5443453", "0.5439927", "0.5430551", "0.54291743", "0.54074204", "0.53749627", "0.53337085", "0.53335774", "0.5318211", "0.5305827", "0.5303754", "0.528856", "0.5273299", "0.5240601", "0.5228354", "0.5226485", "0.5225801", "0.5209655", "0.5202137", "0.5200449", "0.51948273", "0.51924366", "0.5191379", "0.5183699", "0.5179081", "0.5165912", "0.51642656", "0.51640445", "0.5159601", "0.5159601", "0.5159601", "0.5152752", "0.5148414", "0.51415807", "0.51401323", "0.51304203", "0.5128989", "0.51194984", "0.51118815", "0.51113695", "0.5108087", "0.5089803", "0.50714415", "0.50699157", "0.5068765", "0.5054128", "0.50531363", "0.50314784", "0.50296354", "0.5007197", "0.5005428", "0.50014675", "0.5001421", "0.4997926", "0.4996218", "0.4996218", "0.4996218", "0.49866444", "0.49796832", "0.49758863", "0.49745062", "0.49706003", "0.4970553", "0.49626493", "0.49580196", "0.49580196", "0.49570468", "0.49526685", "0.495235", "0.495235", "0.495235", "0.495235", "0.49494156", "0.49405992", "0.4938731", "0.49384838", "0.4937961", "0.49272683", "0.49272683", "0.49272683", "0.49272683" ]
0.7473756
0
Deserialize response body to Java object according to the ContentType.
public <T> T deserialize(HttpResponse response, Type returnType) throws PdfFillerAPIException { String body; if (response.getBody() != null && !response.getBody().isEmpty()) body = response.getBody(); else body = ""; List<String> contentType = response.getHeaders().get("Content-Type"); if (contentType.contains("application/json")) { return this.deserialize(body, returnType); } else if (returnType.equals(String.class)) { // Expecting string, return the raw response body. return (T) body; } else { throw new PdfFillerAPIException( "Content type \"" + contentType + "\" is not supported for type: " + returnType ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <T> T deserialize(String body, Type returnType) throws PdfFillerAPIException {\n\treturn mapper.fromJson(body, returnType);\n }", "protected static <T> T bodyAsJava(Response response, TypeToken<T> type) {\n Type type0 = type.getType();\n return new Gson().fromJson(bodyAsJson(response), type0);\n }", "Object deserialize(InputStream input, Class type, String format,\r\n String contentEncoding);", "protected abstract RS deserializeTokenResponse(String body) throws JsonDeserializationException, OAuthException;", "@Override\n public GsonFooCustomObject deserialize(final HttpResponse httpResponse) {\n final String jsonAsString = SphereRequestUtils.getBodyAsString(httpResponse);\n return gson.fromJson(jsonAsString, GsonFooCustomObject.class);\n }", "public abstract Object deserialize(Object object);", "public Object parseJsonToObject(String response, Class<?> modelClass) {\n\n try {\n return gson.fromJson(response, modelClass);\n } catch (Exception ex) {\n ex.printStackTrace();\n return null;\n }\n }", "public <T> T getBodyFromResponse(ClientResponse response, Class<T> clazz);", "public static Object parse(Payload payload) {\n Class classType = PayloadRegistry.getClassByType(payload.getMetadata().getType());\n if (classType != null) {\n ByteString byteString = payload.getBody().getValue();\n ByteBuffer byteBuffer = byteString.asReadOnlyByteBuffer();\n Object obj = JacksonUtils.toObj(new ByteBufferBackedInputStream(byteBuffer), classType);\n if (obj instanceof Request) {\n ((Request) obj).putAllHeader(payload.getMetadata().getHeadersMap());\n }\n return obj;\n } else {\n throw new RemoteException(NacosException.SERVER_ERROR,\n \"Unknown payload type:\" + payload.getMetadata().getType());\n }\n \n }", "Object deserialize(Class objClass, InputStream stream) throws IOException;", "@SuppressWarnings(\"unchecked\")\n @Override\n public JsonDeserializer<Object> getContentDeserializer() {\n return (JsonDeserializer<Object>) _valueDeserializer;\n }", "public @Nullable T getContent() {\n logger.trace(\"Get Content of Message, content type : \" + contentType + \" / Content : \" + content);\n try {\n Class type = Class.forName(contentType);\n return (T) gson.fromJson(content, type);\n } catch (ClassNotFoundException e) {\n logger.error(\"Problem when change message content (json) in object\", e);\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n public BaseType deserialize(InputStream stream) throws IOException {\n processHeader(stream);\n\n // Decode the object type and look up its serializer.\n byte type = (byte) stream.read();\n if (type < 0) {\n throw new EOFException();\n }\n\n val si = this.serializersById.get(type);\n ensureCondition(si != null, \"No serializer found for object type %s.\", type);\n\n // Deserialize contents.\n return (BaseType) si.serializer.deserializeContents(stream);\n }", "T deserialize(InputStream stream) throws IOException;", "@Override\n public final Object readFrom(final Class<Object> type,\n final Type genericType, final Annotation[] annotations,\n final MediaType mediaType,\n final MultivaluedMap<String, String> httpHeaders,\n final InputStream entityStream) throws IOException {\n InputStreamReader streamReader = new InputStreamReader(entityStream,\n \"UTF-8\");\n try {\n Type jsonType;\n if (type.equals(genericType)) {\n jsonType = type;\n } else {\n jsonType = genericType;\n }\n return getGson().fromJson(streamReader, jsonType);\n } finally {\n try {\n if (streamReader != null) {\n streamReader.close();\n }\n } catch (IOException e) {\n // ignore, nothing to be done here anyway\n }\n }\n }", "InputStream deserialize(InputStream toDeserialize);", "public abstract Object decode(InputStream is) ;", "@Override\r\n public Object fromBinaryJava(byte[] bytes, Class<?> clazz) {\r\n return JSON.parseObject(bytes, clazz);\r\n }", "private void parseResponse(String body) {\n Gson gson = new Gson();\n try {\n FactDataList factDataList = gson.fromJson(body, FactDataList.class);\n if (!factDataList.title.isEmpty() || (factDataList.factDataArrayList != null && factDataList.factDataArrayList.size() > 0)) {\n factDataView.UpdateListView(factDataList);\n } else {\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n } catch (Exception e) {\n e.printStackTrace();\n factDataView.displayMessage(context.getString(R.string.nodata), false);\n }\n }", "public <T> T deserialize(Class<T> type, InputStream is) throws SerializationException;", "public static Payload convert(Response response) {\n byte[] jsonBytes = JacksonUtils.toJsonBytes(response);\n \n Metadata.Builder metaBuilder = Metadata.newBuilder().setType(response.getClass().getSimpleName());\n return Payload.newBuilder()\n .setBody(Any.newBuilder().setValue(UnsafeByteOperations.unsafeWrap(jsonBytes)))\n .setMetadata(metaBuilder.build()).build();\n }", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException {\n return JSON.parseObject(inputMessage.getBody(), this.fastJsonConfig.getCharset(), (Type) clazz, this.fastJsonConfig.getFeatures());\n }", "@Test\n\tpublic void testDeSerializationUsingContentType() {\n\t\t\n\t\tZebraRequestClassNew reqObj = new ZebraRequestClassNew();\n\t\treqObj.setAge(10);\n\t\treqObj.setWeight(100);\n\t\treqObj.setHome(\"India\");\t\t\n\t\n\t\tZebraRequestClass respObj = \n\t\tgiven()\n\t\t\t.body(reqObj). \n\t\twhen()\n\t\t\t.post(\"http://www.thomas-bayer.com/restnames/countries.groovy\")\n\t\t\t.as(ZebraRequestClass.class);\n\t\t\n\t\trespObj.setregId(1101);\n\t\tAssert.assertTrue(respObj.getregId() > 0);\n\t}", "public static <T> T toObject(String body, Class<T> cls) {\n\t\ttry {\n\t\t\treturn fullMapper.readValue(body, cls);\n\t\t} catch (Exception e) {\n\t\t\t//return null;\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "protected PastContent deserialize(byte[] bytes, Endpoint endpoint, PastContentDeserializer pcd) throws IOException, ClassNotFoundException {\n \n SimpleInputBuffer sib = new SimpleInputBuffer(bytes);\n short type = sib.readShort();\n return pcd.deserializePastContent(sib, endpoint, type); \n }", "public void deserialize() {\n\t\t\n\t}", "public static <T> T unmarshallStreamingIngestResponse(\n HttpResponse response,\n Class<T> valueType,\n ApiName apiName,\n CloseableHttpClient httpClient,\n HttpUriRequest request,\n RequestBuilder requestBuilder)\n throws IOException, IngestResponseException {\n // We can't unmarshall a null response\n if (response == null) {\n LOGGER.warn(\"Null response passed to {}\", valueType.getName());\n throw new IllegalArgumentException();\n }\n\n // Handle the exceptional status code\n response =\n handleExceptionalStatus(response, null, apiName, httpClient, request, requestBuilder);\n\n // Grab the string version of the response entity\n String blob = consumeAndReturnResponseEntityAsString(response.getEntity());\n\n // Read out our blob into a pojo\n return mapper.readValue(blob, valueType);\n }", "@SuppressWarnings({\"unchecked\"})\n private void readObject(final java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n /** Response string */\n this.responseString = (String) in.readObject();\n\n /** Code */\n this.code = in.readInt();\n\n /** Response headers */\n final Map headers = (Map) in.readObject();\n this.headers.clear();\n this.headers.putAll(headers);\n\n /** Response body */\n final byte[] body = (byte[]) in.readObject();\n //System.out.println(\"[] body \"+body.length );\n sosi = new ServletByteArrayOutputStream();\n sosi.write(body);\n writer = new PrintWriter(sosi);\n\n }", "private Object deserialize(byte[] data) throws IOException, ClassNotFoundException {\n\t\tByteArrayInputStream in = new ByteArrayInputStream(data);\n\t ObjectInputStream is = new ObjectInputStream(in);\n\t\treturn (Object) is.readObject();\n\t}", "public void parseResponse();", "protected <T> T deserialize(final String value, final Class<T> type) throws JsonDeserializationException {\n return json.deserialize(value, type);\n }", "TypedResponse createTypedResponse();", "private OlapResult parseFromResponse(OlapMessage.Response response) throws IOException{\n switch(response.getType()){\n case NOT_SUBMITTED:\n return new NotSubmittedResult();\n case FAILED:\n OlapMessage.FailedResponse fr=response.getExtension(OlapMessage.FailedResponse.response);\n throw Exceptions.rawIOException((Throwable)OlapSerializationUtils.decode(fr.getErrorBytes()));\n case IN_PROGRESS:\n OlapMessage.ProgressResponse pr=response.getExtension(OlapMessage.ProgressResponse.response);\n return new SubmittedResult(pr.getTickTimeMillis());\n case CANCELLED:\n return new CancelledResult();\n case COMPLETED:\n OlapMessage.Result r=response.getExtension(OlapMessage.Result.response);\n return OlapSerializationUtils.decode(r.getResultBytes());\n default:\n throw new IllegalStateException(\"Programmer error: unexpected response type\");\n }\n }", "public TargetType deserialize(BufferView data) throws IOException {\n return deserialize(data.getReader());\n }", "public static Object deserializeObject(ByteBuffer bb) {\n String className = deserializeString(bb);\n int numFields = deserializeInteger(bb);\n try {\n Class<?> c = Class.forName(className);\n Object o = c.newInstance();\n\n HashMap<String, Object> fieldTypeMap = new HashMap<>();\n Field[] fields = c.getFields();\n for (Field f: fields) {\n fieldTypeMap.put(f.getName(), f.getType());\n }\n for (int i = 0; i < numFields; i++) {\n String fieldName = deserializeString(bb);\n Object val;\n if (fieldTypeMap.get(fieldName).equals(String.class)) {\n val = deserializeString(bb);\n } else if (fieldTypeMap.get(fieldName).equals(Integer.class)) {\n val = deserializeInteger(bb);\n } else if (fieldTypeMap.get(fieldName).equals(List.class)) {\n val = deserializeList(bb);\n } else if (fieldTypeMap.get(fieldName).equals(Day.class)) {\n val = deserializeDayEnum(bb);\n } else {\n val = Deserializer.deserializeObject(bb);\n }\n try {\n o.getClass().getDeclaredField(fieldName).set(o, val);\n } catch (NoSuchFieldException e) {\n e.printStackTrace();\n }\n }\n return c.cast(o);\n } catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {\n e.printStackTrace();\n }\n return null;\n }", "public TargetType deserialize(byte[] data) throws IOException {\n return deserialize(new ByteArrayInputStream(data));\n }", "public BaseType deserialize(ArrayView data) throws IOException {\n return deserialize(data.getReader());\n }", "GeneratedMessage deserialize(InputStream in) throws IOException, InstantiationException, IllegalAccessException, ClassNotFoundException;", "public Object readObject() throws IOException, ClassNotFoundException {\n if (objectInputStream == null) {\n objectInputStream = new ObjectInputStream(byteArrayInputStream);\n }\n return objectInputStream.readObject();\n }", "private Object deserializeObjectFromRequest(String mimeInputFormat,\n\t\tIWebSerialDeserial serialDeserial)\n\t{\n\t\tWebRequest servletRequest = AbstractRestResource.getCurrentWebRequest();\n\n\t\treturn serialDeserial.requestToObject(servletRequest, parameterClass, mimeInputFormat);\n\t}", "public TargetType deserialize(InputStream stream) throws IOException {\n ReaderType builder = newBuilder();\n deserialize(stream, builder);\n return builder.build();\n }", "private PostData getPostData(HttpResponse response) throws IOException {\n return this.gson.fromJson(\n getContent(response),\n PostData.class\n );\n }", "T deserialize(JsonObject json, DynamicDeserializerFactory deserializerFactory) throws ClassNotFoundException;", "Object deserialize(Writable blob) throws SerDeException;", "private JsonApiEnvelopeDeserializer() {\n super(JsonApiEnvelope.class);\n }", "public native Object parse( Object json );", "TargetType deserializeContents(InputStream stream) throws IOException {\n ReaderType builder = newBuilder();\n super.deserializeContents(stream, builder);\n return builder.build();\n }", "public CheckResponseDeserializer() {\n this(null);\n }", "private JsonElement getPayload(HttpServletRequest request, HttpServletResponse response)\n throws JsonParseException, IllegalStateException, IOException {\n return new JsonParser().parse(getBody(request));\n }", "public abstract T deserialize(String serial);", "protected static JsonElement bodyAsJson(Response response) {\n try {\n String body = response.body().string();\n JsonElement json = new JsonParser().parse(body);\n Variables.register(\"json_body_\" + response.hashCode(), body);\n return json;\n }\n catch (IOException e) {\n throw CheckedExceptions.wrapAsRuntimeException(e);\n }\n }", "public static Object deserialize(byte[] data) throws IOException, ClassNotFoundException {\n\t\tObjectInputStream ois = new ObjectInputStream(new ByteArrayInputStream(data));\n\t\treturn ois.readObject();\n\t}", "private static Model decodeModel(final String id, final String msgBody) {\n final Model model = createDefaultModel();\n model.read(new ByteArrayInputStream(msgBody.getBytes(UTF_8)), id, \"JSON-LD\");\n return model;\n }", "@Override\n public BitfinexModel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException\n {\n JsonElement bitfinexModel = json.getAsJsonObject();\n\n /**\n * Deserialize the JsonElement as GSON\n */\n return new Gson().fromJson(bitfinexModel, BitfinexModel.class);\n }", "@Override\n\tpublic <T extends BaseModel> T decodeContent(JSONObject object)\n\t{\n\t\treturn null;\n\t}", "<T> T fromJsonResult(MvcResult result, Class<T> valueType) throws Exception {\r\n return this.mapper.readValue(result.getResponse().getContentAsString(), valueType);\r\n }", "@Override\n public T deserialize(JsonParser p, DeserializationContext ctxt)\n throws JacksonException\n {\n if (ctxt.isEnabled(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY)) {\n return deserializeFromSingleValue(p, ctxt);\n }\n // if not deserialize the normal way\n return deserializeContents(p, ctxt);\n }", "@Override\n\tpublic Object deserialize(byte[] bytes) throws SerializationException {\n\t\tif(bytes==null || bytes.length==0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn deserializingConverter.convert(bytes);\n\t}", "public T deserialize() throws IOException {\n FileInputStream fileInputStream = new FileInputStream(this.mFile);\n DataInputStream dataInputStream = new DataInputStream(fileInputStream);\n T deserialize = this.mCodec.deserialize(dataInputStream);\n $closeResource(null, dataInputStream);\n $closeResource(null, fileInputStream);\n return deserialize;\n }", "@Test\n public void readSystemObjectClassAppointmentRequest() throws UnsupportedEncodingException, IOException {\n ISystemObject object = Factory.createObject(\"AppointmentRequest\");\n testJson = gson.toJson(object);\n\n //convert string to input stream\n InputStream inputStream = new ByteArrayInputStream(testJson.getBytes(Charset.forName(\"UTF-8\")));\n //convert inputstream to jsonReader\n JsonReader reader = new JsonReader(new InputStreamReader(inputStream, \"UTF-8\"));\n\n //read json string into resultant\n ISystemObject actual = DataHandler.readSystemObjectClass(reader);\n\n //compare results \n assertEquals(\"Fails to return AppointmentRequest properly\", object.getClass(), actual.getClass());\n }", "protected <T> T getDatamodelObjectFromResponse(JsonNode response, List<String> path, Class<T> targetClass) throws JsonProcessingException {\n\t\tif(response == null) {\n\t\t\tthrow new MalformedResponseException(\"The API response is null\");\n\t\t}\n\t\tJsonNode currentNode = response;\n\t\tfor(String field : path) {\n\t\t\tif (!currentNode.has(field)) {\n\t\t\t\tthrow new MalformedResponseException(\"Field '\"+field+\"' not found in API response.\");\n\t\t\t}\n\t\t\tcurrentNode = currentNode.path(field);\n\t\t}\n\t\treturn mapper.treeToValue(currentNode, targetClass);\n\t}", "public static Object deserializeObject(byte[] data) throws IOException {\n\t\tif (data == null || data.length < 1) {\n\t\t\treturn null;\n\t\t}\n\t\tObject object = null;\n\t\ttry {\n\t\t\tObjectInputStream objectStream = new ObjectInputStream(new ByteArrayInputStream(data));\n\t\t\tobject = objectStream.readObject();\n\t\t\tobjectStream.close();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn object;\n\t}", "public interface JSONDeserializer<T> {\n\t\n\t/**\n\t * Deserialize a json string\n\t * @param json object to deserialize\n\t * @return JSON representation as {@link JsonObject}\n\t */\n\tJsonObject deserialise(String json);\n\t\n\t/**\n\t * Unmarshall 'meta' section of the response\n\t * @param meta section represented as {@link JsonObject}\n\t * @return object of generic type T\n\t */\n\tT unmarshallMeta(JsonObject meta);\n\t\n\t/**\n\t * Unmarshall 'response' section of the response\n\t * @param response section represented as {@link JsonObject}\n\t * @return list of objects of generic type T\n\t */\n\tCollection<T> unmarshallResponse(JsonObject response);\n\n}", "<T> T fromJson(String source, JavaType type);", "public abstract Class<Response> getResponseClass();", "<T> T parseToObject(Object json, Class<T> classObject);", "protected MusicBrainz deserializeResponse(String responseStr) {\n\t\tObjectMapper objectMapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,\n\t\t\t\tfalse);\n\n\t\ttry {\n\t\t\treturn objectMapper.readValue(responseStr, MusicBrainz.class);\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"Error on deserializing response\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "public JSONResponse convertReponse(HttpResponse response){\n\n\t\ttry {\n\t\t\tString json = EntityUtils.toString(response.getEntity(), \"UTF-8\");\n\t\t\tint statusCode = response.getStatusLine().getStatusCode();\n\t return new JSONResponse(json, statusCode);\n\t\t} catch (ParseException | IOException e) {\n\t\t\tlogger.error(\"convert http response to json failed, error={}\", e.getLocalizedMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treturn null;\n\t\t} \n \n }", "@Override\n protected Response<WeatherPOJO> parseNetworkResponse(NetworkResponse response) {\n try {\n // Convert the obtained byte[] into a String\n String json = new String(response.data, HttpHeaderParser.parseCharset(response.headers));\n // Use Gson to process the JSON string and return a WeatherPOJO object\n return Response.success(new Gson().fromJson(json, WeatherPOJO.class),\n HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n return null;\n }", "SessionSerializationMetadata deserialize( byte[] data ) throws IOException, ClassNotFoundException;", "public static <T> T loadJson(String content, Class<T> valueType){\n return (T)JsonMapper.fromJsonString(content, valueType);\n }", "public static MessageResponseOfAnimalModelNuLtuh91 parse(\n javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n MessageResponseOfAnimalModelNuLtuh91 object = new MessageResponseOfAnimalModelNuLtuh91();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n if (reader.getAttributeValue(\n \"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\") != null) {\n java.lang.String fullTypeName = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"type\");\n\n if (fullTypeName != null) {\n java.lang.String nsPrefix = null;\n\n if (fullTypeName.indexOf(\":\") > -1) {\n nsPrefix = fullTypeName.substring(0,\n fullTypeName.indexOf(\":\"));\n }\n\n nsPrefix = (nsPrefix == null) ? \"\" : nsPrefix;\n\n java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(\n \":\") + 1);\n\n if (!\"MessageResponseOfAnimalModelNuLtuh91\".equals(\n type)) {\n //find namespace for the prefix\n java.lang.String nsUri = reader.getNamespaceContext()\n .getNamespaceURI(nsPrefix);\n\n return (MessageResponseOfAnimalModelNuLtuh91) ExtensionMapper.getTypeObject(nsUri,\n type, reader);\n }\n }\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n reader.next();\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Body\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n object.setBody(null);\n reader.next();\n\n reader.next();\n } else {\n object.setBody(AnimalModel.Factory.parse(reader));\n\n reader.next();\n }\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.datacontract.org/2004/07/Tamagotchi.Common.Messages\",\n \"Error\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.setError(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(\n content));\n } else {\n reader.getElementText(); // throw away text nodes if any.\n }\n\n reader.next();\n } // End of if for expected property start element\n\n else {\n }\n\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n if (reader.isStartElement()) {\n // 2 - A start element we are not expecting indicates a trailing invalid property\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" + reader.getName());\n }\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "@Override\n @SuppressWarnings(\"unchecked\")\n public <T> T getObject() {\n waitFor();\n return (T) response;\n }", "public Object deserialize(byte[] bytes) {\n try {\n ByteArrayInputStream b = new ByteArrayInputStream(bytes);\n ObjectInputStream o = new ObjectInputStream(b);\n return o.readObject();\n } catch (Exception e) {\n return null;\n }\n }", "public Class<RES> getResponseClass() {\n return responseClass;\n }", "@Override\r\n\tprotected Object readObject() throws IOException, SerializeException {\r\n\t\treturn AdvancedDeserializerUtil.readObject(super.readObject());\r\n\t}", "public static <T> T convertObjectFromBody(Message message,\n\t\t\tClass<T> valueType) {\n\t\ttry {\n\t\t\tString messageBody = ((TextMessage) message).getText();\n\t\t\treturn convertJsonStringToObject(messageBody, valueType);\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(\"Error converting message\", e);\n\t\t}\n\t}", "@Override\n public Object deserializeWithType(JsonParser jp, DeserializationContext ctxt,\n TypeDeserializer typeDeserializer)\n throws IOException, JsonProcessingException\n {\n return typeDeserializer.deserializeTypedFromObject(jp, ctxt);\n }", "public <T> T toObject(Class<T> c) {\n if (JsonSerializable.class.isAssignableFrom(c) || String.class.isAssignableFrom(c)\n || Number.class.isAssignableFrom(c) || Boolean.class.isAssignableFrom(c)) {\n throw new IllegalArgumentException(\"c can only be a POJO class or JSONObject\");\n }\n if (JSONObject.class.isAssignableFrom(c)) {\n // JSONObject\n if (JSONObject.class != c) {\n throw new IllegalArgumentException(\"We support JSONObject but not its sub-classes.\");\n }\n return c.cast(this.propertyBag);\n } else {\n // POJO\n JsonSerializable.checkForValidPOJO(c);\n try {\n return this.getMapper().readValue(this.toJson(), c);\n } catch (IOException e) {\n throw new IllegalStateException(\"Failed to get POJO.\", e);\n }\n }\n }", "@Override\n public void deserialize(ByteBuffer buf) {\n }", "@Override\n public Object deserializeWithType(JsonParser p, DeserializationContext ctxt,\n TypeDeserializer typeDeserializer)\n throws IOException\n {\n return typeDeserializer.deserializeTypedFromArray(p, ctxt);\n }", "private static XdmValue decodeResponse(ReadablePipe port)\n throws SaxonApiException\n , ServlexException\n {\n List<XdmItem> result = new ArrayList<XdmItem>();\n port.canReadSequence(true);\n // if there are more than 1 docs, the first one must be web:response,\n // and the following ones are the bodies\n int count = port.documentCount();\n if ( count == 0 ) {\n LOG.debug(\"The pipeline returned no document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n // TODO: If there is no document on the port, we return an empty\n // sequence. We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n else if ( count > 1 ) {\n LOG.debug(\"The pipeline returned \" + count + \" documents on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n while ( port.moreDocuments() ) {\n XdmNode doc = port.read();\n addToList(result, doc);\n }\n }\n else {\n LOG.debug(\"The pipeline returned 1 document on '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"'.\");\n XdmNode response = port.read();\n if ( LOG.debug()) {\n LOG.debug(\"Content of the outpot port '\" + org.expath.servlex.processors.XProcProcessor.OUTPUT_PORT_NAME + \"': \" + response);\n }\n if ( response == null ) {\n // TODO: If there is no web:response, we return an empty sequence.\n // We should probably throw an error instead...\n return XdmEmptySequence.getInstance();\n }\n XdmNode wrapper_elem = getWrapperElem(response);\n // not a web:wrapper, so only one doc, so must be web:response\n if ( wrapper_elem == null ) {\n addToList(result, response);\n }\n // a web:wrapper, so unwrap the sequence\n else {\n XdmSequenceIterator it = wrapper_elem.axisIterator(Axis.CHILD);\n while ( it.hasNext() ) {\n // TODO: FIXME: For now, due to some strange behaviour in\n // Calabash, we ignore everything but elements (because it\n // exposes the indentation as text nodes, which is wrong...)\n XdmItem child = it.next();\n if ( child instanceof XdmNode && ((XdmNode) child).getNodeKind() == XdmNodeKind.ELEMENT ) {\n addToList(result, (XdmNode) child);\n }\n }\n }\n }\n return new XdmValue(result);\n }", "@Test\n public void testDeSerialize() throws Exception {\n Writable w = new Text(\"{ \\\"ts\\\":\\\"2014-08-25T00:24:27.41103928Z\\\", \\\"t\\\":36529, \\\"Request\\\":{ \\\"path\\\":\\\"/foo/bar\\\", \\\"query\\\":{\\\"baz\\\": [\\\"ban\\\"]}, \\\"headers\\\":{ \\\"Accept\\\":[\\\"image/webp,*/*;q=0.8\\\"], \\\"Accept-Encoding\\\":[\\\"identity\\\"], \\\"Accept-Language\\\":[\\\"en-US,en;q=0.8\\\"], \\\"Connection\\\":[\\\"keep-alive\\\"], \\\"Referer\\\":[\\\"http://foo.com/bar\\\"], \\\"User-Agent\\\":[\\\"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36\\\"] }, \\\"ip\\\":\\\"10.0.0.1\\\" } }\");\n\n JSONObject result = (JSONObject) instance.deserialize(w);\n \n StructObjectInspector soi = (StructObjectInspector) instance.getObjectInspector();\n \n StructField tSF = soi.getStructFieldRef(\"t\");\n assertEquals(36529, ((JavaStringIntObjectInspector)tSF.getFieldObjectInspector()).get(soi.getStructFieldData(result, tSF )));\n assertEquals(\"2014-08-25T00:24:27.41103928Z\"\n , soi.getStructFieldData(result, soi.getStructFieldRef(\"ts\")));\n \n StructField requestSF = soi.getStructFieldRef(\"request\");\n \n Object request = soi.getStructFieldData(result, requestSF);\n \n StructObjectInspector requestOI = (StructObjectInspector) requestSF.getFieldObjectInspector();\n \n assertEquals(3, requestOI.getAllStructFieldRefs().size());\n \n\n StructField headersSF = requestOI.getStructFieldRef(\"headers\");\n Object headers = requestOI.getStructFieldData(request, headersSF);\n \n assertTrue(headersSF.getFieldObjectInspector().getCategory() == Category.STRUCT);\n StructObjectInspector headersOI = (StructObjectInspector) headersSF.getFieldObjectInspector();\n \n // now get the user agent with the mapping\n StructField useragentSF = headersOI.getStructFieldRef(\"useragent\");\n Object useragent = requestOI.getStructFieldData(headers, useragentSF);\n ListObjectInspector useragentOI = (ListObjectInspector) useragentSF.getFieldObjectInspector();\n assertEquals(useragentOI.getCategory(), Category.LIST);\n \n // get value\n List d = useragentOI.getList(useragent);\n assertEquals(d.size(),1);\n }", "static <T extends JSONSerializable> T deserialize(String json, Class<T> type) throws Exception {\n T result = type.newInstance();\n result.jsonDeserialize(json);\n return result;\n }", "public static ResponseWrapper fromJson(String json)\n\t{ \n\t\tResponseWrapper response = new ResponseWrapper();\n\t\tresponse.fromJsonCore(json, \"response\", (type) -> type.getResponseContentType()); \n\t\treturn response;\n\t}", "private void processResponse(byte[] bResponse, long startTime, long endTime, BaseRequest request, String message, int httpCode, Headers headers) {\n BaseResponse response = request.getResponse();\n try {\n if (response == null) {\n // Get response header information\n String contentType = headers.get(\"ContentType\");\n if (StringUtils.isBlank(contentType)) {\n contentType = \"\";\n }\n response = TankHttpUtil.newResponseObject(contentType);\n request.setResponse(response);\n }\n\n // Get response detail information\n response.setHttpMessage(message);\n response.setHttpCode(httpCode);\n\n // Get response header information\n for (String key : headers.names()) {\n response.setHeader(key, headers.get(key));\n }\n\n if (((CookieManager) okHttpClient.getCookieHandler()).getCookieStore().getCookies() != null) {\n for (HttpCookie cookie : ((CookieManager) okHttpClient.getCookieHandler()).getCookieStore().getCookies()) {\n // System.out.println(\"in processResponse-getCookies\");\n // System.out.println(cookie.toString());\n response.setCookie(cookie.getName(), cookie.getValue());\n }\n }\n\n response.setResponseTime(endTime - startTime);\n String contentType = response.getHttpHeader(\"Content-Type\");\n String contentEncode = response.getHttpHeader(\"Content-Encoding\");\n if (BaseResponse.isDataType(contentType) && contentEncode != null && contentEncode.toLowerCase().contains(\"gzip\")) {\n // decode gzip for data types\n try {\n GZIPInputStream in = new GZIPInputStream(new ByteArrayInputStream(bResponse));\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n IOUtils.copy(in, out);\n bResponse = out.toByteArray();\n } catch (Exception e) {\n LOG.warn(request.getLogUtil().getLogMessage(\"cannot decode gzip stream: \" + e, LogEventType.System));\n }\n }\n response.setResponseBody(bResponse);\n\n } catch (Exception ex) {\n LOG.warn(\"Unable to get response: \" + ex.getMessage());\n } finally {\n response.logResponse();\n }\n }", "@Override\n public T readData(InputStream in) throws IOException\n {\n String doc = _read(in, \"UTF-8\");\n return _deserializer.deserialize(doc, _itemClass);\n }", "void deserialize(@NotNull InputStream in) throws IOException;", "public Object readObject() throws ClassNotFoundException, IOException;", "private static Model getSelectedModel(HttpResponse<String> response){\n\t\tModel model;\n\t\ttry {\n\t\t\tmodel = new ObjectMapper().readValue(response.body(), new TypeReference<Model>(){});\n\t\t\treturn model;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static PaymentManifestParserParseWebAppManifestResponseParams deserialize(java.nio.ByteBuffer data) {\n if (data == null)\n return null;\n \n return deserialize(new org.chromium.mojo.bindings.Message(\n data, new java.util.ArrayList<org.chromium.mojo.system.Handle>()));\n }", "protected abstract Object toObject(ByteBuffer content, Type targetType) throws BeanConversionException;", "public abstract Response read(Request request, Response response);", "@Override\n public Object convertJsonToObject(String content) {\n try {\n Map<String, EventDataValue> data = reader.readValue(content);\n\n return convertEventDataValuesMapIntoSet(data);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "protected CosServiceResponse<T> parseResponseMetadata(CosHttpResponse response) {\n CosServiceResponse<T> cosResponse = new CosServiceResponse<T>();\n String cosRequestId = response.getHeaders().get(Headers.REQUEST_ID);\n String cosTraceId = response.getHeaders().get(Headers.TRACE_ID);\n String ciRequestId = response.getHeaders().get(Headers.CI_REQUEST_ID);\n\n Map<String, String> metadataMap = new HashMap<String, String>();\n metadataMap.put(Headers.REQUEST_ID, cosRequestId);\n metadataMap.put(Headers.TRACE_ID, cosTraceId);\n metadataMap.put(Headers.CI_REQUEST_ID, ciRequestId);\n cosResponse.setResponseMetadata(new ResponseMetadata(metadataMap));\n\n return cosResponse;\n }", "public Object readInternal(Class<? extends Object> clazz, HttpInputMessage inputMessage) throws IOException {\n return this.conversionService.convert(this.stringHttpMessageConverter.readInternal(String.class, inputMessage), clazz);\n }", "public void deserialize(InputStream stream, ReaderType target) throws IOException {\n processHeader(stream);\n deserializeContents(stream, target);\n }", "private static ArrayList<Model> getModels(HttpResponse<String> response){\n\t\tArrayList<Model> models;\n\t\ttry {\n\t\t\tmodels = new ObjectMapper().readValue(response.body(), new TypeReference<ArrayList<Model>>(){});\n\t\t\treturn models;\n\t\t} catch (JsonMappingException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (JsonProcessingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public Serializable getObject() throws OpenwireException {\n if (object == null && getContent() != null) {\n try {\n Buffer content = getContent();\n InputStream is = new ByteArrayInputStream(content);\n if (isCompressed()) {\n is = new InflaterInputStream(is);\n }\n DataInputStream dataIn = new DataInputStream(is);\n ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn);\n try {\n object = (Serializable)objIn.readObject();\n } catch (ClassNotFoundException ce) {\n throw new OpenwireException(\"Failed to build body from content. Serializable class not available to broker. Reason: \" + ce, ce);\n } finally {\n dataIn.close();\n }\n } catch (IOException e) {\n throw new OpenwireException(\"Failed to build body from bytes. Reason: \" + e, e);\n }\n }\n return this.object;\n }", "@Test\n public void testUnmarshal() throws IOException {\n InputStream is = PlaceLimitOrderJSONTest.class.getResourceAsStream(\"/trade/place_order.json\");\n\n // Use Jackson to parse it\n ObjectMapper mapper = new ObjectMapper();\n JavaType type = mapper.getTypeFactory().constructParametricType(VosResponse.class, VosOrderId.class);\n VosResponse<VosOrderId> vaultOfSatoshiPlaceOrder = mapper.readValue(is, type);\n\n assertThat(vaultOfSatoshiPlaceOrder.getData().getOrder_id()).isEqualTo(2036833);\n assertThat(vaultOfSatoshiPlaceOrder.getStatus()).isEqualTo(\"success\");\n }" ]
[ "0.6356805", "0.63438636", "0.6187874", "0.6113062", "0.602761", "0.59273094", "0.58450055", "0.5798412", "0.5727577", "0.5667678", "0.5637707", "0.5573994", "0.5558191", "0.549051", "0.5440466", "0.54291683", "0.54232943", "0.5400156", "0.53926104", "0.5362549", "0.53394955", "0.53365475", "0.5333757", "0.53264385", "0.5293777", "0.5285778", "0.52579296", "0.52368706", "0.5214897", "0.52131116", "0.5128479", "0.5126134", "0.51126224", "0.5110514", "0.5104917", "0.50957054", "0.50838727", "0.5038948", "0.5030199", "0.502044", "0.50169784", "0.5001755", "0.49965405", "0.4994305", "0.49729863", "0.4965187", "0.4958715", "0.4958298", "0.49460763", "0.49406132", "0.49352127", "0.48919177", "0.48918587", "0.48725128", "0.48625115", "0.4855487", "0.48444605", "0.4838537", "0.4829271", "0.48198012", "0.4818578", "0.48151278", "0.48045638", "0.4793622", "0.47931004", "0.47877175", "0.47860736", "0.47856295", "0.47743627", "0.47721097", "0.47609913", "0.47573", "0.47518852", "0.47465461", "0.47465044", "0.4739237", "0.47350243", "0.47172785", "0.47108492", "0.47096673", "0.47064292", "0.46972463", "0.46930733", "0.46855953", "0.4682449", "0.4674462", "0.46687204", "0.46617296", "0.46547338", "0.46544385", "0.46476537", "0.4641836", "0.4640146", "0.4638037", "0.46371236", "0.46365404", "0.4634522", "0.46232724", "0.4602971", "0.45920065" ]
0.6319661
2
System.out.println("KiviPaperiSakset.seuraavaArvaus() viimeisimmat: " +viimeisimmat); System.out.println("KiviPaperiSakset.seuraavaArvaus() muisti.size(): " +muisti.size());
public static String seuraavaArvaus(HashMap<String, Integer> muisti, String viimeisimmat, String kaikki) { if (kaikki.length() < 3) { return "k"; } String viimKivi = viimeisimmat + "k"; String viimPaperi = viimeisimmat + "p"; String viimSakset = viimeisimmat + "s"; int viimKiviLkm = 0; int viimPaperiLkm = 0; int viimSaksetLkm = 0; String arvaus = "k"; int viimValueMax = 0; /* Sopivan valinnan etsiminen tehdään tarkastelemalla käyttäjän kahta viimeistä syötettä ja vertailemalla niitä koko historiaan. Mikäli historian mukaan kahta viimeistä syötettä seuraa useimmin kivi, tekoälyn tulee pelata paperi. Mikäli kahta viimeistä syötettä seuraa useimmin paperi, tekoälyn tulee pelata sakset. Mikäli taas kahta viimeistä syötettä seuraa useimmin sakset, tekoälyn tulee pelata kivi. Muissa tapauksissa pelataan kivi. */ if (muisti.containsKey(viimKivi)) { viimKiviLkm = muisti.get(viimKivi); } if (muisti.containsKey(viimPaperi)) { viimPaperiLkm = muisti.get(viimPaperi); } if (muisti.containsKey(viimSakset)) { viimSaksetLkm = muisti.get(viimSakset); } if (viimKiviLkm > viimPaperiLkm && viimKiviLkm > viimSaksetLkm) { return "p"; } if (viimPaperiLkm > viimKiviLkm && viimPaperiLkm > viimSaksetLkm) { return "s"; } if (viimSaksetLkm > viimKiviLkm && viimSaksetLkm > viimPaperiLkm) { return "k"; } return arvaus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int size() {\n\t\treturn cerraduras.size();\n\t}", "int size(){\n\treturn m.size();\n }", "public int size(){\n return set.length;\n }", "public int length(){\n return pilha.size();\n }", "public int size() {\n \t return size;\n }", "public void somaVezes(){\n qtVezes++;\n }", "@Test\n public void nelioMuodostuu() {\n ArrayList lista=this.tetrimino.palautaKuvio();\n assertEquals(lista.size(), 4);\n \n }", "public int size() {\n\t\treturn posicionActual;\n\t}", "public int size() {\n // TODO: YOUR CODE HERE\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int getsize() {\r\n\t\treturn listaReservas.size();\r\n\t}", "public int size(){\r\n return size;\r\n \r\n }", "public int size(){\n return size;\n }", "public int size() {\r\n\t\treturn geheim.length;\r\n\t}", "public int size( )\n {\n // Implemented by student.\n }", "public int size(){\n return this.size;\n }", "public int size() {\n \treturn size;\n }", "public int size() {\n \treturn size;\n }", "public int size()\n {\n \treturn size;\n }", "public int size(){\n\t\treturn size; \n\t}", "public int size() {\n\treturn size;\n }", "public int size() {\n return size;\n }", "public int size(){\n\t\treturn size;\n\t}", "public int size()\n {\n return size; \n }", "public int size(){\n return items.size();\n }", "public int size() { \r\n return size; \r\n }", "public int size(){\n return size;\n }", "public int size()\n {\n\treturn size;\n }", "public int size() {\r\n return size; \r\n }", "public int size(){\n\t\treturn super.size();\n\t}", "public int size(){\n return n_nodi;\n }", "int size(){\n return size_ ;\n }", "public int conta()\n\t{\n\t\treturn posicoes.size();\n\t}", "public int size() {\r\n return size;\r\n }", "public int size(){\n\t\treturn howMany; \n\t}", "public int size() {\r\n \t return 0;\r\n }", "public int size() {\r\n // TODO\r\n return 0;\r\n }", "public int size()\r\n {\r\n\treturn chromos.size();\r\n }", "public int getAtracciones(){\n return atracciones.size(); \n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size()\n {\n return size;\n }", "public int size(){\n return numItems;\n }", "public int size ()\n {\n return size;\n }", "@Override\n\tpublic int contar() {\n\t\treturn comision.size();\n\t}", "public int Size(){\n \treturn size;\n\t}", "public int size() {\n // YOUR CODE HERE\n return 1;\n }", "public int size() {\r\n \r\n return size;\r\n }", "public int size() {\r\n \treturn size;\r\n }", "public int size()\n {\n return size;\n }", "public int size(){\n return count;\n }", "@Override\n public int size(){\n return size;\n }", "public int size() {\n return size;\n }", "public int size() \n { \n return count; \n }", "public int size(){\n return words.size();\n }", "public int getSize() {\n return v.size();\n }", "public int size() {\n return size;\r\n }", "public int size ()\r\n {\r\n }", "public int size()\n {\n return size;\n }", "public int size() {\n return size;\n }", "public int size(){\n return sizeCounter;\n }", "public int size() {\n\t\treturn 0;\n\t}", "public int size() {\n\t\treturn 0;\n\t}", "public int size() {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public int size()\r\n {\r\n return size;\r\n }", "public static int sizeOf()\n {\n return 4;\n }", "public int size() {\n return a.length;\n }", "public int size(){\n return length;\n }", "public int size() {\n \treturn numItems;\n }", "public static int size(){\n return showing.size();\n }", "public int getSize(){return this.IdAgente.size();}", "public int size() {\n \t\treturn size;\n \t}", "public int size() {\n return set.size();\n }", "public int size()\n {\n return 0;\n }", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "public int size() {\n return this.wellsets.size();\n }", "public void mostrarNumeroTareasPendientes(){\n System.out.println(tareas.size());\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int size() {\n return size;\n }", "public int darCantidadSalones()\n {\n return salones.size( );\n }", "@Override\n public int size() {\n return theSet.size();\n }", "public int size() {\n return slexic.size();\n }", "public int size() { return size; }", "public int size() { return size; }", "public int size() {\r\n return size;\r\n }", "static int size_of_mvi(String passed){\n\t\treturn 2;\n\t}", "public int size()\n {\n return this.size;\n }" ]
[ "0.7061467", "0.69491", "0.6817894", "0.68134505", "0.67647034", "0.67335874", "0.67318606", "0.67021203", "0.6661043", "0.6631377", "0.6631377", "0.6631377", "0.6631377", "0.6631377", "0.6631377", "0.6572939", "0.6566151", "0.6552659", "0.65434843", "0.65336424", "0.652595", "0.65009487", "0.65009487", "0.6476019", "0.6474689", "0.64732486", "0.6472196", "0.6465158", "0.6463035", "0.64580655", "0.6447977", "0.6442409", "0.643865", "0.6433678", "0.6431352", "0.6429642", "0.64288014", "0.64194316", "0.6397556", "0.63889915", "0.63790345", "0.6376851", "0.636852", "0.636506", "0.6359637", "0.6359637", "0.6359637", "0.6359637", "0.635731", "0.6352516", "0.63430464", "0.6333859", "0.6332859", "0.6332298", "0.6316452", "0.63156354", "0.63142675", "0.63086104", "0.6292958", "0.62886584", "0.6287696", "0.62832904", "0.627245", "0.6270417", "0.6269725", "0.62670213", "0.62657654", "0.62650365", "0.62650365", "0.6253251", "0.62524724", "0.62524724", "0.62524724", "0.62439734", "0.6240698", "0.62398875", "0.62374496", "0.62374234", "0.6237348", "0.62322253", "0.6229331", "0.62230253", "0.62224174", "0.6221341", "0.6220834", "0.6213139", "0.6213139", "0.6213139", "0.6213139", "0.6213139", "0.6213139", "0.6213139", "0.62124974", "0.6212307", "0.62109554", "0.62106013", "0.62106013", "0.62029", "0.6202313", "0.620152" ]
0.6298688
58
Builds a DFSM from a string representation (encoding)
public DFSM(String encoding) throws Exception { super(encoding); this.transitionFunction().veryifyTotal(this.states, this.alphabet); this.transitionFunction().verifyNoEpsilonTransitions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "State mo5880e(String str);", "public abstract void fromString(String s, String context);", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "protected static CfDef cfdefFromString(String st) throws IOException\n {\n assert st != null;\n TDeserializer deserializer = new TDeserializer(new TBinaryProtocol.Factory());\n CfDef cfDef = new CfDef();\n try\n {\n deserializer.deserialize(cfDef, Hex.hexToBytes(st));\n }\n catch (TException e)\n {\n throw new IOException(e);\n }\n return cfDef;\n }", "public abstract byte[] parse(String input);", "public Tree<String> parse(Tree<State> tree) {\n\t\tTree<String> parsed = null;\n\t\ttry { // do NOT expect it to crash\n\t\t\tviterbiParse(tree);\n\t\t\tparsed = StateTreeList.stateTreeToStringTree(tree, Inferencer.grammar.numberer);\n\t\t\tparsed = Inferencer.extractBestMaxRuleParse(chart, parsed.getYield());\n\t\t} catch (Exception e) {\n\t\t\tparsed = new Tree<String>(Inferencer.DUMMY_TAG);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn parsed;\n\t}", "public static DriverStateEvent fromString(String string) {\n String[] parts = string.split(\",\");\n String eventTimeString = parts[0].substring(0,19).replace(\"T\", \" \");\n Long eventTimestamp = java.sql.Timestamp.valueOf(eventTimeString).getTime();\n String driverId = parts[1];\n DriverState lastState = DriverState.valueOf(parts[2] );\n DriverState currentState = DriverState.valueOf(parts[3]);\n return new DriverStateEvent(eventTimestamp, driverId, lastState, currentState);\n }", "public static Command decode(String input) \n\t{\n\t\tString[] data = new String[4];\n\t\tdata = input.split(\";\");\n\t\tCommand cmd = new Command(data[0], data[1], data[2], data[3]);\n\t\treturn cmd;\n\t}", "public PolynomBuilder(String polyString) throws BadParsingException, UnstableStateException{\n//\t\tvarsInPolynom = new ArrayList<String>(givenVars); unneeded after rework \n\t\tcurrentTerm = new Term();\n\n\t\ttry{\n\t\t\twhile(position < polyString.length()){\n\t\t\t\tcurrentChar = polyString.charAt(this.position);\n\t\t\t\tcurrentState = parseChar(this.currentChar);\n\t\t\t\tposition++;\t\t\n\t\t\t}\n\t\t\tfinaliseTheTerm();\n\t\t\tif( currentState == States.COEFFICIENT ||\n\t\t\t\tcurrentState == States.DECIMAL ||\n\t\t\t\tcurrentState == States.VAR ||\n\t\t\t\tcurrentState == States.POWER ){\n\t\t\t\tSystem.out.println(\"Successfully parsed!\");\n\t\t\t} else{\n\t\t\t\tSystem.out.println(this.currentState);\n\t\t\t\tthrow new UnstableStateException(\"Polynom ended in unstable state\");\n\t\t\t}\n\t\t}catch(BadParsingException e){\n\t\t\tthrow e;\n\t\t}\n\t}", "public TreeNode deserialize(String data) {\n return build(new Scanner(data));\n }", "@Test\n public void decodeStringDelta()\n {\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 1.0);\n assertEquals(3.0, encoder.decode(\"0011\"), 0.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 2.0);\n assertEquals(0.0, encoder.decode(\"0001\"), 2.0);\n }\n\n {\n final BinaryEncoder encoder = new BinaryEncoder(0, 16, 0.5);\n assertEquals(3.0, encoder.decode(\"00110\"), 0.0);\n }\n }", "public static Tree convertToTree(String s) {\n\ttry {\n\t PennTreeReader ptr = new PennTreeReader(new StringReader(s),\n\t\t new LabeledScoredTreeFactory(new StringLabelFactory()));\n\t Tree tr = ptr.readTree();\n\t ptr.close();\n\t return tr;\n\t} catch (IOException ioe) {\n\t log.log(Level.SEVERE, \"Unable to convert the string to a parse tree: {0}. {1}\",\n\t\t new Object[] { s, ioe.getMessage() });\n\t ioe.printStackTrace();\n\t}\n\treturn null;\n }", "@Test\n public void testConstructionString()\n {\n String constructed = StateUtils.construct(sensitiveString, externalContext);\n Object object = StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertTrue(object instanceof String);\n String string = (String) object;\n Assertions.assertEquals(string, sensitiveString);\n }", "@Test\n public void decodeString()\n {\n final BinaryEncoder encoder = new BinaryEncoder(16);\n assertThat(encoder.decode(\"0011\"), is(3.0));\n }", "@Override\n\tpublic function initFromString(String s) {\n\t\treturn new Monom(s);\n\t}", "public static Obj fromString(String xml) \n { \n try\n {\n ByteArrayInputStream in = new ByteArrayInputStream(xml.getBytes(\"UTF-8\"));\n ObixDecoder decoder = new ObixDecoder(in);\n return decoder.decodeDocument(); \n }\n catch(Exception e)\n {\n throw new RuntimeException(e.toString());\n }\n }", "public EncodeAndDecodeStrings() {}", "public static Result<MessageType, JSONException> fromString(String str) {\r\n return Result.ofRuntime(() -> valueOf(str))\r\n .mapError(ignored -> new JSONException(\"command not recognised\"));\r\n }", "public abstract T parse(String s);", "public static String decode(String str){\r\n\t\treturn HtmlCodec.DefaultChar2ENUM.decode(str);\r\n\t}", "public State(int stateNum, String stateString) throws IllegalArgumentEvent {\r\n\t\tint iVal = 0;\r\n\t\t\r\n\t\tthis.stateNum = stateNum;\r\n\t\t\r\n\t\t//Given: \"Sense Ahead 1 3 Food\"\r\n\t\tString[] terms = stateString.split(\" \");\r\n\t\t//Gives: [Sense,Ahead,1,3,Food]\r\n\t\t\r\n\t\tCommand command = null;\r\n\t\ttry{\r\n\t\t\tcommand = Command.valueOf(terms[0].trim().toUpperCase());\r\n\t\t}catch(IllegalArgumentException e){\r\n\t\t\tthrow new IllegalArgumentEvent(\"Illegal Command \" +\r\n\t\t\t\t\"argument in State constructor: \" + e.getMessage(), e);\r\n\t\t}finally{\r\n\t\t\tthis.command = command;\r\n\t\t}\r\n\t\t\r\n\t\tswitch(this.command){\r\n\t\t//Sense senseDir st1 st2 condition (senseMarker)\r\n\t\tcase SENSE:\r\n\t\t\tif(terms.length != 5 && terms.length != 6){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tSenseDir senseDir = null;\r\n\t\t\ttry{\r\n\t\t\t\tsenseDir = SenseDir.valueOf(terms[1].trim().toUpperCase());\r\n\t\t\t}catch(IllegalArgumentException e){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal SenseDir ordinal \" +\r\n\t\t\t\t\t\"argument in State constructor: \" + e.getMessage(), e);\r\n\t\t\t}finally{\r\n\t\t\t\tthis.senseDir = senseDir;\r\n\t\t\t}\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tthis.marker = -1;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tiVal = Integer.parseInt(terms[3]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st2 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st2 = iVal;\r\n\t\t\t\r\n\t\t\tCondition condition = null;\r\n\t\t\ttry{\r\n\t\t\t\tcondition = Condition.valueOf(terms[4].trim().toUpperCase());\r\n\t\t\t}catch(IllegalArgumentException e){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal Condition ordinal \" +\r\n\t\t\t\t\t\"argument in State constructor: \" + e.getMessage(), e);\r\n\t\t\t}finally{\r\n\t\t\t\tthis.condition = condition;\r\n\t\t\t}\r\n\t\t\tif(this.condition == Condition.MARKER){\r\n\t\t\t\tiVal = Integer.parseInt(terms[5]);\r\n\t\t\t\tif(iVal < 0 || iVal > 5){\r\n\t\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal senseMarker \" +\r\n\t\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t\t}\r\n\t\t\t\tthis.senseMarker = iVal;\r\n\t\t\t}else{\r\n\t\t\t\tthis.senseMarker = -1;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t//Mark marker st1\r\n\t\tcase MARK:\r\n\t\t\tif(terms.length != 3){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 0 || iVal > 5){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal marker \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.marker = iVal;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tthis.st2 = -1;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//Unmark marker st1\r\n\t\tcase UNMARK:\r\n\t\t\tif(terms.length != 3){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 0 || iVal > 5){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal marker \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.marker = iVal;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tthis.st2 = -1;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//PickUp st1 st2\r\n\t\tcase PICKUP:\r\n\t\t\tif(terms.length != 3){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tthis.marker = -1;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st2 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st2 = iVal;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//Drop st1\r\n\t\tcase DROP:\r\n\t\t\tif(terms.length != 2){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tthis.marker = -1;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tthis.st2 = -1;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//Turn turnDir st1\r\n\t\tcase TURN:\r\n\t\t\tif(terms.length != 3){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tTurnDir turnDir = null;\r\n\t\t\ttry{\r\n\t\t\t\tturnDir = TurnDir.valueOf(terms[1].trim().toUpperCase());\r\n\t\t\t}catch(IllegalArgumentException e){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal TurnDir ordinal \" +\r\n\t\t\t\t\t\"argument in State constructor: \" + e.getMessage(), e);\r\n\t\t\t}finally{\r\n\t\t\t\tthis.turnDir = turnDir;\r\n\t\t\t}\r\n\t\t\tthis.marker = -1;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tthis.st2 = -1;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//Move st1 st2\r\n\t\tcase MOVE:\r\n\t\t\tif(terms.length != 3){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tthis.marker = -1;\r\n\t\t\tthis.p = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st2 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st2 = iVal;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//Flip p st1 st2\r\n\t\tcase FLIP:\r\n\t\t\tif(terms.length != 4){\r\n\t\t\t\tthrow new IllegalArgumentException(\"Incomplete state String\");\r\n\t\t\t}\r\n\t\t\tthis.senseDir = null;\r\n\t\t\tthis.turnDir = null;\r\n\t\t\tthis.marker = -1;\r\n\t\t\tiVal = Integer.parseInt(terms[1]);\r\n\t\t\tif(iVal < 1){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal p \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.p = iVal;\r\n\t\t\tiVal = Integer.parseInt(terms[2]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st1 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st1 = iVal;\r\n\t\t\tiVal = Integer.parseInt(terms[3]);\r\n\t\t\tif(iVal < 0 || iVal > max){\r\n\t\t\t\tthrow new IllegalArgumentEvent(\"Illegal st2 \" +\r\n\t\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t\t\tthis.st2 = iVal;\r\n\t\t\tthis.condition = null;\r\n\t\t\tthis.senseMarker = -1;\r\n\t\t\tbreak;\r\n\t\t//This should never be reached\r\n\t\tdefault:\r\n\t\t\tthrow new IllegalArgumentEvent(\"Illegal Command \" +\r\n\t\t\t\t\"argument in State constructor\");\r\n\t\t\t}\r\n\t}", "String decodeString();", "public abstract T parse(String str);", "public TreeNode deserialize(String data) {\n Queue<String> queue = new LinkedList<>(Arrays.asList(data.split(SP)));\n return buildTree(queue);\n }", "@Override\n public String decode(String code) throws IllegalStateException {\n if (code == null || code.equals(\"\")) {\n throw new IllegalStateException(\"the code cannot be null or empty.\");\n }\n Tree iterator = root;\n decode = \"\";\n\n for (int i = 0; i < code.length(); i++) {\n if (!encodingArray.contains(code.charAt(i))) {\n throw new IllegalStateException(\"The encoded string contains illegal symbol\");\n }\n }\n\n code = decoder(code, iterator);\n\n if (code.length() != 0) {\n throw new IllegalStateException(\"there is some problem with decoding.\");\n }\n\n return decode;\n }", "SAPL parse(String saplDefinition);", "@Override\r\n public String decode(String message) throws IllegalStateException {\r\n StringBuilder sb = new StringBuilder();\r\n TrieNode currNode = root;\r\n //check validity of the encoded message\r\n for (char ch : message.toCharArray()) {\r\n if (!this.codeSymbolsSet.contains(ch)) {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n //regular decoding\r\n for (int i = 0; i < message.length(); i++) {\r\n char currChar = message.charAt(i);\r\n if (currNode.getChildrenMap().containsKey(currChar)) {\r\n currNode = currNode.getChildrenMap().get(currChar);\r\n if (currNode.isLeaf()) {\r\n sb.append(currNode.getSymbol());\r\n currNode = root;\r\n }\r\n }\r\n //wrong decoding\r\n else {\r\n throw new IllegalStateException();\r\n }\r\n }\r\n if (!currNode.isLeaf() && currNode != root) {\r\n throw new IllegalStateException();\r\n }\r\n return sb.toString();\r\n }", "@Override\n\tpublic OrdineTestata fromString(String ordineTestata) {\n\t\treturn null;\n\t}", "public static Type Type(String str) {\n\t\ttry {\n\t\t\tJavaIdentifierInputStream jin = new JavaIdentifierInputStream(str);\n\t\t\tBinaryInputStream bin = new BinaryInputStream(jin);\n\t\t\tBinaryAutomataReader reader = new BinaryAutomataReader(bin,\n\t\t\t\t\tTypes.SCHEMA);\n\t\t\tAutomaton automaton = reader.read();\n\t\t\treader.close();\n\n\t\t\treturn Type.construct(automaton);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(\"runtime failure constructing type\", e);\n\t\t}\n\t}", "public AstParser(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new AstParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 9; i++) jj_la1[i] = -1;\n }", "public static RecordSchema buildDatahubSchema(String str) {\n if (str == null || str.isEmpty()) {\n return new RecordSchema();\n }\n String remain = str;\n ArrayList<Field> cols = new ArrayList<Field>();\n int pos;\n while (remain.length() > 0) {\n pos = remain.indexOf(SEPERATOR);\n if (pos < 0) {\n // Last one\n pos = remain.length();\n }\n String tok = remain.substring(0, pos);\n String[] knv = tok.split(DELIMITER, 2);\n if (knv.length != 2) {\n throw new IllegalArgumentException(\n \"Malformed schema definition, expecting \\\"name:type\\\" but was \\\"\" + tok + \"\\\"\");\n }\n if (pos == remain.length()) {\n remain = \"\";\n } else {\n remain = remain.substring(pos + 1);\n }\n cols.add(new Field(knv[0], FieldType.valueOf(knv[1].toUpperCase())));\n }\n RecordSchema schema = new RecordSchema();\n schema.setFields(cols);\n return schema;\n }", "public void testFromString()\n {\n // An empty board\n assertEquals(b1.toString(), \"EEEEEEEEE\");\n b1.fromString(\"EEEEEEEEE\");\n assertEquals(b1.toString(), \"EEEEEEEEE\");\n\n // An arbitrary complex but valid case\n b1.fromString(\"RRRBEEBBE\");\n assertEquals(b1.toString(), \"RRRBEEBBE\");\n\n // Wrong string length\n try { b1.fromString(\"E\"); }\n catch (Exception e)\n {\n assertEquals(e.getClass(),\n (new IllegalArgumentException()).getClass());\n assertEquals(e.getMessage(), \"Your state identifying \" +\n \"string is the wrong length. It must be nine characters\" +\n \" long with no spaces.\");\n }\n\n // Invalid cell characters\n try { b1.fromString(\"XXXXXXXXX\"); }\n catch (Exception e)\n {\n assertEquals(e.getClass(),\n (new IllegalArgumentException()).getClass());\n assertEquals(e.getMessage(), \"Your string has a \" +\n \"value in it that doesn't match one of our cell \" +\n \"types.\");\n }\n\n }", "<S> S fromStr(String s, Class<S> clazz);", "private static String loadConvert(String str) {\n\t\tint off = 0;\n\t\tint len = str.length();\n\t\tchar[] in = str.toCharArray();\n\t\tchar[] convtBuf = new char[1024];\n\t\tif (convtBuf.length < len) {\n\t\t\tint newLen = len * 2;\n\t\t\tif (newLen < 0) {\n\t\t\t\tnewLen = Integer.MAX_VALUE;\n\t\t\t}\n\t\t\tconvtBuf = new char[newLen];\n\t\t}\n\t\tchar aChar;\n\t\tchar[] out = convtBuf;\n\t\tint outLen = 0;\n\t\tint end = off + len;\n\n\t\twhile (off < end) {\n\t\t\taChar = in[off++];\n\t\t\tif (aChar == '\\\\') {\n\t\t\t\taChar = in[off++];\n\t\t\t\tif (aChar == 'u') {\n\t\t\t\t\t// Read the xxxx\n\t\t\t\t\tint value = 0;\n\t\t\t\t\tfor (int i = 0; i < 4; i++) {\n\t\t\t\t\t\taChar = in[off++];\n\t\t\t\t\t\tswitch (aChar) {\n\t\t\t\t\t\tcase '0':\n\t\t\t\t\t\tcase '1':\n\t\t\t\t\t\tcase '2':\n\t\t\t\t\t\tcase '3':\n\t\t\t\t\t\tcase '4':\n\t\t\t\t\t\tcase '5':\n\t\t\t\t\t\tcase '6':\n\t\t\t\t\t\tcase '7':\n\t\t\t\t\t\tcase '8':\n\t\t\t\t\t\tcase '9':\n\t\t\t\t\t\t\tvalue = (value << 4) + aChar - '0';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'a':\n\t\t\t\t\t\tcase 'b':\n\t\t\t\t\t\tcase 'c':\n\t\t\t\t\t\tcase 'd':\n\t\t\t\t\t\tcase 'e':\n\t\t\t\t\t\tcase 'f':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'a';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'A':\n\t\t\t\t\t\tcase 'B':\n\t\t\t\t\t\tcase 'C':\n\t\t\t\t\t\tcase 'D':\n\t\t\t\t\t\tcase 'E':\n\t\t\t\t\t\tcase 'F':\n\t\t\t\t\t\t\tvalue = (value << 4) + 10 + aChar - 'A';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(\"Malformed \\\\uxxxx encoding.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tout[outLen++] = (char) value;\n\t\t\t\t} else {\n\t\t\t\t\tif (aChar == 't')\n\t\t\t\t\t\taChar = '\\t';\n\t\t\t\t\telse if (aChar == 'r')\n\t\t\t\t\t\taChar = '\\r';\n\t\t\t\t\telse if (aChar == 'n')\n\t\t\t\t\t\taChar = '\\n';\n\t\t\t\t\telse if (aChar == 'f')\n\t\t\t\t\t\taChar = '\\f';\n\t\t\t\t\tout[outLen++] = aChar;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tout[outLen++] = aChar;\n\t\t\t}\n\t\t}\n\t\treturn new String(out, 0, outLen);\n\t}", "public Token toToken(String s);", "public TreeNode deserialize(String data) {\n// String[] nodes = data.split(\",\");\n Deque<String> nodes = new LinkedList<>(Arrays.asList(data.split(\",\")));\n return build(nodes);\n }", "protected final Object fromStringImpl(String string)\n throws TypeValueException {\n int y, m, d;\n try {\n y = Integer.parseInt(string.substring(0, 4));\n m = Integer.parseInt(string.substring(4, 6));\n d = Integer.parseInt(string.substring(6, 8));\n } catch (NumberFormatException nfe) {\n\n // Should never happen, since isValidValueImpl(String) will have been\n // called\n throw new TypeValueException(this, string);\n }\n\n // Check that the values are in the correct range\n return new Value(y, m, d);\n }", "Object decode(String encoded);", "protected abstract SimpleType doParseString(String s);", "public DerParser( byte[] bytes ) throws IOException {\n this( new ByteArrayInputStream( bytes ) );\n }", "public DFAState(String name) {\n this.name = name;\n this.hashCode = name.hashCode();\n }", "public void parse(String string) {\n\t\t\n\t}", "public static SessionState fromBytes(byte[] bytes)\n {\n String[] sessionInfo = (new String(bytes)).split(\"_\", 3);\n String[] sesid = sessionInfo[0].split(\"/\");\n \n return new SessionState(\n Integer.parseInt(sesid[0]), \n sesid[1],\n Integer.parseInt(sessionInfo[1]),\n sessionInfo[2]);\n }", "public abstract ExplicitMachineState convertToExplicitMachineState(MachineState state);", "public Packman(String str) {\r\n\t\tString[] fields = str.split(\",\");\r\n\t\tType = fields[0].charAt(0);\r\n\t\tID = Integer.parseInt(fields[1]);\r\n\t\tLocation = new LatLonAlt(fields[2] + \",\" + fields[3] + \",\" + fields[4]);\r\n\t\tSpeed = Double.parseDouble(fields[5]);\r\n\t\tRadius = Double.parseDouble(fields[6]);\r\n\t\tInitTime = new Date().getTime();\r\n\t}", "public static Expr parse(String str) {\r\n\t\tExprBinary at = new ExprBinary(null, null); // the root of the tree\r\n\t\tStringBuilder opstore = new StringBuilder(); // stores operator characters\r\n\t\tStringBuilder adder = new StringBuilder(); // stores value characters\r\n\t\tboolean text = false; // whether inside of a string\r\n\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar c = str.charAt(i);\r\n\t\t\tboolean add = (c != '\\\\'); // whether to add the char to adder. ignore escape char\r\n\t\t\tboolean leftSide = (opstore.length() == 0); // whether on the left side of the binary expression (before the operator)\r\n\t\t\tString adderStr = adder.toString();\r\n\t\t\tString opStr = opstore.toString();\r\n\r\n\t\t\tif (c == '\"') { // string\r\n\t\t\t\tif (i == 0 || str.charAt(i - 1) != '\\\\') {\r\n\t\t\t\t\ttext = !text; // ignore string contents\r\n\t\t\t\t}\r\n\t\t\t} else if (!text) {\r\n\t\t\t\tif (c == ' ') {\r\n\t\t\t\t\tadd = false; // ignore spaces\r\n\t\t\t\t} else if (c == '(') { // grouping or function\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tString contents = str.substring(i + 1, closeIndex);\r\n\t\t\t\t\tExpr group; // the expression denoted by the parentheses group\r\n\r\n\t\t\t\t\tif (i > 0 && (!isReserved(str.charAt(i - 1)) || str.charAt(i - 1) == ')')) { // function\r\n\t\t\t\t\t\tif (adderStr.isEmpty()) { // function reference call ... func()()\r\n\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(null, contents); // a reference call is only a parameter group, null name\r\n\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t} else { // function call\r\n\t\t\t\t\t\t\tif (adderStr.startsWith(\".\")) { // function sub call ... func().subfunc()\r\n\t\t\t\t\t\t\t\tExpr leftLink = leftSide ? at.left() : at.right();\r\n\t\t\t\t\t\t\t\tExprCall rightLink = new ExprCall(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\tgroup = new ExprCallChain(leftLink, rightLink);\r\n\r\n\t\t\t\t\t\t\t} else { // standalone function ... func()\r\n\t\t\t\t\t\t\t\tif (Character.toString(adderStr.charAt(0)).equals(Operator.REF.op)) { // @func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprFuncRef(adderStr.substring(1), contents);\r\n\t\t\t\t\t\t\t\t} else { // func()\r\n\t\t\t\t\t\t\t\t\tgroup = new ExprCall(adderStr, contents);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // parenthetical grouping\r\n\t\t\t\t\t\tchar cc = (adderStr.length() == 1 ? adderStr.charAt(0) : 0); // operator before parenthesis ... !()\r\n\t\t\t\t\t\tif (isReserved(cc)) { // operation on the group\r\n\t\t\t\t\t\t\tgroup = new ExprUnary(Operator.get(Character.toString(cc)), parse(contents));\r\n\t\t\t\t\t\t} else { // ignore character, not an operator\r\n\t\t\t\t\t\t\tgroup = parse(contents);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// add to tree\r\n\t\t\t\t\tif (leftSide) at.setLeft(group);\r\n\t\t\t\t\telse at.setRight(group);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (c == '{') { // array initializer ... {}\r\n\t\t\t\t\tint closeIndex = getExitIndex(str, i);\r\n\t\t\t\t\tExpr arr = new ExprArray(str.substring(i + 1, closeIndex), adderStr);\r\n\r\n\t\t\t\t\tif (adderStr.length() == 1 && isReserved(adderStr.charAt(0))) {\r\n\t\t\t\t\t\t// unary op done on array initializer ... !{}\r\n\t\t\t\t\t\tarr = new ExprUnary(Operator.get(Character.toString(adderStr.charAt(0))), arr);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (leftSide) at.setLeft(arr);\r\n\t\t\t\t\telse at.setRight(arr);\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t\ti = closeIndex;\r\n\t\t\t\t\tadd = false;\r\n\r\n\t\t\t\t} else if (isOp(c)) { // operator\r\n\t\t\t\t\t// add value used in operation to tree\r\n\t\t\t\t\tif (!adderStr.isEmpty()) {\r\n\t\t\t\t\t\tif (leftSide) { // ex: adderStr + ___\r\n\t\t\t\t\t\t\tat.setLeft(parseValue(adderStr));\r\n\t\t\t\t\t\t} else { // ex: (___ + adderStr) + ___\r\n\t\t\t\t\t\t\tat.setRight(parseValue(adderStr));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (opStr.equals(\"\") || (i > 0 && isOp(str.charAt(i - 1)))) { // accumulate operator from adjacent operator characters (ex: != consists of ! and =)\r\n\t\t\t\t\t\tif (!(adderStr.isEmpty() && (opStr + c).equals(\"-\")) && (Operator.get(opStr + c) != null || (opStr.isEmpty() && isOp(c)))) {// if the operator exists, then it is an operator character\r\n\t\t\t\t\t\t\tif (opStr.equals(\"-\") && c == '-') { // this and the above line handle negatives and double negatives\r\n\t\t\t\t\t\t\t\topStr = \"+\";\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\topStr += c;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { // existing operator operation must be added to tree ... in \"(a + b) * c\", \"(a+b)\" must be abstracted-out so we get \"x * c\"\r\n\t\t\t\t\t\tint endIndex = i + 1; // end index of operator\r\n\r\n\t\t\t\t\t\t// get entire operator if operator is more than 1 character long\r\n\t\t\t\t\t\tfor (int i2 = endIndex; i2 < str.length(); i2++) {\r\n\t\t\t\t\t\t\tif (isOp(str.charAt(i2))) endIndex++;\r\n\t\t\t\t\t\t\telse break;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tOperator nextOp = Operator.get(str.substring(i, endIndex)); // second (right-most) operator\r\n\t\t\t\t\t\tat.op = Operator.get(opStr); // first (left-most) operator\r\n\r\n\t\t\t\t\t\t// group values in operation by operator precedence\r\n\t\t\t\t\t\tint p1 = precedence(nextOp); // right-most op\r\n\t\t\t\t\t\tint p2 = precedence(at.op); // left-most op\r\n\r\n\t\t\t\t\t\tif (p1 > p2) { // group around the right-most op\r\n\t\t\t\t\t\t\tExprBinary right = new ExprBinary(at, nextOp);\r\n\t\t\t\t\t\t\tright.setLeft(at.right());\r\n\r\n\t\t\t\t\t\t\tat.setRight(right);\r\n\t\t\t\t\t\t\tat = right;\r\n\r\n\t\t\t\t\t\t} else if (p1 < p2) { // group around the left-most op\r\n\t\t\t\t\t\t\tExprBinary last = at;\r\n\t\t\t\t\t\t\tExprBinary match = at.parent();\r\n\r\n\t\t\t\t\t\t\t// correctly add to the binary tree based on precedence of operators\r\n\t\t\t\t\t\t\twhile (match instanceof ExprBinary && p1 < (p2 = precedence(((ExprBinary) match).op))) {\r\n\t\t\t\t\t\t\t\tlast = match;\r\n\t\t\t\t\t\t\t\tmatch = match.parent();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tExprBinary tr = new ExprBinary(match, nextOp);\r\n\t\t\t\t\t\t\ttr.setLeft(last);\r\n\r\n\t\t\t\t\t\t\tif (match != null) {\r\n\t\t\t\t\t\t\t\tif (last == match.right()) match.setRight(tr);\r\n\t\t\t\t\t\t\t\telse match.setLeft(tr);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tat = tr;\r\n\r\n\t\t\t\t\t\t} else { // group from left to right (equal operator precedence)\r\n\t\t\t\t\t\t\tExprBinary left = new ExprBinary(at, at.op); // group existing values into left node, add right to open right node spot\r\n\t\t\t\t\t\t\tleft.setLeft(at.left());\r\n\t\t\t\t\t\t\tleft.setRight(at.right());\r\n\r\n\t\t\t\t\t\t\tat.op = nextOp;\r\n\t\t\t\t\t\t\tat.setLeft(left);\r\n\t\t\t\t\t\t\tat.setRight(null);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\topStr = nextOp.op;\r\n\t\t\t\t\t\ti = endIndex - 1;\r\n\t\t\t\t\t\tadd = false;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tadder.setLength(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// store valid value characters\r\n\t\t\tif (add) {\r\n\t\t\t\tadder.append(c);\r\n\r\n\t\t\t\t// if this is the last character, then add the stored value to the tree.\r\n\t\t\t\t// otherwise, would be incorrectly ignored because there is no next operator\r\n\t\t\t\tif (i + 1 == str.length()) {\r\n\t\t\t\t\tif (opstore.length() == 0) {\r\n\t\t\t\t\t\tat.setLeft(parseValue(adder.toString()));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tat.setRight(parseValue(adder.toString()));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// initialize binary tree operator if not done so already\r\n\t\tif (at.op == null) {\r\n\t\t\tat.op = Operator.get(opstore.toString());\r\n\t\t}\r\n\r\n\t\t// after traversing the tree to some point, we need to get back to root so we can return the entire tree\r\n\t\twhile (at.parent() != null) {\r\n\t\t\tat = (ExprBinary) at.parent();\r\n\t\t}\r\n\r\n\t\t// the expression may not actually be a binary operation\r\n\t\tif (at.op == null && at.right() == NULL) {\r\n\t\t\tif (at.left() == NULL) return NULL; // the expression is empty\r\n\t\t\treturn at.left(); // the expression is a single value/unary-operation\r\n\t\t}\r\n\r\n\t\treturn at;\r\n\t}", "public GongDomObject(String string) throws ParserConfigurationException, InvalidTagException, SAXException, IOException {\r\n super(string);\r\n }", "public BinaryTree(String expression) {\n \tString[] arr = expression.split(\" \");\n \troot = parse(arr);\n }", "public Label newLabelFromString(String encodedLabelStr) {\r\n return newLabel(encodedLabelStr);\r\n }", "public DecoderImpl(String codingSymbols) throws IllegalArgumentException {\n if (codingSymbols == null || codingSymbols.isEmpty()) {\n throw new IllegalArgumentException(\"The argument cannot be empty or null.\");\n }\n\n root = new GroupTreeNode(\"root\");\n\n for (int i = 0; i < codingSymbols.length(); i++) {\n encodingArray.add(codingSymbols.charAt(i));\n }\n\n }", "SAPL parse(InputStream saplInputStream);", "public TreeNode deserialize(String data) {\n start = 0;\n TreeNode root = build(data.split(\",\",-1));\n return root;\n }", "@JsonCreator\n public static ProgrammingState fromString(String name) {\n return fromString(name, ProgrammingState.class);\n }", "public static <S, T, A extends MutableMealyMachine<S, ? super Input, T, ? super Output>> A constructMachine(A fm) {\n // @formatter:off\n return AutomatonBuilders.forMealy(fm)\n .withInitial(\"s0\")\n .from(\"s0\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s1\")\n .on(Input.POP).withOutput(Output.EMPTY).loop()\n .from(\"s1\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s2\")\n .on(Input.POP).withOutput(Output.OK).to(\"s0\")\n .from(\"s2\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s3\")\n .on(Input.POP).withOutput(Output.OK).to(\"s1\")\n .from(\"s3\")\n .on(Input.PUSH).withOutput(Output.FULL).loop()\n .on(Input.POP).withOutput(Output.OK).to(\"s2\")\n .create();\n // @formatter:on\n }", "public TreeNode deserialize(String data) {\r\n Deque<String> nodes = new LinkedList<>();\r\n nodes.addAll(Arrays.asList(data.split(spliter)));\r\n return buildTree(nodes);\r\n }", "public LEParser(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new JavaCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new LEParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 5; i++) jj_la1[i] = -1;\n }", "public void fromString(String xmlString) throws Exception {\r\n\t\tJAXBContext jc = JAXBContext.newInstance(TaskTypes.class);\r\n\t\tUnmarshaller u = jc.createUnmarshaller();\r\n\t\tTaskTypes tt = (TaskTypes) u.unmarshal(new StringReader(xmlString));\r\n\t\tthis.taskTypes = tt.taskTypes;\r\n\t}", "public CalculatorParser(java.io.InputStream stream, String encoding) {\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\n token_source = new CalculatorParserTokenManager(jj_input_stream);\n token = new Token();\n jj_ntk = -1;\n }", "public abstract Object parseRecord(String input);", "public static Formula parse_string(String sf)\n\t{\n\t\tFormula f = new Formula(sf, Formula.formula_type(sf.substring(1, sf.length()-1)), new MetaFormula());\n\t\treturn f;\n\t}", "private static Order parseFixToOrder(String fixStringOrd) {\n\t\tString[] tOrdParsed = fixStringOrd.split(\"\\\\x01\");\n\t\tOrder newOrd = new Order(tOrdParsed[12].split(\"=\")[1],\n\t\t\t\ttOrdParsed[11].split(\"=\")[1].charAt(0),\n\t\t\t\ttOrdParsed[9].split(\"=\")[1].charAt(0),\n\t\t\t\tDouble.parseDouble(tOrdParsed[10].split(\"=\")[1]),\n\t\t\t\tDouble.parseDouble(tOrdParsed[8].split(\"=\")[1]),\n\t\t\t\ttOrdParsed[4].split(\"=\")[1]);\n\t\treturn newOrd;\n\t}", "public TreeNode deserialize(String data) {\n LinkedList<String> linkedList = new LinkedList<>(Arrays.asList(data.split(\",\")));\n return buildTree(linkedList);\n }", "boolean deserialize(String inputString);", "static public GCode fromString(String str) {\n int c = str.indexOf('(');\n if(c != -1) {\n str = str.substring(0,c-1);\n } \n String[] parts = str.split(\" \");\n GCode g = new GCode(parts[0]);\n // parse args\n for(int i=1; i < parts.length; i++) {\n String arg = parts[i].substring(0,1);\n if(parts[i].length() == 1) {\n g.arg(arg);\n } else {\n String value = parts[i].substring(1);\n g.arg(arg, value); \n }\n }\n return g;\n }", "public TreeNode deserialize(String data) {\n \n Queue<String> q = new LinkedList<>(Arrays.asList(data.split(\" \")));\n return helper(q);\n }", "@JsonCreator\n public static TestMigrationState fromString(String name) {\n return fromString(name, TestMigrationState.class);\n }", "synchronized boolean createFromString (String buffer) {\n m_buffer = buffer;\n m_pos = 0;\n m_len = buffer.length ();\n return m_newData = parse ();\n }", "protected Element parseString(String str){\n\t\ttry {\n\t\t\tparser.parse(str);\n\t\t\treturn parser.getDocument().getDocumentElement();\n\t\t} catch (SAXException e) {\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn el(\"failure\", text(\"The workflow instrumenter could not insert an activity here, because\" +\n\t\t\t\"the code for the activitiy, that was supplied in the requirement specification was not correct!\"));\n\t}", "public Segment createSegmentFromString(String segmentstring) {\n\n SegmentImpl segment = new SegmentImpl();\n\n String[] chars = segmentstring.split(\"\");\n\n List<String> worldChars = Arrays.asList(chars);\n\n for (String tocken : worldChars) {\n StepImpl step = new StepImpl();\n Overlay over = null;\n\n if (tocken.equals(\"W\")) {\n over = new Sword();\n } else if (tocken.equals(\"M\")) {\n over = new MonsterImpl();\n } else if (tocken.equals(\"P\")){\n over = new Princess();\n }\n\n if (over != null) {\n step.addOverlay(over);\n }\n segment.addStep(step);\n }\n\n return segment;\n }", "public DNode(String s) {\n\t\tString[] parts = s.split(\" @ \");\n\t\tString[] params = parts[0].split(\", \");\n\t\tthis.key = Integer.parseInt(params[0]);\n\t\tthis.location = new Point3D(params[1]);\n\t\tthis.weight = Double.parseDouble(params[2]);\n\t\tthis.info = params[3];\n\t\tthis.tag = Integer.parseInt(params[4]);\n\n\t\tif (parts.length > 1) {\n\t\t\tString[] edges = parts[1].split(\" # \");\n\t\t\tfor (String string : edges) {\n\t\t\t\tDEdge e = new DEdge(string);\n\t\t\t\tif (e.getSrc() == getKey())\n\t\t\t\t\tput(e.getDest(), e);\n\t\t\t\telse\n\t\t\t\t\tthrow new RuntimeException(\"Edge src is \" + e.getSrc() + \" but source node key is \" + getKey());\n\t\t\t}\n\t\t}\n\t}", "public static TableId parse(String str) {\n return parse(str, true);\n }", "C1114c mo5879d(String str);", "public static MimeTransferEncoding parseString(String s) {\n\t\t// Initially I tried to fill the map in the constructor, but I got a\n\t\t// compiler error about not being able to access a static variable from\n\t\t// within an \"initializer\" (apparently referring to the constructor).\n\t\tif (map == null) {\n\t\t\tinitializeMap();\n\t\t}\n\n\t\treturn map.get(s);\n\t}", "public final TaskHolderBuilder mo93069d(String str) {\n C32569u.m150519b(str, C6969H.m41409d(\"G7B86C615AA22A82CCF0A\"));\n TaskHolderBuilder tVar = this;\n tVar.f72237f = str;\n return tVar;\n }", "static Task decodeTaskFromString(String task) {\n String modifiedTask = task.trim();\n String type = modifiedTask.substring(eventTypeIndexStart, eventTypeIndexEnd);\n String done = modifiedTask.substring(eventDoneIndexStart, eventDoneIndexEnd);\n String taskDescription = modifiedTask.substring(taskDescriptionIndexStart).trim();\n switch (type) {\n case \"T\" :\n return new Todo(taskDescription, done);\n case \"D\" :\n DesAndTime deadLineDetails = new DesAndTime(taskDescription);\n deadLineDetails.deadLine();\n return new DeadLine(deadLineDetails.getDes(), deadLineDetails.getTime(), done);\n case \"E\" :\n DesAndTime eventDetails = new DesAndTime(taskDescription);\n eventDetails.event();\n return new Event(eventDetails.getDes(), eventDetails.getTime(), done);\n default:\n return new Task(\"Invalid Task\");\n }\n }", "public TreeNode deserialize(String data) {\n Deque<String> nodes = new LinkedList<>();\n nodes.addAll(Arrays.asList(data.substring(1, data.length() - 1).split(SPLITER)));\n \n return build_tree(nodes);\n }", "public static Value makeStr(String s) {\n Value r = new Value();\n r.str = s;\n return canonicalize(r);\n }", "void mo8713dV(String str);", "public Parser(java.io.InputStream stream, String encoding) {\r\n try { jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1); } catch(java.io.UnsupportedEncodingException e) { throw new RuntimeException(e); }\r\n token_source = new ParserTokenManager(jj_input_stream);\r\n token = new Token();\r\n jj_ntk = -1;\r\n }", "public T parse(String value);", "@Override\r\n\tpublic Instruction parse(String cad) throws WrongInstructionFormatException {\r\n\r\n\t\tStringTokenizer st = new StringTokenizer(cad, \" \");\r\n\t\tString words = st.nextToken().toUpperCase();\r\n\t\tif ((words.equals(\"DROP\")) || (words.equals(\"SOLTAR\"))) {\r\n\t\t\tif (st.hasMoreTokens()) {\r\n\t\t\t\tid = st.nextToken();\r\n\t\t\t\tif (!st.hasMoreTokens())\r\n\t\t\t\t\treturn new DropInstruction(id);\r\n\t\t\t\telse\r\n\t\t\t\t\tthrow new WrongInstructionFormatException();\r\n\t\t\t} else\r\n\t\t\t\tthrow new WrongInstructionFormatException();\r\n\t\t} else\r\n\t\t\tthrow new WrongInstructionFormatException();\r\n\r\n\t}", "@Override\r\n\tpublic Instruction parse(String cad) throws WrongInstructionFormatException {\r\n\r\n\t\tStringTokenizer st = new StringTokenizer(cad, \" \");\r\n\t\tString words = st.nextToken().toUpperCase();\r\n\t\tif ((words.equals(\"DROP\")) || (words.equals(\"SOLTAR\"))) {\r\n\t\t\tif (st.hasMoreTokens()) {\r\n\t\t\t\tid = st.nextToken();\r\n\t\t\t\tif (!st.hasMoreTokens())\r\n\t\t\t\t\treturn new DropInstruction(id);\r\n\t\t\t\telse\r\n\t\t\t\t\tthrow new WrongInstructionFormatException();\r\n\t\t\t} else\r\n\t\t\t\tthrow new WrongInstructionFormatException();\r\n\t\t} else\r\n\t\t\tthrow new WrongInstructionFormatException();\r\n\r\n\t}", "public static State parseString(String name)\n\t\t{\n\t\t\tif (FULL.toString().equals(name))\n\t\t\t\treturn FULL;\n\t\t\telse if (PARTIAL.toString().equals(name))\n\t\t\t\treturn PARTIAL;\n\t\t\telse if (DELETED.toString().equals(name))\n\t\t\t\treturn DELETED;\n\t\t\telse\n\t\t\t\treturn null;\n\t\t}", "public IValuable parse(String value);", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "public TreeNode deserialize(String tree) {\r\n\r\n // **** sanity check ****\r\n if (tree.isEmpty())\r\n return null;\r\n\r\n // **** populate the queue with the serialized data ****\r\n Queue<String> q = new LinkedList<>(Arrays.asList(tree.split(\" \")));\r\n\r\n // **** deserialize the BST ****\r\n return deserialize(q, Integer.MIN_VALUE, Integer.MAX_VALUE);\r\n }", "StateMachineFactory getStateMachineFactory();", "private Parser makeParser(String input) throws LexicalException {\r\n\t\tshow(input); //Display the input \r\n\t\tScanner scanner = new Scanner(input).scan(); //Create a Scanner and initialize it\r\n\t\tshow(scanner); //Display the Scanner\r\n\t\tParser parser = new Parser(scanner);\r\n\t\treturn parser;\r\n\t}", "private GraphSprite parseGraph(String str) {\n ParseResult<GraphAST> result = GraphAST.parse(new StringSlice(str));\n if(result.success()) {\n GraphAST grAST = result.getAST();\n Debug.debugln(\"Parse success. Stringified version of result: \\n\" + grAST.stringify());\n return grAST.toGraph();\n }\n else {\n throw new CazgraphException(\"Could not parse graph: \" + result.getMessage());\n }\n }", "public TreeItem(StreamTokenizer st) throws DataFormatException, IOException {\n\t\tcreateItem(st);\n\t}", "@Override\n public FriendsDTO decode(String s) throws DecodeException {\n FriendsDTO friendsDTO = new FriendsDTO();\n // friendsDTO.setSender(Long.valueOf(obj.getString(\"sender\")));\n // friendsDTO.setReceiver(Long.valueOf(obj.getString(\"receiver\")));\n // friendsDTO.setAccept(obj.getBoolean(\"accept\"));\n return friendsDTO;\n }", "public static PacketFormat generateFromString(String str, List<Integer> ids)\r\n\t{\r\n\t\tPacketFormat pf = new PacketFormat();\r\n\t\tstr = str.trim();\r\n\t\tint i = 0;\r\n\t\tif(str.charAt(i) == '(')\r\n\t\t{\r\n\t\t\tList<PartType> idparts = new FastList<PartType>();\r\n\t\t\twhile(str.charAt(i) != ')')\r\n\t\t\t{\r\n\t\t\t\tif(str.charAt(i) == ' ')\r\n\t\t\t\t{\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\tPartType type = PartTypeManager.getInstance().getType(str.substring(i, i+1));\r\n\t\t\t\tif(type != null)\r\n\t\t\t\t\tidparts.add(type);\r\n\t\t\t\telse\r\n\t\t\t\t\treturn null;\r\n\t\t\t\ti++;\r\n\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tpf.addIdPartsAtBegining(idparts, ids);\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn null;\r\n\t\twhile(i < str.length())\r\n\t\t{\r\n\t\t\tif(str.charAt(i) != '[')\r\n\t\t\t{\r\n\t\t\t\ti++;\r\n\t\t\t\tfor(Part part : parseForString(str.substring(i, str.substring(i).indexOf(']'))))\r\n\t\t\t\t{\r\n\t\t\t\t\tpf.getDataFormat().getMainBlock().addPart(part);\r\n\t\t\t\t\twhile(str.charAt(i) == ' ')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(str.charAt(i) == ' ')\r\n\t\t\t{\r\n\t\t\t\ti++;\r\n\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t PartType type = PartTypeManager.getInstance().getType(str.substring(i, i+1));\r\n\t\t\t\tif(type != null)\r\n\t\t\t\t\tpf.getDataFormat().getMainBlock().addPart(new Part(type,-1,\"\",\"\",\"\"));\r\n\t\t\t\telse\r\n\t\t\t\t\treturn null;\r\n\t\t\t\ti++;\r\n\t\t\t\tif(i >= str.length())\r\n\t\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn pf;\r\n\t}", "public TreeNode deserialize(String data) {\n // write your code here\n Queue<String> queue = new LinkedList<>();\n queue.addAll(Arrays.asList(data.split(splitter)));\n return deserializeHelper(queue);\n }", "Data mo12944a(String str) throws IllegalArgumentException;", "public ParserForms(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}", "public abstract Builder zza(String str);", "public static State fromString(String s) {\n if (s != null) {\n State[] vs = values();\n for (int i = 0; i < vs.length; i++) {\n if (vs[i].toString().equalsIgnoreCase(s)) {\n return vs[i];\n }\n }\n }\n return null;\n }", "public static String decode(String string){\n\t\treturn new String(decode(string.getBytes()));\n\t}", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}", "@Override\n\t\t\tpublic Device fromString(String arg0) {\n\t\t\t\treturn null;\n\t\t\t}" ]
[ "0.6016872", "0.54553974", "0.53587484", "0.5272735", "0.5222068", "0.5211387", "0.51764536", "0.51712185", "0.5095483", "0.508889", "0.50719523", "0.5034669", "0.5031976", "0.50269043", "0.50230175", "0.501168", "0.50066286", "0.4998701", "0.4945966", "0.4944923", "0.4932149", "0.492579", "0.49223146", "0.49000713", "0.48996434", "0.48628342", "0.48610157", "0.48491228", "0.483089", "0.4811941", "0.48016673", "0.47881365", "0.47838005", "0.47741294", "0.47474745", "0.47474107", "0.47459692", "0.47444353", "0.47149804", "0.4713121", "0.47069415", "0.47057796", "0.4694074", "0.46835", "0.4675219", "0.46706456", "0.46686244", "0.46679047", "0.46642885", "0.46614257", "0.46613568", "0.46612805", "0.46605772", "0.46576735", "0.46513906", "0.46484873", "0.46428624", "0.46388564", "0.46321675", "0.46314612", "0.46309006", "0.4619659", "0.46194574", "0.4619423", "0.46157506", "0.46149206", "0.46119502", "0.45795238", "0.4578277", "0.45741498", "0.4574111", "0.45674202", "0.4565407", "0.45645162", "0.45613283", "0.4557032", "0.45566693", "0.4553273", "0.45468554", "0.45462778", "0.45408952", "0.45408952", "0.45392215", "0.45377466", "0.45341587", "0.45299867", "0.45298943", "0.45285717", "0.45273188", "0.45236105", "0.4514655", "0.45053977", "0.45027086", "0.45024493", "0.44964564", "0.44931522", "0.44931152", "0.4489697", "0.4489079", "0.4489079" ]
0.60426974
0
Build a DFSM from its components
public DFSM(Set<State> states, Alphabet alphabet, Set<Transition> transitions, State initialState, Set<State> acceptingStates) throws Exception { super(states, alphabet, transitions, initialState, acceptingStates); this.transitionFunction().veryifyTotal(states, alphabet); this.transitionFunction().verifyNoEpsilonTransitions(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "StatePac build();", "public void buildFlow(FlowDO flow) {\n\t}", "private AFD buildAFD() {\n\t\tfor (Cerradura cerradura : cerraduras) {\n\t\t\tEstado origen = getState(cerradura);\n\t\t\tEstado destino = null;\n\n\t\t\tfor (pol.una.py.model.lexico.Cerradura.Subconjunto conjunto : cerradura\n\t\t\t\t\t.getSubconjuntos()) {\n\t\t\t\tString codigoUnico = conjunto.getCodCerradura();\n\t\t\t\t// Conjunto vacio\n\t\t\t\tif (codigoUnico.equals(\"{}\")) {\n\t\t\t\t\tdestino = getStateError();\n\t\t\t\t} else {\n\t\t\t\t\tdestino = getState(getCerradura(codigoUnico));\n\n\t\t\t\t}\n\t\t\t\torigen.addTransition(new Transicion(origen, destino, conjunto\n\t\t\t\t\t\t.getSymbol()));\n\n\t\t\t}\n\t\t\tautomata.addEstado(origen);\n\t\t}\n\t\t// Puede darse el caso de que el estado inicial del AFN no sea mas un\n\t\t// estado inicial, sino un estado de aceptacion. Si no es un estado de\n\t\t// aceptacion, indicamos que es el estado inicial.\n\t\tif (!automata.getInitState().isAcceptation()) {\n\t\t\tautomata.getInitState().setInit(true);\n\t\t}\n\t\treturn automata;\n\t}", "private Builder stateMachine(State<Entity> initialState) {\n FSMComponent component = entityManager.createComponent(FSMComponent.class);\n component.reset();\n component.init(entity, messages);\n component.changeState(initialState);\n entity.add(component);\n return this;\n }", "StateMachineFactory getStateMachineFactory();", "public FSM() {\r\n \t\tstates = new HashMap<String, State>();\r\n \t\ttransitions = new LinkedHashMap<String, Transition>();\r\n \t}", "public void buildCD(){\n\t\tbuildCards();\n\t\tbuildDeck();\n\t}", "private ENFAutomaton build() {\n final Set<State> states = new HashSet<State>(this.states.values());\n final Set<State> acceptStates = new HashSet<State>(this.acceptStates.values());\n\n final Set<Input> alphabet = alphabetBuilder.build();\n\n final ENFAutomatonTransferFunction transferFunction = transferFunctionBuilder.build(this.states);\n\n return new ENFAutomaton(states, acceptStates, alphabet, transferFunction, initial);\n }", "public Compactor build(final Config config) {\n final TObjectLongMap<String> modMap = config.getModMap();\n final long dotNodes = config.getDotNodes();\n final long dotEdges = config.getDotEdges();\n modMap.put(\"node_read\", dotNodes);\n modMap.put(\"node_write\", dotNodes);\n modMap.put(\"node_create\", dotNodes);\n modMap.put(\"node_update\", dotNodes);\n modMap.put(\"node_delete\", dotNodes);\n modMap.put(\"edge_read\", dotEdges);\n modMap.put(\"edge_write\", dotEdges);\n modMap.put(\"edge_create\", dotNodes);\n modMap.put(\"edge_update\", dotNodes);\n modMap.put(\"edge_delete\", dotNodes);\n modMap.put(\"clean_ok\", config.getDotOk());\n \n // Iterators for input\n final PropertyContainerEventProducer<NodeEvent> nodeProducer = new GlopsNodeEventProducer(config, sourceDb);\n final PropertyContainerEventProducer<EdgeEvent> edgeProducer = new GlopsEdgeEventProducer(config, sourceDb);\n \n return new Compactor(config, nodeProducer, edgeProducer);\n }", "public interface CompositeElement {\n\n List<State> getStates();\n\n State getActiveState();\n\n String getName();\n\n default void activeStateConfiguration(ListIterator<String> configurationIterator) {\n }\n\n default Optional<State> configureActiveState(ListIterator<String> configurationIterator, List<State> states) {\n String stateName = configurationIterator.next();\n\n Optional<State> state = states.stream().filter(s -> stateName.equals(s.getName())).findFirst();\n state.orElseThrow(() -> new IllegalStateException(\"No state named \" + stateName\n + \" exists. Add all states to the StateMachine before setting active state configuration.\"));\n\n State activeState = state.get();\n\n if (configurationIterator.hasNext()) {\n if (activeState instanceof CompositeElement) {\n\n ((CompositeElement) activeState).activeStateConfiguration(configurationIterator);\n } else {\n String nextStateName = configurationIterator.next();\n throw new IllegalStateException(\n \"Current state is not Composite State but configuration element remains: \" + nextStateName);\n }\n } else if (activeState instanceof CompositeElement) {\n // no more elements in configuration and current state is composite. Initial transition.\n activeState.onEntry();\n }\n return Optional.ofNullable(activeState);\n }\n\n /**\n * DOT graph description language for the State Machine.\n * Composite states is filled with grey but internal states is not included. Should be possible at least for one\n * level with DOT attrs compound:\n * See: http://www.graphviz.org/content/attrs#dcompound and\n * http://stackoverflow.com/questions/2012036/graphviz-how-to-connect-subgraphs\n *\n * @return sting describing the state machine graph\n */\n default String toDot(boolean showActiveState) {\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"digraph \");\n sb.append(getName().replaceAll(\"\\\\s+\", \"_\"));\n sb.append(\" { \");\n sb.append(System.lineSeparator());\n sb.append(getActiveState().getName().replaceAll(\"\\\\s+\", \"_\"));\n sb.append(\"[label=\\\"\");\n sb.append(getActiveState().getName());\n sb.append(\"\\\"\");\n if (showActiveState) {\n sb.append(\", style=filled, fillcolor=lightblue\");\n }\n sb.append(\"];\");\n sb.append(System.lineSeparator());\n\n getActiveState().toDot(sb);\n\n getStates().stream().filter(state -> state != getActiveState()).forEach(state -> {\n sb.append(state.getName().replaceAll(\"\\\\s+\", \"_\"));\n sb.append(\"[label=\\\"\");\n sb.append(state.getName());\n sb.append(\"\\\"\");\n if (state instanceof CompositeElement) {\n sb.append(\", style=filled, fillcolor=lightgrey\");\n }\n sb.append(\"];\");\n sb.append(System.lineSeparator());\n state.toDot(sb);\n });\n sb.append(\"} \");\n sb.append(System.lineSeparator());\n return sb.toString();\n }\n}", "@Override\n public void enterInputs(FSMParser.InputsContext ctx) {\n for (int i = 0; i < ctx.getChildCount(); i++) {\n if (ctx.getChild(i) instanceof FSMParser.RegisterContext) {\n\n // if defining a new register\n FSMParser.RegisterContext regcont = (FSMParser.RegisterContext) ctx.getChild(i);\n Register reg = new Register(regcont.NAME().getText(), Integer.parseInt(regcont.getChild(1).getText()),\n true, false); //getChild(i-1) because size is always defined before the register\n\n this.comps.add(reg);\n this.regInputs.put(reg, new ArrayList<>());\n\n //if defining a new Variable\n } else if (ctx.getChild(i) instanceof FSMParser.VarContext) {\n FSMParser.VarContext varCont = (FSMParser.VarContext) ctx.getChild(i);\n\n // if this varaible is a clock (labled with C_)\n if (varCont.Clk() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setClkName(var.getName());\n\n\n // if this varible is a reset(labled with R_)\n } else if (varCont.RESET() != null) {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n VerilogComp.setResetName(var.getName());\n\n }\n // else just a standard variable\n else {\n Var var = new Var(varCont.NAME().getText(), Integer.parseInt(varCont.getChild(1).getText()), true,\n false, false);\n this.comps.add(var);\n\n }\n }\n\n }\n\n\n }", "public DFSM(String encoding) throws Exception {\n\t\tsuper(encoding);\n\t\tthis.transitionFunction().veryifyTotal(this.states, this.alphabet);\n\t\tthis.transitionFunction().verifyNoEpsilonTransitions();\n\t}", "FlowRule build();", "public static <S, T, A extends MutableMealyMachine<S, ? super Input, T, ? super Output>> A constructMachine(A fm) {\n // @formatter:off\n return AutomatonBuilders.forMealy(fm)\n .withInitial(\"s0\")\n .from(\"s0\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s1\")\n .on(Input.POP).withOutput(Output.EMPTY).loop()\n .from(\"s1\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s2\")\n .on(Input.POP).withOutput(Output.OK).to(\"s0\")\n .from(\"s2\")\n .on(Input.PUSH).withOutput(Output.OK).to(\"s3\")\n .on(Input.POP).withOutput(Output.OK).to(\"s1\")\n .from(\"s3\")\n .on(Input.PUSH).withOutput(Output.FULL).loop()\n .on(Input.POP).withOutput(Output.OK).to(\"s2\")\n .create();\n // @formatter:on\n }", "@Override\n\tpublic LSystem build() {\n\t\t\n\t\t/**\n\t\t * Nested class which implements the LSystem and provides two essential methods\n\t\t * for building the LSystem: draw and generate.\n\t\t * @author Alen Carin\n\t\t *\n\t\t */\n\t\tclass LSystemImpl implements LSystem {\n\n\t\t\t/**\n\t\t\t * Method used for drawing the Lyndermayer system.\n\t\t\t * Calls method generate to generate all of the productions and \n\t\t\t * executes all the commands that are in the generated string.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void draw(int depth, Painter painter) {\n\t\t\t\tTurtleState state = new TurtleState(\n\t\t\t\t\t\torigin.copy(), \n\t\t\t\t\t\tnew Vector2D(1, 0).rotated(angle), \n\t\t\t\t\t\tColor.BLACK,\n\t\t\t\t\t\tunitLength * Math.pow(unitLengthDegreeScaler, depth)\n\t\t\t\t\t\t);\n\t\t\t\tContext context = new Context();\n\t\t\t\tcontext.pushState(state);\n\t\t\t\tchar[] sequence = generate(depth).toCharArray();\n\t\t\t\t\n\t\t\t\texecuteAllCommands(context, painter, sequence);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Recursive method which generates a string of actions \n\t\t\t * which are generated from productions for the given depth.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic String generate(int depth) {\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tif(depth == 0) {\n\t\t\t\t\treturn axiom;\n\t\t\t\t}\n\t\t\t\tbuilder.append(generate(depth-1));\n\t\t\t\t\n\t\t\t\tchar[] array = builder.toString().toCharArray();\n\t\t\t\tString result = new String();\n\t\t\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\t\t\tString production = (String) productions.get(array[i]);\n\t\t\t\t\tif(production != null) {\n\t\t\t\t\t\tresult += production;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult += array[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn new LSystemImpl();\n\t}", "protected abstract Nfa buildInternal();", "private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }", "public static DAG creatBigFireDectectorModel(Attributes attributes, int nRooms){\n\n /********** Model Definition ************/\n //Create the object handling the random variables of the model\n Variables variables = new Variables();\n\n //Create the random variables of the model.\n // Some of them are associated to one attribute to retrieve its observed values from the data set.\n Variable temperatureBuilding = variables.newGaussianVariable(\"TemperatureBuilding\");\n\n Variable[] fire = new Variable[nRooms];\n Variable[] temperature = new Variable[nRooms];\n Variable[] smoke = new Variable[nRooms];\n Variable[] sensorT1 = new Variable[nRooms];\n Variable[] sensorT2 = new Variable[nRooms];\n Variable[] sensorSmoke = new Variable[nRooms];\n\n for (int i = 0; i < nRooms; i++) {\n fire[i] = variables.newMultinomialVariable(attributes.getAttributeByName(\"Fire_\"+i));\n temperature[i] = variables.newGaussianVariable(\"Temperature_\"+i);\n smoke[i] = variables.newMultinomialVariable(\"Smoke_\"+i, 2);\n sensorT1[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorTemp1_\"+i));\n sensorT2[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorTemp2_\"+i));\n sensorSmoke[i] = variables.newGaussianVariable(attributes.getAttributeByName(\"SensorSmoke_\"+i));\n }\n\n //Create the directed acyclic graph object encoding the conditional independence relationship among the variables of the model.\n DAG dag = new DAG(variables);\n for (int i = 0; i < nRooms; i++) {\n //Define the parent set for each random variable\n dag.getParentSet(sensorT1[i]).addParent(temperature[i]);\n dag.getParentSet(sensorT2[i]).addParent(temperature[i]);\n\n dag.getParentSet(sensorSmoke[i]).addParent(smoke[i]);\n\n dag.getParentSet(temperature[i]).addParent(fire[i]);\n dag.getParentSet(smoke[i]).addParent(fire[i]);\n\n dag.getParentSet(temperature[i]).addParent(temperatureBuilding);\n }\n\n //Print the defined DAG\n System.out.println(dag);\n\n return dag;\n }", "public synchronized void createBDDNodes(BIPComponent component, List<Port> componentPorts,\n\t\t\tList<String> componentStates) throws BIPEngineException {\n\n\t\tint nbComponentPorts = componentPorts.size();\n\t\tint nbComponentStates = componentStates.size();\n\t\tint initialNoNodes = nbComponentPorts + nbComponentStates + auxSum;\n\n\t\tif (engine.getBDDManager().varNum() < initialNoNodes) {\n\t\t\tengine.getBDDManager().setVarNum(initialNoNodes);\n\t\t}\n\n\t\tBDD[] singleNodeBDDsForStates = new BDD[nbComponentStates];\n\t\tHashtable<String, BDD> stateToBDD = new Hashtable<String, BDD>();\n\t\tfor (int i = 0; i < nbComponentStates; i++) {\n\t\t\t/* Create new variable in the BDD manager for the state of each component instance. */\n\t\t\tsingleNodeBDDsForStates[i] = engine.getBDDManager().ithVar(i + auxSum);\n\t\t\tif (singleNodeBDDsForStates[i] == null) {\n\t\t\t\ttry {\n\t\t\t\t\tlogger.error(\"Single node BDD for state {} is equal to null\", componentStates.get(i));\n\t\t\t\t\tthrow new BIPEngineException(\"Single node BDD for state \" + componentStates.get(i)\n\t\t\t\t\t\t\t+ \" is equal to null\");\n\t\t\t\t} catch (BIPEngineException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tstateToBDD.put(componentStates.get(i), singleNodeBDDsForStates[i]);\n\t\t\tif (stateToBDD.get(componentStates.get(i)) == null) {\n\t\t\t\ttry {\n\t\t\t\t\tlogger.error(\"BDD node that corresponds to the state {} of component {} is not created.\",\n\t\t\t\t\t\t\tcomponentStates.get(i), component.getId());\n\t\t\t\t\tthrow new BIPEngineException(\"BDD node that corresponds to the state \" + componentStates.get(i)\n\t\t\t\t\t\t\t+ \" of component \" + component.getId() + \" is not created.\");\n\t\t\t\t} catch (BIPEngineException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomponentToStateToBDD.put(component, stateToBDD);\n\t\tstateBDDs.put(component, singleNodeBDDsForStates);\n\n\t\tBDD[] singleNodeBDDsForPorts = new BDD[nbComponentPorts];\n\t\tHashtable<String, BDD> portToBDD = new Hashtable<String, BDD>();\n\t\tlogger.trace(\"Behaviour Encoder: Number of component ports: \" + nbComponentPorts + \" for component: \"\n\t\t\t\t+ component);\n\t\tlogger.trace(\"Behaviour Encoder: Number of component states: \" + nbComponentStates + \" for component: \"\n\t\t\t\t+ component);\n\n\t\tfor (int i = 0; i < nbComponentPorts; i++) {\n\t\t\t/* Create new variable in the BDD manager for the port of each component instance. */\n\t\t\tsingleNodeBDDsForPorts[i] = engine.getBDDManager().ithVar(i + nbComponentStates + auxSum);\n\t\t\tif (singleNodeBDDsForPorts[i] == null) {\n\t\t\t\ttry {\n\t\t\t\t\tlogger.error(\"Single node BDD for port {} is equal to null\", componentPorts.get(i));\n\t\t\t\t\tthrow new BIPEngineException(\"Single node BDD for port \" + componentPorts.get(i)\n\t\t\t\t\t\t\t+ \" is equal to null.\");\n\t\t\t\t} catch (BIPEngineException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t\tportToBDD.put(componentPorts.get(i).getId(), singleNodeBDDsForPorts[i]);\n\t\t\tif (portToBDD.get(componentPorts.get(i).getId()) == null) {\n\t\t\t\ttry {\n\t\t\t\t\tlogger.error(\"BDD node that corresponds to the port {} of component {} is not created.\",\n\t\t\t\t\t\t\tcomponentPorts.get(i).getId(), component.getId());\n\t\t\t\t\tthrow new BIPEngineException(\"BDD node that corresponds to the port \"\n\t\t\t\t\t\t\t+ componentPorts.get(i).getId() + \" of component \" + component.getId() + \" is not created.\");\n\t\t\t\t} catch (BIPEngineException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcomponentToPortToBDD.put(component, portToBDD);\n\t\tportBDDs.put(component, singleNodeBDDsForPorts);\n\t\tauxSum = auxSum + nbComponentPorts + nbComponentStates;\n\t}", "SimplStateMachineFactory getSimplStateMachineFactory();", "State.Builder<E, S, A> to(S state);", "private List<State> substitueStateSketch(State oldState, Set<Node> components) {\n\n// long start = System.currentTimeMillis();\n\n List<State> ret = new ArrayList<>();\n\n for (Node sk : components) {\n\n State newState = new State(oldState);\n VariableNode v = newState.pp.findSelectedVar();\n v.sketch = sk;\n\n if (sk instanceof NullaryTerminalNode) {\n\n NullaryTerminalNode n = (NullaryTerminalNode) sk;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n if (n.sym.name.equals(\"<any>\")) continue;\n } else if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n newState.cost += Main.NOT_TERMINAL_PATTERN;\n }\n }\n\n newState.pp.numNullaryTerminals++;\n } else if (sk instanceof OperatorNode) {\n if (((OperatorNode) sk).special) newState.cost += Main.SPECIAL_REPEATATLEAST_1;\n\n String opName = ((OperatorNode) sk).operatorName;\n\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"not\")) {\n if (!(opName.equals(\"startwith\") || opName.equals(\"endwith\") || opName.equals(\"contain\"))) {\n newState.cost += Main.NOT_NOT_CONTAIN_SW_EW_PATTERN;\n }\n }\n }\n } else {\n\n // do not continue if we are trying to replace argument of notcc with a op node\n if (v.parent != null && !(v.parent instanceof RepSketchNode)) {\n if (((OperatorNode) v.parent).operatorName.equals(\"notcc\")) {\n continue;\n }\n }\n }\n\n newState.pp.numOperatorSketch++; // TODO: it might be a problem if we have a rf sketch such as concat(v:contain(v:?{<num>}))\n newState.pp.deselectVar();\n if (evalApprox(newState)) ret.add(newState);\n\n }\n\n return ret;\n\n }", "public FlowTableOperations build() {\n return build(null);\n }", "private void buildComponents() {\r\n buildJMenuBar();\r\n setJMenuBar( gameBar );\r\n\r\n buildScorePanel();\r\n buildInfoPanel();\r\n\r\n getContentPane().add( scorePanel, \"North\" );\r\n getContentPane().add( infoPanel, \"South\" );\r\n }", "public AugmentedfsmFactoryImpl() {\n\t\tsuper();\n\t}", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "private void createComponentFramework(\n\t\t\tint numberOfComponentNames,\n\t\t\tint depthOfComponentTree,\n\t\t\tint maxOutDegreeOfComponents) {\n\t\tObject root = \"root\";\n\t\tthis.myComponentFramework.getComponentTree().addVertex(root);\n\t\tthis.myComponentFramework.getComponentTree().setRoot(root);\n\t\tthis.myComponentFramework.extractInformationFor(root, \"N\"+ThreadLocalRandom.current().nextInt(0, numberOfComponentNames));\n\t\ttry{\n\t\t\trecurseAndCreateComponentTree(root,numberOfComponentNames,depthOfComponentTree-1,maxOutDegreeOfComponents);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t}", "DsmlComponent createDsmlComponent();", "public ArcadeDrivetrain build() {\n verify();\n return new ArcadeDrivetrain(this);\n }", "private void generateSteps() {\n for (GlobalState g : this.globalStates) {\n List<String> faults = g.getPendingFaults(); \n if(faults.isEmpty()) {\n // Identifying all available operation transitions (when there \n // are no faults), and adding them as steps\n List<String> gSatisfiableReqs = g.getSatisfiableReqs();\n \n for(Node n : nodes) {\n String nName = n.getName();\n String nState = g.getStateOf(nName);\n List<Transition> nTau = n.getProtocol().getTau().get(nState);\n for(Transition t : nTau) {\n boolean firable = true;\n for(String req : t.getRequirements()) {\n if(!(gSatisfiableReqs.contains(n.getName() + \"/\" + req)))\n firable = false;\n }\n if(firable) {\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, t.getTargetState());\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,t.getOperation(),next));\n }\n }\n }\n } else {\n // Identifying all settling handlers for handling the faults\n // pending in this global state\n for(Node n: nodes) {\n // Computing the \"targetState\" of the settling handler for n\n String targetState = null;\n \n String nName = n.getName();\n String nState = g.getStateOf(nName);\n Map<String,List<String>> nRho = n.getProtocol().getRho();\n \n List<String> nFaults = new ArrayList();\n for(String req : nRho.get(nState)) {\n if(faults.contains(nName + \"/\" + req)) \n nFaults.add(req);\n }\n\n // TODO : Assuming handlers to be complete \n\n if(nFaults.size() > 0) {\n Map<String,List<String>> nPhi = n.getProtocol().getPhi();\n for(String handlingState : nPhi.get(nState)) {\n // Check if handling state is handling all faults\n boolean handles = true;\n for(String req : nRho.get(handlingState)) {\n if(nFaults.contains(req))\n handles = false;\n }\n\n // TODO : Assuming handlers to be race-free\n\n // Updating targetState (if the handlingState is \n // assuming a bigger set of requirements)\n if(handles) {\n if(targetState == null || nRho.get(handlingState).size() > nRho.get(targetState).size())\n targetState = handlingState;\n }\n }\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, targetState);\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,next));\n }\n }\n }\n }\n }", "private void buildProcessGraph() {\n\n BpmnProcessDefinitionBuilder builder = BpmnProcessDefinitionBuilder.newBuilder();\n\n // Building the IntermediateTimer\n eventBasedXorGatewayNode = BpmnNodeFactory.createBpmnEventBasedXorGatewayNode(builder);\n\n intermediateEvent1Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_1);\n\n intermediateEvent2Node = BpmnNodeFactory.createBpmnIntermediateTimerEventNode(builder, NEW_WAITING_TIME_2);\n\n endNode1 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n endNode2 = BpmnCustomNodeFactory.createBpmnNullNode(builder);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent1Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent1Node, endNode1);\n\n ControlFlowFactory.createControlFlowFromTo(builder, eventBasedXorGatewayNode, intermediateEvent2Node);\n ControlFlowFactory.createControlFlowFromTo(builder, intermediateEvent2Node, endNode2);\n\n }", "private MonsterState(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public static POMDPState sampleInitialStates(Domain d) {\n\t\tPOMDPState s = new POMDPState();\n\n\t\t//Retrieve object classes from the domain.\n\t\tObjectClass containerClass = d.getObjectClass(Names.CLASS_CONTAINER);\n\t\tObjectClass babyClass = d.getObjectClass(Names.CLASS_BABY);\n\t\tObjectClass contentClass = d.getObjectClass(Names.CLASS_CONTENT);\n\t\tObjectClass humanClass = d.getObjectClass(Names.CLASS_HUMAN);\n\n\t\t//Create all the objects \n\t\tObjectInstance caregiver = new ObjectInstance(humanClass, Names.OBJ_CAREGIVER);\n\t\tObjectInstance baby = new ObjectInstance(babyClass, Names.OBJ_BABY);\n\t\tObjectInstance ointment = new ObjectInstance(contentClass, Names.OBJ_OINTMENT);\n\t\tObjectInstance oldClothes = new ObjectInstance(contentClass, Names.OBJ_OLD_CLOTHES);\n\t\tObjectInstance newClothes = new ObjectInstance(contentClass, Names.OBJ_NEW_CLOTHES);\n\t\tObjectInstance changingTable = new ObjectInstance(containerClass, Names.OBJ_CHANGING_TABLE);\n\t ObjectInstance hamper = new ObjectInstance(containerClass, Names.OBJ_HAMPER);\n\t\tObjectInstance sideTable = new ObjectInstance(containerClass, Names.OBJ_SIDE_TABLE);\n\t ObjectInstance dresser = new ObjectInstance(containerClass, Names.OBJ_DRESSER);\n\n\t\t//Set the \tproper values for objects' attributes\n\t\tchangingTable.setValue(Names.ATTR_OPEN, 1);\n\t hamper.setValue(Names.ATTR_OPEN, 1);\n\t\tsideTable.setValue(Names.ATTR_OPEN, 1);\n\t\tdresser.setValue(Names.ATTR_OPEN, 0);\n\t\tbaby.setValue(Names.ATTR_RASH, new java.util.Random().nextBoolean() ? 1 : 0);\n\n\t\t//Place contents in the proper initial container\n\t\tplaceObject(newClothes, dresser);\n\t\tplaceObject(oldClothes, changingTable);\n\t\tplaceObject(ointment, sideTable);\n\n\t\t//Add objects to the state, and have the caregiver decide on its mental state\n\t\taddObjects(s, caregiver, baby, oldClothes, newClothes, changingTable, hamper, sideTable, dresser, ointment);\n\t\tcaregiverThink(d, s);\n\n\t\t//Et voila\n\t\treturn s;\n\t}", "public BlueMeshService build(){\n BlueMeshService bms = new BlueMeshService();\n \n bms.setUUID(uuid);\n bms.setDeviceId(deviceId);\n bms.enableBluetooth(bluetoothEnabled);\n bms.setup();\n \n return bms;\n }", "void create( State state );", "public Component build(){\n\t\tif(children!=null)\n\t\t\tnew CollectionHelper.Iterator.Adapter.Default<Component>(children.getElements()){\n\t\t\t\tprivate static final long serialVersionUID = 1L;\n\t\t\t\t@Override\n\t\t\t\tprotected void __executeForEach__(Component component) {\n\t\t\t\t\tcomponent.build();\n\t\t\t\t}\n\t\t\t}.execute();\n\t\t//built = ListenerHelper.getInstance()\n\t\t//\t\t.listenObject(Listener.COLLECTION, Listener.METHOD_NAME_BUILD, MethodHelper.Method.Parameter.buildArray(Component.class,this));\n\t\tbuilt = ClassHelper.getInstance().instanciateOne(Listener.class).build(this);\n\t\thasBeenBuilt = Boolean.TRUE;\n\t\treturn this;\n\t}", "abstract T build();", "public ConnectedComponentFromSeed()\r\n/* 25: */ {\r\n/* 26: 32 */ this.inputFields = \"input, seed\";\r\n/* 27: 33 */ this.outputFields = \"output\";\r\n/* 28: */ }", "ComponentsType createComponentsType();", "private CSTeamCreate(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public void build() {\r\n // TODO\r\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "public DynamicModelPart build() {\n return this.rotateModelPart(this.rotation).addCuboids();\n }", "public void build() {\n boolean debugGates = this.debugDepth > 0 ? this.inDebuggerMode : false;\n if (this.outputs.size() != 1 << this.input.getSize()) {\n throw new BitStreamInputSizeMismatch(this);\n }\n\n List<BitStream> splitterInput = new ArrayList<>();\n splitterInput.add(this.input);\n\n List<BitStream> splitterOutput = new ArrayList<>();\n for (int i = 0; i < this.input.getSize(); i++) {\n splitterOutput.add(new BitStream(1));\n }\n\n Splitter inputSplitter = new Splitter(splitterInput, splitterOutput, \"inputSplitter\", debugGates);\n\n for (int i = 0; i < this.outputs.size(); i++) {\n List<BitStream> andInputs = new ArrayList<>();\n for (BitStream splitterOut : splitterOutput) {\n andInputs.add(splitterOut);\n }\n\n String indexInBinary = DataConverter.convertUnsignedDecToBin(i);\n indexInBinary = this.padZeros(indexInBinary, this.input.getSize());\n\n for (int j = indexInBinary.length() - 1; j >= 0; j--) {\n if (indexInBinary.charAt(j) == '0') {\n BitStream notOut = new BitStream(1);\n NOT not = new NOT(andInputs.get(j), notOut,\n \"not\" + i + (indexInBinary.length() - 1 - j), debugGates);\n andInputs.set(j, notOut);\n }\n }\n\n MultiAND and = new MultiAND(andInputs, this.outputs.get(i), \"and\" + i, debugGates);\n }\n }", "private void buildUI()\n {\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.gridy = 0;\n\n // Adds the title to the panel, changes the font, and centers it\n c.gridwidth = 2;\n Font displayFont = new Font(\"Serif\", Font.BOLD, 18);\n JLabel cardTitle = new JLabel(\"Transition Options\");\n cardTitle.setFont(displayFont);\n cardTitle.setHorizontalAlignment(JLabel.CENTER);\n add(cardTitle, c);\n\n // Adds a separator between the title and the rules text field\n c.gridy++;\n JSeparator separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Adds a label for the rules field\n c.gridy++;\n c.gridwidth = 1;\n JLabel rulesLabel = new JLabel(\"Rules:\");\n add(rulesLabel, c);\n\n // Sets the insets to 3 on every side\n c.insets = new Insets(3, 3, 3, 3);\n\n // Creates the rules text field of size 100, sets the action command\n // to enter\n c.gridy++;\n c.ipadx = 100;\n ruleTextField = new JTextField();\n ruleTextField.setActionCommand(\"enter\");\n ruleTextField.addActionListener(this);\n add(ruleTextField, c);\n\n // Creates an enter button, resets padding to 0\n c.gridx = 1;\n c.ipadx = 0;\n enterButton = new JButton(\"Enter\");\n enterButton.setActionCommand(\"enter\");\n enterButton.addActionListener(this);\n add(enterButton, c);\n\n // Creates a button that adds an epsilon transition to the rule text field\n c.gridy++;\n c.gridx = 0;\n c.gridwidth = 2;\n epsilonButton = new JButton(\"Add Epsilon Transition\");\n epsilonButton.setActionCommand(\"epsilon\");\n epsilonButton.addActionListener(this);\n add(epsilonButton, c);\n\n // Adds a separator between the rule text field items and the delete button\n c.gridy++;\n separator = new JSeparator();\n separator.setPreferredSize(new Dimension(0, 15));\n add(separator, c);\n\n // Creates a delete button\n c.gridy++;\n deleteButton = new JButton(\"Delete Transition\");\n deleteButton.setVerticalTextPosition(AbstractButton.BOTTOM);\n deleteButton.setHorizontalTextPosition(AbstractButton.CENTER);\n deleteButton.setActionCommand(\"delete\");\n deleteButton.addActionListener(this);\n add(deleteButton, c);\n\n // I hate Alby for making this work.\n // Pushes the panel to the top\n c.gridy++;\n c.weighty = 1;\n JLabel blank = new JLabel();\n add(blank, c);\n }", "public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }", "public DoorsStateMessage() {\n super();\n }", "Flows createFlows();", "private void initComponents() {\n java.awt.GridBagConstraints gridBagConstraints;\n\n buttonPanel1 = new nl.astron.lofar.sas.otbcomponents.ButtonPanel();\n BBSStepExplorerPanel = new javax.swing.JPanel();\n stepExplorerScrollPanel = new javax.swing.JScrollPane();\n stepExplorerPanel = new javax.swing.JPanel();\n stepExplorerStepNameLabel = new javax.swing.JLabel();\n stepExplorerStepNameText = new javax.swing.JTextField();\n stepExplorerRevertButton = new javax.swing.JButton();\n stepExplorerOperationPanel = new javax.swing.JPanel();\n stepExplorerOperationTypeHeaderPanel = new javax.swing.JPanel();\n stepExplorerOperationTypeLabel = new javax.swing.JLabel();\n stepExplorerOperationComboBox = new javax.swing.JComboBox();\n stepExplorerOperationAttributesPanel = new javax.swing.JPanel();\n seOperationAttributesScrollPane = new javax.swing.JScrollPane();\n stepExplorerOutputDataPanel = new javax.swing.JPanel();\n stepExplorerOutputDataText = new javax.swing.JTextField();\n writeOutputCheckbox = new javax.swing.JCheckBox();\n stepExplorerNSources = new javax.swing.JPanel();\n stepExplorerNSourcesPanel = new javax.swing.JPanel();\n useAllSourcesCheckbox = new javax.swing.JCheckBox();\n stepExplorerNSourcesScrollPane = new javax.swing.JScrollPane();\n stepExplorerNSourcesList = new javax.swing.JList();\n stepExplorerNSourcesEditPanel = new javax.swing.JPanel();\n stepExplorerModifyNSourceCombobox = new javax.swing.JComboBox();\n stepExplorerNSourcesButtonPanel = new javax.swing.JPanel();\n addNSourceButton = new javax.swing.JButton();\n deleteNSourceButton = new javax.swing.JButton();\n stepExplorerInstrumentModel = new javax.swing.JPanel();\n stepExplorerInstrumentModelPanel = new javax.swing.JPanel();\n noInstrumentModelCheckbox = new javax.swing.JCheckBox();\n stepExplorerInstrumentModelScrollPane = new javax.swing.JScrollPane();\n stepExplorerInstrumentModelList = new javax.swing.JList();\n stepExplorerInstrumentModelEditPanel = new javax.swing.JPanel();\n stepExplorerModifyInstrumentModelCombobox = new javax.swing.JComboBox();\n StepExplorerInstrumentModelButtonPanel = new javax.swing.JPanel();\n addInstrumentButton = new javax.swing.JButton();\n deleteInstrumentButton = new javax.swing.JButton();\n stepExplorerCorrelationPanel = new javax.swing.JPanel();\n stepExplorerCorrelationSelectionLabel = new javax.swing.JLabel();\n stepExplorerCorrelationSelectionBox = new javax.swing.JComboBox();\n stepExplorerCorrelationTypeLabel = new javax.swing.JLabel();\n stepExplorerCorrelationTypeScrollPane = new javax.swing.JScrollPane();\n stepExplorerCorrelationTypeList = new javax.swing.JList();\n integrationIntervalPanel = new javax.swing.JPanel();\n integrationFrequencyLabel = new javax.swing.JLabel();\n integrationFrequencyText = new javax.swing.JTextField();\n integrationFrequencyUnitLabel = new javax.swing.JLabel();\n integrationTimeLabel = new javax.swing.JLabel();\n integrationTimeText = new javax.swing.JTextField();\n integrationTimeUnitLabel = new javax.swing.JLabel();\n BaselineSelectionPanel = new javax.swing.JPanel();\n baselinePanel = new javax.swing.JPanel();\n baselineStationsScrollPane = new javax.swing.JScrollPane();\n baselineStationsTable = new javax.swing.JTable();\n baselineInputPanel = new javax.swing.JPanel();\n baselineStation1Text = new javax.swing.JTextField();\n baselineStation2Text = new javax.swing.JTextField();\n baselineUseAllCheckbox = new javax.swing.JCheckBox();\n baselineModsPanel = new javax.swing.JPanel();\n addBaseLineButton = new javax.swing.JButton();\n deleteBaseLineButton = new javax.swing.JButton();\n helpButton = new javax.swing.JButton();\n\n setLayout(new java.awt.BorderLayout());\n\n buttonPanel1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n buttonPanel1ActionPerformed(evt);\n }\n });\n add(buttonPanel1, java.awt.BorderLayout.SOUTH);\n\n BBSStepExplorerPanel.setLayout(new java.awt.BorderLayout());\n\n stepExplorerPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n stepExplorerStepNameLabel.setFont(new java.awt.Font(\"Dialog\", 1, 18));\n stepExplorerStepNameLabel.setText(\"Step\");\n stepExplorerPanel.add(stepExplorerStepNameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 10, -1, 30));\n\n stepExplorerStepNameText.setEditable(false);\n stepExplorerStepNameText.setFont(new java.awt.Font(\"Dialog\", 1, 18));\n stepExplorerStepNameText.setToolTipText(\"This is the name of the displayed step\");\n stepExplorerStepNameText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n stepExplorerStepNameTextKeyReleased(evt);\n }\n });\n stepExplorerPanel.add(stepExplorerStepNameText, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 10, 260, 30));\n\n stepExplorerRevertButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_undo.png\"))); // NOI18N\n stepExplorerRevertButton.setText(\"Revert\");\n stepExplorerRevertButton.setToolTipText(\"Revert the step variables to the values present when this dialog was opened.\");\n stepExplorerRevertButton.setEnabled(false);\n stepExplorerRevertButton.setMaximumSize(new java.awt.Dimension(100, 25));\n stepExplorerRevertButton.setMinimumSize(new java.awt.Dimension(100, 25));\n stepExplorerRevertButton.setPreferredSize(new java.awt.Dimension(100, 25));\n stepExplorerRevertButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n stepExplorerRevertButtonActionPerformed(evt);\n }\n });\n stepExplorerPanel.add(stepExplorerRevertButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(30, 650, 100, -1));\n\n stepExplorerOperationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Operation\"));\n stepExplorerOperationPanel.setLayout(new java.awt.BorderLayout());\n\n stepExplorerOperationTypeHeaderPanel.setBackground(new java.awt.Color(204, 204, 204));\n stepExplorerOperationTypeHeaderPanel.setLayout(new java.awt.GridBagLayout());\n\n stepExplorerOperationTypeLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n stepExplorerOperationTypeLabel.setText(\"Type :\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n stepExplorerOperationTypeHeaderPanel.add(stepExplorerOperationTypeLabel, gridBagConstraints);\n\n stepExplorerOperationComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"NOT DEFINED\", \"Predict\", \"Solve\", \"Subtract\", \"Correct\" }));\n stepExplorerOperationComboBox.setToolTipText(\"The type of operation to be performed in this step. Use NOT DEFINED when this step is/will be a multistep, or when this step should not perform an operation.\");\n stepExplorerOperationComboBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n stepExplorerOperationComboBoxItemStateChanged(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n stepExplorerOperationTypeHeaderPanel.add(stepExplorerOperationComboBox, gridBagConstraints);\n\n stepExplorerOperationPanel.add(stepExplorerOperationTypeHeaderPanel, java.awt.BorderLayout.NORTH);\n\n stepExplorerOperationAttributesPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder(new java.awt.Color(204, 204, 204), null));\n stepExplorerOperationAttributesPanel.setLayout(new java.awt.BorderLayout());\n stepExplorerOperationAttributesPanel.add(seOperationAttributesScrollPane, java.awt.BorderLayout.CENTER);\n\n stepExplorerOperationPanel.add(stepExplorerOperationAttributesPanel, java.awt.BorderLayout.CENTER);\n\n stepExplorerPanel.add(stepExplorerOperationPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 400, 700, 240));\n\n stepExplorerOutputDataPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Output Data Column\"));\n stepExplorerOutputDataPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n stepExplorerOutputDataText.setText(\"CORRECTED_DATA\");\n stepExplorerOutputDataText.setToolTipText(\"Column of the measurement set wherein the output values of this step should be written\");\n stepExplorerOutputDataText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n stepExplorerOutputDataTextKeyReleased(evt);\n }\n });\n stepExplorerOutputDataPanel.add(stepExplorerOutputDataText, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 40, 150, 20));\n\n writeOutputCheckbox.setText(\"No output\");\n writeOutputCheckbox.setToolTipText(\"Check this box if no output data should be written in this step\");\n writeOutputCheckbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n writeOutputCheckbox.setMargin(new java.awt.Insets(0, 0, 0, 0));\n writeOutputCheckbox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n writeOutputCheckboxItemStateChanged(evt);\n }\n });\n stepExplorerOutputDataPanel.add(writeOutputCheckbox, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, -1, -1));\n\n stepExplorerPanel.add(stepExplorerOutputDataPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 280, 170, 110));\n\n stepExplorerNSources.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Sources\"));\n stepExplorerNSources.setMinimumSize(new java.awt.Dimension(150, 150));\n stepExplorerNSources.setPreferredSize(new java.awt.Dimension(150, 150));\n stepExplorerNSources.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n stepExplorerNSourcesPanel.setLayout(new java.awt.BorderLayout());\n\n useAllSourcesCheckbox.setSelected(true);\n useAllSourcesCheckbox.setText(\"Use all sources\");\n useAllSourcesCheckbox.setToolTipText(\"Check this box to use all the sources\");\n useAllSourcesCheckbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n useAllSourcesCheckbox.setMargin(new java.awt.Insets(0, 0, 0, 0));\n useAllSourcesCheckbox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n useAllSourcesCheckboxItemStateChanged(evt);\n }\n });\n stepExplorerNSourcesPanel.add(useAllSourcesCheckbox, java.awt.BorderLayout.NORTH);\n\n stepExplorerNSourcesList.setBackground(java.awt.Color.lightGray);\n stepExplorerNSourcesList.setToolTipText(\"The specified sources for this step\");\n stepExplorerNSourcesList.setEnabled(false);\n stepExplorerNSourcesList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n stepExplorerNSourcesListValueChanged(evt);\n }\n });\n stepExplorerNSourcesScrollPane.setViewportView(stepExplorerNSourcesList);\n\n stepExplorerNSourcesPanel.add(stepExplorerNSourcesScrollPane, java.awt.BorderLayout.CENTER);\n\n stepExplorerNSourcesEditPanel.setLayout(new java.awt.BorderLayout());\n\n stepExplorerModifyNSourceCombobox.setToolTipText(\"Add sources\");\n stepExplorerModifyNSourceCombobox.setEnabled(false);\n stepExplorerNSourcesEditPanel.add(stepExplorerModifyNSourceCombobox, java.awt.BorderLayout.CENTER);\n\n stepExplorerNSourcesButtonPanel.setLayout(new java.awt.GridBagLayout());\n\n addNSourceButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_add.gif\"))); // NOI18N\n addNSourceButton.setToolTipText(\"Add the source entered above to the list of sources\");\n addNSourceButton.setEnabled(false);\n addNSourceButton.setMaximumSize(new java.awt.Dimension(30, 25));\n addNSourceButton.setMinimumSize(new java.awt.Dimension(30, 25));\n addNSourceButton.setPreferredSize(new java.awt.Dimension(53, 23));\n addNSourceButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addNSourceButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n stepExplorerNSourcesButtonPanel.add(addNSourceButton, gridBagConstraints);\n\n deleteNSourceButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_delete.png\"))); // NOI18N\n deleteNSourceButton.setToolTipText(\"Remove the selected source from the list\");\n deleteNSourceButton.setEnabled(false);\n deleteNSourceButton.setMaximumSize(new java.awt.Dimension(30, 25));\n deleteNSourceButton.setMinimumSize(new java.awt.Dimension(30, 25));\n deleteNSourceButton.setPreferredSize(new java.awt.Dimension(65, 23));\n deleteNSourceButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteNSourceButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n stepExplorerNSourcesButtonPanel.add(deleteNSourceButton, gridBagConstraints);\n\n stepExplorerNSourcesEditPanel.add(stepExplorerNSourcesButtonPanel, java.awt.BorderLayout.SOUTH);\n\n stepExplorerNSourcesPanel.add(stepExplorerNSourcesEditPanel, java.awt.BorderLayout.SOUTH);\n\n stepExplorerNSources.add(stepExplorerNSourcesPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 20, 150, 240));\n\n stepExplorerPanel.add(stepExplorerNSources, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 0, 170, 270));\n\n stepExplorerInstrumentModel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Instrument Model\"));\n stepExplorerInstrumentModel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n stepExplorerInstrumentModelPanel.setLayout(new java.awt.BorderLayout());\n\n noInstrumentModelCheckbox.setSelected(true);\n noInstrumentModelCheckbox.setText(\"No model\");\n noInstrumentModelCheckbox.setToolTipText(\"Check this box when no instrument model should be used\");\n noInstrumentModelCheckbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n noInstrumentModelCheckbox.setMargin(new java.awt.Insets(0, 0, 0, 0));\n noInstrumentModelCheckbox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n noInstrumentModelCheckboxItemStateChanged(evt);\n }\n });\n stepExplorerInstrumentModelPanel.add(noInstrumentModelCheckbox, java.awt.BorderLayout.NORTH);\n\n stepExplorerInstrumentModelScrollPane.setPreferredSize(new java.awt.Dimension(260, 132));\n\n stepExplorerInstrumentModelList.setBackground(java.awt.Color.lightGray);\n stepExplorerInstrumentModelList.setToolTipText(\"the specified instrument models for this step\");\n stepExplorerInstrumentModelList.setEnabled(false);\n stepExplorerInstrumentModelList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n stepExplorerInstrumentModelListValueChanged(evt);\n }\n });\n stepExplorerInstrumentModelScrollPane.setViewportView(stepExplorerInstrumentModelList);\n\n stepExplorerInstrumentModelPanel.add(stepExplorerInstrumentModelScrollPane, java.awt.BorderLayout.CENTER);\n\n stepExplorerInstrumentModelEditPanel.setLayout(new java.awt.BorderLayout());\n\n stepExplorerModifyInstrumentModelCombobox.setToolTipText(\"Input Instrument Models\");\n stepExplorerModifyInstrumentModelCombobox.setEnabled(false);\n stepExplorerInstrumentModelEditPanel.add(stepExplorerModifyInstrumentModelCombobox, java.awt.BorderLayout.CENTER);\n\n StepExplorerInstrumentModelButtonPanel.setLayout(new java.awt.GridBagLayout());\n\n addInstrumentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_add.gif\"))); // NOI18N\n addInstrumentButton.setToolTipText(\"Add the source entered above to the list of sources\");\n addInstrumentButton.setEnabled(false);\n addInstrumentButton.setMaximumSize(new java.awt.Dimension(30, 25));\n addInstrumentButton.setMinimumSize(new java.awt.Dimension(30, 25));\n addInstrumentButton.setPreferredSize(new java.awt.Dimension(53, 23));\n addInstrumentButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addInstrumentButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n StepExplorerInstrumentModelButtonPanel.add(addInstrumentButton, gridBagConstraints);\n\n deleteInstrumentButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_delete.png\"))); // NOI18N\n deleteInstrumentButton.setToolTipText(\"Remove the selected source from the list\");\n deleteInstrumentButton.setEnabled(false);\n deleteInstrumentButton.setMaximumSize(new java.awt.Dimension(30, 25));\n deleteInstrumentButton.setMinimumSize(new java.awt.Dimension(30, 25));\n deleteInstrumentButton.setPreferredSize(new java.awt.Dimension(65, 23));\n deleteInstrumentButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteInstrumentButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 2;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n StepExplorerInstrumentModelButtonPanel.add(deleteInstrumentButton, gridBagConstraints);\n\n stepExplorerInstrumentModelEditPanel.add(StepExplorerInstrumentModelButtonPanel, java.awt.BorderLayout.SOUTH);\n\n stepExplorerInstrumentModelPanel.add(stepExplorerInstrumentModelEditPanel, java.awt.BorderLayout.SOUTH);\n\n stepExplorerInstrumentModel.add(stepExplorerInstrumentModelPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(6, 14, 158, 250));\n\n stepExplorerPanel.add(stepExplorerInstrumentModel, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 0, 170, 270));\n\n stepExplorerCorrelationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Correlation\"));\n stepExplorerCorrelationPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n stepExplorerCorrelationSelectionLabel.setText(\"Selection :\");\n stepExplorerCorrelationPanel.add(stepExplorerCorrelationSelectionLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 30, -1, -1));\n\n stepExplorerCorrelationSelectionBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"N/A\", \"AUTO\", \"CROSS\", \"ALL\" }));\n stepExplorerCorrelationSelectionBox.setSelectedIndex(3);\n stepExplorerCorrelationSelectionBox.setToolTipText(\"Specifies which station correlations to use.\");\n stepExplorerCorrelationSelectionBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n stepExplorerCorrelationSelectionBoxItemStateChanged(evt);\n }\n });\n stepExplorerCorrelationPanel.add(stepExplorerCorrelationSelectionBox, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 80, -1));\n\n stepExplorerCorrelationTypeLabel.setText(\"Type :\");\n stepExplorerCorrelationPanel.add(stepExplorerCorrelationTypeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 10, -1, -1));\n\n stepExplorerCorrelationTypeList.setModel(new javax.swing.AbstractListModel() {\n String[] strings = { \"XX\", \"XY\", \"YX\", \"YY\" };\n public int getSize() { return strings.length; }\n public Object getElementAt(int i) { return strings[i]; }\n });\n stepExplorerCorrelationTypeList.setToolTipText(\"Correlations of which polarizations to use, one or more of XX,XY,YX,YY.\");\n stepExplorerCorrelationTypeList.setSelectedIndices(new int[]{0,3});\n stepExplorerCorrelationTypeList.addListSelectionListener(new javax.swing.event.ListSelectionListener() {\n public void valueChanged(javax.swing.event.ListSelectionEvent evt) {\n stepExplorerCorrelationTypeListValueChanged(evt);\n }\n });\n stepExplorerCorrelationTypeScrollPane.setViewportView(stepExplorerCorrelationTypeList);\n\n stepExplorerCorrelationPanel.add(stepExplorerCorrelationTypeScrollPane, new org.netbeans.lib.awtextra.AbsoluteConstraints(110, 30, 50, 80));\n\n stepExplorerPanel.add(stepExplorerCorrelationPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(550, 270, 170, 120));\n\n integrationIntervalPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Integration\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 0, 11), java.awt.Color.lightGray)); // NOI18N\n integrationIntervalPanel.setToolTipText(\"Cell size for integration. Not yet implemented.\");\n integrationIntervalPanel.setEnabled(false);\n integrationIntervalPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n integrationFrequencyLabel.setText(\"Freq. Interval :\");\n integrationFrequencyLabel.setEnabled(false);\n integrationIntervalPanel.add(integrationFrequencyLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 20, -1, -1));\n\n integrationFrequencyText.setEditable(false);\n integrationFrequencyText.setToolTipText(\"Frequency interval in Hertz (Hz)\");\n integrationFrequencyText.setEnabled(false);\n integrationFrequencyText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n integrationFrequencyTextKeyReleased(evt);\n }\n });\n integrationIntervalPanel.add(integrationFrequencyText, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 20, 70, -1));\n\n integrationFrequencyUnitLabel.setText(\"Hz\");\n integrationFrequencyUnitLabel.setEnabled(false);\n integrationIntervalPanel.add(integrationFrequencyUnitLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 20, -1, -1));\n\n integrationTimeLabel.setText(\"Time Interval :\");\n integrationTimeLabel.setEnabled(false);\n integrationIntervalPanel.add(integrationTimeLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 50, -1, -1));\n\n integrationTimeText.setEditable(false);\n integrationTimeText.setEnabled(false);\n integrationTimeText.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n integrationTimeTextKeyReleased(evt);\n }\n });\n integrationIntervalPanel.add(integrationTimeText, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 50, 70, -1));\n\n integrationTimeUnitLabel.setText(\"s\");\n integrationTimeUnitLabel.setEnabled(false);\n integrationIntervalPanel.add(integrationTimeUnitLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 50, 10, -1));\n\n stepExplorerPanel.add(integrationIntervalPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 310, 320, 80));\n\n BaselineSelectionPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Baseline Selection\"));\n BaselineSelectionPanel.setLayout(new java.awt.BorderLayout());\n\n baselinePanel.setLayout(new java.awt.BorderLayout());\n\n baselineStationsScrollPane.setToolTipText(\"The baseline pairs of stations\");\n baselineStationsScrollPane.setEnabled(false);\n baselineStationsScrollPane.setPreferredSize(new java.awt.Dimension(453, 250));\n\n baselineStationsTable.setBackground(java.awt.Color.lightGray);\n baselineStationsTable.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"Station 1\", \"Station 2\"\n }\n ) {\n Class[] types = new Class [] {\n java.lang.String.class, java.lang.String.class\n };\n\n public Class getColumnClass(int columnIndex) {\n return types [columnIndex];\n }\n });\n baselineStationsTable.setToolTipText(\"The baselines used\");\n baselineStationsTable.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseReleased(java.awt.event.MouseEvent evt) {\n baselineStationsTableMouseReleased(evt);\n }\n });\n baselineStationsScrollPane.setViewportView(baselineStationsTable);\n\n baselinePanel.add(baselineStationsScrollPane, java.awt.BorderLayout.CENTER);\n\n baselineInputPanel.setLayout(new java.awt.GridBagLayout());\n\n baselineStation1Text.setToolTipText(\"Input field for the name of the first station part that forms the baseline\");\n baselineStation1Text.setEnabled(false);\n baselineStation1Text.setMinimumSize(new java.awt.Dimension(120, 19));\n baselineStation1Text.setPreferredSize(new java.awt.Dimension(200, 19));\n baselineStation1Text.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n baselineStation1TextKeyReleased(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n baselineInputPanel.add(baselineStation1Text, gridBagConstraints);\n\n baselineStation2Text.setToolTipText(\"Input field for the name of the second station part that forms the baseline\");\n baselineStation2Text.setEnabled(false);\n baselineStation2Text.setMinimumSize(new java.awt.Dimension(120, 19));\n baselineStation2Text.setPreferredSize(new java.awt.Dimension(200, 19));\n baselineStation2Text.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n baselineStation2TextKeyReleased(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n baselineInputPanel.add(baselineStation2Text, gridBagConstraints);\n\n baselinePanel.add(baselineInputPanel, java.awt.BorderLayout.SOUTH);\n\n baselineUseAllCheckbox.setSelected(true);\n baselineUseAllCheckbox.setText(\"Use all baselines\");\n baselineUseAllCheckbox.setToolTipText(\"Check this box to use all baselines available\");\n baselineUseAllCheckbox.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n baselineUseAllCheckbox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n baselineUseAllCheckbox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n baselineUseAllCheckboxItemStateChanged(evt);\n }\n });\n baselinePanel.add(baselineUseAllCheckbox, java.awt.BorderLayout.NORTH);\n\n BaselineSelectionPanel.add(baselinePanel, java.awt.BorderLayout.CENTER);\n\n baselineModsPanel.setLayout(new java.awt.GridBagLayout());\n\n addBaseLineButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_add.gif\"))); // NOI18N\n addBaseLineButton.setToolTipText(\"Adds a baseline using the Station1 and Station2 values in the input boxes above\");\n addBaseLineButton.setEnabled(false);\n addBaseLineButton.setMaximumSize(new java.awt.Dimension(30, 25));\n addBaseLineButton.setMinimumSize(new java.awt.Dimension(30, 25));\n addBaseLineButton.setPreferredSize(new java.awt.Dimension(50, 23));\n addBaseLineButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBaseLineButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 1;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.ipadx = 7;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n baselineModsPanel.add(addBaseLineButton, gridBagConstraints);\n\n deleteBaseLineButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_delete.png\"))); // NOI18N\n deleteBaseLineButton.setToolTipText(\"Deletes the selected baseline (the selected Station 1 and Station 2 pair)\");\n deleteBaseLineButton.setEnabled(false);\n deleteBaseLineButton.setMaximumSize(new java.awt.Dimension(30, 25));\n deleteBaseLineButton.setMinimumSize(new java.awt.Dimension(30, 25));\n deleteBaseLineButton.setPreferredSize(new java.awt.Dimension(65, 23));\n deleteBaseLineButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteBaseLineButtonActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 3;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.ipadx = 6;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);\n baselineModsPanel.add(deleteBaseLineButton, gridBagConstraints);\n\n BaselineSelectionPanel.add(baselineModsPanel, java.awt.BorderLayout.SOUTH);\n\n stepExplorerPanel.add(BaselineSelectionPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 50, 320, 250));\n\n helpButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/nl/astron/lofar/sas/otb/icons/16_help.png\"))); // NOI18N\n helpButton.setText(\"Help\");\n helpButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n helpButtonActionPerformed(evt);\n }\n });\n stepExplorerPanel.add(helpButton, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 650, -1, -1));\n\n stepExplorerScrollPanel.setViewportView(stepExplorerPanel);\n\n BBSStepExplorerPanel.add(stepExplorerScrollPanel, java.awt.BorderLayout.CENTER);\n\n add(BBSStepExplorerPanel, java.awt.BorderLayout.CENTER);\n }", "BGPv4FSMState state();", "private void initComponents() {\n\t\tlabel11 = new JLabel();\n\t\tlabel12 = new JLabel();\n\t\tlabel32 = new JLabel();\n\t\tlabel5 = new JLabel();\n\t\tlabel7 = new JLabel();\n\t\tlabel6 = new JLabel();\n\t\tlabel8 = new JLabel();\n\t\tlabel13 = new JLabel();\n\t\tlabel14 = new JLabel();\n\t\tlabel15 = new JLabel();\n\t\tlabel16 = new JLabel();\n\t\tlabel9 = new JLabel();\n\t\tlabel33 = new JLabel();\n\t\tlabel1 = new JLabel();\n\t\ttestStateButton1 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton7 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton4 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton10 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton1 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton5 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton9 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton12 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton15 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton19 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel2 = new JLabel();\n\t\ttestStateButton2 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton8 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton5 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton11 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton2 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton6 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton10 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton13 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton16 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton20 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel3 = new JLabel();\n\t\ttestStateButton3 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton9 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton6 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton12 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton3 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton7 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton11 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton14 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton17 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton21 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel4 = new JLabel();\n\t\ttestStateButton13 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateButton14 = new FlatComponentStateTest.TestStateButton();\n\t\ttestStateToggleButton4 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateToggleButton8 = new FlatComponentStateTest.TestStateToggleButton();\n\t\ttestStateButton18 = new FlatComponentStateTest.TestStateButton();\n\t\tlabel10 = new JLabel();\n\t\tbutton1 = new JButton();\n\t\ttestDefaultButton1 = new FlatComponentStateTest.TestDefaultButton();\n\t\ttoggleButton1 = new JToggleButton();\n\t\ttoggleButton2 = new JToggleButton();\n\t\tbutton2 = new JButton();\n\t\tseparator1 = new JSeparator();\n\t\tlabel22 = new JLabel();\n\t\tlabel27 = new JLabel();\n\t\tlabel23 = new JLabel();\n\t\tlabel28 = new JLabel();\n\t\tlabel24 = new JLabel();\n\t\tlabel29 = new JLabel();\n\t\tlabel25 = new JLabel();\n\t\tlabel30 = new JLabel();\n\t\tlabel26 = new JLabel();\n\t\tlabel31 = new JLabel();\n\t\tlabel17 = new JLabel();\n\t\ttestStateCheckBox1 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox8 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox5 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox12 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton1 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton8 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton5 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton9 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel18 = new JLabel();\n\t\ttestStateCheckBox2 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox9 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox6 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox13 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton2 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton10 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton6 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton11 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel19 = new JLabel();\n\t\ttestStateCheckBox3 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox10 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox7 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox14 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton3 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton12 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton7 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton13 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel20 = new JLabel();\n\t\ttestStateCheckBox4 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateCheckBox11 = new FlatComponentStateTest.TestStateCheckBox();\n\t\ttestStateRadioButton4 = new FlatComponentStateTest.TestStateRadioButton();\n\t\ttestStateRadioButton14 = new FlatComponentStateTest.TestStateRadioButton();\n\t\tlabel21 = new JLabel();\n\t\tcheckBox1 = new JCheckBox();\n\t\tcheckBox2 = new JCheckBox();\n\t\tradioButton1 = new JRadioButton();\n\t\tradioButton2 = new JRadioButton();\n\t\tseparator2 = new JSeparator();\n\t\tlabel35 = new JLabel();\n\t\ttextField1 = new JTextField();\n\t\ttextField2 = new JTextField();\n\t\tlabel38 = new JLabel();\n\t\tcomboBox1 = new JComboBox<>();\n\t\tcomboBox2 = new JComboBox<>();\n\n\t\t//======== this ========\n\t\tsetLayout(new MigLayout(\n\t\t\t\"insets dialog,hidemode 3\",\n\t\t\t// columns\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]para\" +\n\t\t\t\"[fill]\" +\n\t\t\t\"[fill]\",\n\t\t\t// rows\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]para\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]para\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\" +\n\t\t\t\"[]\"));\n\n\t\t//---- label11 ----\n\t\tlabel11.setText(\"JButton\");\n\t\tlabel11.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label11, \"cell 1 0 2 1\");\n\n\t\t//---- label12 ----\n\t\tlabel12.setText(\"JToggleButton\");\n\t\tlabel12.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label12, \"cell 5 0 3 1\");\n\n\t\t//---- label32 ----\n\t\tlabel32.setText(\"Help Button\");\n\t\tlabel32.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label32, \"cell 9 0 2 1\");\n\n\t\t//---- label5 ----\n\t\tlabel5.setText(\"regular\");\n\t\tadd(label5, \"cell 1 1\");\n\n\t\t//---- label7 ----\n\t\tlabel7.setText(\"default\");\n\t\tadd(label7, \"cell 2 1\");\n\n\t\t//---- label6 ----\n\t\tlabel6.setText(\"focused\");\n\t\tadd(label6, \"cell 3 1\");\n\n\t\t//---- label8 ----\n\t\tlabel8.setText(\"default\");\n\t\tadd(label8, \"cell 4 1\");\n\n\t\t//---- label13 ----\n\t\tlabel13.setText(\"unsel.\");\n\t\tadd(label13, \"cell 5 1\");\n\n\t\t//---- label14 ----\n\t\tlabel14.setText(\"selected\");\n\t\tadd(label14, \"cell 6 1\");\n\n\t\t//---- label15 ----\n\t\tlabel15.setText(\"focused\");\n\t\tadd(label15, \"cell 7 1\");\n\n\t\t//---- label16 ----\n\t\tlabel16.setText(\"selected\");\n\t\tadd(label16, \"cell 8 1\");\n\n\t\t//---- label9 ----\n\t\tlabel9.setText(\"regular\");\n\t\tadd(label9, \"cell 9 1\");\n\n\t\t//---- label33 ----\n\t\tlabel33.setText(\"focused\");\n\t\tadd(label33, \"cell 10 1\");\n\n\t\t//---- label1 ----\n\t\tlabel1.setText(\"none\");\n\t\tadd(label1, \"cell 0 2\");\n\n\t\t//---- testStateButton1 ----\n\t\ttestStateButton1.setText(\"text\");\n\t\ttestStateButton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton1, \"cell 1 2\");\n\n\t\t//---- testStateButton7 ----\n\t\ttestStateButton7.setText(\"text\");\n\t\ttestStateButton7.setStateDefault(true);\n\t\ttestStateButton7.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton7, \"cell 2 2\");\n\n\t\t//---- testStateButton4 ----\n\t\ttestStateButton4.setText(\"text\");\n\t\ttestStateButton4.setStateFocused(true);\n\t\ttestStateButton4.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton4, \"cell 3 2\");\n\n\t\t//---- testStateButton10 ----\n\t\ttestStateButton10.setText(\"text\");\n\t\ttestStateButton10.setStateFocused(true);\n\t\ttestStateButton10.setStateDefault(true);\n\t\ttestStateButton10.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton10, \"cell 4 2\");\n\n\t\t//---- testStateToggleButton1 ----\n\t\ttestStateToggleButton1.setText(\"text\");\n\t\tadd(testStateToggleButton1, \"cell 5 2\");\n\n\t\t//---- testStateToggleButton5 ----\n\t\ttestStateToggleButton5.setText(\"text\");\n\t\ttestStateToggleButton5.setStateSelected(true);\n\t\tadd(testStateToggleButton5, \"cell 6 2\");\n\n\t\t//---- testStateToggleButton9 ----\n\t\ttestStateToggleButton9.setText(\"text\");\n\t\ttestStateToggleButton9.setStateFocused(true);\n\t\tadd(testStateToggleButton9, \"cell 7 2\");\n\n\t\t//---- testStateToggleButton12 ----\n\t\ttestStateToggleButton12.setText(\"text\");\n\t\ttestStateToggleButton12.setStateSelected(true);\n\t\ttestStateToggleButton12.setStateFocused(true);\n\t\tadd(testStateToggleButton12, \"cell 8 2\");\n\n\t\t//---- testStateButton15 ----\n\t\ttestStateButton15.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton15.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton15, \"cell 9 2\");\n\n\t\t//---- testStateButton19 ----\n\t\ttestStateButton19.setStateFocused(true);\n\t\ttestStateButton19.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton19.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton19, \"cell 10 2\");\n\n\t\t//---- label2 ----\n\t\tlabel2.setText(\"hover\");\n\t\tadd(label2, \"cell 0 3\");\n\n\t\t//---- testStateButton2 ----\n\t\ttestStateButton2.setText(\"text\");\n\t\ttestStateButton2.setStateHover(true);\n\t\ttestStateButton2.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton2, \"cell 1 3\");\n\n\t\t//---- testStateButton8 ----\n\t\ttestStateButton8.setText(\"text\");\n\t\ttestStateButton8.setStateHover(true);\n\t\ttestStateButton8.setStateDefault(true);\n\t\ttestStateButton8.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton8, \"cell 2 3\");\n\n\t\t//---- testStateButton5 ----\n\t\ttestStateButton5.setText(\"text\");\n\t\ttestStateButton5.setStateHover(true);\n\t\ttestStateButton5.setStateFocused(true);\n\t\ttestStateButton5.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton5, \"cell 3 3\");\n\n\t\t//---- testStateButton11 ----\n\t\ttestStateButton11.setText(\"text\");\n\t\ttestStateButton11.setStateHover(true);\n\t\ttestStateButton11.setStateFocused(true);\n\t\ttestStateButton11.setStateDefault(true);\n\t\ttestStateButton11.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton11, \"cell 4 3\");\n\n\t\t//---- testStateToggleButton2 ----\n\t\ttestStateToggleButton2.setText(\"text\");\n\t\ttestStateToggleButton2.setStateHover(true);\n\t\tadd(testStateToggleButton2, \"cell 5 3\");\n\n\t\t//---- testStateToggleButton6 ----\n\t\ttestStateToggleButton6.setText(\"text\");\n\t\ttestStateToggleButton6.setStateHover(true);\n\t\ttestStateToggleButton6.setStateSelected(true);\n\t\tadd(testStateToggleButton6, \"cell 6 3\");\n\n\t\t//---- testStateToggleButton10 ----\n\t\ttestStateToggleButton10.setText(\"text\");\n\t\ttestStateToggleButton10.setStateHover(true);\n\t\ttestStateToggleButton10.setStateFocused(true);\n\t\tadd(testStateToggleButton10, \"cell 7 3\");\n\n\t\t//---- testStateToggleButton13 ----\n\t\ttestStateToggleButton13.setText(\"text\");\n\t\ttestStateToggleButton13.setStateHover(true);\n\t\ttestStateToggleButton13.setStateSelected(true);\n\t\ttestStateToggleButton13.setStateFocused(true);\n\t\tadd(testStateToggleButton13, \"cell 8 3\");\n\n\t\t//---- testStateButton16 ----\n\t\ttestStateButton16.setStateHover(true);\n\t\ttestStateButton16.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton16.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton16, \"cell 9 3\");\n\n\t\t//---- testStateButton20 ----\n\t\ttestStateButton20.setStateHover(true);\n\t\ttestStateButton20.setStateFocused(true);\n\t\ttestStateButton20.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton20.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton20, \"cell 10 3\");\n\n\t\t//---- label3 ----\n\t\tlabel3.setText(\"pressed\");\n\t\tadd(label3, \"cell 0 4\");\n\n\t\t//---- testStateButton3 ----\n\t\ttestStateButton3.setText(\"text\");\n\t\ttestStateButton3.setStatePressed(true);\n\t\ttestStateButton3.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton3, \"cell 1 4\");\n\n\t\t//---- testStateButton9 ----\n\t\ttestStateButton9.setText(\"text\");\n\t\ttestStateButton9.setStatePressed(true);\n\t\ttestStateButton9.setStateDefault(true);\n\t\ttestStateButton9.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton9, \"cell 2 4\");\n\n\t\t//---- testStateButton6 ----\n\t\ttestStateButton6.setText(\"text\");\n\t\ttestStateButton6.setStatePressed(true);\n\t\ttestStateButton6.setStateFocused(true);\n\t\ttestStateButton6.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton6, \"cell 3 4\");\n\n\t\t//---- testStateButton12 ----\n\t\ttestStateButton12.setText(\"text\");\n\t\ttestStateButton12.setStatePressed(true);\n\t\ttestStateButton12.setStateFocused(true);\n\t\ttestStateButton12.setStateDefault(true);\n\t\ttestStateButton12.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton12, \"cell 4 4\");\n\n\t\t//---- testStateToggleButton3 ----\n\t\ttestStateToggleButton3.setText(\"text\");\n\t\ttestStateToggleButton3.setStatePressed(true);\n\t\tadd(testStateToggleButton3, \"cell 5 4\");\n\n\t\t//---- testStateToggleButton7 ----\n\t\ttestStateToggleButton7.setText(\"text\");\n\t\ttestStateToggleButton7.setStatePressed(true);\n\t\ttestStateToggleButton7.setStateSelected(true);\n\t\tadd(testStateToggleButton7, \"cell 6 4\");\n\n\t\t//---- testStateToggleButton11 ----\n\t\ttestStateToggleButton11.setText(\"text\");\n\t\ttestStateToggleButton11.setStatePressed(true);\n\t\ttestStateToggleButton11.setStateFocused(true);\n\t\tadd(testStateToggleButton11, \"cell 7 4\");\n\n\t\t//---- testStateToggleButton14 ----\n\t\ttestStateToggleButton14.setText(\"text\");\n\t\ttestStateToggleButton14.setStatePressed(true);\n\t\ttestStateToggleButton14.setStateSelected(true);\n\t\ttestStateToggleButton14.setStateFocused(true);\n\t\tadd(testStateToggleButton14, \"cell 8 4\");\n\n\t\t//---- testStateButton17 ----\n\t\ttestStateButton17.setStatePressed(true);\n\t\ttestStateButton17.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton17.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton17, \"cell 9 4\");\n\n\t\t//---- testStateButton21 ----\n\t\ttestStateButton21.setStatePressed(true);\n\t\ttestStateButton21.setStateFocused(true);\n\t\ttestStateButton21.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton21.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton21, \"cell 10 4\");\n\n\t\t//---- label4 ----\n\t\tlabel4.setText(\"disabled\");\n\t\tadd(label4, \"cell 0 5\");\n\n\t\t//---- testStateButton13 ----\n\t\ttestStateButton13.setText(\"text\");\n\t\ttestStateButton13.setEnabled(false);\n\t\ttestStateButton13.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton13, \"cell 1 5\");\n\n\t\t//---- testStateButton14 ----\n\t\ttestStateButton14.setText(\"text\");\n\t\ttestStateButton14.setEnabled(false);\n\t\ttestStateButton14.setStateDefault(true);\n\t\ttestStateButton14.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testStateButton14, \"cell 2 5\");\n\n\t\t//---- testStateToggleButton4 ----\n\t\ttestStateToggleButton4.setText(\"text\");\n\t\ttestStateToggleButton4.setEnabled(false);\n\t\tadd(testStateToggleButton4, \"cell 5 5\");\n\n\t\t//---- testStateToggleButton8 ----\n\t\ttestStateToggleButton8.setText(\"text\");\n\t\ttestStateToggleButton8.setEnabled(false);\n\t\ttestStateToggleButton8.setStateSelected(true);\n\t\tadd(testStateToggleButton8, \"cell 6 5\");\n\n\t\t//---- testStateButton18 ----\n\t\ttestStateButton18.setEnabled(false);\n\t\ttestStateButton18.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\ttestStateButton18.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(testStateButton18, \"cell 9 5\");\n\n\t\t//---- label10 ----\n\t\tlabel10.setText(\"raw\");\n\t\tadd(label10, \"cell 0 6\");\n\n\t\t//---- button1 ----\n\t\tbutton1.setText(\"text\");\n\t\tbutton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(button1, \"cell 1 6\");\n\n\t\t//---- testDefaultButton1 ----\n\t\ttestDefaultButton1.setText(\"text\");\n\t\ttestDefaultButton1.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tadd(testDefaultButton1, \"cell 2 6\");\n\n\t\t//---- toggleButton1 ----\n\t\ttoggleButton1.setText(\"text\");\n\t\tadd(toggleButton1, \"cell 5 6\");\n\n\t\t//---- toggleButton2 ----\n\t\ttoggleButton2.setText(\"text\");\n\t\ttoggleButton2.setSelected(true);\n\t\tadd(toggleButton2, \"cell 6 6\");\n\n\t\t//---- button2 ----\n\t\tbutton2.putClientProperty(\"JComponent.minimumWidth\", 0);\n\t\tbutton2.putClientProperty(\"JButton.buttonType\", \"help\");\n\t\tadd(button2, \"cell 9 6\");\n\t\tadd(separator1, \"cell 0 7 11 1\");\n\n\t\t//---- label22 ----\n\t\tlabel22.setText(\"JCheckBox\");\n\t\tlabel22.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label22, \"cell 1 8 2 1\");\n\n\t\t//---- label27 ----\n\t\tlabel27.setText(\"JRadioButton\");\n\t\tlabel27.putClientProperty(\"FlatLaf.styleClass\", \"h3\");\n\t\tadd(label27, \"cell 5 8 2 1\");\n\n\t\t//---- label23 ----\n\t\tlabel23.setText(\"unsel.\");\n\t\tadd(label23, \"cell 1 9\");\n\n\t\t//---- label28 ----\n\t\tlabel28.setText(\"selected\");\n\t\tadd(label28, \"cell 2 9\");\n\n\t\t//---- label24 ----\n\t\tlabel24.setText(\"focused\");\n\t\tadd(label24, \"cell 3 9\");\n\n\t\t//---- label29 ----\n\t\tlabel29.setText(\"selected\");\n\t\tadd(label29, \"cell 4 9\");\n\n\t\t//---- label25 ----\n\t\tlabel25.setText(\"unsel.\");\n\t\tadd(label25, \"cell 5 9\");\n\n\t\t//---- label30 ----\n\t\tlabel30.setText(\"selected\");\n\t\tadd(label30, \"cell 6 9\");\n\n\t\t//---- label26 ----\n\t\tlabel26.setText(\"focused\");\n\t\tadd(label26, \"cell 7 9\");\n\n\t\t//---- label31 ----\n\t\tlabel31.setText(\"selected\");\n\t\tadd(label31, \"cell 8 9\");\n\n\t\t//---- label17 ----\n\t\tlabel17.setText(\"none\");\n\t\tadd(label17, \"cell 0 10\");\n\n\t\t//---- testStateCheckBox1 ----\n\t\ttestStateCheckBox1.setText(\"text\");\n\t\tadd(testStateCheckBox1, \"cell 1 10\");\n\n\t\t//---- testStateCheckBox8 ----\n\t\ttestStateCheckBox8.setText(\"text\");\n\t\ttestStateCheckBox8.setStateSelected(true);\n\t\tadd(testStateCheckBox8, \"cell 2 10\");\n\n\t\t//---- testStateCheckBox5 ----\n\t\ttestStateCheckBox5.setText(\"text\");\n\t\ttestStateCheckBox5.setStateFocused(true);\n\t\tadd(testStateCheckBox5, \"cell 3 10\");\n\n\t\t//---- testStateCheckBox12 ----\n\t\ttestStateCheckBox12.setText(\"text\");\n\t\ttestStateCheckBox12.setStateFocused(true);\n\t\ttestStateCheckBox12.setStateSelected(true);\n\t\tadd(testStateCheckBox12, \"cell 4 10\");\n\n\t\t//---- testStateRadioButton1 ----\n\t\ttestStateRadioButton1.setText(\"text\");\n\t\tadd(testStateRadioButton1, \"cell 5 10\");\n\n\t\t//---- testStateRadioButton8 ----\n\t\ttestStateRadioButton8.setText(\"text\");\n\t\ttestStateRadioButton8.setStateSelected(true);\n\t\tadd(testStateRadioButton8, \"cell 6 10\");\n\n\t\t//---- testStateRadioButton5 ----\n\t\ttestStateRadioButton5.setText(\"text\");\n\t\ttestStateRadioButton5.setStateFocused(true);\n\t\tadd(testStateRadioButton5, \"cell 7 10\");\n\n\t\t//---- testStateRadioButton9 ----\n\t\ttestStateRadioButton9.setText(\"text\");\n\t\ttestStateRadioButton9.setStateFocused(true);\n\t\ttestStateRadioButton9.setStateSelected(true);\n\t\tadd(testStateRadioButton9, \"cell 8 10\");\n\n\t\t//---- label18 ----\n\t\tlabel18.setText(\"hover\");\n\t\tadd(label18, \"cell 0 11\");\n\n\t\t//---- testStateCheckBox2 ----\n\t\ttestStateCheckBox2.setText(\"text\");\n\t\ttestStateCheckBox2.setStateHover(true);\n\t\tadd(testStateCheckBox2, \"cell 1 11\");\n\n\t\t//---- testStateCheckBox9 ----\n\t\ttestStateCheckBox9.setText(\"text\");\n\t\ttestStateCheckBox9.setStateHover(true);\n\t\ttestStateCheckBox9.setStateSelected(true);\n\t\tadd(testStateCheckBox9, \"cell 2 11\");\n\n\t\t//---- testStateCheckBox6 ----\n\t\ttestStateCheckBox6.setText(\"text\");\n\t\ttestStateCheckBox6.setStateFocused(true);\n\t\ttestStateCheckBox6.setStateHover(true);\n\t\tadd(testStateCheckBox6, \"cell 3 11\");\n\n\t\t//---- testStateCheckBox13 ----\n\t\ttestStateCheckBox13.setText(\"text\");\n\t\ttestStateCheckBox13.setStateFocused(true);\n\t\ttestStateCheckBox13.setStateHover(true);\n\t\ttestStateCheckBox13.setStateSelected(true);\n\t\tadd(testStateCheckBox13, \"cell 4 11\");\n\n\t\t//---- testStateRadioButton2 ----\n\t\ttestStateRadioButton2.setText(\"text\");\n\t\ttestStateRadioButton2.setStateHover(true);\n\t\tadd(testStateRadioButton2, \"cell 5 11\");\n\n\t\t//---- testStateRadioButton10 ----\n\t\ttestStateRadioButton10.setText(\"text\");\n\t\ttestStateRadioButton10.setStateHover(true);\n\t\ttestStateRadioButton10.setStateSelected(true);\n\t\tadd(testStateRadioButton10, \"cell 6 11\");\n\n\t\t//---- testStateRadioButton6 ----\n\t\ttestStateRadioButton6.setText(\"text\");\n\t\ttestStateRadioButton6.setStateFocused(true);\n\t\ttestStateRadioButton6.setStateHover(true);\n\t\tadd(testStateRadioButton6, \"cell 7 11\");\n\n\t\t//---- testStateRadioButton11 ----\n\t\ttestStateRadioButton11.setText(\"text\");\n\t\ttestStateRadioButton11.setStateFocused(true);\n\t\ttestStateRadioButton11.setStateHover(true);\n\t\ttestStateRadioButton11.setStateSelected(true);\n\t\tadd(testStateRadioButton11, \"cell 8 11\");\n\n\t\t//---- label19 ----\n\t\tlabel19.setText(\"pressed\");\n\t\tadd(label19, \"cell 0 12\");\n\n\t\t//---- testStateCheckBox3 ----\n\t\ttestStateCheckBox3.setText(\"text\");\n\t\ttestStateCheckBox3.setStatePressed(true);\n\t\tadd(testStateCheckBox3, \"cell 1 12\");\n\n\t\t//---- testStateCheckBox10 ----\n\t\ttestStateCheckBox10.setText(\"text\");\n\t\ttestStateCheckBox10.setStatePressed(true);\n\t\ttestStateCheckBox10.setStateSelected(true);\n\t\tadd(testStateCheckBox10, \"cell 2 12\");\n\n\t\t//---- testStateCheckBox7 ----\n\t\ttestStateCheckBox7.setText(\"text\");\n\t\ttestStateCheckBox7.setStateFocused(true);\n\t\ttestStateCheckBox7.setStatePressed(true);\n\t\tadd(testStateCheckBox7, \"cell 3 12\");\n\n\t\t//---- testStateCheckBox14 ----\n\t\ttestStateCheckBox14.setText(\"text\");\n\t\ttestStateCheckBox14.setStateFocused(true);\n\t\ttestStateCheckBox14.setStatePressed(true);\n\t\ttestStateCheckBox14.setStateSelected(true);\n\t\tadd(testStateCheckBox14, \"cell 4 12\");\n\n\t\t//---- testStateRadioButton3 ----\n\t\ttestStateRadioButton3.setText(\"text\");\n\t\ttestStateRadioButton3.setStatePressed(true);\n\t\tadd(testStateRadioButton3, \"cell 5 12\");\n\n\t\t//---- testStateRadioButton12 ----\n\t\ttestStateRadioButton12.setText(\"text\");\n\t\ttestStateRadioButton12.setStatePressed(true);\n\t\ttestStateRadioButton12.setStateSelected(true);\n\t\tadd(testStateRadioButton12, \"cell 6 12\");\n\n\t\t//---- testStateRadioButton7 ----\n\t\ttestStateRadioButton7.setText(\"text\");\n\t\ttestStateRadioButton7.setStateFocused(true);\n\t\ttestStateRadioButton7.setStatePressed(true);\n\t\tadd(testStateRadioButton7, \"cell 7 12\");\n\n\t\t//---- testStateRadioButton13 ----\n\t\ttestStateRadioButton13.setText(\"text\");\n\t\ttestStateRadioButton13.setStateFocused(true);\n\t\ttestStateRadioButton13.setStatePressed(true);\n\t\ttestStateRadioButton13.setStateSelected(true);\n\t\tadd(testStateRadioButton13, \"cell 8 12\");\n\n\t\t//---- label20 ----\n\t\tlabel20.setText(\"disabled\");\n\t\tadd(label20, \"cell 0 13\");\n\n\t\t//---- testStateCheckBox4 ----\n\t\ttestStateCheckBox4.setText(\"text\");\n\t\ttestStateCheckBox4.setEnabled(false);\n\t\tadd(testStateCheckBox4, \"cell 1 13\");\n\n\t\t//---- testStateCheckBox11 ----\n\t\ttestStateCheckBox11.setText(\"text\");\n\t\ttestStateCheckBox11.setEnabled(false);\n\t\ttestStateCheckBox11.setStateSelected(true);\n\t\tadd(testStateCheckBox11, \"cell 2 13\");\n\n\t\t//---- testStateRadioButton4 ----\n\t\ttestStateRadioButton4.setText(\"text\");\n\t\ttestStateRadioButton4.setEnabled(false);\n\t\tadd(testStateRadioButton4, \"cell 5 13\");\n\n\t\t//---- testStateRadioButton14 ----\n\t\ttestStateRadioButton14.setText(\"text\");\n\t\ttestStateRadioButton14.setEnabled(false);\n\t\ttestStateRadioButton14.setStateSelected(true);\n\t\tadd(testStateRadioButton14, \"cell 6 13\");\n\n\t\t//---- label21 ----\n\t\tlabel21.setText(\"raw\");\n\t\tadd(label21, \"cell 0 14\");\n\n\t\t//---- checkBox1 ----\n\t\tcheckBox1.setText(\"text\");\n\t\tadd(checkBox1, \"cell 1 14\");\n\n\t\t//---- checkBox2 ----\n\t\tcheckBox2.setText(\"text\");\n\t\tcheckBox2.setSelected(true);\n\t\tadd(checkBox2, \"cell 2 14\");\n\n\t\t//---- radioButton1 ----\n\t\tradioButton1.setText(\"text\");\n\t\tadd(radioButton1, \"cell 5 14\");\n\n\t\t//---- radioButton2 ----\n\t\tradioButton2.setText(\"text\");\n\t\tradioButton2.setSelected(true);\n\t\tadd(radioButton2, \"cell 6 14\");\n\t\tadd(separator2, \"cell 0 15 11 1\");\n\n\t\t//---- label35 ----\n\t\tlabel35.setText(\"JTextField\");\n\t\tadd(label35, \"cell 0 16\");\n\t\tadd(textField1, \"cell 1 16 2 1\");\n\t\tadd(textField2, \"cell 3 16 2 1\");\n\n\t\t//---- label38 ----\n\t\tlabel38.setText(\"JComboBox\");\n\t\tadd(label38, \"cell 0 17\");\n\t\tadd(comboBox1, \"cell 1 17 2 1\");\n\t\tadd(comboBox2, \"cell 3 17 2 1\");\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\n\t}", "private transitFlight(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public Workflow(ArrayList<Component> components) {\n\t\tsuper();\n\t\tsetSubComponents(components);\n\t}", "public TreeItem(TransducerLeftTree tlt, \n\t\t\tVector<HashSet<Symbol>> states, \n\t\t\tHashMap<HashSet<Symbol>, Symbol> map) throws ImproperConversionException {\n\t\tboolean debug = false;\n\t\tif (debug) Debug.debug(debug, \"Building tree item from \"+tlt+\" with remaining state vector \"+states);\n\t\t// if we're a variable, map and return\n\t\t// TODO: what about variable+label cases?\n\t\tif (tlt.hasVariable()) {\n\t\t\tHashSet<Symbol> stvals = states.remove(0);\n\t\t\tif (stvals.size() == 1) {\n\t\t\t\tSymbol[] ar =new Symbol[1];\n\t\t\t\tstvals.toArray(ar);\n\t\t\t\tlabel = ar[0];\n\t\t\t\tif (debug) Debug.debug(debug, \"Turning \"+tlt.getLabel()+\" into \"+label);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!map.containsKey(stvals))\n\t\t\t\t\tthrow new ImproperConversionException(\"No mapped value for set of states \"+stvals);\n\t\t\t\tlabel = map.get(stvals);\n\t\t\t\tif (debug) Debug.debug(debug, \"Turning \"+tlt.getLabel()+\" into \"+label);\n\t\t\t}\n\t\t\tif (tlt.getNumChildren() > 0)\n\t\t\t\tthrow new ImproperConversionException(\"Trying to convert tlt \"+tlt.toString()+\" with non-terminal variables\");\n\t\t\tchildren = null;\n\t\t\tnumChildren = 0;\n\t\t\tnumNodes = 1;\n\t\t\tdecideNorm = true;\n\t\t\tisNorm = true;\n\t\t\tisEmptyString = false;\n\t\t}\n\t\telse {\n\t\t\tlabel = tlt.getLabel();\n\t\t\tif (debug) Debug.debug(debug, \"Copying \"+tlt.getLabel()+\" into tree and descending\");\t\n\t\t\tnumChildren = tlt.getNumChildren();\n\t\t\tchildren = new Item[numChildren];\n\t\t\tfor (int i = 0; i < numChildren; i++)\n\t\t\t\tchildren[i] = new TreeItem(tlt.getChild(i), states, map);\n\t\t}\n\t}", "BehaviorStateMachinesFactory getBehaviorStateMachinesFactory();", "@Override\n\tpublic void buildComponent(StructureComponent structurecomponent, List list, Random random) {\n\t}", "@DebugLog\n private void buildDaggerGraph(){\n mComponent = DaggerAppComponent.builder()\n .appModule(new AppModule(this))\n .dataModule(new DataModule())\n .uiModule(new UiModule())\n .apiModule(new ApiModule())\n .infoModule(new InfoModule())\n .build();\n mComponent.inject(this);\n }", "@Override\r\n\tpublic DFA getDFA() {\r\n\t\t// Must implement the breadth first search algorithm.\r\n\t\tQueue<Set<NFAState>> workQueue = new LinkedList<Set<NFAState>>();\r\n\t\tDFA d = new DFA(); // Step 1. https://www.javatpoint.com/automata-conversion-from-nfa-to-dfa\r\n\t\t// d.addStartState(\"[\" + startState.getName() + \"]\"); //Step 2.\r\n\t\tworkQueue.add(eClosure(startState));\r\n\r\n\t\twhile (!workQueue.isEmpty()) {\r\n\t\t\tSet<NFAState> currentNode = workQueue.poll(); // current workItem.\r\n\t\t\tboolean isFinalState = false;\r\n\r\n\t\t\tfor (NFAState n : currentNode) {\r\n\t\t\t\tif (n.isFinal()) {\r\n\t\t\t\t\tisFinalState = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (d.getStartState() == null && !isFinalState) {\r\n\t\t\t\td.addStartState(currentNode.toString());\r\n\t\t\t} else if (d.getStartState() == null && isFinalState) {\r\n\t\t\t\td.addFinalState(currentNode.toString());\r\n\t\t\t\td.addStartState(currentNode.toString());\r\n\t\t\t}\r\n\r\n\t\t\tfor (Character symb : getABC()) {\r\n\t\t\t\tSet<NFAState> setOfStateForSymb = new HashSet<NFAState>();\r\n\t\t\t\tfor (NFAState v : currentNode) {\r\n\t\t\t\t\tif (v.getTrans().get(symb) != null) {\r\n\t\t\t\t\t\tfor (NFAState t : v.getTrans().get(symb)) {\r\n\t\t\t\t\t\t\tsetOfStateForSymb.addAll(eClosure(t));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tboolean dfaHasState = false;\r\n\r\n\t\t\t\tfor (State s : d.getStates()) {\r\n\t\t\t\t\tif (s.getName().equals(setOfStateForSymb.toString())) {\r\n\t\t\t\t\t\tdfaHasState = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (setOfStateForSymb.toString() == \"[]\") {\r\n\t\t\t\t\tif (!dfaHasState) {\r\n\t\t\t\t\t\td.addState(\"[]\");\r\n\t\t\t\t\t\tworkQueue.add(setOfStateForSymb);\r\n\t\t\t\t\t}\r\n\t\t\t\t\td.addTransition(currentNode.toString(), symb, \"[]\");\r\n\t\t\t\t} else if (!dfaHasState) {\r\n\t\t\t\t\tboolean isFinal = false;\r\n\t\t\t\t\tfor (NFAState ns : setOfStateForSymb) {\r\n\t\t\t\t\t\tif (ns.isFinal()) {\r\n\t\t\t\t\t\t\tisFinal = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isFinal) {\r\n\t\t\t\t\t\tworkQueue.add(setOfStateForSymb);\r\n\t\t\t\t\t\td.addFinalState(setOfStateForSymb.toString());\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tworkQueue.add(setOfStateForSymb);\r\n\t\t\t\t\t\td.addState(setOfStateForSymb.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\td.addTransition(currentNode.toString(), symb, setOfStateForSymb.toString());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn d;\r\n\t}", "public void getAllFSMProcess() {\n IReadFile readFile = new ReadFile();\n List<String> list = readFile.readFsmFile(path);\n for(String s : list) {\n FSMContent content = readFile.saveFSMContent(readFile.splitFsmLine(s));\n if(currentState == null) {\n currentState = content.getCurrentState();\n }\n current_state.add(content.getCurrentState());\n next_state.add(content.getNextState());\n solution_set.add(content.getInputSymbol());\n contentsMap.put(content.getCurrentState() + content.getInputSymbol(), content);\n }\n }", "DataFlow createDataFlow();", "T2 build();", "public interface ComponentBuilder {\n interface CommonComponent {\n\n /**\n * The name of the component\n *\n * @return the name of the component\n */\n ComponentBuilder named(String label);\n }\n\n interface Command extends CommonComponent {\n\n /**\n * Used to handle the execution of the command\n * @param commandExecute execution handler\n */\n Command handleExecute(CommandExecute commandExecute);\n\n Command addCommand(Consumer<Command> commandBuilder);\n\n <T extends Argument> Command addArg(T argument, Consumer<T> argumentBuilderConsumer);\n\n Command addArg(Consumer<Argument> consumer);\n }\n\n interface Argument<T> extends CommonComponent {\n\n /**\n * Handle tab completion at the place of the argument\n *\n * @param complete handler for the completion\n */\n Argument<T> handleTabComplete(@NonNull TabComplete complete);\n\n /**\n * Parse input into object\n *\n * @param parser function which parses string into object\n */\n Argument<T> parse(Function<String, ParseResult<T>> parser);\n\n /**\n * Should the argument be optional? Remember that optional arguments should be last\n *\n * @param optional if the argument should be optional\n */\n Argument<T> optional(boolean optional);\n }\n}", "protected Path constructPath(DFNode node) {\n if (node == null) {\n return null;\n }\n\n Path result = new Path();\n result.cost = node.getCost();\n while (node.parent != null) {\n result.add(0, new ActionStatePair(node.action, node.state));\t//add state to the beginning of list\n node = node.parent;\n }\n result.head = node.state;\t//now node is the head of the path\n\n return result;\n }", "protected void build() {\n // Make sure we have a fresh build of everything needed to run a JAM session\n // - bootstrap, translator and agent suites\n builder(\"clean\");\n builder(\"\");\n buildBootstrap();\n }", "public Component() {\n\t\tlocation = new Point(0, 0);\n\t\tsize = new Dimension(100, 80);\n\t\tproperties = new LinkedHashMap<>();\n\t\tsubJobContainer= new LinkedHashMap<>();\n\t\tleftPortCount = 0;\n\t\trightPortCount = 0;\n\t\tbottomPortCount = 0;\n\t\tinputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\n\t\tinputLinks = new ArrayList<Link>();\n\t\toutputLinksHash = new Hashtable<String, ArrayList<Link>>();\n\t\toutputLinks = new ArrayList<Link>();\n\t\tinputportTerminals = new ArrayList<String>();\n\t\toutputPortTerminals = new ArrayList<String>();\n\t\twatcherTerminals = new HashMap();\n\t\tnewInstance = true;\n\t\tvalidityStatus = ValidityStatus.WARN.name();\n\t\tcomponentName = DynamicClassProcessor.INSTANCE.getClazzName(this\n\t\t\t\t.getClass());\n\n\t\tcomponentLabel = new ComponentLabel(componentName);\n\t\tcomponentLabelMargin = 16;\n\n\t\tprefix = XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\t\n\t\tdefaultPrefix=XMLConfigUtil.INSTANCE.getComponent(componentName)\n\t\t\t\t.getDefaultNamePrefix();\n\t\tinitPortSettings();\n\t\ttoolTipErrorMessages = new LinkedHashMap<>();\n\t\tstatus = ComponentExecutionStatus.BLANK;\n\t}", "StateMachineType createStateMachineType();", "public IFsm initFsm(Class<? extends IState> p_newState) throws Exception;", "private void buildInputPanel(){\n //Create the holding panel\n inputPanel = new JPanel();\n\n //Create a GridLayout manager for the panel with 3 rows and 2 columns\n inputPanel.setLayout(new GridLayout(3,2));\n\n // Create the labels and text fields\n messageLabel1 = new JLabel(\"\\tEnter CS at 5 minutes: \");\n csAmount5 = new JTextField(5);\n messageLabel2 = new JLabel(\"\\tEnter CS at 10 minutes: \");\n csAmount10 = new JTextField(5);\n messageLabel3 = new JLabel(\"\\tEnter CS at 13 minutes: \");\n csAmount13 = new JTextField(5);\n\n //Add the components to the panel\n inputPanel.add(messageLabel1);\n inputPanel.add(csAmount5);\n inputPanel.add(messageLabel2);\n inputPanel.add(csAmount10);\n inputPanel.add(messageLabel3);\n inputPanel.add(csAmount13);\n }", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "@Test\n public void testConstruction()\n {\n String constructed = StateUtils.construct(TEST_DATA, externalContext);\n Object object = org.apache.myfaces.application.viewstate.StateUtils.reconstruct(constructed, externalContext);\n Assertions.assertTrue(TEST_DATA.equals(object));\n }", "<C, S> StateExp<C, S> createStateExp();", "public interface IState {\n\n /**\n * Click on button to load a new map from file.\n */\n void btnLoadMap();\n\n /**\n * Click on button to load a new planning from file.\n */\n void btnLoadPlanning();\n\n /**\n * Click on button to compute the best route to make deliveries.\n */\n void btnGenerateRoute();\n\n /**\n * Click on button to cancel a loading action.\n */\n void btnCancel();\n\n /**\n * Click on button to load file.\n *\n * @param file File to load as a map or a planning depending on the state.\n */\n void btnValidateFile(File file);\n\n /**\n * Left click pressed on a delivery.\n */\n void leftClickPressedOnDelivery();\n\n /**\n * Left click released on another delivery.\n *\n * @param sourceDelivery Delivery to switch with target delivery.\n * @param targetDelivery Delivery to switch with sourceDelivery.\n */\n void leftClickReleased(Delivery sourceDelivery, Delivery targetDelivery);\n\n /**\n * Simple click on a delivery.\n *\n * @param delivery The delivery clicked.\n */\n void clickOnDelivery(Delivery delivery);\n\n /**\n * Simple click somewhere else (not a interactive point).\n */\n void clickSomewhereElse();\n\n /**\n * Click on an empty node (not a delivery or warehouse node).\n *\n * @param node The empty node clicked.\n */\n void clickOnEmptyNode(Node node);\n\n /**\n * Click on button to add a new delivery.\n *\n * @param node The node to deliver.\n * @param previousDeliveryNode The node with the previous delivery.\n * @param timeSlot The time slot of the new delivery.\n */\n void btnAddDelivery(Node node, Node previousDeliveryNode, TimeSlot timeSlot);\n\n /**\n * Click on button to remove a delivery.\n *\n * @param delivery The delivery to remove.\n */\n void btnRemoveDelivery(Delivery delivery);\n\n /**\n * Click on a specific node : the warehouse.\n *\n * @param warehouse The warehouse node clicked.\n */\n void clickOnWarehouse(Node warehouse);\n\n /**\n * Click on button to close the current map already loaded.\n */\n void btnCloseMap();\n\n /**\n * Click on button to clear the current planning already loaded.\n */\n void btnClearPlanning();\n\n /**\n * Set the default view for this state (enable/disable buttons ...).\n */\n void initView();\n}", "private static List<State<StepStateful>> getStates() {\n List<State<StepStateful>> states = new LinkedList<>();\n states.add(s0);\n states.add(s1);\n states.add(s2);\n states.add(s3);\n states.add(s4);\n states.add(s5);\n states.add(s6);\n return states;\n }", "T transformToAndValidateInitialState(VendingMachine vendingMachine);", "public TreeItem(TransducerLeftTree tlt, Vector<Symbol> states) throws ImproperConversionException {\n\t\tboolean debug = false;\n\t\tif (debug) Debug.debug(debug, \"Building tree item from \"+tlt+\" with state vec \"+states);\n\t\t// if we're a variable, map and return\n\t\t// TODO: what about variable+label cases?\n\t\tif (tlt.hasVariable()) {\n\t\t\tif (states.isEmpty())\n\t\t\tthrow new ImproperConversionException(\"Ran out of states before swapping for \"+tlt);\n\t\t\tlabel = states.remove(0);\n\t\t\tif (debug) Debug.debug(debug, \"Turning \"+tlt+\" into \"+label);\n\t\t\tchildren = null;\n\t\t\tnumChildren = 0;\n\t\t\tnumNodes = 1;\n\t\t\tdecideNorm = true;\n\t\t\tisNorm = true;\n\t\t\tisEmptyString = false;\n\t\t}\n\t\telse {\n\t\t\tlabel = tlt.getLabel();\n\t\t\tif (debug) Debug.debug(debug, \"Copying \"+tlt.getLabel()+\" into tree and descending\");\t\n\t\t\tnumChildren = tlt.getNumChildren();\n\t\t\tchildren = new Item[numChildren];\n\t\t\tfor (int i = 0; i < numChildren; i++)\n\t\t\t\tchildren[i] = new TreeItem(tlt.getChild(i), states);\n\t\t}\n\t}", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "private void buildPanel()\n\t{\n\t\tvoterIDMessage = new JLabel(\"Please Enter Your Voter ID.\");\n\t\tbutton1 = new JButton(\"Cancel\");\n\t\tbutton1.addActionListener(new ButtonListener());\n\t\tbutton2 = new JButton(\"OK\");\n\t\tbutton2.addActionListener(new ButtonListener());\n\t\tidText = new JTextField(10);\n\t\tpanel1 = new JPanel();\n\t\tpanel2 = new JPanel();\n\t\tpanel3 = new JPanel();\n\t\tpanel1.add(voterIDMessage);\n\t\tpanel2.add(idText);\n\t\tpanel3.add(button1);\n\t\tpanel3.add(button2);\n\t}", "StepFSM(StepDetector detector) {\n super(\"StepStateful FSM\", new MemoryPersisterImpl<>(getStates(), s0));\n initTransitions();\n this.detector = detector;\n }", "public String buildTreeFromMessage(){\n parseMsg();\n if(printOCCTable)printTable();\n constructTree();\n reconstructTree();\n if(printHuffTree)\n printTree();\n return printBFSTree();\n }", "private void buildPanel()\r\n\t{\r\n\t\tgallonsLabel = new JLabel(\"Gallons: \");\r\n\t\tgallonsField = new JTextField(5);\r\n\t\t\r\n\t\tmilesLabel = new JLabel(\"Miles: \");\r\n\t\tmilesField = new JTextField(5);\r\n\t\t\r\n\t\tcalcButton = new JButton(\"Calculate MPG\");\r\n\t\tcalcButton.addActionListener(new CalcButtonListener());\r\n\t\t\r\n\t\tpanel = new JPanel();\r\n\t\tpanel.add(gallonsLabel);\r\n\t\tpanel.add(gallonsField);\r\n\t\tpanel.add(milesLabel);\r\n\t\tpanel.add(milesField);\r\n\t\tpanel.add(calcButton);\r\n\t}", "public static ArrayList genStates(){\n ArrayList states = new ArrayList(44);\n List<String> notes = new ArrayList<String>(Arrays.asList(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\"));\n List<String> beat = new ArrayList<String>(Arrays.asList(\"1\",\"2\",\"3\",\"4\"));\n //List<String> dot = new ArrayList<String>(Arrays.asList(\"1\",\"0\"));\n for(int n = 0; n<=10; n++){\n for(int b = 0; b<=3; b++){\n //for(int d = 0; d<=1; d++){\n String state = \"\"; \n state += notes.get(n);\n state += beat.get(b);\n //state += dot.get(d);\n states.add(state);\n //}\n }\n }\n return states;\n }", "public void constructHierarchy(){\n\t\t// populate parents for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tpopulateParent(ps);\n\t\t}\n\t\t// populate values for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tps.lookupValues();\n\t\t}\n\t\t\n\t\t// populate parents for the command specs and their contained param specs\n\t\tfor (CommandSpec cs : m_commandSpecs){\n\t\t\tpopulateParent(cs);\n\t\t\tif (cs.getParamSpecs() != null){\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tpopulateParent(ps);\n\t\t\t\t}\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tps.lookupValues();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addComponents(State s) {\n\t\t// Removes the components\n\t\tfor (Component c : this.getComponents())\n\t\t\tthis.remove(c);\n\n\t\t// Adds the components, when they are needed.\n\t\tif (s.equals(State.CLASS_COURSE_STUDENT_TASK)) {\n\t\t\tthis.add(lblSpacer1, BorderLayout.PAGE_START);\n\t\t\tthis.add(panelInfo, BorderLayout.LINE_START);\n\t\t\tthis.add(scroll, BorderLayout.CENTER);\n\t\t\tthis.add(pComment, BorderLayout.LINE_END);\n\t\t\tthis.add(lblSpacer7, BorderLayout.PAGE_END);\n\t\t} else if (s.equals(State.CLASS_COURSE_STUDENT)) {\n\t\t\tthis.add(lblSpacer1, BorderLayout.PAGE_START);\n\t\t\tthis.add(panelInfo, BorderLayout.LINE_START);\n\t\t\tthis.add(scroll, BorderLayout.CENTER);\n\t\t\tthis.add(lblSpacer5, BorderLayout.LINE_END);\n\t\t}\n\t}", "private void buildComponent() {\n\t\tStoreItemCell cell = new StoreItemCell(\"Turret\");\n\t\tcell.initialize(mySize);\n\t\tmyContainer.getChildren().add(cell.getNode());\n\t}", "T build();", "T build();", "private Frame buildFrame() {\n return new Frame(command, headers, body);\n }", "private DrmSystems(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void buildUI() {\n initComponents();\n\n FormLayout layout = new FormLayout(\"3dlu, pref:grow, 3dlu\",\n \"3dlu, pref, 3dlu, pref, 3dlu, fill:0:grow\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n CellConstraints cc = new CellConstraints();\n\n // Toolbar\n JPanel toolbar = createToolBar();\n toolbar.setOpaque(false);\n builder.add(toolbar, cc.xy(2, 2));\n builder.addSeparator(null, cc.xyw(1, 4, 2));\n\n // Main panel in scroll pane\n JPanel mainPanel = buildMainPanel();\n mainPanel.setOpaque(false);\n JScrollPane scrollPane = new JScrollPane(mainPanel);\n scrollPane.setOpaque(false);\n scrollPane.getVerticalScrollBar().setUnitIncrement(10);\n UIUtil.removeBorder(scrollPane);\n builder.add(scrollPane, cc.xyw(1, 6, 2));\n\n uiComponent = builder.getPanel();\n }", "@Override\n\tpublic void buildComponent(StructureComponent structurecomponent, List list, Random random) {\n\t\t;\n\t}", "public State(String fromString)\n {\n// Metrics.increment(\"State count\");\n //...\n }", "private void startComponents(){\n\n if(isAllowed(sentinel)){\n SentinelComponent sentinelComponent = new SentinelComponent(getInstance());\n sentinelComponent.getCanonicalName();\n }\n\n if(isAllowed(\"fileserver\")){\n FileServer fileServer = new FileServer(getInstance());\n fileServer.getCanonicalName();\n }\n\n if(isAllowed(\"manager\")){\n ManagerComponent Manager = new ManagerComponent(getInstance());\n Manager.getCanonicalName();\n }\n\n// if(isAllowed(\"sdk\")){\n// SDK sdk = new SDK(getInstance());\n// sdk.getCanonicalName();\n// }\n\n if(isAllowed(\"centrum\")){\n CentrumComponent centrum1 = new CentrumComponent(getInstance(), null);\n centrum1.getCanonicalName();\n }\n\n }", "private Component createComponent(XmlNode node, String id) {\n\n Component comp = null;\n String tag = node.getTag();\n\n if (tag.equals(TAG_PANEL)) {\n comp = layoutContainer(new JPanel(), node, node.getChildren());\n } else if (tag.equals(TAG_BORDER)) {\n comp = layoutBorder(node, node.getChildren());\n } else if (tag.equals(TAG_TEXTINPUT)) {\n int cols = node.getAttribute(ATTR_COLS, -1);\n int rows = node.getAttribute(ATTR_ROWS, -1);\n String value = node.getAttribute(ATTR_VALUE, \"\");\n\n JTextComponent textComp;\n if (rows > 1) {\n if (cols < 0) {\n cols = 30;\n }\n textComp = new JTextArea(value, rows, cols);\n } else {\n if (cols == -1) {\n textComp = new JTextField(value);\n } else {\n textComp = new JTextField(value, cols);\n }\n ((JTextField) textComp).addActionListener(this);\n }\n comp = textComp;\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n if (action != null) {\n componentToAction.put(textComp, action);\n }\n } else if (tag.equals(TAG_MENUITEM) || tag.equals(TAG_CBMENUITEM)) {\n String actionTemplate = null;\n JMenuItem mi;\n String label = node.getAttribute(ATTR_LABEL, \"\");\n String action = node.getAttribute(ATTR_ACTION);\n String value = node.getAttribute(ATTR_VALUE);\n String key = node.getAttribute(ATTR_KEY);\n if ((action == null) && (actionTemplate != null)\n && (value != null)) {\n action = GuiUtils.replace(actionTemplate, \"%value%\", value);\n }\n if ((key != null) && !key.startsWith(\"group:\")) {\n label = label + \" \" + key;\n }\n\n if (node.getTag().equals(TAG_CBMENUITEM)) {\n boolean initValue = node.getAttribute(ATTR_VALUE, true);\n JCheckBoxMenuItem cbmi = new JCheckBoxMenuItem(label,\n initValue);\n String group = node.getAttribute(ATTR_GROUP, (String) null);\n addToGroup(group, cbmi);\n mi = cbmi;\n if (action != null) {\n Hashtable actions = new Hashtable();\n actions.put(ATTR_ACTION, action);\n actions.put(ATTR_VALUE, new Boolean(initValue));\n componentToAction.put(cbmi, actions);\n cbmi.addItemListener(this);\n if ((group == null) || initValue) {\n itemStateChanged(new ItemEvent(cbmi, 0, cbmi,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n }\n\n if (key != null) {\n if (key.startsWith(\"group:\")) {\n if (group != null) {\n key = key.substring(6);\n keyToComponent.put(key.toLowerCase(), group);\n }\n } else {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n } else {\n mi = new JMenuItem(label);\n if (action != null) {\n mi.setActionCommand(action);\n mi.addActionListener(this);\n if (key != null) {\n keyToComponent.put(key.toLowerCase(), mi);\n }\n }\n }\n if (id != null) {\n idToMenuItem.put(id, mi);\n }\n comp = mi;\n } else if (tag.equals(TAG_MENU)) {\n Vector children = node.getChildren();\n JMenu menu = new JMenu(node.getAttribute(ATTR_LABEL, \"\"));\n comp = menu;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n if (childElement.getTag().equals(TAG_SEPARATOR)) {\n menu.addSeparator();\n\n continue;\n }\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menu.add(childComponent);\n }\n } else if (tag.equals(TAG_MENUBAR)) {\n Vector children = node.getChildren();\n JMenuBar menuBar = new JMenuBar();\n comp = menuBar;\n for (int i = 0; i < children.size(); i++) {\n XmlNode childElement = (XmlNode) children.get(i);\n Component childComponent = xmlToUi(childElement);\n if (childComponent == null) {\n continue;\n }\n menuBar.add(childComponent);\n }\n } else if (tag.equals(TAG_SPLITPANE)) {\n Vector xmlChildren = node.getChildren();\n if (xmlChildren.size() != 2) {\n throw new IllegalArgumentException(\n \"splitpane tag needs to have 2 children \" + node);\n }\n XmlNode leftNode = getReffedNode((XmlNode) xmlChildren.get(0));\n XmlNode rightNode = getReffedNode((XmlNode) xmlChildren.get(1));\n Component leftComponent = xmlToUi(leftNode);\n Component rightComponent = xmlToUi(rightNode);\n boolean continuous = node.getAttribute(ATTR_CONTINUOUS, true);\n int orientation = findValue(node.getAttribute(ATTR_ORIENTATION,\n (String) null), SPLITPANE_NAMES,\n SPLITPANE_VALUES);\n\n JSplitPane split = new JSplitPane(orientation, continuous,\n leftComponent, rightComponent);\n int divider = node.getAttribute(ATTR_DIVIDER, -1);\n if (divider != -1) {\n split.setDividerLocation(divider);\n }\n split.setOneTouchExpandable(\n node.getAttribute(ATTR_ONETOUCHEXPANDABLE, true));\n double resizeweight = node.getAttribute(ATTR_RESIZEWEIGHT, -1.0);\n if (resizeweight != -1.0) {\n split.setResizeWeight(resizeweight);\n }\n comp = split;\n } else if (tag.equals(TAG_LABEL)) {\n String label = node.getAttribute(ATTR_LABEL, \"\");\n comp = new JLabel(label, getAlign(node));\n } else if (tag.equals(TAG_IMAGE)) {\n comp = makeImageButton(node, null, null);\n } else if (tag.equals(TAG_SHAPEPANEL)) {\n comp = new ShapePanel(this, node);\n } else if (tag.equals(TAG_BUTTON)) {\n JButton b = new JButton(node.getAttribute(ATTR_LABEL, \"\"));\n b.setActionCommand(node.getAttribute(ATTR_ACTION, \"No action\"));\n b.addActionListener(this);\n comp = b;\n } else if (tag.equals(TAG_CHOICE)) {\n Choice b = new java.awt.Choice();\n String action = node.getAttribute(ATTR_ACTION,\n (String) null);\n int selected = node.getAttribute(ATTR_SELECTED, 0);\n Hashtable actions = new Hashtable();\n for (int i = 0; i < node.size(); i++) {\n XmlNode child = getReffedNode(node.get(i));\n if ( !child.getTag().equals(TAG_ITEM)) {\n throw new IllegalArgumentException(\"Bad choice item:\"\n + child);\n }\n b.add(child.getAttribute(ATTR_LABEL, \"\"));\n String value = child.getAttribute(ATTR_VALUE, (String) null);\n if (value != null) {\n actions.put(ATTR_VALUE + i, value);\n }\n String subAction = child.getAttribute(ATTR_ACTION,\n (String) null);\n if (subAction != null) {\n actions.put(ATTR_ACTION + i, subAction);\n }\n }\n comp = b;\n if (action != null) {\n actions.put(ATTR_ACTION, action);\n componentToAction.put(b, actions);\n b.select(selected);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else if (tag.equals(TAG_CHECKBOX)) {\n JCheckBox b = new JCheckBox(node.getAttribute(ATTR_LABEL, \"\"),\n node.getAttribute(ATTR_VALUE, false));\n String action = node.getAttribute(ATTR_ACTION, (String) null);\n comp = b;\n if (action != null) {\n componentToAction.put(comp, action);\n b.addItemListener(this);\n itemStateChanged(new ItemEvent(b, 0, b,\n ItemEvent.ITEM_STATE_CHANGED));\n }\n } else {\n comp = new JLabel(\"Unknown tag:\" + tag);\n System.err.println(\"Unknown tag:\" + node);\n }\n\n return comp;\n\n }", "public Structure build(Group parentGroup) {\n if (built)\n throw new IllegalStateException(\"already built\");\n built = true;\n this.setDataType(DataType.STRUCTURE);\n return new Structure(this, parentGroup);\n }", "abstract Object build();", "private static void addSentenceForm(SentenceForm form, SentenceDomainModel model,\n\t\t\tMap<GdlSentence, ExternalizedStateComponent> components,\n\t\t\tMap<GdlSentence, ExternalizedStateComponent> negations,\n\t\t\tExternalizedStateConstant trueComponent, ExternalizedStateConstant falseComponent,\n\t\t\tboolean usingBase, boolean usingInput,\n\t\t\tSet<SentenceForm> recursionForms,\n\t\t\tMap<GdlSentence, ExternalizedStateComponent> temporaryComponents, Map<GdlSentence, ExternalizedStateComponent> temporaryNegations,\n\t\t\tMap<SentenceForm, FunctionInfo> functionInfoMap, ConstantChecker constantChecker,\n\t\t\tMap<SentenceForm, Collection<GdlSentence>> completedSentenceFormValues) throws InterruptedException {\n\n\t\tSet<GdlSentence> alwaysTrueSentences = model.getSentencesListedAsTrue(form);\n\t\tSet<GdlRule> rules = model.getRules(form);\n\n\t\tfor(GdlSentence alwaysTrueSentence : alwaysTrueSentences) {\n\t\t\t//We add the sentence as a constant\n\t\t\tif(alwaysTrueSentence.getName().equals(LEGAL)\n\t\t\t\t\t|| alwaysTrueSentence.getName().equals(NEXT)\n\t\t\t\t\t|| alwaysTrueSentence.getName().equals(GOAL)) {\n\t\t\t\tExternalizedStateProposition prop = new ExternalizedStateProposition(alwaysTrueSentence);\n\t\t\t\t//Attach to true\n\t\t\t\ttrueComponent.addOutput(prop);\n\t\t\t\tprop.addInput(trueComponent);\n\t\t\t\t//Still want the same components;\n\t\t\t\t//we just don't want this to be anonymized\n\t\t\t}\n\t\t\t//Assign as true\n\t\t\tcomponents.put(alwaysTrueSentence, trueComponent);\n\t\t\tnegations.put(alwaysTrueSentence, falseComponent);\n\t\t\tcontinue;\n\t\t}\n\n\t\t//For does/true, make nodes based on input/base, if available\n\t\tif(usingInput && form.getName().equals(DOES)) {\n\t\t\t//Add only those propositions for which there is a corresponding INPUT\n\t\t\tSentenceForm inputForm = form.withName(INPUT);\n\t\t\tfor (GdlSentence inputSentence : constantChecker.getTrueSentences(inputForm)) {\n\t\t\t\tGdlSentence doesSentence = GdlPool.getRelation(DOES, inputSentence.getBody());\n\t\t\t\tExternalizedStateProposition prop = new ExternalizedStateProposition(doesSentence);\n\t\t\t\tcomponents.put(doesSentence, prop);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif(usingBase && form.getName().equals(TRUE)) {\n\t\t\tSentenceForm baseForm = form.withName(BASE);\n\t\t\tfor (GdlSentence baseSentence : constantChecker.getTrueSentences(baseForm)) {\n\t\t\t\tGdlSentence trueSentence = GdlPool.getRelation(TRUE, baseSentence.getBody());\n\t\t\t\tExternalizedStateProposition prop = new ExternalizedStateProposition(trueSentence);\n\t\t\t\tcomponents.put(trueSentence, prop);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tMap<GdlSentence, Set<ExternalizedStateComponent>> inputsToOr = new HashMap<GdlSentence, Set<ExternalizedStateComponent>>();\n\t\tfor(GdlRule rule : rules) {\n\t\t\tAssignments assignments = AssignmentsFactory.getAssignmentsForRule(rule, model, functionInfoMap, completedSentenceFormValues);\n\n\t\t\t//Calculate vars in live (non-constant, non-distinct) conjuncts\n\t\t\tSet<GdlVariable> varsInLiveConjuncts = getVarsInLiveConjuncts(rule, constantChecker.getConstantSentenceForms());\n\t\t\tvarsInLiveConjuncts.addAll(GdlUtils.getVariables(rule.getHead()));\n\t\t\tSet<GdlVariable> varsInRule = new HashSet<GdlVariable>(GdlUtils.getVariables(rule));\n\t\t\tboolean preventDuplicatesFromConstants =\n\t\t\t\t(varsInRule.size() > varsInLiveConjuncts.size());\n\n\t\t\t//Do we just pass those to the Assignments class in that case?\n\t\t\tfor(AssignmentIterator asnItr = assignments.getIterator(); asnItr.hasNext(); ) {\n\t\t\t\tMap<GdlVariable, GdlConstant> assignment = asnItr.next();\n\t\t\t\tif(assignment == null) continue; //Not sure if this will ever happen\n\n\t\t\t\tConcurrencyUtils.checkForInterruption();\n\n\t\t\t\tGdlSentence sentence = CommonTransforms.replaceVariables(rule.getHead(), assignment);\n\n\t\t\t\t//Now we go through the conjuncts as before, but we wait to hook them up.\n\t\t\t\tList<ExternalizedStateComponent> componentsToConnect = new ArrayList<ExternalizedStateComponent>(rule.arity());\n\t\t\t\tfor(GdlLiteral literal : rule.getBody()) {\n\t\t\t\t\tif(literal instanceof GdlSentence) {\n\t\t\t\t\t\t//Get the sentence post-substitutions\n\t\t\t\t\t\tGdlSentence transformed = CommonTransforms.replaceVariables((GdlSentence) literal, assignment);\n\n\t\t\t\t\t\t//Check for constant-ness\n\t\t\t\t\t\tSentenceForm conjunctForm = model.getSentenceForm(transformed);\n\t\t\t\t\t\tif(constantChecker.isConstantForm(conjunctForm)) {\n\t\t\t\t\t\t\tif(!constantChecker.isTrueConstant(transformed)) {\n\t\t\t\t\t\t\t\tList<GdlVariable> varsToChange = getVarsInConjunct(literal);\n\t\t\t\t\t\t\t\tasnItr.changeOneInNext(varsToChange, assignment);\n\t\t\t\t\t\t\t\tcomponentsToConnect.add(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tExternalizedStateComponent conj = components.get(transformed);\n\t\t\t\t\t\t//If conj is null and this is a sentence form we're still handling,\n\t\t\t\t\t\t//hook up to a temporary sentence form\n\t\t\t\t\t\tif(conj == null) {\n\t\t\t\t\t\t\tconj = temporaryComponents.get(transformed);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(conj == null && SentenceModelUtils.inSentenceFormGroup(transformed, recursionForms)) {\n\t\t\t\t\t\t\t//Set up a temporary component\n\t\t\t\t\t\t\tExternalizedStateProposition tempProp = new ExternalizedStateProposition(transformed);\n\t\t\t\t\t\t\ttemporaryComponents.put(transformed, tempProp);\n\t\t\t\t\t\t\tconj = tempProp;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Let's say this is false; we want to backtrack and change the right variable\n\t\t\t\t\t\tif(conj == null || isThisConstant(conj, falseComponent)) {\n\t\t\t\t\t\t\tList<GdlVariable> varsInConjunct = getVarsInConjunct(literal);\n\t\t\t\t\t\t\tasnItr.changeOneInNext(varsInConjunct, assignment);\n\t\t\t\t\t\t\t//These last steps just speed up the process\n\t\t\t\t\t\t\t//telling the factory to ignore this rule\n\t\t\t\t\t\t\tcomponentsToConnect.add(null);\n\t\t\t\t\t\t\tcontinue; //look at all the other restrictions we'll face\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcomponentsToConnect.add(conj);\n\t\t\t\t\t} else if(literal instanceof GdlNot) {\n\t\t\t\t\t\t//Add a \"not\" if necessary\n\t\t\t\t\t\t//Look up the negation\n\t\t\t\t\t\tGdlSentence internal = (GdlSentence) ((GdlNot) literal).getBody();\n\t\t\t\t\t\tGdlSentence transformed = CommonTransforms.replaceVariables(internal, assignment);\n\n\t\t\t\t\t\t//Add constant-checking here...\n\t\t\t\t\t\tSentenceForm conjunctForm = model.getSentenceForm(transformed);\n\t\t\t\t\t\tif(constantChecker.isConstantForm(conjunctForm)) {\n\t\t\t\t\t\t\tif(constantChecker.isTrueConstant(transformed)) {\n\t\t\t\t\t\t\t\tList<GdlVariable> varsToChange = getVarsInConjunct(literal);\n\t\t\t\t\t\t\t\tasnItr.changeOneInNext(varsToChange, assignment);\n\t\t\t\t\t\t\t\tcomponentsToConnect.add(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tExternalizedStateComponent conj = negations.get(transformed);\n\t\t\t\t\t\tif(isThisConstant(conj, falseComponent)) {\n\t\t\t\t\t\t\t//We need to change one of the variables inside\n\t\t\t\t\t\t\tList<GdlVariable> varsInConjunct = getVarsInConjunct(internal);\n\t\t\t\t\t\t\tasnItr.changeOneInNext(varsInConjunct, assignment);\n\t\t\t\t\t\t\t//ignore this rule\n\t\t\t\t\t\t\tcomponentsToConnect.add(null);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(conj == null) {\n\t\t\t\t\t\t\tconj = temporaryNegations.get(transformed);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//Check for the recursive case:\n\t\t\t\t\t\tif(conj == null && SentenceModelUtils.inSentenceFormGroup(transformed, recursionForms)) {\n\t\t\t\t\t\t\tExternalizedStateComponent positive = components.get(transformed);\n\t\t\t\t\t\t\tif(positive == null) {\n\t\t\t\t\t\t\t\tpositive = temporaryComponents.get(transformed);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(positive == null) {\n\t\t\t\t\t\t\t\t//Make the temporary proposition\n\t\t\t\t\t\t\t\tExternalizedStateProposition tempProp = new ExternalizedStateProposition(transformed);\n\t\t\t\t\t\t\t\ttemporaryComponents.put(transformed, tempProp);\n\t\t\t\t\t\t\t\tpositive = tempProp;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//Positive is now set and in temporaryComponents\n\t\t\t\t\t\t\t//Evidently, wasn't in temporaryNegations\n\t\t\t\t\t\t\t//So we add the \"not\" gate and set it in temporaryNegations\n\t\t\t\t\t\t\tExternalizedStateNot not = new ExternalizedStateNot();\n\t\t\t\t\t\t\t//Add positive as input\n\t\t\t\t\t\t\tnot.addInput(positive);\n\t\t\t\t\t\t\tpositive.addOutput(not);\n\t\t\t\t\t\t\ttemporaryNegations.put(transformed, not);\n\t\t\t\t\t\t\tconj = not;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(conj == null) {\n\t\t\t\t\t\t\tExternalizedStateComponent positive = components.get(transformed);\n\t\t\t\t\t\t\t//No, because then that will be attached to \"negations\", which could be bad\n\n\t\t\t\t\t\t\tif(positive == null) {\n\t\t\t\t\t\t\t\t//So the positive can't possibly be true (unless we have recurstion)\n\t\t\t\t\t\t\t\t//and so this would be positive always\n\t\t\t\t\t\t\t\t//We want to just skip this conjunct, so we continue to the next\n\n\t\t\t\t\t\t\t\tcontinue; //to the next conjunct\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//Check if we're sharing a component with another sentence with a negation\n\t\t\t\t\t\t\t//(i.e. look for \"nots\" in our outputs and use those instead)\n\t\t\t\t\t\t\tExternalizedStateNot existingNotOutput = getNotOutput(positive);\n\t\t\t\t\t\t\tif(existingNotOutput != null) {\n\t\t\t\t\t\t\t\tcomponentsToConnect.add(existingNotOutput);\n\t\t\t\t\t\t\t\tnegations.put(transformed, existingNotOutput);\n\t\t\t\t\t\t\t\tcontinue; //to the next conjunct\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tExternalizedStateNot not = new ExternalizedStateNot();\n\t\t\t\t\t\t\tnot.addInput(positive);\n\t\t\t\t\t\t\tpositive.addOutput(not);\n\t\t\t\t\t\t\tnegations.put(transformed, not);\n\t\t\t\t\t\t\tconj = not;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcomponentsToConnect.add(conj);\n\t\t\t\t\t} else if(literal instanceof GdlDistinct) {\n\t\t\t\t\t\t//Already handled; ignore\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Unwanted GdlLiteral type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!componentsToConnect.contains(null)) {\n\t\t\t\t\t//Connect all the components\n\t\t\t\t\tExternalizedStateProposition andComponent = new ExternalizedStateProposition(TEMP);\n\n\t\t\t\t\tandify(componentsToConnect, andComponent, trueComponent);\n\t\t\t\t\tif(!isThisConstant(andComponent, falseComponent)) {\n\t\t\t\t\t\tif(!inputsToOr.containsKey(sentence))\n\t\t\t\t\t\t\tinputsToOr.put(sentence, new HashSet<ExternalizedStateComponent>());\n\t\t\t\t\t\tinputsToOr.get(sentence).add(andComponent);\n\t\t\t\t\t\t//We'll want to make sure at least one of the non-constant\n\t\t\t\t\t\t//components is changing\n\t\t\t\t\t\tif(preventDuplicatesFromConstants) {\n\t\t\t\t\t\t\tasnItr.changeOneInNext(varsInLiveConjuncts, assignment);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//At the end, we hook up the conjuncts\n\t\tfor(Entry<GdlSentence, Set<ExternalizedStateComponent>> entry : inputsToOr.entrySet()) {\n\t\t\tConcurrencyUtils.checkForInterruption();\n\n\t\t\tGdlSentence sentence = entry.getKey();\n\t\t\tSet<ExternalizedStateComponent> inputs = entry.getValue();\n\t\t\tSet<ExternalizedStateComponent> realInputs = new HashSet<ExternalizedStateComponent>();\n\t\t\tfor(ExternalizedStateComponent input : inputs) {\n\t\t\t\tif(input instanceof ExternalizedStateConstant || input.getInputs().size() == 0) {\n\t\t\t\t\trealInputs.add(input);\n\t\t\t\t} else {\n\t\t\t\t\trealInputs.add(input.getSingleInput());\n\t\t\t\t\tinput.getSingleInput().removeOutput(input);\n\t\t\t\t\tinput.removeAllInputs();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tExternalizedStateProposition prop = new ExternalizedStateProposition(sentence);\n\t\t\torify(realInputs, prop, falseComponent);\n\t\t\tcomponents.put(sentence, prop);\n\t\t}\n\n\t\t//True/does sentences will have none of these rules, but\n\t\t//still need to exist/\"float\"\n\t\t//We'll do this if we haven't used base/input as a basis\n\t\tif(form.getName().equals(TRUE)\n\t\t\t\t|| form.getName().equals(DOES)) {\n\t\t\tfor(GdlSentence sentence : model.getDomain(form)) {\n\t\t\t\tConcurrencyUtils.checkForInterruption();\n\n\t\t\t\tExternalizedStateProposition prop = new ExternalizedStateProposition(sentence);\n\t\t\t\tcomponents.put(sentence, prop);\n\t\t\t}\n\t\t}\n\n\t}", "public String toString()\n {\n \tint tempIndex;\n \tStringBuilder statesStr = new StringBuilder(\"States: { \");\n \tfor(ComplexState state: states)\n \t\tstatesStr.append(state.getName() + \", \");\n\t\ttempIndex = statesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tstatesStr.deleteCharAt(statesStr.lastIndexOf(\",\"));\n \tstatesStr.append(\"}\\n\");\n \tStringBuilder initStatesStr = new StringBuilder(\"Initial states: { \");\n \tfor(ComplexState state: initialStates)\n \t\tinitStatesStr.append(state.getName() + \", \");\n \ttempIndex = initStatesStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tinitStatesStr.deleteCharAt(initStatesStr.lastIndexOf(\",\"));\n \tinitStatesStr.append(\"}\\n\");\n \tStringBuilder transitionFuncStr = new StringBuilder(\"Transition relation: { \");\n \tArrayList<ComplexState> destStates = new ArrayList<ComplexState>();\n \tfor(ComplexState srcState: states) \n \t{\n \t\tdestStates = transitionRelation.get(srcState);\n \t\tif(destStates != null)\n\t \t\tfor(ComplexState destState: destStates)\n\t \t\t\ttransitionFuncStr.append(\"( \" + srcState.getName() + \", \" + destState.getName() + \" ), \" );\t\n \t}\n \ttempIndex = transitionFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\ttransitionFuncStr.deleteCharAt(transitionFuncStr.lastIndexOf(\",\"));\n \ttransitionFuncStr.append(\"}\\n\");\n \tStringBuilder labelingFuncStr = new StringBuilder(\"Labeling function: { \");\n \tArrayList<AtomicProp> atomicProps = new ArrayList<AtomicProp>();\n \tfor(ComplexState state: states) \n \t{\n \t\tlabelingFuncStr.append(\"( \" + state.getName() + \", { \");\n \t\tatomicProps = state.getLabels();\n \t\tif(atomicProps != null)\n \t\t\tfor(AtomicProp ap: state.getLabels())\n \t\t\t\tlabelingFuncStr.append(ap.getName() + \", \");\n \t\ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \t\tlabelingFuncStr.append(\"} ), \");\n \t}\n \ttempIndex = labelingFuncStr.lastIndexOf(\",\");\n \tif(tempIndex != -1)\n \t\tlabelingFuncStr.deleteCharAt(labelingFuncStr.lastIndexOf(\",\"));\n \tlabelingFuncStr.append(\"}\\n\"); \t\n \tString result = statesStr.toString() + initStatesStr.toString() + transitionFuncStr.toString() + labelingFuncStr.toString() + \"Type: \" + type.toString();\n \treturn result;\n }", "public interface CompositionBuilder<T> {\n /**\n * Constructs an actual composition, given the notes that have been added\n *\n * @return The new composition\n */\n T build();\n\n /**\n * Sets the tempo of the piece\n *\n * @param tempo The speed, in microseconds per beat\n * @return This builder\n */\n CompositionBuilder<T> setTempo(int tempo);\n\n /**\n * Adds a new note to the piece\n *\n * @param start The start time of the note, in beats\n * @param end The end time of the note, in beats\n * @param instrument The instrument number (to be interpreted by MIDI)\n * @param pitch The pitch (in the range [0, 127], where 60 represents C4, the middle-C on a\n * piano)\n * @param volume The volume (in the range [0, 127])\n * @return This builder\n */\n CompositionBuilder<T> addNote(int start, int end, int instrument, int pitch, int volume);\n\n /**\n * Sets a simple, whole song repeat\n *\n * @param repeats the number of times the song should be repeated\n * @return This builder\n */\n CompositionBuilder<T> setRepeat1(int repeats);\n\n /**\n * Sets a bound repeat\n *\n * @param repeats the number of times this section should be repeated\n * @param startrep the starting beat of this repeat\n * @param endrep the end beat of this repeat\n * @return This builder\n */\n CompositionBuilder<T> setRepeat2(int repeats, int startrep, int endrep);\n\n /**\n * Sets an alternate ending in a piece\n *\n * @param integers the even list of integers to be made into BoundRepeats\n * @return This builder\n */\n CompositionBuilder<T> setAlternateEndings(List<Integer> integers);\n}", "private void buildMainPanel() {\n\t\t\n\t\tif(theMode == MODE_FPC) {\n\t\t\ttheFields = new PropertyComponent[9];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"\", 1, false, false);\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", FPC_GRP_SORT, 0, true, false);\t\t\t\n\t\t\t//theFields[5] = new PropertyComponent(\"grp_order\", \"\", 1, true, false);\t\t\t\n\t\t\ttheFields[4] = new PropertyComponent(\"cbsize\", \"1200\", 1, false, false);\t\t\t\n\t\t\ttheFields[5] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[6] = new PropertyComponent(\"fpc_file\", \"\", true, true, true);\n\t\t\ttheFields[7] = new PropertyComponent(\"bes_files\", \"\", true, true, false);\n\t\t\ttheFields[8] = new PropertyComponent(\"marker_files\", \"\", true, true, false);\n\t\t} else { //MODE_PSEUDO\n\t\t\ttheFields = new PropertyComponent[13];\n\t\t\t\n\t\t\ttheFields[0] = new PropertyComponent(\"category\", \"Uncategorized\", 1, false, false);\n\t\t\ttheFields[1] = new PropertyComponent(\"display_name\", theDisplayName, 1, false, false);\n\t\t\ttheFields[2] = new PropertyComponent(\"grp_type\", \"Chromosome\", 1, false, false);\n\t\t\ttheFields[3] = new PropertyComponent(\"grp_prefix\", \"Chr\", 1, false, false);\t\t\t\n\t\t\t//theFields[4] = new PropertyComponent(\"grp_sort\", PSEUDO_GRP_SORT, 0, true, false);\n\t\t\ttheFields[4] = new PropertyComponent(\"order_against\", getProjectSelections(), 0, false, true);\n\t\t\ttheFields[5] = new PropertyComponent(\"mask_all_but_genes\", PSEUDO_MASK_GENES, 1, false, true);\n\t\t\ttheFields[6] = new PropertyComponent(\"min_size\", \"100000\", 1, true, false);\t\t\t\n\t\t\ttheFields[7] = new PropertyComponent(\"min_display_size_bp\", \"0\", 1, false, false);\t\t\t\n\t\t\ttheFields[8] = new PropertyComponent(\"description\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[9] = new PropertyComponent(\"annot_keywords\", \"\", 2, false, false);\t\t\t\n\t\t\ttheFields[10] = new PropertyComponent(\"annot_kw_mincount\", \"50\", 2, false, false);\t\n\t\t\ttheFields[11] = new PropertyComponent(\"anno_files\", \"\", true, true, false);\n\t\t\ttheFields[12] = new PropertyComponent(\"sequence_files\", \"\", true, true, false);\n\t\t}\n\t\t\t\n\t\tJPanel tempPanel = new JPanel();\n\t\ttempPanel.setLayout(new BoxLayout(tempPanel, BoxLayout.PAGE_AXIS));\n\t\ttempPanel.setBackground(Color.WHITE);\n\t\t\n\t\tfor(int x=0; x<theFields.length; x++) {\n\t\t\ttempPanel.add(Box.createVerticalStrut(5));\n\t\t\ttheFields[x].setTextListener(theListener);\n\t\t\ttempPanel.add(theFields[x]);\n\t\t}\n\t\ttempPanel.add(Box.createVerticalStrut(20));\n\t\ttempPanel.add(createButtonPanel());\n\t\ttempPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n\t\ttempPanel.setMaximumSize(tempPanel.getPreferredSize());\n\t\ttempPanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\t\t\n\t\tgetContentPane().add(tempPanel);\n\t}", "public ArrayList genStates2(){\n ArrayList states = new ArrayList(44);\n List<String> notes = new ArrayList<String>(Arrays.asList(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\"));\n List<String> beat = new ArrayList<String>(Arrays.asList(\"1\",\"2\",\"3\",\"4\"));\n //List<String> dot = new ArrayList<String>(Arrays.asList(\"1\",\"0\"));\n for(String s : notes){\n for(String d : beat){\n //for(int d = 0; d<=1; d++){\n String state = \"\"; \n state += s;\n state += d;\n //state += dot.get(d);\n states.add(state);\n //}\n }\n }\n return states;\n }", "private void buildCity() {\r\n\t\tMessage message = new Message(clickedNode, true, null);\r\n\t\tsendMessage(message);\r\n\t}" ]
[ "0.6100225", "0.5564538", "0.5467759", "0.53355134", "0.5263611", "0.5203333", "0.5175788", "0.51395756", "0.503098", "0.49621686", "0.4916661", "0.49102116", "0.4909656", "0.4907085", "0.4871238", "0.4856859", "0.48566523", "0.48513928", "0.48507434", "0.4839611", "0.48275036", "0.4817309", "0.48105887", "0.4800211", "0.48001838", "0.478851", "0.4764411", "0.47570044", "0.47526357", "0.4746208", "0.47379616", "0.473714", "0.47181505", "0.47070047", "0.47057277", "0.47023776", "0.4696588", "0.4676406", "0.4659246", "0.46590453", "0.46584538", "0.46445867", "0.46406275", "0.4636806", "0.46298322", "0.4616836", "0.46162158", "0.4607817", "0.46060723", "0.46058494", "0.4602887", "0.46009746", "0.45994526", "0.45979747", "0.4593418", "0.45795244", "0.4575548", "0.45746434", "0.4571131", "0.45672825", "0.45603645", "0.45543942", "0.45456985", "0.45387813", "0.4538064", "0.45316094", "0.45299187", "0.45286024", "0.45236036", "0.4520484", "0.4517322", "0.45163625", "0.45151216", "0.45141762", "0.4506736", "0.45056424", "0.45024842", "0.45021528", "0.44992998", "0.4490798", "0.44906288", "0.44879735", "0.4486145", "0.44832668", "0.4479766", "0.4479766", "0.44710624", "0.44617486", "0.44616717", "0.44465855", "0.4445344", "0.44446877", "0.4440104", "0.44347015", "0.44333917", "0.44307372", "0.44286263", "0.44193998", "0.44137135", "0.4409719", "0.44086918" ]
0.0
-1
Returns a minimal version of this state machine
protected TransitionFunction transitionFunction() { return (TransitionFunction) this.transitions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String lowestEnergyState() {\n\treturn state(bestEverPoints, temperature, bestEverStateEnergy);\n }", "@Override\n\tpublic StateMachine getInitialStateMachine() {\n\t\tlong startTime = System.currentTimeMillis();\n\t\tstateMachines.clear();\n\t\tStateMachine firstMachine = new FirstPropNetStateMachine();\n\t\tlong stopTime = System.currentTimeMillis();\n\t\tpropNetCreationTime = stopTime - startTime;\n\t\tSystem.out.println(\"PropNetCreationTime: \" + propNetCreationTime);\n\t\tstateMachines.add(firstMachine);\n\t\treturn firstMachine;\n\t}", "public PuzzleState getStateWithShortestPath();", "@Override\r\n public MachineState getInitialState() {\r\n \tclearpropnet();\r\n \tpropNet.getInitProposition().setValue(true);\r\n\t\tMachineState initial = getStateFromBase();\r\n\t\treturn initial;\r\n }", "public abstract MachineState getInitialState();", "@Override\n\tpublic State getSingleInitialState()\n\t{\n\t\tassert (initialState != null);\n\t\treturn initialState;\n\t}", "public static State startState() {\n return new State(StateTypes.q0);\n }", "public State state();", "public E startState() {\r\n\t\treturn this.values[0];\r\n\t}", "public abstract State getMinState(String fieldName, String subFieldName);", "@NonNull\n public EnterTransition build() {\n return new EnterTransition(mImpl.build(), mFingerprint);\n }", "public static int getStartState() {\n int startState = 1;\n int n = 1;\n for (int i = 2; i <= state; i ++) {\n if (stateList.get(i).getN1() == n || stateList.get(i).getN2() == n) {\n startState = i;\n n = i;\n }\n }\n return startState;\n }", "public MachineState getStateFromBase() {\r\n \tSet<GdlSentence> contents = new HashSet<GdlSentence>();\r\n for (Proposition p : propNet.getBasePropositions().values()) {\r\n if (p.getSingleInputC().propmark()){\r\n contents.add(p.getName());\r\n }\r\n }\r\n return new MachineState(contents);\r\n }", "public State getInitialState(){\n\t\treturn new AggregateState(gs);\n\t}", "public MoveAddress nextVariationFirstState() {\n MoveAddress other = nextVariation(1);\n return other.firstChild(1, 0);\n }", "public State getInitialState() {\r\n \t\treturn initialState;\r\n \t}", "public Key min() {\n if (isEmpty()) throw new NoSuchElementException(\"called min() with empty symbol table\");\n return min(root).key;\n }", "SimplStateMachineFactory getSimplStateMachineFactory();", "public K min() {\n if (isEmpty()) throw new NoSuchElementException(\"calls min() with empty symbol table\");\n return min(root).key;\n }", "SpacecraftState getInitialState() throws OrekitException;", "public State getInitialState() {\n\t\treturn initialState;\n\t}", "public K min() {\n if (isEmpty()) throw new NoSuchElementException(\"called min() with empty symbol table\");\n return min(root).key;\n }", "AVLTreeNode Min() {\r\n\r\n AVLTreeNode current = root;\r\n\r\n /* loop down to find the leftmost leaf */\r\n while (current.left != null)\r\n current = current.left;\r\n\r\n return current;\r\n\r\n\r\n }", "public S getCurrentState();", "@Override\n public TreeNode<E> tree_minimum() {\n return tree_minimum(root);\n }", "public State getinitialState(){\n\t\t\treturn initialState;\n\t\t}", "public S getRandomState();", "public static StartupOptions earliest() {\n return new StartupOptions(StartupMode.EARLIEST_OFFSET, BinlogOffset.ofEarliest());\n }", "public State getStart() {\n \t\treturn start;\n \t}", "public State who()\n\t{\n\t\t// TODO \n\t\treturn State.EMPTY; \n\t}", "State getState();", "State getState();", "State getState();", "State getState();", "T transformToAndValidateInitialState(VendingMachine vendingMachine);", "public GetMinStack() {\n stackData = new Stack<>();\n stackMin = new Stack<>();\n }", "State getInitialState( int nIdWorkflow );", "public Vertex HeapExtractMin() {\n\n if (size == 1) {\n \t\n Vertex min = ver[0];\n size--;\n return min;\n }\n\n // Getting the last element and making it root element of the binary tree\n Vertex min = ver[0];\n Vertex lastItem = ver[size-1];\n ver[0]= lastItem;\n size--;\n // Calling heapMinHeapify to maintain heap property\n heapMinHeapify(0);\n return min;\n }", "public static State min(State a, State b){\n return a.score <= b.score ? a: b;\n }", "public Key min();", "@Override\r\n\tpublic T min() {\n\t\treturn null;\r\n\t}", "public BSTMapNode findMin() \n\t{\n\t\t\n\t\t\n\t\treturn null;\n\t}", "Object getState();", "String getState();", "String getState();", "String getState();", "public Node getMin() {\n return getMin(root);\n }", "public State getState();", "public State getState();", "public final boolean minimum(){\r\n\t\treturn minimum;\r\n\t}", "S getInitialState();", "PowerState getState();", "@Override\n\tpublic int getState() {\n\t\treturn 0;\n\t}", "protected BattleFirstMoveState firstMoveState(){\n return new BattleFirstMoveState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }", "StateMachineFactory getStateMachineFactory();", "protected String getMinimum()\n {\n return minimum;\n }", "public Node min() {\n\t\tNode x = root;\n\t\tif (x == null) return null;\n\t\twhile (x.getLeft() != null)\n\t\t\tx = x.getLeft();\n\t\treturn x;\n\t}", "public String getNewState()\n\t{\n\t\treturn (UUID.randomUUID().toString());\n\t}", "public ServerActivityState getNewestServerActivityState()\r\n\t\t\tthrows SQLException {\r\n\r\n\t\ttry (Statement stmt = m_ogdb.getDatabaseConnection().createStatement();\r\n\t\t\t\tResultSet rs = stmt\r\n\t\t\t\t\t\t.executeQuery(\"SELECT timestamp, notDeletablePlayers, statusString FROM serverActivityStates \"\r\n\t\t\t\t\t\t\t\t+ \"ORDER BY timestamp DESC LIMIT 1;\");) {\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tServerActivityState state = new ServerActivityState(\r\n\t\t\t\t\t\tm_ogdb.getServerPrefix());\r\n\t\t\t\tstate.setPlayerActivityMapFromString(rs\r\n\t\t\t\t\t\t.getString(\"statusString\"));\r\n\t\t\t\tstate.setNumberOfNotDeletablePlayers(rs\r\n\t\t\t\t\t\t.getInt(\"notDeletablePlayers\"));\r\n\t\t\t\tstate.setDateTime(rs.getTimestamp(\"timestamp\",\r\n\t\t\t\t\t\tOGameAPIDatabase.serverCalendar).toLocalDateTime());\r\n\t\t\t\treturn state;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public State getStartState() {\n\t\treturn startState;\r\n\t}", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "int getState();", "public String getState()\n {\n return null;\n }", "ESMFState getState();", "protected S state() {\n return state;\n }", "public abstract State getSourceState ();", "public static Level getMinimumLevel() {\n\t\treturn minLevel;\n\t}", "private static State generateInitialState(double initialHeuristic) {\n ArrayList<List<Job>> jobList = new ArrayList<>(RecursionStore.getNumberOfProcessors());\n for (int i = 0; i < RecursionStore.getNumberOfProcessors(); i++) {\n jobList.add(new ArrayList<>());\n }\n int[] procDur = new int[RecursionStore.getNumberOfProcessors()];\n java.util.Arrays.fill(procDur, 0);\n return new State(jobList, procDur, initialHeuristic, 0);\n }", "public MinStack() {\n min = Integer.MIN_VALUE;\n stack = new Stack();\n }", "public static int MIN_VALUE(State state){\n if(TERMINAL_TEST(state)){\n //System.out.println(\"Found a terminal state on min\\n:\"+state);\n return UTILITY(state);\n }\n if(SUCCESSOR(state).size()==0){\n return UTILITY(state);\n }\n int v = positiveInf;\n for(State s:SUCCESSOR(state)){\n v = Math.min(v, MAX_VALUE(s));\n }\n return v;\n }", "private void enterSequence_mainRegion_State1_default() {\n\t\tnextStateIndex = 0;\n\t\tstateVector[0] = State.mainRegion_State1;\n\t}", "private static int min_value(State curr_state) {\n\t\tcounterMinimax++;\r\n\r\n\t\t//Check if the current state is a terminal state, if it is, return\r\n\t\t//its terminal value\r\n\t\tif(curr_state.isTerminal()){\r\n\t\t\treturn curr_state.getScore();\r\n\t\t}\r\n\r\n\t\tint min_value = Integer.MAX_VALUE;\r\n\t\t//Get the successors of the current state, as light always runs second\r\n\t\t//it will call minValue;\r\n\t\tState[] successors = curr_state.getSuccessors('2');\r\n\r\n\t\tif(successors.length == 0 && curr_state.isTerminal() == false){\r\n\t\t\tmin_value = Math.min(min_value, max_value(curr_state));\r\n\t\t}\r\n\r\n\r\n\t\t//Select the successor that returns the smallest(optimal) value\r\n\t\tfor(State state : successors){\r\n\t\t\tmin_value = Math.min(min_value, max_value(state));\r\n\t\t}\r\n\r\n\r\n\t\treturn min_value;\r\n\t}", "public FiniteStateMachine getFiniteStateMachine() {\n return stateMachine;\n }", "protected final IntervalNode treeMin() {\n\tIntervalNode x = this;\n\twhile(x.left != IntervalNode.nullIntervalNode) {\n\t x = x.left;\n\t}\n\treturn(x);\n }", "public T minimum() {\n return min.key;\n }", "public StackWithMin() {\n st = new LinkedList<>();\n minSt = new LinkedList<>();\n }", "public LifeState lifeState() {\r\n return lifeStates().head();\r\n }", "public S getState() {\r\n\t\treturn state;\r\n\t}", "private WAVLNode min(WAVLNode x) {\n\t while(x.left!=EXT_NODE) {\r\n \tx=x.left;\r\n }\r\n return x;\r\n }", "StateT getState();", "public S getState() {\n return currentState;\n }", "public Edge extractMin() {\n return Q.remove(0);\n }", "java.lang.String getState();", "protected SelfCheckout fastestSelfCheckout() {\n return servers.stream().filter(x -> !x.isHuman())\n .map(x -> (SelfCheckout) x)\n .min(Comparator.comparing(Counter::getTime))\n .get();\n }", "public String min() {\n\t\tif (this.empty()) {\n\t\t\treturn null;\n\t\t}\n\t\tAVLNode min = (AVLNode) this.root;\n\t\twhile (min.getLeft().getHeight() != -1) {\n\t\t\tmin = (AVLNode) min.getLeft();\n\t\t}\n\t\treturn min.getValue();\n\t}", "private Object getState() {\n\treturn null;\r\n}", "public State() {\n resetTransitions();\n id = next_id++;\n }", "public E minimum() {\r\n\t\treturn objectHeap[0];\r\n\t}", "public E minimum() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn heap.get(0);\n\t}", "public E minimum() {\n\t\tif (heap.size() <= 0)\n\t\t\treturn null;\n\t\telse\n\t\t\treturn heap.get(0);\n\t}", "@Override\r\n\tpublic Map<Seat, SeatState> loadInitialState() {\n\t\t// return empty hashmap as we are not persisting states.\r\n\t\t//\r\n\t\treturn new HashMap<>();\r\n\t}", "public String cheapest()\n {\n if(stocks.size() == 0)\n {\n return \"\";\n }\n Stock min = stocks.get(0);\n for (Stock c: stocks)\n {\n if (stocks.size() > 0)\n {\n if (c.getPrice() < min.getPrice())\n {\n min = c;\n }\n }\n }\n return min.getSymbol();\n }", "public byte get_min() {\n return (byte)getSIntBEElement(offsetBits_min(), 8);\n }", "@Override\n\tpublic boolean isStartingState(State state, MaxNode maxNode) {\n\t\treturn false;\n\t}", "public int getMinSelectionIndex()\r\n {\r\n return 0;\r\n }", "public interface MiniMaxState extends State {\r\n\t/**\r\n\t * Determine if this state is a state in which MAX acts (we, as opposed to\r\n\t * the opponent that we have no control over).\r\n\t * \r\n\t * @return true if MAX acts, false if opponent acts\r\n\t */\r\n\tpublic boolean isMaxState();\r\n\r\n\t/**\r\n\t * Determine the \"utility\" of the state, is usually called when a\r\n\t * terminating state is visited. Should be a positive value (not exceeding\r\n\t * +9999999) if we're doing well, a negative value (not below -9999999) if\r\n\t * we're doing badly.\r\n\t * \r\n\t * @return the utility of the state\r\n\t */\r\n\tpublic double utility();\r\n\r\n}", "public E findMin() throws NoSuchElementException {\n\t\treturn minimums.peek();\n\t}" ]
[ "0.71318847", "0.6305921", "0.6244395", "0.6167034", "0.61470634", "0.614672", "0.61205673", "0.60116816", "0.59107673", "0.59060246", "0.5900047", "0.58796245", "0.5844162", "0.5835838", "0.5807874", "0.58025783", "0.5789176", "0.57662046", "0.5734431", "0.5715444", "0.5692084", "0.56885844", "0.56823945", "0.56783074", "0.5652863", "0.5647708", "0.5639261", "0.56386715", "0.5638642", "0.5603228", "0.5592506", "0.5592506", "0.5592506", "0.5592506", "0.5584194", "0.5574134", "0.55622786", "0.55562323", "0.5550755", "0.55370814", "0.5507108", "0.550141", "0.54907566", "0.5485219", "0.5485219", "0.5485219", "0.5482289", "0.54791945", "0.54791945", "0.54747283", "0.54735863", "0.54717934", "0.5465039", "0.5457586", "0.54465705", "0.54426485", "0.54417944", "0.5439445", "0.54350865", "0.54261696", "0.54188645", "0.54188645", "0.54188645", "0.54188645", "0.54188645", "0.54188645", "0.5414087", "0.54102457", "0.5409562", "0.5408821", "0.5407268", "0.5402739", "0.54001856", "0.5397053", "0.53880155", "0.5387553", "0.5386486", "0.53760153", "0.53691053", "0.53599435", "0.53573984", "0.5356673", "0.535487", "0.5341054", "0.53380275", "0.53302425", "0.5323407", "0.53086466", "0.5299014", "0.5295131", "0.5291398", "0.5284415", "0.52651304", "0.52651304", "0.5265099", "0.52623636", "0.52554226", "0.52391577", "0.5235952", "0.52356005", "0.52331823" ]
0.0
-1
returns a map that maps each state to a representative of their equivalence class.
private Map<State, State> equivalentStates() { Map<State, State> prevEcc = new HashMap<State, State>(); Map<State, State> ecc = new HashMap<State, State>(); /* * We will represent each equivalence classes with a representative member and * use a dictionary to map each state to this representative. * * First we create two equivalence classes, put all the accepting states in the * first and all the non accepting states in the second. */ if (!this.acceptingStates.isEmpty()) { State rep = this.acceptingStates.iterator().next(); for (State state : this.acceptingStates) { ecc.put(state, rep); } } Set<State> nonAcceptingStates = new HashSet<State>(this.states); nonAcceptingStates.removeAll(this.acceptingStates); if (!nonAcceptingStates.isEmpty()) { State rep = nonAcceptingStates.iterator().next(); for (State state : nonAcceptingStates) { ecc.put(state, rep); } /* * The invariant for the following loop is: * * 1. for any s -> r association in ecc, s is equivalent to r in prevEcc, 2. for * any input symbol c, the destination of the transition from s on c is * equivalent (in prevEcc) to the destiation of the transition from r to c, 3. * for any two values r1, r2 in ecc, they are not equivalent to each other in * prevEcc, 4. all the equivalence classes in prevEcc have a representative in * ecc. * */ } while (!prevEcc.equals(ecc)) { prevEcc = ecc; ecc = new HashMap<State, State>(); /* * To establish the invariant we will set ecc with the associations of the form * * r -> r where r is a representative from prevEcc. * * This will initially satisfy the invariant because our action establishes * condition (4) and conditions (1) and (2) and (3) are correct by induction * from the validity of prevEcc." */ for (State state : prevEcc.values()) { ecc.put(state, state); } for (State state : this.states) { /* * For each state s, we look in ecc for a rep r that is equivalent to s in * prevEcc (that is, s's rep in prevEcc is r and for every input they transition * to the same equivalence class in prevEcc) and add s to ecc with the same * equivalence rep. If no state is equivalent to s, we add s to ecc as its own * rep. */ Iterator<State> p = ecc.keySet().iterator(); State rep = null; boolean equivalent = false; while (p.hasNext() && !equivalent) { rep = (State) p.next(); equivalent = this.equivalentIn(prevEcc, state, rep); } if (equivalent) { ecc.put(state, rep); continue; } ecc.put(state, state); } } return ecc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final static void determineRepresentativeStates(Automaton automaton,\n\t\t\tBinaryMatrix equivs, int[] mapping) {\n\t\tfinal int size = automaton.nStates();\n\n\t\tfor (int i = 0; i != size; ++i) {\n\t\t\tAutomaton.State i_state = automaton.get(i);\n\t\t\tif (i_state != null) {\n\t\t\t\tint classRep = i;\n\t\t\t\t// determine the unique representative for this equivalence\n\t\t\t\t// class.\n\t\t\t\tfor (int j = 0; j < i; ++j) {\n\t\t\t\t\tif (equivs.get(i, j)) {\n\t\t\t\t\t\tclassRep = j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// map this state to the unique representative (which may be\n\t\t\t\t// itself if it is the unique rep).\n\t\t\t\tmapping[i] = classRep;\n\t\t\t} else {\n\t\t\t\tmapping[i] = i;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public int hashCode() {\n return Arrays.hashCode(getState());\n }", "public Map<Integer, Color> getStates(){\n return myStates;\n }", "final static void determineEquivalenceClasses(Automaton automaton,\n\t\t\tBinaryMatrix equivs) {\n\t\tboolean changed = true;\n\t\tint size = automaton.nStates();\n\n\t\twhile (changed) {\n\t\t\tchanged = false;\n\t\t\tfor (int i = 0; i < size; ++i) {\n\t\t\t\tfor (int j = i + 1; j < size; ++j) {\n\t\t\t\t\tif (equivs.get(i, j)) {\n\t\t\t\t\t\t// no need to explore nodes which are already known to\n\t\t\t\t\t\t// be not equivalent.\n\t\t\t\t\t\tboolean b = equivalent(automaton, equivs, i, j);\n\t\t\t\t\t\tequivs.set(i, j, b);\n\t\t\t\t\t\tequivs.set(j, i, b);\n\t\t\t\t\t\tchanged |= !b;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public Map<String, Object> currentState() {\n\n return new HashMap<>();\n }", "public HashMap<String, NeonValue> getMap();", "public Map<EntityMode,String> getTuplizerClassMap();", "java.util.Map<java.lang.Integer, object_detection.protos.Calibration.XYPairs>\n getClassIdXyPairsMapMap();", "private Map<String, Integer> getTagClassesEnrichment(PersonActivity in) {\n\t\tList<String> tags = in.getCategoryKeys(CategoryType.FORUM);\n\n\t\tMap<String, Integer> tagClasses = tags.stream()\n\t\t\t\t.map(tag -> tagClassRelation.get(tag))\n\t\t\t\t.filter(x -> x != null)\n\t\t\t\t.flatMap(List::stream)\n\t\t\t\t.collect(Collectors.groupingBy(Function.identity(), Collectors.reducing(0, e -> 1, Integer::sum)));\n\n\t\treturn tagClasses;\n\t}", "Map<String, IAttribute> getConnectedAttributes();", "public Map<String, Object> state() {\n return Collections.unmodifiableMap(values);\n }", "public Map<Integer, State> getMyStateMap() { return myStateMap; }", "List<S> getAllPossibleStates(S state);", "public Map<Integer, ArrayList<Integer>> getClassCardMap() {\n classCardMap = new HashMap<Integer, ArrayList<Integer>>();\n if (classPowers.size() > 0) {\n for (Integer pos : classPosMap.get(classId)) {\n // Filter out any pos already in the powMap\n if (!powMap.keySet().contains(pos)) {\n // Rotate power to next in list\n classPowers.add(classPowers.remove(0));\n ArrayList<Integer> powersCopy = new ArrayList<>(classPowers);\n classCardMap.put(pos, powersCopy);\n }\n }\n }\n return classCardMap;\n }", "public Map<AdornedAtom, List<AdornedTgd>> adornedMap() {\n Map<AdornedAtom, List<AdornedTgd>> map = new HashMap<>();\n for(AdornedAtom p: adornedPredicates) {\n ArrayList<AdornedTgd> tgd = new ArrayList<>();\n for(AdornedTgd t : adornedRules) {\n if(t.getHead().equals(p)) {\n tgd.add(t);\n }\n }\n map.put(p, tgd);\n }\n\n return map;\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result + ((state_rep == null) ? 0 : state_rep.hashCode());\n\t\treturn result;\n\t}", "public Map<V,List<E>> adjacencyMap(){\n\t\tMap<V,List<E>> ret = new HashMap<V,List<E>>();\n\t\tfor (E e : edges){\n\t\t\tif (virtualEdges.contains(e))\n\t\t\t\tcontinue;\n\t\t\tList<E> list;\n\t\t\tif (!ret.containsKey(e.getOrigin())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getOrigin(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getOrigin());\n\t\t\tlist.add(e);\n\t\t\t\n\t\t\tif (!ret.containsKey(e.getDestination())){\n\t\t\t\tlist = new ArrayList<E>();\n\t\t\t\tret.put(e.getDestination(), list);\n\t\t\t}\n\t\t\telse\n\t\t\t\tlist = ret.get(e.getDestination());\n\t\t\tlist.add(e);\n\t\t}\n\t\treturn ret;\n\t}", "public States states();", "public static LinkedHashMap<String,Class<?>> getNodeAttributesMap() {\r\n\t\tLinkedHashMap<String, Class<?>> map= new LinkedHashMap<String, Class<?>>();\r\n\t\tmap.put(uri, String.class);\r\n//\t\tmap.put(canonicalName, String.class);\r\n//\t\tmap.put(category , String.class);\r\n\t\tmap.put(scope,String.class);\r\n\t\tmap.put(segment,String.class);\r\n//\t\tmap.put(numInteractionEdges,Integer.class);\r\n//\t\tmap.put(numSubsumptionEdges,Integer.class);\r\n\t\tmap.put(timestamp,String.class);\r\n\t\tmap.put(modificationDate,String.class);\r\n\t\tmap.put(marked,Boolean.class);\r\n\t\tmap.put(nodeTypeURI, String.class);\r\n\t\t\r\n\t\tmap.put(GO_BIOLOGICAL_PROCESS, List.class);\r\n\t\tmap.put(GO_CELLULAR_COMPONENT, List.class);\r\n\t\tmap.put(GO_MOLECULAR_FUNCTION, List.class);\r\n\t\t\r\n\t\t//GO\r\n//\t\tmap.put(AddGOAnnotations.GO_BIOLOGICAL_PROCESS, String.class);\r\n//\t\tmap.put(AddGOAnnotations.GO_CELLURAL_COMPONENT, String.class);\r\n//\t\tmap.put(AddGOAnnotations.GO_MOLECULAR_FUNCTION, String.class);\r\n\t\t\r\n\t\treturn map;\r\n\t}", "public static Map<Integer, Boolean> InitializeVisited() {\n\t\tMap<Integer, Boolean> visited = new HashMap<Integer, Boolean>();\r\n\t\tfor (Entry<Integer, Vertex> currentVertex : vertexes.entrySet())\r\n\t\t\tvisited.put(currentVertex.getKey(), false);\r\n\t\treturn visited;\r\n\t}", "public int hashCode() {\n return state.hashCode();\n }", "Map<ParameterInstance, SetType> getInstanceSetTypes();", "private Map<String, DroneGuiState> getDroneGuiStates(Set<Drone> drones)\n\t{\n\t\t//generate the map containing the gui states\n\t\tMap<String, DroneGuiState> stateMap = new HashMap<>();\n\t\t//fill the map\n\t\tString key;\n\t\tDroneGuiState value;\n\t\tfor(Drone drone: drones){\n\t\t\t//get the ID, position and orientation of the drone\n\t\t\tkey = drone.getDroneID();\n\t\t\tVector position = drone.getPosition().deepCopy();\n\t\t\tVector velocity = drone.getVelocity().deepCopy();\n\t\t\tVector orientation = drone.getOrientation().deepCopy();\n\t\t\tvalue = new DroneGuiState() {\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getPosition() {\n\t\t\t\t\treturn position;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getVelocity() {\n\t\t\t\t\treturn velocity;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getOrientation() {\n\t\t\t\t\treturn orientation;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t//add the key value pair\n\t\t\tstateMap.put(key, value);\n\t\t}\n\n\t\t//return the newly created hashMap\n\t\treturn stateMap;\n\t}", "public HashMap<String, ArrayList<Tweet>> getStates() {\n return states;\n }", "@Override\n\tpublic int hashCode() {\n\t\tint ret = 0;\n\t\tfor (final Object o : states) {\n\t\t\tret += ((State) o).specialHash();\n\t\t}\n\t\tfor (final Object o : transitions) {\n\t\t\tret += ((Transition) o).specialHash();\n\t\t}\n\t\tfor (final Object o : myNotes) {\n\t\t\tret += ((Note) o).specialHash();\n\t\t}\n\t\tret += finalStates.hashCode();\n\t\tret += initialState == null ? 0 : (int) (initialState.specialHash() * Math.PI);\n\n\t\t// EDebug.print(ret);\n\t\treturn ret;\n\t}", "public static List<State> getStateMapper() throws SQLException{\n\t\tList<State> stateList = new ArrayList<State>(52);\n\t\tConnection conn = DBConnector.getInstance().getConn();\n\t\tStatement statement = conn.createStatement();\n\t\t\n\t\tString sql = \"select * from mhtc_sch.getStates(FALSE)\";\n\t\tstatement.execute(sql);\n\t\t\n\t\tResultSet rs = statement.getResultSet();\n \n\t\t/*\n\t\t * index 1 : StateID\n\t\t * index 2 : State initial\n\t\t * index 3 : StateName\n\t\t */\n while (rs.next()) {\n \tint stateID = rs.getInt(1);\n \tString initial = rs.getString(2).toLowerCase();\n \tString stateName = rs.getString(3).toLowerCase();\n \tState state = new State(stateID, stateName, initial);\n \tstateList.add(state);\n \t//System.out.println(state.getFullName() + \" \" + state.getInitial());\n }\n\t\treturn stateList;\n\t}", "default Collection<I_GameState> getRepeatStates() {\n return getRepeatStates(FULL_EQUAL);\n }", "private Map<S, Integer> getAppearances() {\n List<P> productions = slp.getOrderedProductions();\n Map<S, Integer> appearences = new HashMap<>(productions.size());\n\n for(S axiom : slp.getAxioms()) {\n appearences.put(axiom, 1);\n }\n\n for(P production : productions) {\n if(!appearences.containsKey(production.getLeft())) {\n appearences.put(production.getLeft(), 1);\n }\n\n for(S terminal : production.getRight().findAll(s -> !s.isTerminal())) {\n if(!appearences.containsKey(terminal)) {\n appearences.put(terminal, 0);\n }\n\n appearences.put(terminal, appearences.get(terminal) + appearences.get(production.getLeft()));\n }\n }\n return appearences;\n }", "List<State> adj() {\n\t\t\tList<State> adj = new ArrayList<State>();\n\t\t\tList<Edge> edgeList = edgeMap.get(city);\n\n\t\t\tfor (Edge e : edgeList) {\n\t\t\t\tboolean isPlane = e.cost == 0;\n\t\t\t\tif (ticketUsed == true && isPlane) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tint toCity = e.to;\n\t\t\t\tState s = new State(toCity, isPlane, dist + e.cost);\n\n\t\t\t\tadj.add(s);\n\t\t\t}\n\n\t\t\treturn adj;\n\t\t}", "public HashSet<State> statesReachableOn(State from, Character on) {\n \t\tHashSet<State> reachable = new HashSet<State>();\n \t\tIterator<Transition> iter = from.getTransitions().iterator();\n \t\twhile (iter.hasNext()) {\n \t\t\tTransition t = iter.next();\n \n \t\t\t// Do they want the epsilon transitions?\n \t\t\tboolean equals = false;\n \t\t\tif (on == null)\n \t\t\t\tequals = on == t.c;\n \t\t\telse\n \t\t\t\tequals = on.equals(t.c);\n \n \t\t\t// Add all matching transitions\n \t\t\t// Skip if already added to prevent loops\n \t\t\tif (equals && !reachable.contains(t.to)) {\n \t\t\t\t// Add this state\n \t\t\t\treachable.add(t.to);\n \n \t\t\t\t// Recurse and add all reachable from this state (epsilon transitions)\n \t\t\t\treachable.addAll(statesReachableFrom(t.to));\n \t\t\t}\n \t\t}\n \n \t\treturn reachable;\n \t}", "private Map<Integer, Set<Integer>> computeInverseTransitionRelation(LabelledTransitionSystem ret) {\n\n\t\tMap<Integer, Set<Integer>> reverseTransitionMap = new HashMap<>();\n\t\tLTSTransitionList[] transitions = ret.getStates();\n\n\t\tfor (int stateIndex = 0; stateIndex < transitions.length; stateIndex++) {\n\t\t\treverseTransitionMap.put(stateIndex, new HashSet<>());\n\t\t}\n\n\t\tfor (int stateIndex = 0; stateIndex < transitions.length; stateIndex++) {\n\n\t\t\tLTSTransitionList transition = transitions[stateIndex];\n\t\t\tthis.updateIndexes(stateIndex, transition, reverseTransitionMap);\n\t\t}\n\n\t\treturn reverseTransitionMap;\n\t}", "public Map<State, StatePolicyProperties> getStateMap() {\r\n return mStateMap;\r\n }", "public final static boolean collapseEquivalenceClasses(Automaton automaton, int[] binding) {\n\t\t// First, remap states so all references are to the unique\n\t\t// representatives.\n\t\tboolean changed = false;\n\t\tint nStates = automaton.nStates();\n\n\t\tfor (int i = 0; i != nStates; ++i) {\n\t\t\tif(binding[i] != i) {\t\t\t\t\n\t\t\t\t// This state has be subsumed by another state which was the\n\t\t\t\t// representative for its equivalence class. Therefore, the\n\t\t\t\t// state must now be unreachable.\n\t\t\t\tautomaton.set(i,null);\n\t\t\t\tchanged = true;\n\t\t\t} else {\n\t\t\t\tAutomaton.State state = automaton.get(i);\n\t\t\t\tif(state != null) {\n\t\t\t\t\t// This state is the unique representative for its equivalence\n\t\t\t\t\t// class. Therefore, retain it whilst remapping all of its\n\t\t\t\t\t// references appropriately.\t\t\t\t\n\t\t\t\t\tstate.remap(binding);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Second, remap the root references so that they also refer to the\n\t\t// unique representatives.\n\t\tint nRoots = automaton.nRoots();\n\t\tfor (int i = 0; i != nRoots; ++i) {\n\t\t\tint root = automaton.getRoot(i);\n\t\t\tif (root >= 0) {\n\t\t\t\tautomaton.setRoot(i, binding[root]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn changed;\n\t}", "@Internal\n\tpublic static <T> Map<String, State<T>> migrateGraph(State<T> oldStartState) {\n\t\tState<T> oldFirst = oldStartState;\n\t\tState<T> oldSecond = oldStartState.getStateTransitions().iterator().next().getTargetState();\n\n\t\tStateTransition<T> oldFirstToSecondTake = Iterators.find(\n\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t}\n\n\t\t\t});\n\n\t\tStateTransition<T> oldFirstIgnore = Iterators.find(\n\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.IGNORE;\n\t\t\t\t}\n\n\t\t\t}, null);\n\n\t\tStateTransition<T> oldSecondToThirdTake = Iterators.find(\n\t\t\toldSecond.getStateTransitions().iterator(),\n\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t@Override\n\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t}\n\n\t\t\t}, null);\n\n\t\tfinal Map<String, State<T>> convertedStates = new HashMap<>();\n\t\tState<T> newSecond;\n\t\tState<T> newFirst = new State<>(oldSecond.getName(), State.StateType.Start);\n\t\tconvertedStates.put(newFirst.getName(), newFirst);\n\t\twhile (oldSecondToThirdTake != null) {\n\n\t\t\tnewSecond = new State<T>(oldSecondToThirdTake.getTargetState().getName(), State.StateType.Normal);\n\t\t\tconvertedStates.put(newSecond.getName(), newSecond);\n\t\t\tnewFirst.addTake(newSecond, oldFirstToSecondTake.getCondition());\n\n\t\t\tif (oldFirstIgnore != null) {\n\t\t\t\tnewFirst.addIgnore(oldFirstIgnore.getCondition());\n\t\t\t}\n\n\t\t\toldFirst = oldSecond;\n\n\t\t\toldFirstToSecondTake = Iterators.find(\n\t\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t\t}\n\n\t\t\t\t});\n\n\t\t\toldFirstIgnore = Iterators.find(\n\t\t\t\toldFirst.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.IGNORE;\n\t\t\t\t\t}\n\n\t\t\t\t}, null);\n\n\t\t\toldSecond = oldSecondToThirdTake.getTargetState();\n\n\t\t\toldSecondToThirdTake = Iterators.find(\n\t\t\t\toldSecond.getStateTransitions().iterator(),\n\t\t\t\tnew Predicate<StateTransition<T>>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean apply(@Nullable StateTransition<T> input) {\n\t\t\t\t\t\treturn input != null && input.getAction() == StateTransitionAction.TAKE;\n\t\t\t\t\t}\n\n\t\t\t\t}, null);\n\n\t\t\tnewFirst = newSecond;\n\t\t}\n\n\t\tfinal State<T> endingState = new State<>(ENDING_STATE_NAME, State.StateType.Final);\n\n\t\tnewFirst.addTake(endingState, oldFirstToSecondTake.getCondition());\n\n\t\tif (oldFirstIgnore != null) {\n\t\t\tnewFirst.addIgnore(oldFirstIgnore.getCondition());\n\t\t}\n\n\t\tconvertedStates.put(endingState.getName(), endingState);\n\n\t\treturn convertedStates;\n\t}", "public EnumMap<?, SerializableString> internalMap()\n/* */ {\n/* 100 */ EnumMap<?, SerializableString> result = this._asMap;\n/* 101 */ if (result == null)\n/* */ {\n/* 103 */ Map<Enum<?>, SerializableString> map = new LinkedHashMap();\n/* 104 */ for (Enum<?> en : this._values) {\n/* 105 */ map.put(en, this._textual[en.ordinal()]);\n/* */ }\n/* 107 */ result = new EnumMap(map);\n/* */ }\n/* 109 */ return result;\n/* */ }", "private static boolean identityEqual(final I_GameState state1, final I_GameState state2) {\n if (state1 == state2)\n return true;\n\n return Stream.of(new SimpleEntry<>(state1, state2))\n .flatMap( // transform the elements by making a new stream with the transformation to be used\n pair -> Arrays.stream(E_PileID.values()) // stream the pileIDs\n // make new pair of the elements of that pile from each state\n .map(pileID -> new SimpleEntry<>(\n pair.getKey().get(pileID),\n pair.getValue().get(pileID)\n )\n )\n )\n .allMatch(pair -> pair.getKey() == pair.getValue());\n }", "public static Map<Integer,String> getCurrencyMap(){\n Map<Integer,String> currencyMap = new HashMap<>();\n int temp = 1; // number of first currency\n for (Object s : getCurrencySet()){\n currencyMap.put(temp,s.toString());\n temp++;\n }\n return Collections.synchronizedMap(currencyMap);\n }", "public Map<String, TaskState> getStatesRecursive(List<AbstractArea> elements) {\r\n\t\tMap<String, TaskState> map = new HashMap<String, TaskState>();\r\n\t\tfor (AbstractArea area : elements) {\r\n\t\t\tmap.put(area.getActivityId(), area.getState());\r\n\r\n\t\t\t// call activity traverse strategy\r\n\t\t\tif (area instanceof CallActivityTaskHighlight) {\r\n\t\t\t\tCallActivityTaskHighlight callActivity = (CallActivityTaskHighlight) area;\r\n\t\t\t\tMap<String, TaskState> map2 = getStatesRecursive(callActivity.getElements());\r\n\t\t\t\tfor (String key : map2.keySet()) {\r\n\t\t\t\t\tmap.put(callActivity.getActivityId() + \".\" + key, map2.get(key));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn map;\r\n\t}", "private Map<String, List<String>> getSelectedStatesToApprove() {\n Map<String, List<String>> stateAction = new HashMap<String, List<String>>();\n // exract selected states from stateList and populate the map\n if (stateList != null) {\n // list will be something like ' Created:Publish,Created:Deploy as a Prototype,Published:Block ' String\n // It will have State:action pairs\n String[] statelistArray = stateList.split(\",\");\n for (int i = 0; i < statelistArray.length; i++) {\n String[] stateActionArray = statelistArray[i].split(\":\");\n if (stateAction.containsKey(stateActionArray[0].toUpperCase())) {\n ArrayList<String> actionList = (ArrayList<String>) stateAction\n .get(stateActionArray[0].toUpperCase());\n actionList.add(stateActionArray[1]);\n } else {\n ArrayList<String> actionList = new ArrayList<String>();\n actionList.add(stateActionArray[1]);\n stateAction.put(stateActionArray[0].toUpperCase(), actionList);\n }\n }\n }\n if (log.isDebugEnabled()) {\n log.debug(\"selected states: \" + stateAction.toString());\n }\n return stateAction;\n }", "private void mapPrecincts() {\r\n\t\tMap<Integer, Precinct> allPrecincts = new HashMap<Integer, Precinct>();\r\n\t\tMap<Integer, Precinct> currPrecincts;\r\n\t\tfor (CongressionalDistrict district : districts.values()) {\r\n\t\t\tcurrPrecincts = district.getPrecincts(); // lazy loaded\r\n\t\t\tif (currPrecincts == null) {\r\n\t\t\t\tthrow new IllegalStateException();\r\n\t\t\t}\r\n\t\t\tallPrecincts.putAll(currPrecincts);\r\n\t\t\tfor (Precinct precinct : currPrecincts.values()) {\r\n\t\t\t\tprecinct.setConDistrict(district); // make sure the object is the same\r\n\t\t\t}\r\n\t\t}\r\n\t\tmapNeighborPrecincts(allPrecincts);\r\n\t\tstate.setPrecincts(allPrecincts); //allow for retrieving maps and data later\r\n\t}", "static Map<String, Handlers> getIntentMap()\n\t{\n\t\tMap<String, Handlers> h_map = new HashMap<>();\n\t\t\n\t\t\n\t\th_map.put (ADDRESS_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (ADDRESS_ASSOCIATE , Handlers.LINK_CREATE);\n\t\th_map.put (ADDRESS_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (EVENT_ADD , Handlers.NODE_CREATE_AND_LINK);\n\t\th_map.put (EVENT_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (GROUP_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_MEMBER_ADD , Handlers.LINK_CREATE);\n\t\th_map.put (GROUP_MEMBER_DELETE, Handlers.LINK_DELETE);\n\t\th_map.put (PERSON_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (PERSON_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (SUBSCRIPTION_ADD , Handlers.NODE_CREATE_AND_MULTILINK);\n\t\th_map.put (SUBSCRIPTION_DELETE, Handlers.NODE_DELETE);\n\t\th_map.put (USER_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (USER_REGISTER , Handlers.REGISTER_USER);\n\n\t\treturn h_map;\n\t}", "@SuppressWarnings(\"unchecked\")\n public synchronized Map<String, RegionState> getRegionsInTransition() {\n return (Map<String, RegionState>)regionsInTransition.clone();\n }", "public Map<String, Object> getAttributeValues()\n\t{\n\t\tMap<String, Object> retval = new TreeMap<>();\n\t\t\n\t\tfor (ClassAttribute attribute : attributes.keySet())\n\t\t{\n\t\t\tretval.put(attribute.shortName, attributes.get(attribute));\n\t\t}\n\t\t\n\t\treturn retval;\n\t}", "private static HashMap<String,String> buildColumnMap() {\n HashMap<String,String> map = new HashMap<String,String>();\n map.put( STATE_NAME, STATE_NAME );\n map.put( CAPITAL_NAME, CAPITAL_NAME );\n map.put( STATE_ABBR, STATE_ABBR );\n map.put( STATE_FOUNDING_DATE, STATE_FOUNDING_DATE );\n map.put( STATE_FUN_FACT, STATE_FUN_FACT );\n map.put( BaseColumns._ID, \"rowid AS \" +\n BaseColumns._ID );\n map.put( SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID, \"rowid AS \" +\n SearchManager.SUGGEST_COLUMN_INTENT_DATA_ID );\n map.put( SearchManager.SUGGEST_COLUMN_SHORTCUT_ID, \"rowid AS \" +\n SearchManager.SUGGEST_COLUMN_SHORTCUT_ID );\n return map;\n }", "public void minimize() {\n D = new boolean[states.length][states.length];\r\n S = new ArrayList<ArrayList<HashSet<Point>>>(); // lol\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int i = 0; i < states.length; i++) {\r\n ArrayList<HashSet<Point>> innerList = new ArrayList<HashSet<Point>>();\r\n\r\n //noinspection ForLoopReplaceableByForEach\r\n for (int j = 0; j < states.length; j++) {\r\n Arrays.fill(D[i], false);\r\n innerList.add(new HashSet<Point>());\r\n }\r\n S.add(innerList);\r\n }\r\n\r\n // 2. states with different acceptances are distinguishable\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n if (acceptStates.contains(i) != acceptStates.contains(j)) {\r\n D[i][j] = true;\r\n }\r\n }\r\n }\r\n\r\n // 3. mark as possibly indistinguishable, enforce distinguishability\r\n for (int i = 0; i < states.length; i++) {\r\n for (int j = i + 1; j < states.length; j++) {\r\n // only pairs that are as of yet indistinguishable\r\n if (D[i][j]) {\r\n continue;\r\n }\r\n\r\n DFAState qi = states[i];\r\n DFAState qj = states[j];\r\n\r\n // one of the things being compared is unreachable\r\n if (qi == null || qj == null) {\r\n continue;\r\n }\r\n\r\n // helps emulate \"for any\"\r\n boolean distinguished = false;\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n // if on the same letter, qm and qn move to distinguishable states\r\n if (D[m][n] || D[n][m]) {\r\n dist(i, j);\r\n distinguished = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!distinguished) {\r\n // qm and qn are indistinguishable\r\n for (int k = 0; k < qi.transitions.size(); k++) {\r\n int m = qi.transitions.get(k);\r\n int n = qj.transitions.get(k);\r\n\r\n if (m < n && !(i == m && j == n)) {\r\n S.get(m).get(n).add(new Point(i, j));\r\n } else if (m > n && !(i == n && j == m)) {\r\n S.get(n).get(m).add(new Point(i, j));\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n mergeStates();\r\n }", "private final static boolean equivalent(Automaton automaton,\n\t\t\tBinaryMatrix equivs, Automaton.Bag b1, Automaton.Bag b2) {\n\t\tint b1_size = b1.size();\n\t\tint b2_size = b2.size();\n\n\t\tif (b1_size != b2_size) {\n\t\t\t// Observe that, unlike a set, the size of a bag will never be\n\t\t\t// changed by the identification of equivalent states. Therefore,\n\t\t\t// the size of both collection must be identical, otherwise they can\n\t\t\t// never be equivalent.\n\t\t\treturn false;\n\t\t}\n\n\t\tint[] b1_children = b1.children;\n\t\tint[] b2_children = b2.children;\n\t\t// maps vertices in b2 to those they are matched against in b1\n\t\tint[] matches = new int[b1_size];\n\t\tArrays.fill(matches, -1);\n\t\t// Used to ensure no vertex is explored more than once during\n\t\t// reconfiguration.\n\t\tboolean[] visited = new boolean[b1_size];\n\t\t\n\t\t// For every state in s1\n\t\tfor (int i = 0; i != b1_size; ++i) {\n\t\t\tint b1_child = b1_children[i];\n\t\t\tif(b1_child < 0) {\n\t\t\t\t// In this case, we have to do something different.\n\t\t\t\tif(!findNegativeMatch(i,b1_children,b2_children,equivs,matches)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tArrays.fill(visited,false);\n\t\t\t\tif(!findMatch(i,b1_children,b2_children,equivs,matches,visited)) {\n\t\t\t\t\t// If we can't find a match, then it's game over and we know for\n\t\t\t\t\t// sure these two states are not equivalent.\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "public AeBpelState getState();", "@Basic\n Map<String, String> getLabelsMap();", "private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }", "public Map<EventKey, EventMethod> createEventMap() {\n\t\tfinal Map<EventKey, EventMethod> eventMap = new EnumMap<>(EventKey.class);\n\t\tfinal Pair<Map<String, Object>, Set<Class<?>>> eventPair = prepareEventPair();\n\n\t\tfor (Class<?> eventClass : eventPair.getSecond()) {\n\t\t\tfor (Method eventMethod : prepareEventMethods(eventClass)) {\n\t\t\t\teventMap.put(eventMethod.getAnnotation(EventMapping.class).key(),\n\t\t\t\t\t\tnew EventMethod(eventPair.getFirst().get(eventClass.getName()), eventMethod));\n\t\t\t}\n\t\t}\n\t\treturn eventMap;\n\t}", "@java.lang.Override\n\n public java.util.Map<java.lang.Integer, object_detection.protos.Calibration.XYPairs> getClassIdXyPairsMapMap() {\n return internalGetClassIdXyPairsMap().getMap();\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "Collection<I_GameState> getRepeatStates(final BiPredicate<I_GameState, I_GameState> predicate);", "public final Map<Nation, NationState> getNations() {\n return nations;\n }", "int getClassIdXyPairsMapCount();", "java.util.Map<java.lang.Integer, object_detection.protos.Calibration.SigmoidParameters>\n getClassIdSigmoidParametersMapMap();", "private Map<String, byte[]> createInnerClassesByteCodeMap(Collection<byte[]> classes) {\n Map<String, byte[]> byteCodeMap = new HashMap<>();\n\n for (byte[] byteCode : classes) {\n byteCodeMap.put(ClassNameConverter.getClassName(byteCode), byteCode);\n }\n\n return byteCodeMap;\n }", "Object getState();", "@java.lang.Override\n\n public java.util.Map<java.lang.Integer, object_detection.protos.Calibration.XYPairs> getClassIdXyPairsMapMap() {\n return internalGetClassIdXyPairsMap().getMap();\n }", "Map <String,Integer> RepresentationBinaire(BasicSet A){\r\n\t\tMap<String,Integer> bit=new TreeMap<String,Integer>();\r\n\t\tVector<String> v=context.getAttributes();\t\t\r\n\t\tBasicSet attributes=new BasicSet();\r\n\t\tattributes.addAll(v);\r\n\r\n\t\tfor(String item: attributes )\r\n\t\t{\r\n\t\t\tbit.put(item,0);\t\t\r\n\t\t}\r\n\t\tfor(String item: attributes)\r\n\t\t{\t\t\r\n\t\t\tfor(String it: A){\t\r\n\t\t\t\tif(it.equals(item)){\r\n\t\t\t\t\tbit.put(item,1);\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn bit;\r\n\t}", "private Map<String, Set<String>> getQueueToLabels() {\n Map<String, Set<String>> queueToLabels = new HashMap<>();\n for (CSQueue queue : getQueues().values()) {\n queueToLabels.put(queue.getQueuePath(), queue.getAccessibleNodeLabels());\n }\n return queueToLabels;\n }", "private void mergeStates() {\n ArrayList<DFAState> newStates = new ArrayList<DFAState>();\r\n HashSet<Integer> newAcceptStates = new HashSet<Integer>();\r\n HashMap<Integer, Integer> merged = new HashMap<Integer, Integer>();\r\n ArrayList<ArrayList<Integer>> mergeGroups = new ArrayList<ArrayList<Integer>>();\r\n for (int i = 0; i < D.length; i++) {\r\n if (merged.get(i) != null || states[i] == null) {\r\n continue;\r\n }\r\n\r\n DFAState state = states[i];\r\n\r\n ArrayList<Integer> toMerge = new ArrayList<Integer>();\r\n for (int j = i + 1; j < D.length; j++) {\r\n if (!D[i][j]) {\r\n toMerge.add(j);\r\n merged.put(j, i);\r\n }\r\n }\r\n\r\n // renumber existing transitions\r\n for (int j = 0; j < state.transitions.size(); j++) {\r\n Integer transition = state.transitions.get(j);\r\n if (merged.containsKey(transition)) {\r\n state.transitions.set(j, merged.get(transition));\r\n }\r\n }\r\n\r\n if (acceptStates.contains(i)) {\r\n newAcceptStates.add(i);\r\n }\r\n toMerge.add(i);\r\n mergeGroups.add(toMerge);\r\n newStates.add(state);\r\n }\r\n\r\n renumberStates(mergeGroups, newAcceptStates);\r\n\r\n // replace attributes\r\n DFAState[] newStatesArray = new DFAState[newStates.size()];\r\n newStatesArray = newStates.toArray(newStatesArray);\r\n states = newStatesArray;\r\n acceptStates = newAcceptStates;\r\n }", "@Override\n\tpublic DFA getDFA() {\n\t\t//create a new DFA\n\t\tDFA dfa = new DFA();\n\t\t//Create a queue of NFA sets for traversal\n\t\tQueue<Set<NFAState>> nq = new LinkedList<Set<NFAState>>();\n\t\t\n\t\t//Create set with start state and put it in the queue\n\t\tTreeSet<NFAState> startSet = new TreeSet<NFAState>();\n\t\tstartSet.add((NFAState) getStartState());\n\t\tdfa.addStartState(startSet.toString());\n\t\tnq.add(startSet);\n\t\t\n\t\t//for each set of NFAstates dequeued\n\t\twhile(!nq.isEmpty()) {\n\t\t\t\n\t\t\tSet<NFAState> ncurrent = nq.remove();\t\t\t\n\t\t\t\n\t\t\t//loops through each character that is not 'e' to complete transitions\n\t\t\tfor(Character c : abc) {\n\t\t\t\tif(c != 'e') {\n\t\t\t\t\tSet<NFAState> getTo = new TreeSet<NFAState>();\n\t\t\t\t\tfor(NFAState state : ncurrent) {\n\t\t\t\t\t\tgetTo.addAll(state.getTo(c));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (getTo != null) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (NFAState s : getTo) {\n\t\t\t\t\t\t\t\tif(s.hasNextE()) { // check each next state for e closure\n\t\t\t\t\t\t\t\t\tif(eClosure(s) != null) {\n\t\t\t\t\t\t\t\t\t\t//add the states from eclosure to getTo set\n\t\t\t\t\t\t\t\t\t\tSet<NFAState> setWithE = eClosure(s);\t\t\n\t\t\t\t\t\t\t\t\t\tgetTo.addAll(setWithE);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Add state name and transitions to DFA state\n\t\t\t\t\t\n\t\t\t\t\t//check if the state is final\n\t\t\t\t\tBoolean isFinal = false;\n\t\t\t\t\tfor (NFAState s : getTo) {\n\t\t\t\t\t\tfor(State f : getFinalStates()) {\n\t\t\t\t\t\t\tif(f.getName().equals(s.getName())) {\n\t\t\t\t\t\t\t\tisFinal = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t//check if the state already exists in the DFA\n\t\t\t\t\tBoolean inDFA = false;\t\t\n\t\t\t\t\tfor(DFAState dstate : dfa.getStates()) {\n\t\t\t\t\t\tif(dstate.getName().equals(getTo.toString())) {\n\t\t\t\t\t\t\tinDFA = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t//add the state to DFA if it is not already\n\t\t\t\t\tif(!inDFA) {\n\t\t\t\t\t\t//check if final\n\t\t\t\t\t\tif(isFinal) {\n\t\t\t\t\t\t\tdfa.addFinalState(getTo.toString());\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tdfa.addState(getTo.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnq.add(getTo); //add new set to queue\n\t\t\t\t\t}\n\t\t\t\t\t//create the transition\t\t\n\t\t\t\t\tdfa.addTransition(ncurrent.toString(), c, getTo.toString());\n\t\t\t\t}//end if\n\t\t\t}//end for\n\t\t}//end while\n\t\treturn dfa;\n\t}", "public Map<QuantDiseaseGroupsComparison, QuantDiseaseGroupsComparison> getEqualComparisonMap() {\n return equalComparisonMap;\n }", "@Override\r\n\tpublic int hashCode() {\r\n\t\t// Only this because other fields could be modified after you hash this.\r\n\t\treturn state.hashCode();\r\n\t}", "public HashMap<String,ArrayList<Rule_in_State>> get_rules_of_next_state() throws Exception;", "private Map<Integer, SortedSet> getInvariants(\n Partition partition, Set<Integer> targetBlock) {\n Map<Integer, SortedSet> setList = new HashMap<Integer, SortedSet>();\n for (int u : partition.getCell(currentBlockIndex)) {\n int h = neighboursInBlock(targetBlock, u);\n if (setList.containsKey(h)) {\n setList.get(h).add(u);\n } else {\n SortedSet set = new TreeSet();\n set.add(u);\n setList.put(h, set);\n }\n }\n// System.out.println(\"current block \" + partition.getCell(currentBlockIndex) + \" target block \" + targetBlock + \" inv \" + setList);\n return setList;\n }", "private AutomatonFromTable automatonFromTable() {\n \tAutomatonFromTable hypothesis = new AutomatonFromTable(inputs);\n\t\t/*\n\t\t * Number of new states in the hypothesis is the \n\t\t * number of distinct rows in the upper half of the observation table\n\t\t */\n\t\tint noOfNewStates = -1;\n\t\tList<List<String>> distinctStates = new ArrayList<>();\n\t\tIterator<Entry<String, List<String>>> it = observationTableUpper.entrySet().iterator();\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tdistinctStates.add(entry.getValue());\n\t\t}\n\t\tnoOfNewStates = new HashSet<>(distinctStates).size();\n\t\t//Adding those many number of states\n\t\tfor(int i=0;i<noOfNewStates;i++){\n\t\t\tif(i==0){\n\t\t\t\thypothesis.addInitialState();\n\t\t\t}else{\n\t\t\t\thypothesis.addState();\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No.of new states \"+noOfNewStates);\n\t\t\n\t\t\n\t\tList<Transition> prefixStateMap = new ArrayList<>();\n\t\t\n\t\t//Adding the transitions for those states\n\t\tit = observationTableUpper.entrySet().iterator();\n\t\tSystem.out.println(\"Upper table size \"+observationTableUpper);\n\t\tint currentMaxState = 0;\n\t\twhile(it.hasNext()){\n\t\t\tMap.Entry<String, List<String>> entry = (Map.Entry<String, List<String>>)it.next();\n\t\t\tString prefix = entry.getKey();\n\t\t\tList<String> results = entry.getValue();\n\t\t\tint currentState = getCurrentState(prefix, prefixStateMap);\n\t\t\tSystem.out.println(\"Current State \"+currentState);\n\t\t\tint nextState;\n\t\t\tif(prefix.contains(\"<>\")){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else if((nextState = checkErrorState(prefix, prefixStateMap))!=-1){\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tfor(int i=0;i<results.size();i=i+2){\n\t\t\t\t\tif(!results.get(i+1).equals(\"-\")){\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Check for two start calls and make sure they end up on the same state.\n\t\t\t\t\t\t * This is Media Player specific and might need to be changed \n\t\t\t\t\t\t * add for conditional checks for other examples. \n\t\t\t\t\t\t * For Android Media Player, calling start after the first call to start\n\t\t\t\t\t\t * doesn't lead to a transition to a new state. So that needs to be specifically handled.\n\t\t\t\t\t\t */\n\t\t\t\t\t\tboolean exceptionCase = false;\n\t\t\t\t\t\tif(prefix.contains(\"$\")){\n\t\t\t\t\t\t\tint lastIndex = prefix.lastIndexOf(\"$\");\n\t\t\t\t\t\t\tString lastCall = prefix.substring(lastIndex+1, prefix.length()-1);\n\t\t\t\t\t\t\tif(lastCall.contains(\"start()\") && results.get(i).contains(\"start()\")){\n\t\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t\t\texceptionCase = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}if(!exceptionCase){\n\t\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\t\tint result = checkErrorState(\"<\"+results.get(i)+\",\"+results.get(i+1)+\">\", prefixStateMap);\n\t\t\t\t\t\t\tif(result!=-1){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Error state is: \"+result);\n\t\t\t\t\t\t\t\tnextState = result;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tnextState = ++currentMaxState;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnextState = currentState;\n\t\t\t\t\t\tTransition transitionDetails = new Transition();\n\t\t\t\t\t\ttransitionDetails.setPrefix(prefix);\n\t\t\t\t\t\ttransitionDetails.setInput(results.get(i));\n\t\t\t\t\t\ttransitionDetails.setOutput(results.get(i+1));\n\t\t\t\t\t\ttransitionDetails.setCurrentState(currentState);\n\t\t\t\t\t\ttransitionDetails.setNextState(nextState);\n\t\t\t\t\t\tprefixStateMap.add(transitionDetails);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*\n\t\t * Add all the final transitions to the automaton object\n\t\t */\n\t\tfor(Transition transition: prefixStateMap){\n\t\t\thypothesis.addTransition(transition);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Populate the Tree representation of the Automaton by doing a breadth-first search\n\t\t */\n\t\tint i = 0;\n\t\twhile(i<hypothesis.getNumberStates()){\n\t\t\tList<Transition> successorDetails = new ArrayList<>();\n\t\t\tfor(Transition transition: prefixStateMap){\n\t\t\t\tint startState = transition.getCurrentState();\n\t\t\t\tif(startState==i){\n\t\t\t\t\tsuccessorDetails.add(transition);\n\t\t\t\t\tautomatonTree.put(startState, successorDetails);\n\t\t\t\t}\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tSystem.out.println(automatonTree);\n\t\treturn hypothesis;\n\t}", "private DirectedGraph<State, UniqueEdge> getGraph() {\r\n \t\tDirectedGraph<State, UniqueEdge> graph = new DirectedMultigraph<State, UniqueEdge>(\r\n \t\t\t\tUniqueEdge.class);\r\n \t\tfor (State source : states.values()) {\r\n \t\t\tgraph.addVertex(source);\r\n \t\t\tint index = source.getIndex();\r\n \t\t\tTransition transition = transitions.get(index);\r\n \t\t\tList<NextStateInfo> nextState = transition.getNextStateInfo();\r\n \t\t\tfor (NextStateInfo info : nextState) {\r\n \t\t\t\tState target = info.getTargetState();\r\n \t\t\t\tgraph.addVertex(target);\r\n \t\t\t\tgraph.addEdge(source, target, new UniqueEdge(info.getAction()));\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\treturn graph;\r\n \t}", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "java.util.Map<java.lang.String, java.lang.String> getLabelsMap();", "public interface GameState {\n\n\t/**\n * Method used by a player in order to perform transfer of stones \n * @param pitId the identifier of the pit by which the player will start (the associated pit must belong to him) This is the only method that can change the state \n * @return map {@link Map Map.class} with (pitId,#stones) as entries\n */\n\tpublic Map<Integer, Integer> move(final int pitId);\n\t\n\t/**\n\t * @return the {@link GameStateEnum GameStateEnum.class} that corresponds to {@link GameState GameState.class} concretions\n\t */\n\tpublic GameStateEnum getStateEnum();\n}", "private List<String> calculatePeoplePerState(List<Person> population)\n\t{\t\t\n\t\tList<String> output = population\n\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t.collect(Collectors.groupingBy(Person::getState, Collectors.counting()))\n\t\t\t\t\t\t\t\t\t.entrySet().stream()\n\t\t\t\t\t\t\t\t\t.sorted( (s1,s2) -> {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Desc by Long, Asc by Key\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint r = -s1.getValue().compareTo(s2.getValue());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (r==0)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//return 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn s1.getKey().compareTo(s2.getKey());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn r;\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t)\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t .map(map-> map.getKey() + \",\" + map.getValue())\n\t\t\t\t\t\t\t\t .collect(Collectors.toList());\n\t\treturn output;\n\t}", "public Map<String, Object> getTransitiveBindings() {\n // Can't use ImmutableMap.Builder because it doesn't allow duplicates.\n LinkedHashMap<String, Object> env = new LinkedHashMap<>();\n env.putAll(Starlark.UNIVERSE);\n env.putAll(predeclared);\n env.putAll(globals);\n return env;\n }", "public Map<StateModelDefId, StateModelDefinition> getStateModelMap() {\n return _stateModelMap;\n }", "public ResultMap<Association> associations();", "Map<Class<?>, Object> yangAugmentedInfoMap();", "Map<Class<?>, Object> yangAugmentedInfoMap();", "public static Map<Integer, TaxCategory> ontario() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(5.05, 0, 44740); //Tax Category 1 for ON\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(9.15, 44740.01, 89482);//Tax Category 2 for ON\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(11.16, 89482.01, 150000);//Tax Category 3 for ON\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(12.16, 150000.01, 220000);//Tax Category 4 for ON\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(13.16, 220000.01, 10000000);//Tax Category 5 for ON\n\t\t\t\tcategories.put( 5, cat5 ); //puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "public Map<Diff<K>, Diff<V>> getMap() {\r\n return map;\r\n }", "org.landxml.schema.landXML11.StateType.Enum getState();", "Map<Element, Map<Element, Element>> getOperationMap();", "public static CCodeAdj2CTRYtype getCountryCode2CountryMap() {\n return countryCode2CountryMap;\n }", "public Map<V,Integer> inDegree () {\n Map<V,Integer> result = new HashMap<V,Integer>();\n for (V v: dag.keySet()) result.put(v, 0); // All in-degrees are 0. Will be updated later\n for (V from: dag.keySet()) {\n for (V to: dag.get(from)) {\n result.put(to, result.get(to) + 1); // Increment in-degree\n }\n }\n return result;\n }", "public static Map<Integer, TaxCategory> federal() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(15, 0, 49020); //Tax Category 1 for federal\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory( 20.5, 49020.01, 98040); //Tax Category 2 for federal\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(26, 98040.01, 151978); //Tax Category 3 for federal\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(29, 151978.01, 216511); //Tax Category 4 for federal\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(33, 216511.01, 10000000); //Tax Category 5 for federal\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "@Override\r\n\tpublic Set<Set<Entity>> getStructuralEquivalences()\r\n\t{\r\n\t\tStructurallyEquivalent<Entity, EntityGraphEdge> equivalent = new StructurallyEquivalent<Entity, EntityGraphEdge>();\r\n\t\tVertexPartition<Entity, EntityGraphEdge> vertexPartition = equivalent\r\n\t\t\t\t.transform(directedGraph);\r\n\r\n\t\treturn new HashSet<Set<Entity>>(vertexPartition.getVertexPartitions());\r\n\t}", "private ArrayListMultimap<PreferencesTab, Labeled> getPrefsTabLabelMap() {\n ArrayListMultimap<PreferencesTab, Labeled> prefsTabLabelMap = ArrayListMultimap.create();\n for (PreferencesTab preferencesTab : preferenceTabs) {\n Node builder = preferencesTab.getBuilder();\n if (builder instanceof Parent) {\n Parent parentBuilder = (Parent) builder;\n scanLabeledControls(parentBuilder, prefsTabLabelMap, preferencesTab);\n }\n }\n return prefsTabLabelMap;\n }", "public Map<Move, List<MachineState>> getNextStates(MachineState state, Role role) throws MoveDefinitionException, TransitionDefinitionException, StateMachineException\n {\n Map<Move, List<MachineState>> nextStates = new HashMap<Move, List<MachineState>>();\n Map<Role, Integer> roleIndices = getRoleIndices();\n for (List<Move> moves : getLegalJointMoves(state)) {\n Move move = moves.get(roleIndices.get(role));\n if (!nextStates.containsKey(move)) {\n nextStates.put(move, new ArrayList<MachineState>());\n }\n nextStates.get(move).add(getNextState(state, moves));\n }\n\n return nextStates;\n }", "Graph<Integer, DefaultEdge> buildMap();", "List<Concept2OntClassMapping> lookupConcept2OntClassMappingPairs(Concept concept);", "public Map<Integer, List<CellEntry>> buildShipMap() {\n Map<Integer, List<CellEntry>> shipCellMap = new HashMap<>();\n for (int i = 0; i < BOARD_CELL_NUM_PER_SIDE; i++) {\n for (int j = 0; j < BOARD_CELL_NUM_PER_SIDE; j++) {\n Cell cell = getCell(i, j);\n if (cell.getShipIndex() != -1) {\n int shipIndex = cell.getShipIndex();\n if (!shipCellMap.containsKey(shipIndex)) {\n shipCellMap.put(shipIndex, new ArrayList<>());\n }\n\n CellEntry cellEntry = new CellEntry(cell.getIndex(), cell.getShipIndex());\n shipCellMap.get(shipIndex).add(cellEntry);\n }\n }\n }\n return shipCellMap;\n }", "@Override\n public String toString ()\n {\n StringBuffer buffer = new StringBuffer();\n for (State value : stateMap.values()) {\n buffer.append(value.toString());\n buffer.append(\"\\n\");\n }\n return buffer.toString();\n }", "protected void buildHashMapForAssociationClasses(Package pack)\n {\n\n for (Iterator elementIter = pack.GetElements().iterator();elementIter.hasNext();)\n {\n Element element = (Element)elementIter.next();\n // Check the validity of the class\n checkElement(element);\n\n /////////////////////////////////\n // A numeric subtype qualifies the Type of the main element. For Class: 1 = Parameterised, 2 = Instantiated, 3 = Both, 0 = Neither, 17 = Association Class\n // If 17, because an Association Class has been created through the user interface, MiscData(3) will contain the ID of the related Association.\n // http://www.sparxsystems.com/uml_tool_guide/sdk_for_enterprise_architect/element2.htm\n /////////////////////////////////\n if(element.GetSubtype() == 17)\n {\n _hashMapForAssociationClasses.put(EAConnection.getInstance().getRepository().GetConnectorByID(Integer.parseInt(element.MiscData(3))).GetConnectorGUID(), element.GetElementGUID());\n }\n }\n for (Iterator packageIter = pack.GetPackages().iterator();packageIter.hasNext();)\n {\n Package subPackage = (Package)packageIter.next();\n buildHashMapForAssociationClasses(subPackage);\n }\n }", "public static Map<Integer, TaxCategory> britishColumbia() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(5.06, 0, 42184.00); // Tax Category 1 for BC\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(7.70, 42184.01, 84369.00); // Tax Category 2 for BC\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(10.50, 84369.01, 96866.00); // Tax Category 3 for BC\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(12.29, 96866.01, 117623.00); // Tax Category 4 for BC\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(14.70, 117623.01, 159483.00); // Tax Category 5 for BC\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\t\t\t\tTaxCategory cat6 = new TaxCategory(16.80, 159483.01, 222420.00); // Tax Category 6 for BC\n\t\t\t\tcategories.put( 6, cat6 );//puts both the key and the Taxcategory(value) into the hashmap for category 6\n\t\t\t\tTaxCategory cat7 = new TaxCategory(20.50, 222420.01, 10000000); // Tax Category 7 for BC\n\t\t\t\tcategories.put( 7, cat7 );//puts both the key and the Taxcategory(value) into the hashmap for category 7\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "public ArrayList genStates2(){\n ArrayList states = new ArrayList(44);\n List<String> notes = new ArrayList<String>(Arrays.asList(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\",\"G\",\"H\",\"I\",\"J\",\"K\"));\n List<String> beat = new ArrayList<String>(Arrays.asList(\"1\",\"2\",\"3\",\"4\"));\n //List<String> dot = new ArrayList<String>(Arrays.asList(\"1\",\"0\"));\n for(String s : notes){\n for(String d : beat){\n //for(int d = 0; d<=1; d++){\n String state = \"\"; \n state += s;\n state += d;\n //state += dot.get(d);\n states.add(state);\n //}\n }\n }\n return states;\n }", "private Map<S, List<Node<S>>> getAllOccurrences() {\n List<P> productions = slp.getOrderedProductions();\n Map<S, List<Node<S>>> predecessorMap = new HashMap<>();\n slp.getProductions().stream().map(p -> p.getLeft()).forEach(symbol -> predecessorMap.put(symbol, new ArrayList<>()));\n\n // gather all occurrence\n productions.stream()\n .map(rule -> rule.getRight())\n .flatMap(word -> word.nodeStream())\n .filter(node -> !node.getElement().isTerminal())\n .forEach(node -> predecessorMap.get(node.getElement()).add(node));\n\n return predecessorMap;\n }", "public static Map<Integer, TaxCategory> alberta() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10, 0, 131220); // Tax Category 1 for Alberta\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12,131220.01, 157464); // Tax Category 2 for Alberta\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13, 157464.01, 209952); // Tax Category 3 for Alberta\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(14, 209952.01, 314928); // Tax Category 4 for Alberta\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(15, 314928.01, 10000000); // Tax Category 5 for Alberta\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "synchronized public Map<String, Set<String>> getTypes() {\n return Collections.unmodifiableMap(\n new HashSet<>(types.entrySet()).stream()\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> Collections.unmodifiableSet(new HashSet<>(e.getValue()))\n ))\n );\n }" ]
[ "0.6489417", "0.55426955", "0.54862475", "0.5456914", "0.5398148", "0.5376033", "0.5345036", "0.52222383", "0.5211264", "0.51690775", "0.5133972", "0.51196885", "0.51023746", "0.5089397", "0.50689167", "0.50538987", "0.5044517", "0.50303596", "0.5029872", "0.500973", "0.5002991", "0.4993025", "0.4975401", "0.4974008", "0.49590427", "0.49515173", "0.495043", "0.49489284", "0.49428678", "0.49390626", "0.49182883", "0.49125302", "0.4893547", "0.4891865", "0.4890816", "0.48842034", "0.4875478", "0.48394224", "0.48013553", "0.4798918", "0.4798336", "0.47812235", "0.4778918", "0.47664788", "0.47529852", "0.4744119", "0.4738123", "0.47273722", "0.47256207", "0.4724846", "0.47218266", "0.47162038", "0.4714701", "0.47110635", "0.4708748", "0.4708015", "0.4704664", "0.4702306", "0.4700697", "0.46955705", "0.46945524", "0.46920118", "0.46907303", "0.4688486", "0.4680649", "0.46676138", "0.46555", "0.46474752", "0.4647127", "0.46409777", "0.46409777", "0.46409777", "0.46409777", "0.46380505", "0.46226412", "0.46223408", "0.46115425", "0.46108443", "0.4609819", "0.4609819", "0.4609163", "0.45962423", "0.45928022", "0.4591933", "0.45876223", "0.4582131", "0.45754033", "0.4574662", "0.45719057", "0.4568341", "0.45552072", "0.4551694", "0.4551617", "0.45485973", "0.4544373", "0.4541504", "0.4538221", "0.4537679", "0.45297775", "0.45163038" ]
0.739733
0
Returns true if and only if input belongs to this machine's language.
@Override public boolean compute(String input) { State state = this.initialState; for (int i = 0; i < input.length(); ++i) { state = this.transitionFunction().applyTo(state, Character.valueOf(input.charAt(i))); } return this.acceptingStates.contains(state); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasLanguage();", "public boolean isSetLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANG$28) != null;\n }\n }", "boolean hasLanguageConstant();", "default boolean hasLanguage(@NotNull Language language) {\n return getLanguages().contains(language);\n }", "protected boolean isLanguage( String word )\r\n\t{\r\n\t\treturn m_listLanguage.contains(word);\r\n\t}", "public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }", "public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }", "public boolean isSetLanguage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(LANGUAGE$14) != null;\n }\n }", "public boolean isSetLang() {\n\t\treturn this.lang != null;\n\t}", "public boolean isSetLang() {\n\t\treturn this.lang != null;\n\t}", "protected boolean isAvailableForLanguage(Language language){\n return true;\n }", "public boolean isLanguageSaved(){\n return sharedPreferences.contains(PRIMARY_LANGUAGE) && sharedPreferences.contains(SECONDARY_LANGUAGE);\n }", "public boolean hasLanguage() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "boolean hasI18();", "public boolean isSetOriginal_language() {\n return this.original_language != null;\n }", "boolean hasLocale();", "@JsonIgnore\n public boolean isWelshLanguageRequested() {\n Optional<String> languageValue = Optional.ofNullable(languageRequirement);\n if (languageValue.isEmpty()) {\n return false;\n }\n return languageValue.get().equals(\"Yes\");\n }", "public boolean isSetXmlLang()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(XMLLANG$26) != null;\n }\n }", "@java.lang.Override\n public boolean hasLanguage() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public boolean isTranslateAble() {\n \treturn model.isTranslateAble();\n }", "static boolean isEnglishWord(String str) {\r\n return localDictionary.contains(str);\r\n }", "protected boolean isCommand(String string) {\n\t\treturn myLanguages.containsKey(string);\n\t}", "public boolean isSetInputEncoding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(INPUTENCODING$16) != null;\n }\n }", "boolean hasOutputPartialsBeforeLanguageDecision();", "boolean hasMachineType();", "public boolean allElementsInEng() {\n if (!allMenuCommandsInLang(\"Eng\")) return false;\n return true;\n }", "public boolean isBaseLanguage() {\n\t\treturn false;\r\n\t}", "public boolean isAccepted1(String word) {\r\n\t return (tranzition_extended(word)==3) ;\r\n\r\n }", "public boolean isInDictionary(String word, Language language) {\n if (isInDictionaryWithLabelAskQuery(word, language)) return true;\n else return isInDictionaryWithAltLabelAskQuery(word, language);\n }", "boolean hasSemanticLangidParams();", "public static Boolean checkLangTtf(String localeCode) {\n if (MyApplication.getTtf() != null) {\n Locale locale = new Locale(localeCode);\n int result = MyApplication.getTtf().setLanguage(locale);\n return !(result == MyApplication.getTtf().LANG_MISSING_DATA || result == MyApplication.getTtf().LANG_NOT_SUPPORTED);\n }\n return false;\n }", "boolean hasSemanticLangidModelName();", "public static boolean canTranslate(String unlocalizedString) {\n\t\tif (I18n.hasKey(unlocalizedString))\n\t\t\treturn true;\n\t\telse {\n\t\t\tif (UNLOCALIZED_STRINGS.size() < 100 && !UNLOCALIZED_STRINGS.contains(unlocalizedString))\n\t\t\t\tUNLOCALIZED_STRINGS.add(unlocalizedString);\n\t\t\treturn false;\n\t\t}\n\t}", "boolean hasValueLanguageId();", "private boolean conversationChecker(String currentInput)\n\t{\n\t\tboolean hasConversation = false;\n\n\t\tfor (String currentPhrase : basicConversations)\n\t\t{\n\t\t\tif (currentPhrase.equals(currentInput))\n\t\t\t{\n\t\t\t\thasConversation = true;\n\t\t\t}\n\t\t}\n\t\treturn hasConversation;\n\t}", "public static boolean tlcTranslation() {\n \treturn PcalParams.SpecOption || PcalParams.MyspecOption || PcalParams.Spec2Option\n || PcalParams.Myspec2Option;\n }", "public boolean accepts(String word) {\n List<Character> chars = word.chars().mapToObj(it -> (char) it).collect(Collectors.toList());\n return this.initialState.traverse(chars);\n }", "public static boolean isLangRTL(String lang) {\n return Arrays.binarySearch(RTL_LANGS, lang, null) >= 0;\n }", "public static boolean isEnvironMachineName(String name,\r\n\t\t\tIL1TranslationManager translationManager) {\r\n\t\t\r\n\t\tif(translationManager.getEnvironMachineNames().contains(name)){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "boolean hasIsInputTo();", "public boolean isInputPortEngaged(String terminal) {\n\t\treturn inputportTerminals.contains(terminal);\n\n\t}", "public boolean isSetEngName() {\n return this.engName != null;\n }", "public Boolean inputIsUniversity() {\n return trainingSystem;\n }", "boolean hasWord();", "boolean isAnyLanguageSupported(List<Locale.LanguageRange> languageRanges) {\n return mLanguageIndependent || Locale.lookup(languageRanges, mSupportedLocales) != null;\n }", "public boolean hasUnicodeRepresentation();", "public int isLanguageAvailable(String lang, String country, String variant) {\n return mSelf.isLanguageAvailable(lang, country, variant);\n }", "public boolean isInDictionary(String word) {\n return isInDictionary(word, Language.ENGLISH);\n }", "public boolean isInput() {\n return input;\n }", "boolean hasGrammarList();", "public boolean hasValueLanguageId() {\n return valueLanguageId_ != null;\n }", "public boolean isSetLemma() {\n return this.lemma != null;\n }", "public boolean canBeFrom(String label);", "public boolean isActivationString(String word);", "private boolean isRTLLanguage() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1){\n return false;\n }\n Configuration config = getResources().getConfiguration();\n return config.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL;\n }", "public boolean hasLower(){\n return (alg.hasLower(input.getText().toString()));\n }", "public final boolean pluginUsesTranslator() {\r\n\t\treturn this.usesTranslation;\r\n\t}", "private void ensureLanguageIsDefined() {\n SharedPreferences sharedPref;\n SharedPreferences.Editor editor;\n sharedPref = getSharedPreferences(\"LlPreferences\", Context.MODE_PRIVATE);\n if (sharedPref.getBoolean(\"app_need_lang_def\", true) == true) {\n startActivity(chooseLanguageIntent);\n }\n }", "public boolean isSetOutputEncoding()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(OUTPUTENCODING$18) != null;\n }\n }", "public boolean lexemaEs(String l){\n\t\treturn lexema.equals(l);\n\t}", "public boolean isSetSpoken_languages() {\n return this.spoken_languages != null;\n }", "public boolean enableLocaleOverride( ) {\n\t\ttry {\n\t\t\tURIBuilder builder = new URIBuilder( I18N_URL );\n\t\t\tbuilder.addParameter( \"locale\", \"en_US\" );\n\t\t\tHttpGet get = new HttpGet( builder.build( ).toURL( ).toString( ) );\n\t\t\tString result = EntityUtils.toString( this.httpClient( ).execute( get ).getEntity( ) ).trim( );\n\t\t\treturn result.contains(\"Succeeded\" );\n\t\t} catch( Exception e ) {\n\t\t\tthrow new FitbitExecutionException( e );\n\t\t}\n\t}", "public abstract boolean isIdentifier(@Nullable String text, LanguageLevel languageLevel);", "public boolean isInLanguage(ContextFreeGrammar cfg, Word w) {\n\t\tint n = w.length();\n\n\t\tif (n != 0) {\n\t\t\t//instentiating the max derivative steps to comply with CNF steps\n\t\t\tint numberOfSteps = ((2 * n) - 1);\n\t\t\t//creatin a list to store the rules and variables\n\t\t\tList<Word> listToCheck = new ArrayList<>();\n\t\t\tlistToCheck.add(new Word(cfg.getRules().get(0).getVariable()));\n\t\t\t//iterating throught until the loop is less than the numberOfSteps\n\t\t\tfor (int i = 0; i < numberOfSteps; i++) {\n\t\t\t\tList<Word> tempList = new ArrayList<>();\n\t\t\t\tfor (Word tempWord : listToCheck) {\n\t\t\t\t\tint tempWordLength = tempWord.length();\n\t\t\t\t\t//if there are no variables boolien to establish break or continue\n\t\t\t\t\tboolean wordAllTerminal = wordAllTerminals(tempWord);\n\t\t\t\t\t//while we have variables\n\t\t\t\t\tif (!wordAllTerminal) {\n\t\t\t\t\t\tfor (int j = 0; j < tempWordLength; j++) {\n\t\t\t\t\t\t\t//once we replaced all variables with terminasl\n\t\t\t\t\t\t\tif (tempWord.get(j).isTerminal()) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t//interating through all the rules within cfg\n\t\t\t\t\t\t\t\tfor (Rule rule : cfg.getRules()) {\n\t\t\t\t\t\t\t\t\tif (tempWord.get(j).equals(rule.getVariable())) {\n\t\t\t\t\t\t\t\t\t\tif ((i < numberOfSteps / 2 && (!rule.getExpansion().isTerminal()))\n\t\t\t\t\t\t\t\t\t\t\t\t|| i >= numberOfSteps / 2 && (rule.getExpansion().isTerminal())) {\n\t\t\t\t\t\t\t\t\t\t\tint expansionLength = rule.getExpansion().length();\n\t\t\t\t\t\t\t\t\t\t\tList<Symbol> tempWordSymbolList = new ArrayList<>();\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k < j; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(tempWord.get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = 0; k < expansionLength; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(rule.getExpansion().get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tfor (int k = j + 1; k < tempWordLength; k++) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempWordSymbolList.add(tempWord.get(k));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tSymbol[] symbolArray = new Symbol[tempWordSymbolList.size()];\n\t\t\t\t\t\t\t\t\t\t\tfor (int l = 0; l < tempWordSymbolList.size(); l++) {\n\t\t\t\t\t\t\t\t\t\t\t\tsymbolArray[l] = tempWordSymbolList.get(l);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tWord newWord = new Word(symbolArray);\n\t\t\t\t\t\t\t\t\t\t\tif (expansionLength != 0) {\n\t\t\t\t\t\t\t\t\t\t\t\ttempList.add(newWord);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlistToCheck = tempList;\n\t\t\t\tSystem.out.println(\"Derivation step \" + (i+1) + \":\" + tempList);\n\t\t\t}\n\t\t\tSystem.out.println(\"Possible combinations: \" + listToCheck);\n\t\t\tList<Word> tempListToCheck = new ArrayList<>();\n\t\t\tfor (Word wordToCheck : listToCheck) {\n\t\t\t\tif (wordAllTerminals(wordToCheck)) {\n\t\t\t\t\ttempListToCheck.add(wordToCheck);\n\t\t\t\t}\n\t\t\t}\n\t\t\tlistToCheck = tempListToCheck;\n\t\t\tfor (Word wordToCheck : listToCheck) {\n\t\t\t\tif (w.equals(wordToCheck)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tVariable start = cfg.getRules().get(0).getVariable();\n\t\t\tfor (Rule rule : cfg.getRules()) {\n\t\t\t\tif (rule.getVariable().equals(start)) {\n\t\t\t\t\tif (rule.getExpansion().equals(new Word(\"\")))\n\t\t\t\t\t\tSystem.out.println(\"Empty Match!\");\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean hasInputError(){\n\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\tboolean hasError = false;\n\t\t\n\t\tif( keyword.length() > 100 ) {\n\t\t\tcontext.addMessage( \"BuchSuchenForm:inputUser\", new FacesMessage( \"Schlüsselwort ist zu lang\"));\n\t\t\thasError = true;\n\t\t}\n\n\t\treturn hasError;\n\t}", "public boolean hasSpecial(){\n return (alg.containSpecial(input.getText().toString()));\n }", "public interface Language {\n\n /**\n * @return the language name\n */\n String getName();\n\n /**\n * @return the language display name, including the version if possible\n */\n String getDisplayName();\n\n /**\n * @return true if this language is active. Implementation can decide based on the runtime, for instance the\n * Groovy language can be inactive when the Groovy runtime is not available\n */\n boolean isActive();\n\n /**\n * @return the repl for this language, null should be returned when the language does not support the repl feature\n */\n Repl getRepl();\n\n /**\n * @return the compiler for this language, null should be returned when the language does not support the compilation feature\n */\n Compiler getCompiler();\n\n /**\n * Init session callback.\n *\n * @param session the initialized session\n */\n void init(ShellSession session);\n\n /**\n * Destroy session callback.\n *\n * @param session the destroyed session\n */\n void destroy(ShellSession session);\n\n}", "public boolean hasValueLanguageId() {\n return valueLanguageIdBuilder_ != null || valueLanguageId_ != null;\n }", "private boolean memeChecker(String currentInput)\n\t{\n\t\tboolean hasMeme = false;\n\t\t// loop over all items in it, and look for a meme.\n\n\t\tfor (String currentPhrase : myMemes)\n\t\t{\n\t\t\tif (currentPhrase.equals(currentInput))\n\t\t\t{\n\t\t\t\thasMeme = true;\n\t\t\t}\n\t\t}\n\t\treturn hasMeme;\n\t}", "public boolean isBitvectorTranslation() {\n\t\treturn mBitvectorTranslation;\n\t}", "boolean hasCountry();", "private boolean grammar() {\r\n return skip() && rules() && MARK(END_OF_TEXT) && EOT();\r\n }", "boolean getOutputPartialsBeforeLanguageDecision();", "CLanguage getClanguage();", "protected abstract boolean isInputValid(@NotNull ConversationContext context, @NotNull String input);", "public boolean accept(String word) {\n\t\t// Ceci n'est pas une implémentation !\n\t\treturn false;\n\t}", "@Override\n\tpublic Boolean isCorrect(){\n\t\t\n\t\tif (super.question instanceof TfQuestion){\n\t\t\tif(this.answer.equals(super.question.getAnswer())){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "boolean checkCourse (String course){\r\n // If the course either .net or c/c++ or java, then return true\r\n if (course.equalsIgnoreCase(\".net\") \r\n || course.equalsIgnoreCase(\"c/c++\") \r\n || course.equalsIgnoreCase(\"java\"))\r\n return true;\r\n // else if it's not neither, return false\r\n else return false;\r\n \r\n }", "boolean isDml();", "protected abstract boolean checkInput();", "@Override\n public boolean isMyLanguage(String str) {\n\n Map<Character, Double> strFTable = getStrFrequencyTable(str);\n Map<Character, Double> englishFTable = getEnglishFrequencyTable();\n\n double tableVariance = 0.0;\n\n for (char alphabet = 'a'; alphabet <= 'z'; alphabet++) {\n double variance = strFTable.get(alphabet) - englishFTable.get(alphabet);\n tableVariance += (Math.pow(variance, 2));\n }\n\n return tableVariance < THRESHOLD;\n }", "boolean hasCountryCode();", "boolean hasCountryCode();", "boolean isValid(String word);", "@Override\n public boolean equals(final Object obj) {\n if (obj instanceof Language) {\n return strings.equals(((Language)obj).strings);\n }\n return false;\n }", "private static boolean mayHaveNonStringTranslations(String dirName) {\n if (!dirName.contains(SdkConstants.RES_QUALIFIER_SEP)) {\n return true;\n }\n if (ResourceFolderType.getFolderType(dirName) != ResourceFolderType.VALUES) {\n return true;\n }\n FolderConfiguration config = FolderConfiguration.getConfigForFolder(dirName);\n // Conservatively say it's interesting if there is an unrecognized configuration.\n if (config == null) {\n return true;\n }\n // If this is a translation mixed with something else, consider it a translation directory.\n boolean hasTranslation = false;\n for (ResourceQualifier qualifier : config.getQualifiers()) {\n if (qualifier instanceof LocaleQualifier) {\n hasTranslation = true;\n }\n }\n return !hasTranslation;\n }", "public boolean is(char chIn) {\n for (char ch: allOps) {\n if (chIn == ch){\n return true;\n }\n }\n return false;\n }", "protected abstract boolean isInputValid();", "default boolean isFreeWord() {\n return meta(\"nlpcraft:nlp:freeword\");\n }", "private boolean isOperator(String input) {\n return new String(this.operator).contains(input);\n }", "private boolean canRecognizeSpeechInput() {\n final Activity activity = getActivity();\n if (activity != null) {\n final List<ResolveInfo> activities = activity.getPackageManager()\n .queryIntentActivities(new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH), 0);\n\n if (activities.size() > 0) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return false;\n }\n }", "boolean hasHadithText();", "@Override\n\tpublic boolean isInputPort() {\n\t\tif (getFlexoPort() != null) {\n\t\t\treturn getFlexoPort().isInPort();\n\t\t}\n\t\treturn false;\n\t}", "public boolean allElementsInRus() {\n if (!allMenuCommandsInLang(\"Rus\")) return false;\n Log.info(\"allElementsInRus: all elements are in Russian\");\n return true;\n }", "boolean hasTrainingDataType();", "@Override\r\n\t\t\tpublic boolean test(String t) {\n\t\t\t\treturn t.equalsIgnoreCase(\"JAVA\");\r\n\t\t\t}", "boolean hasExplicitLac();", "public boolean isSetEncoding() {\n return this.encoding != null;\n }", "private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }", "protected boolean stringToBoolean(String input) {\n if (input.equals(\"Y\")) {\n return true;\n }\n return false;\n }", "public boolean isContainedIn(String source) {\n return containsWord(source);\n }" ]
[ "0.76163286", "0.67707896", "0.6640312", "0.6608173", "0.65978396", "0.65370506", "0.65370506", "0.65370506", "0.63900584", "0.63900584", "0.63893163", "0.63794315", "0.6358474", "0.62792975", "0.6195757", "0.61642426", "0.6157914", "0.6141576", "0.59798294", "0.589818", "0.5873164", "0.58280957", "0.58164805", "0.57261866", "0.57125574", "0.5709382", "0.5706456", "0.5646703", "0.5572293", "0.5555169", "0.54757154", "0.5434885", "0.5430242", "0.54245514", "0.5371167", "0.53413755", "0.53350943", "0.53345853", "0.53222716", "0.5315294", "0.531403", "0.5310175", "0.5309664", "0.5298267", "0.52901727", "0.5244062", "0.5234416", "0.5233808", "0.52053493", "0.51976687", "0.51809406", "0.51723945", "0.5141889", "0.5140982", "0.5124121", "0.51092774", "0.5086716", "0.50517625", "0.5050788", "0.5042532", "0.50394726", "0.5033142", "0.5025306", "0.50204736", "0.5011877", "0.50103754", "0.5003864", "0.49993324", "0.49815762", "0.49697557", "0.4969004", "0.49681512", "0.49509057", "0.4944543", "0.49394247", "0.49214062", "0.49101153", "0.4906915", "0.49065262", "0.4904074", "0.49025887", "0.48888317", "0.48888317", "0.48799273", "0.48763338", "0.4876186", "0.4872522", "0.48678714", "0.48631713", "0.4863047", "0.4855062", "0.48549774", "0.48518103", "0.48459476", "0.48442212", "0.48419562", "0.48395565", "0.48220295", "0.4821876", "0.48167402", "0.48110434" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main_screen, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.68621665", "0.68621665", "0.68621665", "0.68515885", "0.68467957", "0.68194443", "0.6817494", "0.6813087", "0.6813087", "0.6812847", "0.6805774", "0.6801204", "0.6797914", "0.6791314", "0.6789091", "0.67883503", "0.6783642", "0.6759701", "0.6757412", "0.67478645", "0.6744127", "0.6744127", "0.67411774", "0.6740183", "0.6726017", "0.6723245", "0.67226785", "0.67226785", "0.67208904", "0.67113477", "0.67079866", "0.6704564", "0.6699229", "0.66989094", "0.6696622", "0.66952467", "0.66865396", "0.6683476", "0.6683476", "0.6682188", "0.6681209", "0.6678941", "0.66772443", "0.6667702", "0.66673946", "0.666246", "0.6657578", "0.6657578", "0.6657578", "0.6656586", "0.66544783", "0.66544783", "0.66544783", "0.66524047", "0.6651954", "0.6650132", "0.66487855", "0.6647077", "0.66467404", "0.6646615", "0.66464466", "0.66449624", "0.6644209", "0.6643461", "0.6643005", "0.66421187", "0.6638628", "0.6634786", "0.6633529", "0.6632049", "0.6632049", "0.6632049", "0.66315657", "0.6628954", "0.66281766", "0.6627182", "0.6626297", "0.6624309", "0.6619582", "0.6618876", "0.6618876" ]
0.0
-1
/ Intermediate tuple constructed by combining two tuples.
IntermediateTuple(Tuple t1, Tuple t2) { if(t1 instanceof BaseTuple) { baseTuples.add((BaseTuple) t1); } else { for(BaseTuple bt : ((IntermediateTuple) t1).baseTuples) { baseTuples.add(bt); } } if(t2 instanceof BaseTuple) { baseTuples.add((BaseTuple) t2); } else { for(BaseTuple bt : ((IntermediateTuple) t2).baseTuples) { baseTuples.add(bt); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static <R> Tuple<R> concat(Tuple<R> a, Tuple<R> b) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : a) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\tfor (R element : b) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "public static TupleDesc combine(TupleDesc td1, TupleDesc td2) {\n TupleDesc newTupleDesc = new TupleDesc(td1.numfields + td2.numfields);\n for (int i = 0; i < td1.numfields; i += 1) {\n newTupleDesc.setTypes(i, td1.getType(i));\n newTupleDesc.setAttrNames(i, td1.getFieldName(i));\n }\n for (int i = 0; i < td2.numfields; i += 1) {\n newTupleDesc.setTypes(i+td1.numfields, td2.getType(i));\n newTupleDesc.setAttrNames(i+td1.numfields, td2.getFieldName(i));\n }\n return newTupleDesc;\n }", "public Tuple append(Tuple... tuples) {\n Tuple result = new Tuple(this);\n\n for (Tuple tuple : tuples)\n result.addAll(tuple);\n\n return result;\n }", "TupleExpr createTupleExpr();", "public void merge(Tuple tup) {\n\t\t\n\t}", "TupleLiteralPart createTupleLiteralPart();", "Astro tuple(AstroArg args);", "TupleLiteralExp createTupleLiteralExp();", "public UnmodifiableTuple(F first, L last) {\r\n this.first = first;\r\n this.last = last;\r\n size = getSize(first, last);\r\n hashCode = hashCode();\r\n }", "<C, P> TupleLiteralPart<C, P> createTupleLiteralPart();", "public Join(Operator operator1, Operator operator2, TupleTransformation tupleTrans) {\n o1 = operator1;\n o2 = operator2;\n this.tupleTrans = tupleTrans;\n tuple1 = o1.next();\n }", "Tuple (L left, R right){\n\t\tthis.left=left;\n\t\tthis.right=right;\n\t}", "static Tuple wrap(Tuple init, long sign) throws ExecException {\n\t\tTuple tup = tf.newTuple(2);\n\t\ttup.set(0, init.get(0));\n\t\ttup.set(1, sign);\n\t\t\n\t\tDataBag bag = bf.newDefaultBag();\n\t\tbag.add(tup);\n\t\t\n\t\treturn tf.newTuple(bag);\n\t}", "Tuple (Atomic... elements) {\n for (Atomic element : elements) {\n add (element);\n }\n }", "<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();", "public Tuple unify(Tuple other) {\n\t\tSubstitution subst = UnionFindBasedUnifier.fromTerms(this.elts, other.elts);\n\t\tif (subst != null) {\n\t\t\treturn new Tuple(subst.apply(this.elts));\n\t\t}\n\t\treturn null;\n\t}", "public TwoTuple(T value1, K value2) {\n this.value1 = value1;\n this.value2 = value2;\n }", "public void merge(Tuple t) {\n // first coloumn, always going to be there\n Type first = t.getDesc().getType(0);\n Field a = t.getField(0);\n Field second = null;\n tupleList.add(t);\n if (gb) {\n // deal with aggregate and group by\n if (first.equals(Type.STRING)) {\n // now the second field is a string field\n second = new StringField(t.getField(0).toByteArray());\n Tuple newTuple = new Tuple(this.tdc);\n newTuple.setField(0, second);\n compareList.add(newTuple);\n\n } else {\n second = new IntField(t.getField(0).toByteArray());\n Tuple newTuple = new Tuple(this.tdc);\n newTuple.setField(0, second);\n if (!compareList.contains(newTuple)) {\n compareList.add(newTuple);\n }\n }\n }\n }", "public UnmodifiableTuple(Tuple<F, L> tuple) {\r\n this.first = tuple.getFirst();\r\n this.last = tuple.getLast();\r\n size = tuple.size();\r\n hashCode = tuple.hashCode();\r\n }", "private TupleDesc generateTupleDesc(){\n \tif(this.childTD == null){ //no tuples merged yet\n \t\t//return a general tupleDesc\n \t\treturn generalTupleDesc();\n \t} else {\n \t\t//generate a helpful, well-named TupleDesc\n \t\tType[] typeArr;\n \tString[] nameArr;\n \tString aggName = operator.toString() + \"(\" + childTD.getFieldName(aggField) + \")\";\n \tif(gbField == NO_GROUPING && gbFieldType == Type.INT_TYPE){\n \t\ttypeArr = new Type[]{Type.INT_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t}else if(gbField == NO_GROUPING){ //gbFieldType == Type.STRING_TYPE\n \t\ttypeArr = new Type[]{Type.STRING_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t} else {\n \t\ttypeArr = new Type[]{gbFieldType, Type.INT_TYPE};\n \t\tString groupName = \"group by(\" + childTD.getFieldName(gbField) + \")\";\n \t\tnameArr = new String[]{groupName, aggName};\n \t}\n \treturn new TupleDesc(typeArr, nameArr);\n \t}\n }", "private Tuple createTuple(Tuple tup) {\n\t\tTuple t = new Tuple(td);\n\t\tif (this.gbfieldtype == null) {\n\t\t\tt.setField(0, new IntField(1));\n\t\t} else {\n\t\t\tt.setField(0, tup.getField(gbfield));\n\t\t\tt.setField(1, new IntField(1));\n\t\t}\n\t\treturn t;\n\t}", "private Tuples() {}", "protected Tuple cleanTuple(Tuple result)\n {\n return result;\n }", "Tuple (){\n\t\tleft=null;\n\t\tright=null;\n\t}", "@Override\n public Tuple nonDistinctNext() {\n //function takes tuples from o2, merges them with t1 from o1 and\n //evaluates them, if it finds a fitting Tuple, returns the result of merge;\n while (tuple1 != null) {\n Tuple tuple2 = o2.nonDistinctNext();\n\n while (tuple2 != null) {\n Tuple result = tupleTrans.transform(new Tuple(tuple1, tuple2));\n if (result != null) {\n return result;\n }\n tuple2 = o2.nonDistinctNext();\n }\n\n //if o2 runs out of Tupes, new t1 is taken from o1 and o2 is reset\n tuple1 = o1.nonDistinctNext();\n o2.reset();\n }\n //if o1 runs out of tuples (t1 == null), the operator is at the end\n return null;\n }", "@SafeVarargs\n\tpublic static <R> Tuple<R> construct(R... data) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : data) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "public static void addTupleAsOneCell(List<Cell> result,\n Tuple tuple,\n TupleProjector tupleProjector,\n ImmutableBytesWritable ptr) {\n byte[] value =\n tupleProjector.getSchema().toBytes(tuple, tupleProjector.getExpressions(),\n tupleProjector.getValueBitSet(), ptr);\n Cell firstCell = result.get(0);\n Cell keyValue =\n PhoenixKeyValueUtil.newKeyValue(firstCell.getRowArray(),\n firstCell.getRowOffset(),firstCell.getRowLength(), VALUE_COLUMN_FAMILY,\n VALUE_COLUMN_QUALIFIER, firstCell.getTimestamp(), value, 0, value.length);\n result.add(keyValue);\n }", "@Override\n\t\t\tpublic String apply(Tuple2<String, String> zipped) {\n\t\t\t\treturn zipped._1 + zipped._2;\n\t\t\t}", "Concat createConcat();", "private static MultiItemTerminal toMultiItemTerminal(ByteBuffer... values)\n {\n return new Tuples.Value(values);\n }", "@io.reactivex.annotations.CheckReturnValue\n @io.reactivex.annotations.BackpressureSupport(io.reactivex.annotations.BackpressureKind.FULL)\n @org.jetbrains.annotations.NotNull\n @io.reactivex.annotations.SchedulerSupport(\"none\")\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static final <T, R, U> io.reactivex.Flowable<kotlin.Triple<T, R, U>> combineLatest(@org.jetbrains.annotations.NotNull io.reactivex.Flowable<T> r2, @org.jetbrains.annotations.NotNull io.reactivex.Flowable<R> r3, @org.jetbrains.annotations.NotNull io.reactivex.Flowable<U> r4) {\n /*\n java.lang.String r0 = \"$receiver\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n java.lang.String r0 = \"flowable1\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n java.lang.String r0 = \"flowable2\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r4, r0)\n org.a.b r2 = (org.a.b) r2\n org.a.b r3 = (org.a.b) r3\n org.a.b r4 = (org.a.b) r4\n io.reactivex.rxkotlin.FlowableKt$combineLatest$3 r0 = io.reactivex.rxkotlin.FlowableKt$combineLatest$3.INSTANCE\n kotlin.jvm.functions.Function3 r0 = (kotlin.jvm.functions.Function3) r0\n if (r0 == 0) goto L_0x0021\n io.reactivex.rxkotlin.FlowableKt$sam$io_reactivex_functions_Function3$0 r1 = new io.reactivex.rxkotlin.FlowableKt$sam$io_reactivex_functions_Function3$0\n r1.<init>(r0)\n r0 = r1\n L_0x0021:\n io.reactivex.functions.Function3 r0 = (io.reactivex.functions.Function3) r0\n io.reactivex.Flowable r2 = io.reactivex.Flowable.combineLatest(r2, r3, r4, r0)\n java.lang.String r3 = \"Flowable.combineLatest(t…le2, Function3(::Triple))\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r2, r3)\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.reactivex.rxkotlin.FlowableKt.combineLatest(io.reactivex.Flowable, io.reactivex.Flowable, io.reactivex.Flowable):io.reactivex.Flowable\");\n }", "public Tuple2() {\n }", "static TwoTuple<String,Integer> f() {\n return new TwoTuple<String,Integer>(\"hi\", 47);\n }", "public default <ANOTHER> StreamPlus<Tuple2<DATA, ANOTHER>> zipWith(Stream<ANOTHER> anotherStream) {\n return zipWith(anotherStream, RequireBoth, Tuple2::of);\n }", "public Tuple(Loyalty... c)\r\n\t\t{\r\n\t\t\tsuper(Arrays.asList(c));\r\n\t\t}", "private Register[] createJoinResult(Register[] left, Register[] right) {\n Register[] result = new Register[left.length + right.length - 1]; // -1 because of joining key\n\n int pos = 0;\n for (int i = 0; i < left.length; i++) {\n result[pos++] = left[i];\n }\n\n for (int i = 0; i < right.length; i++) {\n if (i != rightJoinAttributeIndex) {\n result[pos++] = right[i];\n }\n }\n\n return result;\n }", "public static <A, B> Pair<A, B> of(final @Nullable A first, final @Nullable B second) {\n return new Pair<A, B>(first, second);\n }", "public abstract T getTuple(Record record);", "@Override\r\n public XmlTuple createTaskTuple(int taskid){\r\n XmlTuple task = new XmlTupleService();\r\n String taskstr = null;\r\n FedTaskTuple tasktuple = new FedTaskTuple();\r\n //taskstr = tasktuple.setTaskStr(taskid, masterNetName, value);\r\n List curPara = new ArrayList();\r\n synchronized(lock){\r\n curPara = paramList.get(taskid); \r\n }\r\n //System.out.println(\"createTaskTuple: \"+((Integer)curPara.get(0)).intValue()+\" \"+curPara.get(1).toString()+\" \"+ curPara.get(2).toString() +\" \"+curPara.get(3).toString()\r\n // +\" \"+(Double)curPara.get(4)+\" \"+((Double)curPara.get(5)).doubleValue() + curPara.get(6).toString()+curPara.get(7).toString()+(Long)curPara.get(8));\r\n taskstr = tasktuple.setTaskStr(taskid, masterNetName, \r\n ((Integer)curPara.get(0)).intValue(), curPara.get(1).toString(), curPara.get(2).toString(), curPara.get(3).toString(), \r\n curPara.get(4).toString(), curPara.get(5).toString(), curPara.get(6).toString(),curPara.get(7).toString(), (Long)curPara.get(8));\r\n //System.out.println(\"createTaskTuple: \" +taskstr);\r\n //taskstr = tasktuple.setTaskStr(taskid, masterNetName, _optID,tupleTag,taskType,destIP,cost,benefit);\r\n task.createXMLtuple(taskstr);\r\n \r\n return task;\r\n }", "public <T4> Promise<Tuple4<T1, T2, T3, T4>> andLast(final ASupplier<T4> otherAction) {\n return and(otherAction).toTuple();\n }", "public static <U, V> Pair<U, V> of(U a, V b) {\n\t\t\t// calls private constructor\n\t\t\treturn new Pair<>(a, b);\n\t\t}", "public abstract T getTuple(int aPosition);", "@Override\n public Tuple3<Long, Double, Double> add(Tuple3<Long, Double, Double> tuple, Tuple3<Long, Double, Double> acc) {\n acc.f0 = tuple.f0;\n acc.f1 += tuple.f1;\n acc.f2 += tuple.f2;\n return acc;\n }", "public Pair(final @Nullable A first, final @Nullable B second) {\n this.first = first;\n this.second = second;\n }", "@Test\n\tpublic void testADSBTupleBuilder2() {\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.ADSB_2D);\n\t\t\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(ADS_B_3);\n\t\tfinal Tuple tuple2 = tupleBuilder.buildTuple(ADS_B_2);\n\t\tfinal Tuple tuple3 = tupleBuilder.buildTuple(ADS_B_1);\n\t\tfinal Tuple tuple4 = tupleBuilder.buildTuple(ADS_B_3);\n\n\t\tAssert.assertNull(tuple1);\n\t\tAssert.assertNull(tuple2);\n\t\tAssert.assertNull(tuple3);\n\t\tAssert.assertNotNull(tuple4);\n\t}", "@io.reactivex.annotations.CheckReturnValue\n @io.reactivex.annotations.BackpressureSupport(io.reactivex.annotations.BackpressureKind.FULL)\n @org.jetbrains.annotations.NotNull\n @io.reactivex.annotations.SchedulerSupport(\"none\")\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static final <T, R> io.reactivex.Flowable<kotlin.Pair<T, R>> combineLatest(@org.jetbrains.annotations.NotNull io.reactivex.Flowable<T> r2, @org.jetbrains.annotations.NotNull io.reactivex.Flowable<R> r3) {\n /*\n java.lang.String r0 = \"$receiver\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r2, r0)\n java.lang.String r0 = \"flowable\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n org.a.b r2 = (org.a.b) r2\n org.a.b r3 = (org.a.b) r3\n io.reactivex.rxkotlin.FlowableKt$combineLatest$2 r0 = io.reactivex.rxkotlin.FlowableKt$combineLatest$2.INSTANCE\n kotlin.jvm.functions.Function2 r0 = (kotlin.jvm.functions.Function2) r0\n if (r0 == 0) goto L_0x001a\n io.reactivex.rxkotlin.FlowableKt$sam$io_reactivex_functions_BiFunction$0 r1 = new io.reactivex.rxkotlin.FlowableKt$sam$io_reactivex_functions_BiFunction$0\n r1.<init>(r0)\n r0 = r1\n L_0x001a:\n io.reactivex.functions.BiFunction r0 = (io.reactivex.functions.BiFunction) r0\n io.reactivex.Flowable r2 = io.reactivex.Flowable.combineLatest((org.a.b<? extends T1>) r2, (org.a.b<? extends T2>) r3, (io.reactivex.functions.BiFunction<? super T1, ? super T2, ? extends R>) r0)\n java.lang.String r3 = \"Flowable.combineLatest(t…able, BiFunction(::Pair))\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r2, r3)\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.reactivex.rxkotlin.FlowableKt.combineLatest(io.reactivex.Flowable, io.reactivex.Flowable):io.reactivex.Flowable\");\n }", "@Override\n public BinaryOperator<TradeAccumulator> combiner() {\n return (accum1, accum2) -> {return accum1.addAll(accum2);};\n }", "public Tuple getNextTuple() throws IOException {\n if (done)\n return null;\n /** splits the program based on the type of join with default case being antijoin*/\n switch(joinType) {\n case INNER:\n /** This statement and variants for other joins will only execute the first\n * time the method is called. The statement moves to the first tuple from\n * the left child if such a tuple exists.*/\n if (leftTuple == null) {\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return null;\n }\n }\n /** gets tuples from helper methods and returns them*/\n while (getInner())\n if (canJoinTuples())\n return joinTuples(leftTuple, rightTuple);\n break;\n case LEFT_OUTER:\n if (leftTuple == null) {\n leftTuple = leftChild.getNextTuple();\n if (leftTuple == null) {\n done = true;\n return null;\n }\n }\n while (getLeftOuter()) {\n if (canJoinTuples()) {\n /** if a tuple was found to join the current left tuple, set the state\n * varaible to true.*/\n found = true;\n return joinTuples(leftTuple, rightTuple);\n }\n /** this statement executes if the current left tuple was not joined with any\n * tuple from the right child. Then it is null padded and returned.\n */\n else if (rightTuple == nullPad) {\n found = false;\n return joinTuples(leftTuple, rightTuple);\n }\n }\n break;\n case RIGHT_OUTER:\n /** This section works exactly as the LeftOuter section with tuples reversed*/\n if (rightTuple == null) {\n rightTuple = rightChild.getNextTuple();\n if (rightTuple == null) {\n done = true;\n return null;\n }\n }\n while (getRightOuter()) {\n if (canJoinTuples()) {\n found = true;\n return joinTuples(leftTuple, rightTuple);\n } else if (leftTuple == nullPad) {\n found = false;\n return joinTuples(leftTuple, rightTuple);\n }\n }\n break;\n case SEMIJOIN:\n /** this this method, when called, will immediately proceed to the next tuple on\n * the left child (as the previous call to this method will have returned\n * the current tuple and semi join does not return multisets.\n */\n while (leftChild.getNextTuple() != null) {\n leftTuple = leftChild.getNextTuple();\n /** restarts the right child to check for matching tuples*/\n rightChild.initialize();\n while (rightChild.getNextTuple() != null) {\n rightTuple = rightChild.getNextTuple();\n /** if there is a possible join, return the left tuple*/\n if (canJoinTuples())\n return leftTuple;\n }\n }\n break;\n default:\n /** this will execute if the join is an anitjoin*/\n while (leftChild.getNextTuple() != null) {\n /** state variable represents if the current tuple can join from any tuple in right child.*/\n found = false;\n leftTuple = leftChild.getNextTuple();\n rightChild.initialize();\n while (rightChild.getNextTuple() != null) {\n rightTuple = rightChild.getNextTuple();\n if (canJoinTuples())\n found = true;\n }\n if (!found)\n return leftTuple;\n }\n done = true;\n break;\n }\n return null;\n }", "private static Edge seq(Edge first, Edge second, Edge... rest) {\n // This already rejects epsilon edges.\n Edge edge = Edge.concatenation(first, second);\n for (Edge e : rest) {\n edge = Edge.concatenation(edge, e);\n }\n return edge;\n }", "@Override\r\n\tpublic Tuple getNextTuple() {\r\n\t\tTuple t = next;\r\n\t\tTuple tempNext = next;\r\n\t\twhile (tempNext != null && tempNext.sameAs(t))\r\n\t\t\ttempNext = child.getNextTuple();\r\n\t\tnext = tempNext;\r\n\t\treturn t;\r\n\t}", "public <T3> Promise<Tuple3<T1, T2, T3>> andLast(final ASupplier<T3> otherAction) {\n return and(otherAction).toTuple();\n }", "TupleTypeRule createTupleTypeRule();", "org.apache.xmlbeans.XmlInt xgetCombine();", "private Combined() {}", "public Relation project(Tuple t) throws RelationException;", "int[] concat(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n st[0] = s1;\r\n\t\tst[1] = t2;\r\n\t\t\r\n\t\taddEdge(t1, epssymbol, s2);\r\n\t\t\r\n\t\treturn st;\r\n\t}", "@Override\n\t\tpublic Tuple exec(Tuple input) throws IOException {\n\t\t\tfor (Tuple t : (DataBag) input.get(0)) {\n\t\t\t\treturn wrap(t, getSign());\t\n\t\t\t}\n\t\t\t// Odd.\n\t\t\treturn tf.newTuple(bf.newDefaultBag());\n\t\t}", "protected Pair<JilExpr,List<JilStmt>> doStringConcat(Expr.BinOp bop){\n \t\tString builderLab = \"$builder\" + stringbuilder_label++;\r\n \t\tPair<JilExpr,List<JilStmt>> lhs = doExpression(bop.lhs());\r\n \t\tPair<JilExpr,List<JilStmt>> rhs = doExpression(bop.rhs());\r\n \t\t\r\n \t\tList<JilStmt> stmts = lhs.second();\r\n \t\tstmts.addAll(lhs.second());\r\n \t\tstmts.addAll(rhs.second());\r\n \t\t\r\n \t\tType.Clazz builder = new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\"StringBuilder\");\r\n \t\t\t\t\t\t\r\n \t\tstmts.add(new JilStmt.Assign(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\tnew JilExpr.New(builder, new ArrayList<JilExpr>(),\r\n \t\t\t\t\t\tnew Type.Function(T_VOID), bop.attributes())));\t\t\t\t\t\r\n \t\t\r\n \t\tType lhs_t = lhs.first().type(); \r\n \t\tif(lhs_t instanceof Type.Primitive || isString(lhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), lhs.first().type()), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\")));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(lhs.first());\r\n \t\t\tstmts.add(new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"),\r\n \t\t\t\t\tJAVA_LANG_OBJECT), new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\")));\t\r\n \t\t}\r\n \r\n \t\t// Now, do the right hand side\r\n \t\tJilExpr r;\r\n \t\tType rhs_t = rhs.first().type(); \r\n \t\tif(rhs_t instanceof Type.Primitive || isString(rhs_t)) {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder), \"append\",\r\n \t\t\t\t\tparams, new Type.Function(new Type.Clazz(\"java.lang\",\r\n \t\t\t\t\t\"StringBuilder\"), rhs_t), new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"));\r\n \t\t} else {\r\n \t\t\tArrayList<JilExpr> params = new ArrayList<JilExpr>();\r\n \t\t\tparams.add(rhs.first());\r\n \t\t\tr = new JilExpr.Invoke(new JilExpr.Variable(builderLab, builder),\r\n \t\t\t\t\t\"append\", params, new Type.Function(new Type.Clazz(\r\n \t\t\t\t\t\t\t\"java.lang\", \"StringBuilder\"), JAVA_LANG_OBJECT),\r\n \t\t\t\t\tnew Type.Clazz(\"java.lang\", \"StringBuilder\"));\r\n \t\t}\r\n \r\n \t\tr = new JilExpr.Invoke(r, \"toString\", new ArrayList<JilExpr>(),\r\n \t\t\t\tnew Type.Function(JAVA_LANG_STRING), JAVA_LANG_STRING);\r\n \t\t\r\n \t\treturn new Pair<JilExpr,List<JilStmt>>(r,stmts);\r\n \t}", "public TupleDesc getTupleDesc();", "WordVec constructConcatenatedVec(ArmifiedAttributeValuePair avp, NodeVecs ndvecs, WordVec sumvec) {\n \n WordVec ndvec = ndvecs!=null? getNodeVec(avp, ndvecs): null;\n WordVec ndAndWordVec = WordVec.concat(ndvec, sumvec);\n ndAndWordVec.setWord(sumvec.getWord());\n\n return ndAndWordVec;\n }", "public abstract Tuple getNext();", "@Override\n\t\t\t\t\tpublic Tuple5<Integer, Double, Double, Double, Double> call(\n\t\t\t\t\t\t\tTuple5<Integer, Double, Double, Double, Double> off1,\n\t\t\t\t\t\t\tTuple5<Integer, Double, Double, Double, Double> off2) throws Exception {\n\t\t\t\t\t\treturn new Tuple5<Integer, Double, Double, Double, Double>(\n\t\t\t\t\t\t\t\toff1._1() + off2._1(),\n\t\t\t\t\t\t\t\toff1._2() + off2._2(),\n\t\t\t\t\t\t\t\toff1._3() + off2._3(),\n\t\t\t\t\t\t\t\toff1._4() + off2._4(),\n\t\t\t\t\t\t\t\toff1._5() + off2._5()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t}", "public Pair<Outbox, Boolean> mergeAdjacent(Outbox new_ob, Outbox last_ob) {\n\n int dim = new_ob.adjacent(last_ob);\n if ((dim != -1) && (!new_ob.sameSize(last_ob, dim))) dim = -1;\n if (dim != -1) new_ob.merge(last_ob, dim); //merge the two objects\n// if (dim!=-1) System.out.println(\"after merge:\"+new_ob);\n\n return new Pair<>(new_ob, dim != -1);\n\n }", "private TreeNode<K> combine(TreeNode<K> x, TreeNode<K> y) {\n TreeNode<K> z = new TreeNode<K>();\n z.left = x;\n z.right = y;\n z.rank = x.rank + 1;\n sift(z);\n return z;\n }", "private static <Item extends Comparable> List<Item> catenate(List<Item> q1, List<Item> q2) {\n List<Item> catenated = new ArrayList<>();\n for (Item item : q1) {\n catenated.add(item);\n }\n for (Item item: q2) {\n catenated.add(item);\n }\n return catenated;\n }", "public Pair(final T first, final U second) {\n this.first = first;\n this.second = second;\n }", "public static interface Tuple {\n\n\t}", "private static <T> List<T> pairList(T a, T b) {\n ArrayList<T> res = new ArrayList<T>();\n res.add(a);\n res.add(b);\n return res;\n }", "@Nonnull\r\n\tpublic static <T> Observable<T> concat(\r\n\t\t\t@Nonnull Observable<? extends T> first,\r\n\t\t\t@Nonnull Observable<? extends T> second) {\r\n\t\tList<Observable<? extends T>> list = new ArrayList<Observable<? extends T>>();\r\n\t\tlist.add(first);\r\n\t\tlist.add(second);\r\n\t\treturn concat(list);\r\n\t}", "public Tuple next() throws RelationException;", "@Override\n public BavetScoringTriTuple<A, B, C> createTuple(BavetAbstractTriTuple<A, B, C> parentTuple) {\n return new BavetScoringTriTuple<>(this, parentTuple);\n }", "@Override\n public BinaryOperator<List<Integer>> combiner() {\n return (resultList1, resultList2) -> {\n Integer currentTotal1 = resultList1.get(0);\n Integer currentTotal2 = resultList2.get(0);\n currentTotal1 += currentTotal2;\n resultList1.set(0, currentTotal1);\n return resultList1;\n };\n }", "private static TempTable crossProductPair(Table one, Table two) throws ProcessorException {\n\t\ttry {\n\t\t\t// Define product table\n\t\t\tTempTable tempTable = new TempTable(one.getDatabase());\n\t\t\tfor (FieldDefinition fd : one.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\tfor (FieldDefinition fd : two.getFields()) {\n\t\t\t\ttempTable.addField(fd);\n\t\t\t}\n\t\t\t\n\t\t\t// Create and load definition into memory\n\t\t\ttempTable.create();\n\t\t\t\n\t\t\t// Populate table with product rows\n\t\t\tClass<?> tempDef = tempTable.getDefinition();\n\t\t\tfor (Tuple oneRow : one.getTuples2()) {\n\t\t\t\t\n\t\t\t\t// Get fields from table one\n\t\t\t\tClass<?> fieldDef = oneRow.getData().getClass();\n\t\t\t\tField[] attrDef = fieldDef.getFields();\n\t\t\t\t\n\t\t\t\t// All \"inserts\" done at the nested level\n\t\t\t\tfor (Tuple twoRow : two.getTuples2()) {\n\t\t\t\t\t\n\t\t\t\t\t// New row instance\n\t\t\t\t\tTableDefinition newRow = (TableDefinition) tempDef.newInstance();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table one\n\t\t\t\t\tfor (Field f : attrDef) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(oneRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Get fields from table two\n\t\t\t\t\tClass<?> fieldDef2 = twoRow.getData().getClass();\n\t\t\t\t\tField[] attrDef2 = fieldDef2.getFields();\n\t\t\t\t\t\n\t\t\t\t\t// Set fields for table two\n\t\t\t\t\tfor (Field f : attrDef2) {\n\t\t\t\t\t\tString fieldName = f.getName();\n\t\t\t\t\t\tObject fieldVal = f.get(twoRow.getData());\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!tempTable.isValidFieldValue(fieldName, fieldVal)) {\n\t\t\t\t\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: tuple domains do not match\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\ttempDef.getField(fieldName).set(newRow, fieldVal);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Wrap in Tuple and insert\n\t\t\t\t\tTuple tuple = new Tuple(tempTable);\n\t\t\t\t\ttuple.setData(newRow);\n\t\t\t\t\ttempTable.insertTuple(tuple);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn tempTable;\n\t\t\t\n\t\t} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | IOException | IllegalArgumentException | NoSuchFieldException | SecurityException e) {\n\t\t\tthrow new ProcessorException(\"Failed to build cross product pair: \" + e);\n\t\t}\n\t}", "Tuple extract(int[] pos) {\n Tuple results = new Tuple();\n\n for (int i : pos)\n results.add(elements.set(i, null));\n\n return results;\n }", "@VTID(13)\r\n java.lang.String getTuple();", "@Override public List<Node> visitJoin(@NotNull XQueryParser.JoinContext ctx) {\n\t\tHashMap<String, List<Node>> hashJoin = new HashMap<String, List<Node>>();\n\t\tList<Node> result = new ArrayList<Node>();\n\t\tList<Node> left = new ArrayList<Node>(visit(ctx.query(0)));\n\t\tList<Node> right = new ArrayList<Node>(visit(ctx.query(1)));\n\t\tList<String> latt = transform(ctx.attrs(0));\n\t\tList<String> ratt = transform(ctx.attrs(1));\n\t\t\n\t\tif(latt.isEmpty()){\n\t\t\tfor(Node lnode : left){\n\t\t\t\tfor(Node rnode: right){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(lnode);\n\t\t\t\t\tchild.addAll(findChild(rnode));\n\t\t\t\t\tfor(Node childNode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childNode, true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tList<Node> small = left.size() < right.size() ? left : right,\n\t\t\t\tlarge = left.size() < right.size() ? right : left;\n\t\tList<String> smatt = left.size() < right.size() ? latt : ratt,\n\t\t\t\tlgatt = left.size() < right.size() ? ratt : latt;\n\t\t\n\t\t// store into hash map\n\t\tfor(Node smnode : small){\n\t\t\tString key = convertChildren(smnode, smatt);\n\t\t\tif(hashJoin.containsKey(key)){\n\t\t\t\thashJoin.get(key).add(smnode);\n\t\t\t} else hashJoin.put(key, new ArrayList<Node>(Arrays.asList(smnode)));\n\t\t}\n\t\t\n\t\t// actual join operation\n\t\tfor(Node lgnode : large){\n\t\t\tString attributes = convertChildren(lgnode, lgatt);\n\t\t\tif(hashJoin.containsKey(attributes)){\n\t\t\t\tfor(Node smnode : hashJoin.get(attributes)){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(smnode);\n\t\t\t\t\tchild.addAll(findChild(lgnode));\n\t\t\t\t\tfor(Node childnode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childnode, true));\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(container);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public Pair(T first, T second) {\r\n this.first = first;\r\n this.second = second;\r\n }", "public Tuple1(T value) {\n super(value);\n }", "@ConstructorProperties({\"values\"})\n public Tuple(Object... values) {\n this();\n Collections.addAll(elements, values);\n }", "EExpr mixedTuple(ENodeBuilder b,\n EExpr optPrefix,\n String[] exports,\n ConstMap optExportsOk,\n Astro optBr) {\n int offset = (null == optPrefix) ? 0 : 1;\n EExpr[] nameExprs = new EExpr[offset + exports.length];\n if (null != optPrefix) {\n nameExprs[0] = optPrefix;\n }\n for (int i = 0; i < exports.length; i++) {\n String export = exports[i];\n if (null != optExportsOk && !optExportsOk.maps(export)) {\n nameExprs[offset + i] = noun(optBr);\n } else {\n nameExprs[offset + i] =\n b.slotExpr(BaseEBuilder.NO_POSER, noun(export));\n }\n }\n return b.tuple(nameExprs);\n }", "private TupleDesc generalTupleDesc(){\n \tType[] typeArr;\n \tString[] nameArr;\n \tif(gbField == NO_GROUPING && gbFieldType == Type.INT_TYPE){\n \t\ttypeArr = new Type[]{Type.INT_TYPE};\n \t\tnameArr = new String[]{\"aggregateValue\"};\n \t}else if(gbField == NO_GROUPING){ //gbFieldType == Type.STRING_TYPE\n \t\ttypeArr = new Type[]{Type.STRING_TYPE};\n \t\tnameArr = new String[]{\"aggregateValue\"};\n \t} else {\n \t\ttypeArr = new Type[]{gbFieldType, Type.INT_TYPE};\n \t\tnameArr = new String[]{\"groupValue\", \"aggregateValue\"};\n \t}\n \treturn new TupleDesc(typeArr, nameArr);\n }", "public Tuple nextTuple() {\n\t\ttry {\n\t\t\treturn tr.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public void add(Tuple t) {\n\t\tgetTuples().add(t);\n\t}", "public static <A, B, C> Function<A, C> combine(Function<A, B> functionOne, Function<B, C> functionTwo) {\n// return functionTwo.compose(functionOne);\n return (A a) -> functionTwo.apply(functionOne.apply(a));\n }", "Tuple[] getTuples() {\r\n Tuple[] newTuples = new Tuple[tupleCount];\r\n System.arraycopy(tuple,0,newTuples,0,tupleCount);\r\n return newTuples;\r\n }", "private static void appendTupleToRelation(Relation relation_reference, MainMemory mem, int memory_block_index, Tuple tuple) {\n\t Block block_reference;\n\t if (relation_reference.getNumOfBlocks()==0) {\n\t System.out.print(\"The relation is empty\" + \"\\n\");\n\t System.out.print(\"Get the handle to the memory block \" + memory_block_index + \" and clear it\" + \"\\n\");\n\t block_reference=mem.getBlock(memory_block_index);\n\t block_reference.clear(); //clear the block\n\t block_reference.appendTuple(tuple); // append the tuple\n\t System.out.print(\"Write to the first block of the relation\" + \"\\n\");\n\t relation_reference.setBlock(relation_reference.getNumOfBlocks(),memory_block_index);\n\t } else {\n\t System.out.print(\"Read the last block of the relation into memory block 5:\" + \"\\n\");\n\t relation_reference.getBlock(relation_reference.getNumOfBlocks()-1,memory_block_index);\n\t block_reference=mem.getBlock(memory_block_index);\n\n\t if (block_reference.isFull()) {\n\t System.out.print(\"(The block is full: Clear the memory block and append the tuple)\" + \"\\n\");\n\t block_reference.clear(); //clear the block\n\t block_reference.appendTuple(tuple); // append the tuple\n\t System.out.print(\"Write to a new block at the end of the relation\" + \"\\n\");\n\t relation_reference.setBlock(relation_reference.getNumOfBlocks(),memory_block_index); //write back to the relation\n\t } else {\n\t System.out.print(\"(The block is not full: Append it directly)\" + \"\\n\");\n\t block_reference.appendTuple(tuple); // append the tuple\n\t System.out.print(\"Write to the last block of the relation\" + \"\\n\");\n\t relation_reference.setBlock(relation_reference.getNumOfBlocks()-1,memory_block_index); //write back to the relation\n\t }\n\t }\n\t }", "public static Seq plus(Constant c1, Constant c2) {\n return new Constant((c1.num < c2.num)?c1.num:c2.num, (c1.value + c2.value)); \n }", "private Pair(U first, V second) {\n\t\t\tthis.first = first;\n\t\t\tthis.second = second;\n\t\t}", "public Tuple() {\n this(new ArrayList<Object>());\n }", "private NFA union(NFA nfa1, NFA nfa2) {\n NFA result = new NFA();\n\n String startState = String.valueOf(stateInc++);\n result.addStartState(startState);\n result.addNFAStates(nfa1.getStates());\n result.addNFAStates(nfa2.getStates());\n result.addTransition(startState, 'e', nfa1.getStartState().getName());\n result.addTransition(startState, 'e', nfa2.getStartState().getName());\n result.addAbc(nfa1.getABC());\n result.addAbc(nfa2.getABC());\n\n return result;\n\n }", "int pack(int b2, int s1, int b0)\n {\n return (b2 << 24) | (s1 << 8) | b0;\n }", "public Tuple(List<? extends Loyalty> c)\r\n\t\t{\r\n\t\t\tsuper(c);\r\n\t\t}", "public boolean isGeneralTuple();", "public Tuple(Datum fieldIn) {\n fields = new ArrayList<Datum>(1);\n fields.add(fieldIn);\n }", "public Tuple()\n {\n // Creat a new tuple\n data = new byte[max_size];\n tuple_offset = 0;\n tuple_length = max_size;\n }", "int[] union(int s1,int t1,int s2,int t2)\r\n\t{\r\n\t\tint [] st=new int[2];\r\n\t\t//Please fill in the program here\r\n\t\tst[0] = incCapacity();\r\n\t\taddEdge(st[0], epssymbol, s1);\r\n\t\taddEdge(st[0], epssymbol, s2);\r\n\t\tst[1] = incCapacity();\r\n\t\taddEdge(t1, epssymbol, st[1]);\r\n\t\taddEdge(t2, epssymbol, st[1]);\r\n\r\n\t\treturn st;\r\n\t}", "public static <A, B> Function<Tuple2<A, B>, Tuple2<A, B>> withB(@Nullable final B b) {\n final class WithBFunction implements Function<Tuple2<A, B>, Tuple2<A, B>>, Serializable {\n private static final long serialVersionUID = -3772229372311193449L;\n\n @Override\n public Tuple2<A, B> apply(Tuple2<A, B> input) {\n return input.withB(b);\n }\n }\n return new WithBFunction();\n }", "private OTRGroupElementQuadMsg computeTuple(byte sigma, BigInteger alpha, BigInteger beta, GroupElement gAlpha) {\n\t\t//Sample random value gamma in [0, . . . , q-1]\n\t\tBigInteger gamma = BigIntegers.createRandomInRange(BigInteger.ZERO, qMinusOne, random);\n\t\t\n\t\t//Calculates g^beta, g^(alpha*beta), g^gamma.\n\t\tGroupElement g = dlog.getGenerator();\n\t\tGroupElement gBeta = dlog.exponentiate(g, beta);\n\t\tGroupElement gGamma = dlog.exponentiate(g, gamma);\n\t\tGroupElement gAlphaBeta = dlog.exponentiate(g, alpha.multiply(beta));\n\t\t\n\t\t//Create the tuple.\n\t\tif (sigma == 0){\n\t\t\treturn new OTRGroupElementQuadMsg(gAlpha.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gBeta.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gAlphaBeta.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gGamma.generateSendableData());\n\t\t}\n\t\telse {\n\t\t\treturn new OTRGroupElementQuadMsg(gAlpha.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gBeta.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gGamma.generateSendableData(), \n\t\t\t\t\t\t\t\t\t\t gAlphaBeta.generateSendableData());\n\t\t}\n\t}", "@Override\n\tpublic void merge(MutableAggregationBuffer buffer1, Row buffer2) {\n\t\tif (buffer1.getString(0) == null) {\n\t\t\tbuffer1.update(0, buffer2.getString(0));\n\t\t} else\n\t\t\tbuffer1.update(0, buffer1.getString(0) + \",\" + buffer2.getString(0));\n\n\t\tbuffer1.update(1, buffer1.getLong(1) + buffer2.getLong(1));\n\t\tbuffer1.update(2, buffer1.getLong(2) + buffer2.getLong(2));\n\n\t}", "private static List<Pair<String,String>> product(String[] alist, String[] blist){\n\n List<Pair<String, String>> prod = new ArrayList<>();\n\n for(String a : alist){\n for(String b : blist){\n prod.add(new Pair<>(a,b));\n }\n }\n return prod;\n }" ]
[ "0.7359564", "0.65913796", "0.6486816", "0.6280406", "0.6143261", "0.5924361", "0.5857703", "0.5848425", "0.5802416", "0.5773268", "0.57239604", "0.5710872", "0.56251293", "0.55981135", "0.558002", "0.5507011", "0.54400575", "0.5386615", "0.5349502", "0.53380656", "0.5304575", "0.52960116", "0.52868843", "0.52441573", "0.52440745", "0.523605", "0.521447", "0.5096856", "0.50595754", "0.50593966", "0.50409424", "0.5029457", "0.49806416", "0.49690652", "0.49688607", "0.49144053", "0.49117863", "0.4909407", "0.48896617", "0.48816928", "0.4876165", "0.4859962", "0.48579592", "0.48477602", "0.48449656", "0.48275438", "0.48138368", "0.4813016", "0.4809387", "0.48023495", "0.4787814", "0.478549", "0.4776124", "0.47700346", "0.47680315", "0.47590262", "0.47490576", "0.47466156", "0.47304708", "0.47194716", "0.4716431", "0.4712582", "0.47109166", "0.46976072", "0.46885693", "0.4685322", "0.46799693", "0.46789747", "0.46747118", "0.46745643", "0.46743363", "0.46699622", "0.46634883", "0.46424687", "0.46373525", "0.46261087", "0.46030778", "0.46014678", "0.45775953", "0.45659453", "0.45621228", "0.4557289", "0.45531893", "0.45466504", "0.45371312", "0.4534472", "0.45301405", "0.45257783", "0.4518598", "0.4507978", "0.4505884", "0.45039263", "0.45033467", "0.4497285", "0.44969177", "0.44860774", "0.44837168", "0.44755787", "0.4467575", "0.44587925" ]
0.7112385
1
Write a Tuple object to a TupleOutput
public void objectToEntry(Object object, TupleOutput to) { // Write the data to the TupleOutput (a DatabaseEntry). // Order is important. The first data written will be // the first bytes used by the default comparison routines. BaseTuple bt = (BaseTuple) object; for(int i = 0; i < r.getNumberOfAttributes(); i++) { if(r.getAttributeType(i) == Globals.INTEGER) { to.writeInt(((Integer) bt.values[i]).intValue()); } else { assert r.getAttributeType(i) == Globals.STRING; to.writeString((String) bt.values[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected void writeTuple(Tuple tuple) throws IOException;", "private void placeInOutput(Tuple tuple) {\n\t\tif (outputBuffer.size() < bufferCapacity) {\n\t\t\toutputBuffer.add(tuple);\n\t\t} else {\n\t\t\tflushOutputBuffer();\n\t\t\tif (outputBuffer.size() < bufferCapacity) {\n\t\t\t\toutputBuffer.add(tuple);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"MAJOR ERROR IN WRITING TO ES OUTPUT BUFFER\");\n\t\t\t}\n\t\t\twriterFlushes++;\n\t\t\t// next bucket when we have written numInputBuffers^passNumber\n\t\t\tif (writerFlushes % Math.pow(numInputBuffers, passNumber) == 0) {\n\t\t\t\twriterBucketID++;\n\t\t\t\toutputWriter = new TupleWriterBinary(DatabaseCatalog.getInstance().getTempDirectory() + \"/\"\n\t\t\t\t\t\t+ instanceHashcode + \"_\" + passNumber + \"_\" + writerBucketID);\n\t\t\t}\n\t\t}\n\t}", "public static <T> TStream<T> addJavaOutput(TopologyElement te,\n BOperatorInvocation bop, Type tupleType, boolean singlePort) {\n return addJavaOutput(te, bop, tupleType, Optional.empty(), singlePort);\n }", "public boolean serializeTuple( ByteBuffer buf, TupleAccessor tuple ) {\n buf.mark();\n try\n {\n scanFields( tuple );\n writer.startBlock( buf );\n writer.writeHeader( isNull, isRepeated );\n writeFields( tuple );\n writer.endBlock();\n return true;\n }\n catch ( IndexOutOfBoundsException e ) {\n buf.reset();\n return false;\n }\n }", "private void writeFields(TupleAccessor tuple) {\n for ( int i = 0; i < fieldCount; i++ ) {\n if ( isNull[i] || isRepeated[i] )\n continue;\n FieldAccessor field = tuple.getField( i );\n serializer[i].serialize( writer, field );\n }\n }", "public int toStream(OutputStream out,\n RDFFormat format) throws TrippiException {\n TupleWriter writer;\n if (format == RDFFormat.SPARQL) {\n writer = new SparqlTupleWriter(out, m_aliases); \n }else if(format == RDFFormat.SPARQL_W3C){\n \twriter = new SparqlW3CTupleWriter(out,m_aliases);\n } else if (format == RDFFormat.SIMPLE) {\n writer = new SimpleTupleWriter(out, m_aliases); \n } else if (format == RDFFormat.CSV) {\n writer = new CSVTupleWriter(out, m_aliases); \n } else if (format == RDFFormat.TSV) {\n writer = new TSVTupleWriter(out, m_aliases); \n } else if (format == RDFFormat.COUNT) {\n writer = new CountTupleWriter(out); \n } else if (format == RDFFormat.COUNT_JSON) {\n writer = new FormatCountTupleWriter(new JSONTupleWriter(out, m_aliases)); \n } else if (format == RDFFormat.COUNT_SPARQL) {\n writer = new FormatCountTupleWriter(new SparqlTupleWriter(out, m_aliases)); \n } else if (format == RDFFormat.JSON) {\n writer = new JSONTupleWriter(out, m_aliases); \n } else {\n throw new TrippiException(\"Unsupported output format: \" + format.getName());\n }\n return writer.write(this);\n }", "private void saveTuple(ArrayList<Tuple> tupleList) {\n\n\t\ttry {\n\t\t\tFileOutputStream fileOutputStream = context.openFileOutput(\n\t\t\t\t\tSAVE_FILE, Context.MODE_PRIVATE);\n\t\t\tOutputStreamWriter outputStreamWriter = new OutputStreamWriter(\n\t\t\t\t\tfileOutputStream);\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tgson.toJson(tupleList, outputStreamWriter); // Serialize to Json\n\t\t\toutputStreamWriter.flush();\n\t\t\toutputStreamWriter.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void putNext(Tuple tuple) throws IOException {\n\t\tint sqlPos = 1;\n\t\ttry {\n\t\t\tint size = tuple.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tObject field = tuple.get(i);\n\t\t\t\t\tif(field != null){\n\t\t\t\t\t\tif(\"\\\\N\".equalsIgnoreCase(field.toString())){\n\t\t\t\t\t\t\tfield = null;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tswitch (DataType.findType(field)) {\n\t\t\t\t\tcase DataType.NULL:\n\t\t\t\t\t\tps.setNull(sqlPos, java.sql.Types.VARCHAR);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.BOOLEAN:\n\t\t\t\t\t\tps.setBoolean(sqlPos, (Boolean) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.INTEGER:\n\t\t\t\t\t\tps.setInt(sqlPos, (Integer) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.LONG:\n\t\t\t\t\t\tps.setLong(sqlPos, (Long) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.FLOAT:\n\t\t\t\t\t\tps.setFloat(sqlPos, (Float) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.DOUBLE:\n\t\t\t\t\t\tps.setDouble(sqlPos, (Double) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.DATETIME:\n\t\t\t\t\t\tps.setTimestamp(sqlPos, new Timestamp(((DateTime) field).getMillis()));\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.BYTEARRAY:\n\t\t\t\t\t\tbyte[] b = ((DataByteArray) field).get();\n\t\t\t\t\t\tps.setBytes(sqlPos, b);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DataType.CHARARRAY:\n\t\t\t\t\t\tps.setString(sqlPos, (String) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DataType.BYTE:\n\t\t\t\t\t\tps.setByte(sqlPos, (Byte) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.MAP:\n\t\t\t\t\tcase DataType.TUPLE:\n\t\t\t\t\tcase DataType.BAG:\n\t\t\t\t\t\tthrow new RuntimeException(\"Cannot store a non-flat tuple \"\n\t\t\t\t\t\t\t\t+ \"using DbStorage\");\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new RuntimeException(\"Unknown datatype \"\n\t\t\t\t\t\t\t\t+ DataType.findType(field));\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch (ExecException ee) {\n\t\t\t\t\tthrow new RuntimeException(ee);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tps.addBatch();\n\t\t\tcount++;\n\t\t\tif (count > batchSize) {\n\t\t\t\tcount = 0;\n\t\t\t\tps.executeBatch();\n\t\t\t\tps.clearBatch();\n\t\t\t\tps.clearParameters();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tlog\n\t\t\t\t.error(\"Unable to insert record:\" + tuple.toDelimitedString(\"\\t\"),\n\t\t\t\t\t\te);\n\t\t\t} catch (ExecException ee) {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tif (e.getErrorCode() == 1366) {\n\t\t\t\t// errors that come due to utf-8 character encoding\n\t\t\t\t// ignore these kind of errors TODO: Temporary fix - need to find a\n\t\t\t\t// better way of handling them in the argument statement itself\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"JDBC error\", e);\n\t\t\t}\n\t\t}\n\t}", "@VTID(13)\r\n java.lang.String getTuple();", "private static void writeTupleToBuffer(ByteBuffer buffer, Tuple elt) {\n \n if (ABIToken.STANDARD_LEAF_TYPE_MAP.containsKey(elt.standardType)) {\n // This is a direct leaf type (including a primitive array - they are caught here).\n writeNonArrayToBuffer(buffer, elt.standardType, elt.value);\n } else {\n // This might be an array or something unknown.\n Class<?> componentStandardType = elt.standardType.getComponentType();\n if (ABIToken.STANDARD_LEAF_TYPE_MAP.containsKey(componentStandardType)) {\n // We can write an array token and then the elements.\n Object[] cast = (Object[]) elt.value;\n // (note that it is possible we are seeing a null array so handle that here).\n if (null == cast) {\n buffer.put(ABIToken.NULL.identifier);\n }\n // Now, write the standard array token and leaf type identifier.\n buffer.put(ABIToken.ARRAY.identifier);\n buffer.put(ABIToken.STANDARD_LEAF_TYPE_MAP.get(componentStandardType).identifier);\n // Proceed with length and contents if it was not null.\n if (null != cast) {\n writeLength(buffer, cast.length);\n \n // Now, walk the elements and handle them.\n for (Object val : cast) {\n writeNonArrayToBuffer(buffer, componentStandardType, val);\n }\n }\n } else {\n // Unknown type - no message, due to uncertainty of portability.\n throw new IllegalArgumentException();\n }\n }\n }", "protected final List<Integer> emit(Tuple anchor, List<Object> tuple) {\n return outputCollector.emit(anchor, tuple);\n }", "void writeObj(MyAllTypesSecond aRecord, StrategyI xmlStrat);", "public abstract boolean writeDataItem(BDTuple tuple) throws RollbackException;", "protected final List<Integer> emit(Tuple anchor, Object... tuple) {\n List<Object> tupleList = tuple.length > 0 ? Arrays.asList(tuple) : Collections.EMPTY_LIST;\n return outputCollector.emit(anchor, tupleList);\n }", "@Override\n public void emitTuples() {\n\n Statement query = queryToRetrieveData();\n logger.debug(String.format(\"select statement: %s\", query.toString()));\n RecordSet rs;\n try {\n rs = store.getClient().query(null, query);\n while(rs.next()){\n Record rec = rs.getRecord();\n T tuple = getTuple(rec);\n outputPort.emit(tuple);\n }\n }\n catch (Exception ex) {\n store.disconnect();\n DTThrowable.rethrow(ex);\n }\n }", "public String serialize(Object[] tuple) throws JsonProcessingException {\n Object object = toListMapAccordingSchema(tuple, schemaRoot.getSchema());\n return mapper.writeValueAsString(object);\n }", "TupleExpr createTupleExpr();", "@Override\n public void write(WritableComparable key, Tuple value)\n throws IOException, InterruptedException {\n if(mode == Mode.SINGLE_STORE) {\n if (!(value instanceof NonWritableTuple)) {\n storeDecorator.putNext(value);\n }\n } else {\n throw new IOException(\"Internal Error: Unexpected code path\");\n }\n }", "protected abstract List<Integer> doEmit(OUT flinkTuple);", "@Override\r\n\tpublic void execute( Object obj ) throws Exception {\r\n\t\tTuple t = ( Tuple ) obj;\r\n\t\tif ( t.getType() == TupleType.TRIPLET ) saveEntity( obj );\r\n\t\tif ( t.getType() == TupleType.QUARTET ) saveAncestorAndHistory( obj );\r\n\t}", "public static Tuple toTuple(Object o) throws ExecException {\n if (o == null) {\n return null;\n }\n\n if (o instanceof Tuple) {\n try {\n return (Tuple)o;\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Tuple.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n } else {\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Tuple\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n }", "public TupleDesc getTupleDesc();", "public abstract void handleTuple(ITuple tuple);", "@Override\r\n public XmlTuple createTaskTuple(int taskid){\r\n XmlTuple task = new XmlTupleService();\r\n String taskstr = null;\r\n FedTaskTuple tasktuple = new FedTaskTuple();\r\n //taskstr = tasktuple.setTaskStr(taskid, masterNetName, value);\r\n List curPara = new ArrayList();\r\n synchronized(lock){\r\n curPara = paramList.get(taskid); \r\n }\r\n //System.out.println(\"createTaskTuple: \"+((Integer)curPara.get(0)).intValue()+\" \"+curPara.get(1).toString()+\" \"+ curPara.get(2).toString() +\" \"+curPara.get(3).toString()\r\n // +\" \"+(Double)curPara.get(4)+\" \"+((Double)curPara.get(5)).doubleValue() + curPara.get(6).toString()+curPara.get(7).toString()+(Long)curPara.get(8));\r\n taskstr = tasktuple.setTaskStr(taskid, masterNetName, \r\n ((Integer)curPara.get(0)).intValue(), curPara.get(1).toString(), curPara.get(2).toString(), curPara.get(3).toString(), \r\n curPara.get(4).toString(), curPara.get(5).toString(), curPara.get(6).toString(),curPara.get(7).toString(), (Long)curPara.get(8));\r\n //System.out.println(\"createTaskTuple: \" +taskstr);\r\n //taskstr = tasktuple.setTaskStr(taskid, masterNetName, _optID,tupleTag,taskType,destIP,cost,benefit);\r\n task.createXMLtuple(taskstr);\r\n \r\n return task;\r\n }", "public void write(DataOutput out) throws IOException {\n\t\t\n\t\tout.writeInt(this.id.length());\n\t\tout.write(this.id.getBytes());\n\t\t\n\t\tout.writeInt(this.sequence.length());\n\t\tout.write(this.sequence.getBytes());\n\t\t\n\t\tfor (Point3d p: this.structure) {\n\t\t\tif (p == null) {\n\t\t\t\tout.writeShort(Short.MAX_VALUE);\n\t\t\t\tout.writeShort(Short.MAX_VALUE);\n\t\t\t\tout.writeShort(Short.MAX_VALUE);\n\t\t\t} else {\n\t\t\t\tif (p.x*10 > Short.MAX_VALUE || p.y*10 > Short.MAX_VALUE || p.z*10 > Short.MAX_VALUE) {\n\t\t\t\t\tSystem.out.println(\"Overflow\");\n\t\t\t\t}\n\t\t\t\tout.writeShort((short)Math.round(p.x*10));\n\t\t\t\tout.writeShort((short)Math.round(p.y*10));\n\t\t\t\tout.writeShort((short)Math.round(p.z*10));\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\tid.write(out);\n\t\ttag.write(out);\n\t}", "public interface Output {\n void writeAction(int transactionId, int actionId, int transactionRunCount);\n\n void writeWait(int transactionId, int actionId, int transactionRunCount);\n\n void writeTransactionRestart(int transactionId, int transactionRunCount);\n\n void writeFreeText(String s);\n\n void finish(BPlusTree tree, Order order);\n}", "void writeObject(OutputSerializer out) throws java.io.IOException;", "protected abstract void _write(DataOutput output) throws IOException;", "Output createOutput();", "public void writeOutputTableInfo(OutputInfo oti) {\n conf.set(getOutputTableInfoKey(), Writables.writeToEncodedStr(oti));\n }", "public abstract void write(T dataElement);", "void writeObj(MyAllTypesFirst myFirst, StrategyI xmlStrat);", "protected void submitOutputTuple(StreamingOutput<OutputTuple> outputPort, Tuple inputTuple, ResultSet rs,\r\n\t\t\tJDBCSqlStatus jSqlStatus) throws Exception {\r\n\r\n\t\tOutputTuple outputTuple = outputPort.newTuple();\r\n\r\n\t\t// Pass all incoming attributes as is to the output tuple\r\n\t\toutputTuple.assign(inputTuple);\r\n\r\n\t\t// Get the schema for the output tuple type\r\n\t\tStreamSchema schema = outputTuple.getStreamSchema();\r\n\r\n\t\t// Assign hasResultSet value according to hasResultSetAttr parameter\r\n\t\tif (hasResultSetAttr != null) {\r\n\t\t\tTRACE.log(TraceLevel.DEBUG, \"hasResultSet: \" + hasResultSetValue);\r\n\t\t\toutputTuple.setBoolean(hasResultSetAttr, hasResultSetValue);\r\n\t\t}\r\n\r\n\t\t// Assign SQL status according to sqlStatusAttr parameter\r\n\t\tif (sqlStatusDataAttrs != null && sqlStatusDataAttrs.length > 0 && jSqlStatus != null) {\r\n\t\t\tTRACE.log(TraceLevel.DEBUG, \"Assign SQL status information\");\r\n\t\t\tfor (int i = 0; i < sqlStatusDataAttrs.length; i++) {\r\n\t\t\t\tAttribute attr = schema.getAttribute(sqlStatusDataAttrs[i]);\r\n\t\t\t\tTupleType dTupleType = (TupleType) attr.getType();\r\n\t\t\t\tStreamSchema dSchema = dTupleType.getTupleSchema();\r\n\t\t\t\t// Create a tuple with desired value\r\n\t\t\t\tMap<String, Object> attrmap = new HashMap<String, Object>();\r\n\t\t\t\tattrmap.put(\"sqlCode\", jSqlStatus.getSqlCode());\r\n\t\t\t\tif (jSqlStatus.getSqlState() != null)\r\n\t\t\t\t\tattrmap.put(\"sqlState\", new RString(jSqlStatus.getSqlState()));\r\n\t\t\t\tif (jSqlStatus.getSqlMessage() != null) \r\n\t\t\t\t\tattrmap.put(\"sqlMessage\", new RString(jSqlStatus.getSqlMessage()));\r\n\t\t\t\tTuple sqlStatusT = dSchema.getTuple(attrmap);\r\n\t\t\t\t// Assign the values to the output tuple\r\n\t\t\t\toutputTuple.setObject(sqlStatusErrorAttrs[i], sqlStatusT);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Assign values from result set\r\n\t\tif (rs != null) {\r\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\r\n\t\t\tfor (int i = 1; i <= rsmd.getColumnCount(); i++) {\r\n\t\t\t\tString columnName = rsmd.getColumnName(i);\r\n\t\t\t\tAttribute attr = schema.getAttribute(columnName);\r\n\t\t\t\tif (attr != null) {\r\n\t\t\t\t\trs.getObject(i);\r\n\t\t\t\t\tif (!rs.wasNull()) {\r\n\t\t\t\t\t\tString splAttrName = attr.getName();\r\n\t\t\t\t\t\tString splType = (attr.getType().getLanguageType()).toUpperCase();\r\n\t\t\t\t\t\t// Task 39870 Update JDBC toolkit with respect to optional data type support\r\n\t\t\t\t\t\t// it compares the contain of SPL type delivers by SPL application with data types \r\n\t\t\t\t\t\t// and assign value from result set\r\n\t\t\t\t\t\t// in this case it assign the int32 values for SPL type int32 or optional<int32>\r\n\t\t\t\t\t\tif (splType.contains(\"RSTRING\")) outputTuple.setString(splAttrName, rs.getString(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"USTRING\")) outputTuple.setString(splAttrName, rs.getString(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"INT8\")) outputTuple.setByte(splAttrName, rs.getByte(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"INT16\")) outputTuple.setShort(splAttrName, rs.getShort(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"INT32\")) outputTuple.setInt(splAttrName, rs.getInt(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"INT64\")) outputTuple.setLong(splAttrName, rs.getLong(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"UINT8\")) outputTuple.setByte(splAttrName, rs.getByte(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"UINT16\")) outputTuple.setShort(splAttrName, rs.getShort(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"UINT32\")) outputTuple.setInt(splAttrName, rs.getInt(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"UINT64\")) outputTuple.setLong(splAttrName, rs.getLong(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"FLOAT32\")) outputTuple.setFloat(splAttrName, rs.getFloat(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"FLOAT64\")) outputTuple.setDouble(splAttrName, rs.getDouble(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"DECIMAL32\")) outputTuple.setBigDecimal(splAttrName, rs.getBigDecimal(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"DECIMAL64\")) outputTuple.setBigDecimal(splAttrName, rs.getBigDecimal(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"DECIMAL128\")) outputTuple.setBigDecimal(splAttrName, rs.getBigDecimal(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"BLOB\")) outputTuple.setBlob(splAttrName, ValueFactory.readBlob(rs.getBlob(i).getBinaryStream()));\r\n\t\t\t\t\t\telse if (splType.contains(\"TIMESTAMP\")) outputTuple.setTimestamp(splAttrName, Timestamp.getTimestamp(rs.getTimestamp(i)));\r\n\t\t\t\t\t\telse if (splType.contains(\"XML\")) outputTuple.setXML(splAttrName, (XML)rs.getSQLXML(i));\r\n\t\t\t\t\t\telse if (splType.contains(\"BOOLEAN\")) outputTuple.setBoolean(splAttrName, rs.getBoolean(i));\r\n\t\t\t\t\t\telse LOGGER.log(LogLevel.ERROR, Messages.getString(\"JDBC_SPL_TYPE_NOT_SUPPORT\"), splType); \r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Submit result set as output tuple\r\n\t\toutputPort.submit(outputTuple);\r\n\t}", "public abstract <T> SerializationStream writeObject(T t);", "public abstract void write(DataOutput out) throws IOException;", "Astro tuple(AstroArg args);", "@Override\n\t\tpublic Tuple exec(Tuple input) throws IOException {\n\t\t\tfor (Tuple t : (DataBag) input.get(0)) {\n\t\t\t\treturn wrap(t, getSign());\t\n\t\t\t}\n\t\t\t// Odd.\n\t\t\treturn tf.newTuple(bf.newDefaultBag());\n\t\t}", "public static interface Tuple {\n\n\t}", "public void nextTuple() {\n\t\tif (csvRecordsItr.hasNext()) {\n\t\t\t// Get the next record from input file\n\t\t\tCSVRecord csvRecord = null;\n\t\t\ttry {\n\t\t\t\tcsvRecord = csvRecordsItr.next();\n\t\t\t\tString groupName = csvRecord.get(\"GROUP_NAME\");\n\t\t\t\tString eventName = csvRecord.get(\"EVENT_NAME\");\n\t\t\t\tString eventStatus = csvRecord.get(\"EVENT_STATUS\");\n\t\t\t\tString eventCity = csvRecord.get(\"EVENT_CITY\");\n\t\t\t\tString eventCountry = csvRecord.get(\"EVENT_COUNTRY\");\n\n\t\t\t\t// Emit the record as a tuple\n\t\t\t\tspoutOutputCollector.emit(new Values(groupName, eventName,\n\t\t\t\t\t\teventStatus, eventCity, eventCountry));\n\t\t\t} catch (NoSuchElementException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tprotected void write(ObjectOutput out) throws IOException {\n\t\t\n\t}", "@Override\n public void write(DataOutput output) throws IOException {\n output.writeUTF(getPartitionKey());\n output.writeUTF(getRowKey());\n output.writeLong(getTimestamp().getTime());\n // Write the rest of the properties.\n HashMap<String, EntityProperty> properties = getProperties();\n output.writeInt(properties.size());\n for (Map.Entry<String, EntityProperty> current : properties.entrySet()) {\n output.writeUTF(current.getKey());\n output.writeUTF(current.getValue().getValueAsString());\n }\n }", "private void writeColumnsFromTuple(ByteBuffer key, Tuple t, int offset) throws IOException\n {\n ArrayList<Mutation> mutationList = new ArrayList<Mutation>();\n for (int i = offset; i < t.size(); i++)\n {\n if (t.getType(i) == DataType.BAG)\n writeColumnsFromBag(key, (DataBag) t.get(i));\n else if (t.getType(i) == DataType.TUPLE)\n {\n Tuple inner = (Tuple) t.get(i);\n if (inner.size() > 0) // may be empty, for an indexed column that wasn't present\n mutationList.add(mutationFromTuple(inner));\n }\n else if (!usePartitionFilter)\n {\n throw new IOException(\"Output type was not a bag or a tuple\");\n }\n }\n if (mutationList.size() > 0)\n writeMutations(key, mutationList);\n }", "private TupleDesc generateTupleDesc(){\n \tif(this.childTD == null){ //no tuples merged yet\n \t\t//return a general tupleDesc\n \t\treturn generalTupleDesc();\n \t} else {\n \t\t//generate a helpful, well-named TupleDesc\n \t\tType[] typeArr;\n \tString[] nameArr;\n \tString aggName = operator.toString() + \"(\" + childTD.getFieldName(aggField) + \")\";\n \tif(gbField == NO_GROUPING && gbFieldType == Type.INT_TYPE){\n \t\ttypeArr = new Type[]{Type.INT_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t}else if(gbField == NO_GROUPING){ //gbFieldType == Type.STRING_TYPE\n \t\ttypeArr = new Type[]{Type.STRING_TYPE};\n \t\tnameArr = new String[]{aggName};\n \t} else {\n \t\ttypeArr = new Type[]{gbFieldType, Type.INT_TYPE};\n \t\tString groupName = \"group by(\" + childTD.getFieldName(gbField) + \")\";\n \t\tnameArr = new String[]{groupName, aggName};\n \t}\n \treturn new TupleDesc(typeArr, nameArr);\n \t}\n }", "public void _write(org.omg.CORBA.portable.OutputStream ostream)\r\n {\r\n PropositionHelper.write(ostream,value);\r\n }", "TemplateOutputStream getOutput();", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\ttimeInt.write(out);\n\t\tsum.write(out);\n\t\tIp.write(out);\n\t}", "public void writeObject ();", "public abstract T getTuple(int aPosition);", "@Override\n public void execute(Tuple tuple) {\n String word = tuple.getFields().get(0);\n String line = null;\n if(word.equals(\"word1\")){\n line = (String) tuple.getValueByField(\"word1\");\n }else if(word.equals(\"word2\")){\n line = (String) tuple.getValueByField(\"word2\");\n }\n System.out.println(line);\n }", "@Override\r\n\tpublic void dump(String s, int index) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tTuple tuple = null;\r\n\t\tBufferedWriter output = null;\r\n\t\ttry{\r\n\t\t File file = new File(s + index);\r\n\t\t StringBuilder sb = new StringBuilder();\r\n\t\t output = new BufferedWriter(new FileWriter(file));\r\n\t\t\twhile((tuple = nextTuple())!=null){\r\n\t sb.append(tuple.toString());\r\n\t sb.append(\"\\n\");\r\n\t System.out.println(tuple);\r\n\t\t\t}\r\n\t\t\toutput.write(sb.toString());\r\n\t\t\toutput.close();\r\n\t }catch(IOException e){\r\n\t\t\tSystem.out.println(\"An exception occurs!\");\r\n\t\t}\r\n\t\treset();\r\n\t}", "public void write(DataOutput out) throws IOException {\r\n out.writeLong(this.getId());\r\n out.writeDouble(this.getLat());\r\n out.writeDouble(this.getLon());\r\n out.writeLong(this.getTimestamp());\r\n out.writeInt(this.getTag());\r\n out.writeInt(this.getTileNumber());\r\n out.writeUTF(this.getTiles());\r\n out.writeUTF(this.getOthers());\r\n out.writeUTF(this.getCandidateTags());\r\n\r\n out.writeUTF(this.getTileTag());\r\n \tout.writeLong(this.getUploadtime());\r\n \tout.writeLong(this.getServerId());\r\n \tout.writeUTF(this.getDevice());\r\n \tout.writeUTF(this.getDescription());\r\n \r\n }", "private Tuples() {}", "String objectWrite();", "@Override\n public void writeTo(DataOutput dout) throws IOException {\n\n if (!isHeadless()) {\n dout.writeShort(getTransactionID());\n dout.writeShort(getProtocolID());\n dout.writeShort(getDataLength());\n }\n dout.writeByte(getUnitID());\n dout.writeByte(getFunctionCode());\n writeData(dout);\n }", "TupleLiteralExp createTupleLiteralExp();", "public abstract void write(O value) throws IOException;", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tout.writeShort(this.classType);\r\n\t\tout.writeShort(this.skinType);\r\n\t}", "public interface CoordTupleString {\n\n /**\n * Accessor for the max tuple index\n * \n * @return the max tuple index\n */\n public abstract int maxIndex();\n\n /**\n * Accessor to determine the actual type managed.\n * \n * @return a Number the most directly corresponds to the\n * underlying managed type (Float for a float tuplestring,\n * Double for a double tuplestring, etc)\n */\n public abstract Number getPrimitiveType();\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float[]\n */\n public abstract float[] getasFloat(int tuple);\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double[]\n */\n public abstract double[] getasDouble(int tuple);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float\n */\n public abstract float getasFloat(int tuple, int val);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double\n */\n public abstract double getasDouble(int tuple, int val);\n}", "public abstract T getTuple(Record record);", "@Override\n\tpublic void write(DataOutput arg0) throws IOException {\n\t\targ0.writeUTF(first);\n\t\targ0.writeUTF(second);\n\t}", "public TupleDesc getTupleDesc() {\n return td;\n }", "@Override\r\n\tpublic void write(DataOutput out) throws IOException {\n\t\tWritableUtils.writeVInt(out, this.id);\r\n\t}", "protected abstract void write (Object val);", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\t\n\t\tout.writeInt(id);\n\t\tout.writeUTF(date);\n\t\tout.writeUTF(pid);\n\t\tout.writeInt(amount);\n\t\tout.writeUTF(name);\n\t\tout.writeUTF(category_id);\n\t\tout.writeInt(price);\n\t\tout.writeUTF(flag);\n\t\t\n\t}", "@Override\n\t\tpublic TupleDesc getTupleDesc() {\n\t\t\treturn td;\n\t\t}", "public void write(DataOutput output) throws IOException {\n output.writeShort(this.id());\n this._write(output);\n }", "@Test\n public void testProcessTuple() throws Exception {\n TestBolt tb = spy(new TestBolt());\n\n // Test input data\n TopologyContext tc = mock(TopologyContext.class);\n OutputCollector oc = mock(OutputCollector.class);\n\n // Create a mock tuple\n Tuple tuple = mock(Tuple.class);\n when(tuple.getSourceComponent())\n .thenReturn(Constants.COORDINATED_STREAM_ID);\n when(tuple.getSourceStreamId())\n .thenReturn(\"default\");\n\n // Prepare the bolt\n tb.prepare(new HashMap<>(), tc, oc);\n tb.execute(tuple);\n\n verify(tb, times(1)).process(tuple);\n verify(oc, times(1)).ack(tuple);\n }", "protected abstract void toXml(PrintWriter result);", "Write createWrite();", "public final void entryRuleAstTypeTuple() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2173:1: ( ruleAstTypeTuple EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2174:1: ruleAstTypeTuple EOF\n {\n before(grammarAccess.getAstTypeTupleRule()); \n pushFollow(FOLLOW_ruleAstTypeTuple_in_entryRuleAstTypeTuple4574);\n ruleAstTypeTuple();\n\n state._fsp--;\n\n after(grammarAccess.getAstTypeTupleRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstTypeTuple4581); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "TupleTypeRule createTupleTypeRule();", "@Override\n\tpublic void write(DataOutput dout) throws IOException {\n\t\tdout.writeLong(this.time);\n\t\tdout.writeInt(this.intVal);\n\t}", "public interface IGeneralTuple {\r\n /**\r\n * Sets the values for a tuple.\r\n * @param values the tuple values\r\n */\r\n public void setValues(List<Object> values);\r\n /**\r\n * Returns the list of values in a tuple.\r\n * @return the list of values\r\n */\r\n public List<Object> getValues();\r\n /**\r\n * Returns the value located in a specific index of the list of values. \r\n * @param index the index in which the value is located\r\n * @return the value \r\n */\r\n public Object getValue(int index);\r\n /**\r\n * Returns whether it is a general tuple.\r\n * @return a boolean value indicating whether it is a general tuple\r\n */\r\n public boolean isGeneralTuple();\r\n}", "public T caseTuple(Tuple object)\n {\n return null;\n }", "public interface Output {\n\n void putString(String string);\n\n // Basic Data Types\n /**\n * Write number\n *\n * @param num\n * Number\n */\n void writeNumber(Number num);\n\n /**\n * Write boolean\n *\n * @param bol\n * Boolean\n */\n void writeBoolean(Boolean bol);\n\n /**\n * Write string\n *\n * @param string\n * String\n */\n void writeString(String string);\n\n /**\n * Write date\n *\n * @param date\n * Date\n */\n void writeDate(Date date);\n\n void writeNull();\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Collection<?> array);\n\n /**\n * Write array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object[] array);\n\n /**\n * Write primitive array.\n *\n * @param array\n * Array to write\n */\n void writeArray(Object array);\n\n /**\n * Write map.\n *\n * @param map\n * Map to write\n */\n void writeMap(Map<Object, Object> map);\n\n /**\n * Write array as map.\n *\n * @param array\n * Array to write\n */\n void writeMap(Collection<?> array);\n\n /**\n * Write object.\n *\n * @param object\n * Object to write\n */\n void writeObject(Object object);\n\n /**\n * Write map as object.\n *\n * @param map\n * Map to write\n */\n void writeObject(Map<Object, Object> map);\n\n /**\n * Write recordset.\n *\n * @param recordset\n * Recordset to write\n */\n void writeRecordSet(RecordSet recordset);\n\n /**\n * Write XML object\n *\n * @param xml\n * XML document\n */\n void writeXML(Document xml);\n\n /**\n * Write ByteArray object (AMF3 only).\n *\n * @param array\n * object to write\n */\n void writeByteArray(ByteArray array);\n\n /**\n * Write a Vector&lt;int&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorInt(Vector<Integer> vector);\n\n /**\n * Write a Vector&lt;uint&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorUInt(Vector<Long> vector);\n\n /**\n * Write a Vector&lt;Number&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorNumber(Vector<Double> vector);\n\n /**\n * Write a Vector&lt;Object&gt;.\n *\n * @param vector\n * vector\n */\n void writeVectorObject(Vector<Object> vector);\n\n /**\n * Write reference to complex data type\n *\n * @param obj\n * Referenced object\n */\n void writeReference(Object obj);\n\n /**\n * Whether object is custom\n *\n * @param custom\n * Object\n * @return true if object is of user type, false otherwise\n */\n boolean isCustom(Object custom);\n\n /**\n * Write custom (user) object\n *\n * @param custom\n * Custom data type object\n */\n void writeCustom(Object custom);\n\n /**\n * Clear references\n */\n void clearReferences();\n}", "protected void writeWrite ()\n {\n stream.println (\" public void _write (org.omg.CORBA.portable.OutputStream o)\");\n stream.println (\" {\");\n if (entry instanceof ValueBoxEntry)\n {\n TypedefEntry member = ((InterfaceState) ((ValueBoxEntry) entry).state ().elementAt (0)).entry;\n SymtabEntry mType = member.type ();\n if (mType instanceof StringEntry)\n stream.println (\" o.write_string (value);\");\n\n else if (mType instanceof PrimitiveEntry)\n {\n String name = entry.name ();\n stream.println (\" \" + name + \" vb = new \" + name + \" (value);\");\n stream.println (\" \" + helperClass + \".write (o, vb);\");\n }\n\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n }\n else\n stream.println (\" \" + helperClass + \".write (o, value);\");\n stream.println (\" }\");\n stream.println ();\n }", "TupleLiteralPart createTupleLiteralPart();", "public void write(DataOutput out) throws IOException {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n TIOStreamTransport trans = new TIOStreamTransport(baos);\n TBinaryProtocol oprot = new TBinaryProtocol(trans);\n try {\n v.write(oprot);\n byte[] array = baos.toByteArray();\n out.writeInt(array.length);\n out.write(array);\n } catch (TException e) {\n throw new IOException(e.toString());\n }\n }", "private Tuple createTuple(Tuple tup) {\n\t\tTuple t = new Tuple(td);\n\t\tif (this.gbfieldtype == null) {\n\t\t\tt.setField(0, new IntField(1));\n\t\t} else {\n\t\t\tt.setField(0, tup.getField(gbfield));\n\t\t\tt.setField(1, new IntField(1));\n\t\t}\n\t\treturn t;\n\t}", "public abstract void writeToStream(java.io.DataOutputStream output) throws java.io.IOException;", "protected void processTuple (\n \t\t\t Tuple inputTuple, int streamId)\n \tthrows ShutdownException, InterruptedException {\n \tTuple result;\n \t//If we haven't already picked up a template tuple,\n \t// copy this one.\n \tif (tupleDataSample == null)\n \t\ttupleDataSample = inputTuple;\n \t\t\t\n \tcount++;\n result = appendWindowId(inputTuple, streamId);\n putTuple(result, 0);\t \n \tif ((count % slide == 0) && (windowType == 0)) {\n \t\t//output a punctuation to say windowId_from is completed\t\t\t\n \t\tputTuple (createPunctuation (inputTuple, windowId_from), 0);\n \t} \t\t\n \n }", "public void _write(org.omg.CORBA.portable.OutputStream ostream)\r\n {\r\n NiveauEtudeHelper.write(ostream,value);\r\n }", "@Override\n\tpublic void write(DataOutput out) throws IOException {\n\t\trowOrColumn.write(out);\n\t\tmatrix.write(out);\n\n\t}", "private void appendOutputValue(Tuple tuple, double value, boolean enablePrecision) {\n if(enablePrecision) {\n switch(this.getPrecisionType()) {\n case FLOAT7:\n tuple.append(DECIMAL_FORMAT.format(value));\n break;\n case FLOAT16:\n tuple.append(toFloat(fromFloat((float) value)));\n break;\n case DOUBLE64:\n tuple.append(value);\n break;\n case FLOAT32:\n default:\n tuple.append((float) value);\n break;\n }\n } else {\n tuple.append((float) value);\n }\n }", "@Override\n public void process(StreamingInput<Tuple> stream, Tuple tuple) throws Exception {\n \t\n \t// Collect fields to add to JSON output.\n\t\tStreamSchema schema = tuple.getStreamSchema();\n \tSet<String> attributeNames = schema.getAttributeNames();\n \tJSONObject jsonFields = new JSONObject();\n\t \n\tfor (String attributeName : attributeNames) {\n\t\tif (schema.getAttribute(attributeName).getType().getMetaType() == Type.MetaType.RSTRING) {\n\t\t\tjsonFields.put(attributeName, tuple.getObject(attributeName).toString());\n\t\t} else {\n\t\t\tjsonFields.put(attributeName, tuple.getObject(attributeName));\n\t\t}\n\t}\n \n \t// Add timestamp, if specified, for time-based queries.\n \tif (timestampName != null) {\n \t\tDateFormat df = new SimpleDateFormat(\"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSZZ\");\n \t\t\n \t\tif (attributeNames.contains(timestampName) && schema.getAttribute(timestampName).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(timestampName).equals(\"\")) {\n \t\t\tString timestampToInsert = tuple.getString(timestampName);\n \t\t\tjsonFields.put(timestampName, df.format(timestampToInsert));\n \t\t} else {\n \t\t\tjsonFields.put(timestampName, df.format(new Date(System.currentTimeMillis())));\n \t\t}\n \t}\n \t\n \t// Get index name/type/id specified inside tuple (default: from params).\n \tString indexToInsert = index;\n \tString typeToInsert = type;\n \tString idToInsert = null;\n \t\n \tif (attributeNames.contains(index) && schema.getAttribute(index).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(index).equals(\"\")) {\n \t\tindexToInsert = tuple.getString(index);\n \t}\n \t\n \tif (attributeNames.contains(type) && schema.getAttribute(type).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(type).equals(\"\")) {\n \t\ttypeToInsert = tuple.getString(type);\n \t}\n\n \tif (id != null && attributeNames.contains(id) && schema.getAttribute(id).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(id).equals(\"\")) {\n \t\tidToInsert = tuple.getString(id);\n \t}\n \t\n \tif (connectedToElasticsearch(indexToInsert, typeToInsert)) {\n \t\n \t\t// Add jsonFields to bulkBuilder.\n \tString source = jsonFields.toString();\n \t\n \tif (idToInsert != null) {\n \t\tbulkBuilder.addAction(new Index.Builder(source).index(indexToInsert).type(typeToInsert).id(idToInsert).build());\n \t} else {\n \t\tbulkBuilder.addAction(new Index.Builder(source).index(indexToInsert).type(typeToInsert).build());\n \t}\n \t\n \tcurrentBulkSize++;\n \t\n \t// If bulk size met, output jsonFields to Elasticsearch.\n \tif(currentBulkSize >= bulkSize) {\n\t \tBulk bulk = bulkBuilder.build();\n\t \tBulkResult result;\n\t \t\n\t \ttry {\n\t\t \tresult = client.execute(bulk);\n\t \t} catch (NoHttpResponseException e) {\n\t \t\t_trace.error(e);\n\t \t\treturn;\n\t \t}\n\t \t\n \t\t\tif (result.isSucceeded()) {\n \t\t\t\tlong currentNumInserts = numInserts.getValue();\n \t\t\t\tnumInserts.setValue(currentNumInserts + bulkSize);\n \t\t\t\tcurrentBulkSize = 0;\n \t\t\t} else {\n \t\t\t\tfor (BulkResultItem item : result.getItems()) {\n \t\t\t\t\tif (item.error != null) {\n \t\t\t\t\t\tnumInserts.increment();\n \t\t\t\t\t} else {\n \t\t\t\t\t\ttotalFailedRequests.increment();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Clear bulkBuilder. Gets recreated in connectedToElasticsearch().\n \t\t\tbulkBuilder = null;\n \t\t\t\n \t\t\t// Get size metrics for current type.\n \t\t\tif (sizeMetricsEnabled && mapperSizeInstalled) {\n\t \t\t\tString query = \"{\\n\" +\n\t \t \" \\\"query\\\" : {\\n\" +\n\t \t \" \\\"match_all\\\" : {}\\n\" +\n\t \t \" },\\n\" +\n\t \t \" \\\"aggs\\\" : {\\n\" +\n\t \t \" \\\"size_metrics\\\" : {\\n\" +\n\t \t \" \\\"extended_stats\\\" : {\\n\" +\n\t \t \" \\\"field\\\" : \\\"_size\\\"\\n\" +\n\t \t \" }\\n\" +\n\t \t \" }\\n\" +\n\t \t \" }\\n\" +\n\t \t \"}\";\n\t \t\t\t\n\t \t Search search = new Search.Builder(query)\n\t \t .addIndex(indexToInsert)\n\t \t .addType(typeToInsert)\n\t \t .build();\n\t \t \n\t \t SearchResult searchResult = client.execute(search);\n\t \t \n\t \t if (searchResult.isSucceeded()) {\n\t\t \t ExtendedStatsAggregation sizeMetrics = searchResult.getAggregations().getExtendedStatsAggregation(\"size_metrics\");\n\t\t \t\t\t\n\t\t \t if (sizeMetrics != null) {\n\t\t \t \tif (sizeMetrics.getAvg() != null) {\n\t\t\t\t \t\t\tavgInsertSizeBytes.setValue(sizeMetrics.getAvg().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getMax() != null) {\n\t\t \t \t\tmaxInsertSizeBytes.setValue(sizeMetrics.getMax().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getMin() != null) {\n\t\t \t \t\tminInsertSizeBytes.setValue(sizeMetrics.getMin().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getSum() != null) {\n\t\t \t \t\tsumInsertSizeBytes.setValue(sizeMetrics.getSum().longValue());\n\t\t \t \t}\n\t\t \t }\n\t \t }\n \t\t\t}\n \t\t}\n \t}\n }", "@Override\n Tuple getNextTuple() {\n System.out.println(\"Please use dump() on SortOperator to get results.\");\n return null;\n }", "protected byte[] serializeCursor(int offset, int pageSize, Serializable[] tuple) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {\n oos.write(offset);\n oos.write(pageSize);\n oos.writeObject(tuple);\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n return baos.toByteArray();\n }", "void writeTo(DataOutputStream dout) throws IOException {\r\n throw new Error(\"Method no longer available\");\r\n// dout.writeInt(commit_id);\r\n// dout.writeInt(table_id);\r\n// dout.writeInt(journal_entries);\r\n// dout.write(command_journal, 0, journal_entries);\r\n// int size = command_parameters.size();\r\n// dout.writeInt(size);\r\n// for (int i = 0; i < size; ++i) {\r\n// dout.writeInt(command_parameters.intAt(i));\r\n// }\r\n }", "@Override\n\tpublic Object visitTuple(Tuple tuple, Object arg) throws Exception {\n\t\tList<Expression> explist = tuple.getExprList();\n\t\tfor (Expression exp : explist) {\n\t\t\texp.visit(this, arg);\n\t\t}\n\t\treturn null;\n\t}", "void emit(DataOutputStream out, ConstantPool cp) throws IOException, ClassException {\n out.write(getType());\n // The rest is dependent on what type of constant this is.\n emit2(out, cp);\n }", "@Override\n\tpublic void serializeTo(DataOutputStream output) throws IOException\n\t{\n\t\toutput.writeLong(value);\n\t}", "public AvroTupleWrapper(final T o) {\n avroObject = o;\n }", "public TupleDesc getTupleDesc() {\n // some code goes here\n return td;\n }", "private void writeOutput(\n RecordWriter<Writable, Object> writer,\n TaskAttemptContext context) throws IOException, InterruptedException {\n NullWritable nullWritable = NullWritable.get();\n try (ManifestCommitterTestSupport.CloseWriter<Writable, Object> cw =\n new ManifestCommitterTestSupport.CloseWriter<>(writer, context)) {\n writer.write(KEY_1, VAL_1);\n writer.write(null, nullWritable);\n writer.write(null, VAL_1);\n writer.write(nullWritable, VAL_2);\n writer.write(KEY_2, nullWritable);\n writer.write(KEY_1, null);\n writer.write(null, null);\n writer.write(KEY_2, VAL_2);\n writer.close(context);\n }\n }", "public boolean isTuple() {\n return PyTorchLibrary.LIB.iValueIsTuple(getHandle());\n }", "public Tuple nextTuple() {\n\t\ttry {\n\t\t\treturn tr.read();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@SuppressWarnings(\"unchecked\")\n public static void serialize(Output out, Field field, Method getter, Object object, Object value) {\n log.trace(\"serialize\");\n if (value instanceof IExternalizable) {\n // make sure all IExternalizable objects are serialized as objects\n out.writeObject(value);\n } else if (value instanceof ByteArray) {\n // write ByteArray objects directly\n out.writeByteArray((ByteArray) value);\n } else if (value instanceof Vector) {\n log.trace(\"Serialize Vector\");\n // scan the vector to determine the generic type\n Vector<?> vector = (Vector<?>) value;\n int ints = 0;\n int longs = 0;\n int dubs = 0;\n int nans = 0;\n for (Object o : vector) {\n if (o instanceof Integer) {\n ints++;\n } else if (o instanceof Long) {\n longs++;\n } else if (o instanceof Number || o instanceof Double) {\n dubs++;\n } else {\n nans++;\n }\n }\n // look at the type counts\n if (nans > 0) {\n // if we have non-number types, use object\n ((org.red5.io.amf3.Output) out).enforceAMF3();\n out.writeVectorObject((Vector<Object>) value);\n } else if (dubs == 0 && longs == 0) {\n // no doubles or longs\n out.writeVectorInt((Vector<Integer>) value);\n } else if (dubs == 0 && ints == 0) {\n // no doubles or ints\n out.writeVectorUInt((Vector<Long>) value);\n } else {\n // handle any other types of numbers\n ((org.red5.io.amf3.Output) out).enforceAMF3();\n out.writeVectorNumber((Vector<Double>) value);\n }\n } else {\n if (writeBasic(out, value)) {\n log.trace(\"Wrote as basic\");\n } else if (!writeComplex(out, value)) {\n log.trace(\"Unable to serialize: {}\", value);\n }\n }\n }", "public static void write(OutputStream paramOutputStream, ValueMember paramValueMember) {\n/* 153 */ paramOutputStream.write_string(paramValueMember.name);\n/* 154 */ paramOutputStream.write_string(paramValueMember.id);\n/* 155 */ paramOutputStream.write_string(paramValueMember.defined_in);\n/* 156 */ paramOutputStream.write_string(paramValueMember.version);\n/* 157 */ paramOutputStream.write_TypeCode(paramValueMember.type);\n/* 158 */ IDLTypeHelper.write(paramOutputStream, paramValueMember.type_def);\n/* 159 */ paramOutputStream.write_short(paramValueMember.access);\n/* */ }", "void write();" ]
[ "0.76726264", "0.6571779", "0.625033", "0.6138677", "0.60623586", "0.60537624", "0.5966559", "0.5889688", "0.5790497", "0.5695201", "0.5659859", "0.56279886", "0.55743957", "0.5572717", "0.55500114", "0.5538211", "0.55039465", "0.54833245", "0.5419178", "0.5417662", "0.54160523", "0.54042816", "0.5350813", "0.53352165", "0.52753085", "0.5272454", "0.52632904", "0.525067", "0.5232742", "0.52258265", "0.5179808", "0.51773", "0.5174444", "0.5166298", "0.5155016", "0.5143976", "0.51387525", "0.5136546", "0.5130535", "0.5128416", "0.5126174", "0.51149106", "0.5114368", "0.51138276", "0.511224", "0.51021814", "0.5077838", "0.5076579", "0.5074768", "0.5065123", "0.5063565", "0.50597554", "0.5058176", "0.50554925", "0.5032221", "0.5026944", "0.49921685", "0.49898097", "0.49853525", "0.4983505", "0.49809986", "0.49791458", "0.49777818", "0.4964404", "0.49606264", "0.4954306", "0.49445078", "0.4944483", "0.49318653", "0.49300677", "0.493002", "0.49221057", "0.49193513", "0.49190283", "0.49189743", "0.49166292", "0.49142945", "0.49028713", "0.4898904", "0.48923442", "0.48914146", "0.4888602", "0.48876923", "0.4882903", "0.48710003", "0.48656237", "0.4864838", "0.48639405", "0.48633105", "0.4840073", "0.48357645", "0.48320472", "0.48318702", "0.4830908", "0.48263305", "0.48182026", "0.48097712", "0.48068488", "0.47978178", "0.47934145" ]
0.5944371
7
Convert a TupleInput to a MyData2 object
public Object entryToObject(TupleInput ti) { BaseTuple bt = new BaseTuple(r); for(int i = 0; i < r.getNumberOfAttributes(); i++) { if(r.getAttributeType(i) == Globals.INTEGER) { bt.setAttributeValueByPosition(i, new Integer(ti.readInt())); } else { assert r.getAttributeType(i) == Globals.STRING; bt.setAttributeValueByPosition(i, ti.readString()); } } return bt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Tuple read(DataInput in) throws IOException {\n // nuke the old contents of the tuple\n Tuple ret = new Tuple();\n ret.fields = new ArrayList<Datum>();\n\n int size = decodeInt(in);\n \n for (int i = 0; i < size; i++) {\n ret.appendField(readDatum(in));\n }\n \n return ret;\n\n }", "@Override\n\t\tpublic Tuple exec(Tuple input) throws IOException {\n\t\t\tfor (Tuple t : (DataBag) input.get(0)) {\n\t\t\t\treturn wrap(t, getSign());\t\n\t\t\t}\n\t\t\t// Odd.\n\t\t\treturn tf.newTuple(bf.newDefaultBag());\n\t\t}", "public Tuple(Datum fieldIn) {\n fields = new ArrayList<Datum>(1);\n fields.add(fieldIn);\n }", "public abstract Tuple parseFrom(byte[] bytes) throws Exception;", "private Tuple createTuple(Tuple tup) {\n\t\tTuple t = new Tuple(td);\n\t\tif (this.gbfieldtype == null) {\n\t\t\tt.setField(0, new IntField(1));\n\t\t} else {\n\t\t\tt.setField(0, tup.getField(gbfield));\n\t\t\tt.setField(1, new IntField(1));\n\t\t}\n\t\treturn t;\n\t}", "public abstract void readDataItem(BDTuple tuple) throws RollbackException;", "public Tuple2() {\n }", "public abstract T getTuple(Record record);", "public void objectToEntry(Object object, TupleOutput to) {\n // Write the data to the TupleOutput (a DatabaseEntry).\n // Order is important. The first data written will be\n // the first bytes used by the default comparison routines.\n\n BaseTuple bt = (BaseTuple) object;\n\n for(int i = 0; i < r.getNumberOfAttributes(); i++) {\n if(r.getAttributeType(i) == Globals.INTEGER) {\n to.writeInt(((Integer) bt.values[i]).intValue());\n } else {\n assert r.getAttributeType(i) == Globals.STRING;\n to.writeString((String) bt.values[i]);\n }\n }\n }", "public static Tuple toTuple(Object o) throws ExecException {\n if (o == null) {\n return null;\n }\n\n if (o instanceof Tuple) {\n try {\n return (Tuple)o;\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Tuple.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n } else {\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Tuple\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n }", "protected void handleData(T tuple)\n throws DataException\n {\n \n if (tuple.isMutable())\n {\n if (sequence!=null)\n {\n if (sequenceField.getValue(tuple)==null)\n { \n String sequenceVal = Long.toString(sequence.next());\n if (debug)\n { \n log.fine\n (\"Generated sequence \"+sequenceVal\n +\" for \"+sequenceField.getURI()\n );\n }\n \n sequenceField.setValue\n ((EditableTuple) tuple\n ,sequenceField.getType().fromString(sequenceVal)\n ); \n }\n else\n { \n if (debug)\n {\n log.fine\n (\"Sequence field not null \"+sequenceField.getURI());\n }\n }\n }\n else\n { \n if (sequenceField!=null)\n { log.fine(\"Sequence is null for \"+sequenceField);\n }\n }\n\n if (defaultSetters!=null)\n {\n for (Setter<?> setter : defaultSetters)\n { \n if (setter.getTarget().get()==null)\n { setter.set();\n }\n }\n }\n\n if (fixedSetters!=null)\n {\n for (Setter<?> setter : fixedSetters)\n { setter.set();\n }\n }\n }\n else\n {\n if (debug)\n {\n log.fine\n (\"Not a mutable Tuple \"+tuple);\n }\n }\n \n if (inspector!=null)\n {\n Violation<T>[] violations=inspector.inspect(tuple);\n if (violations!=null)\n { throw new DataException(null,new RuleException(violations));\n }\n }\n \n }", "public T caseTuple2(Tuple2 object)\n {\n return null;\n }", "TupleTypeRule createTupleTypeRule();", "public static ScoredTuple fromIntermediateTuple(Tuple intermediateTuple) throws ExecException\n {\n try {\n Double score = (Double)intermediateTuple.get(0);\n Tuple originalTuple = (Tuple)intermediateTuple.get(1);\n return new ScoredTuple(score, originalTuple);\n } catch (Exception e) {\n throw new RuntimeException(\"Cannot deserialize intermediate tuple: \"+intermediateTuple.toString(), e);\n }\n }", "public abstract void handleTuple(ITuple tuple);", "public T getMetadataEntityFromTuple(ITupleReference tuple) throws MetadataException, IOException;", "TupleExpr createTupleExpr();", "public T caseTuple(Tuple object)\n {\n return null;\n }", "@Override\n public void process(StreamingInput<Tuple> stream, Tuple tuple) throws Exception {\n \t\n \t// Collect fields to add to JSON output.\n\t\tStreamSchema schema = tuple.getStreamSchema();\n \tSet<String> attributeNames = schema.getAttributeNames();\n \tJSONObject jsonFields = new JSONObject();\n\t \n\tfor (String attributeName : attributeNames) {\n\t\tif (schema.getAttribute(attributeName).getType().getMetaType() == Type.MetaType.RSTRING) {\n\t\t\tjsonFields.put(attributeName, tuple.getObject(attributeName).toString());\n\t\t} else {\n\t\t\tjsonFields.put(attributeName, tuple.getObject(attributeName));\n\t\t}\n\t}\n \n \t// Add timestamp, if specified, for time-based queries.\n \tif (timestampName != null) {\n \t\tDateFormat df = new SimpleDateFormat(\"yyyy'-'MM'-'dd'T'HH':'mm':'ss.SSSZZ\");\n \t\t\n \t\tif (attributeNames.contains(timestampName) && schema.getAttribute(timestampName).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(timestampName).equals(\"\")) {\n \t\t\tString timestampToInsert = tuple.getString(timestampName);\n \t\t\tjsonFields.put(timestampName, df.format(timestampToInsert));\n \t\t} else {\n \t\t\tjsonFields.put(timestampName, df.format(new Date(System.currentTimeMillis())));\n \t\t}\n \t}\n \t\n \t// Get index name/type/id specified inside tuple (default: from params).\n \tString indexToInsert = index;\n \tString typeToInsert = type;\n \tString idToInsert = null;\n \t\n \tif (attributeNames.contains(index) && schema.getAttribute(index).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(index).equals(\"\")) {\n \t\tindexToInsert = tuple.getString(index);\n \t}\n \t\n \tif (attributeNames.contains(type) && schema.getAttribute(type).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(type).equals(\"\")) {\n \t\ttypeToInsert = tuple.getString(type);\n \t}\n\n \tif (id != null && attributeNames.contains(id) && schema.getAttribute(id).getType().getMetaType() == Type.MetaType.RSTRING\n \t\t\t&& !tuple.getString(id).equals(\"\")) {\n \t\tidToInsert = tuple.getString(id);\n \t}\n \t\n \tif (connectedToElasticsearch(indexToInsert, typeToInsert)) {\n \t\n \t\t// Add jsonFields to bulkBuilder.\n \tString source = jsonFields.toString();\n \t\n \tif (idToInsert != null) {\n \t\tbulkBuilder.addAction(new Index.Builder(source).index(indexToInsert).type(typeToInsert).id(idToInsert).build());\n \t} else {\n \t\tbulkBuilder.addAction(new Index.Builder(source).index(indexToInsert).type(typeToInsert).build());\n \t}\n \t\n \tcurrentBulkSize++;\n \t\n \t// If bulk size met, output jsonFields to Elasticsearch.\n \tif(currentBulkSize >= bulkSize) {\n\t \tBulk bulk = bulkBuilder.build();\n\t \tBulkResult result;\n\t \t\n\t \ttry {\n\t\t \tresult = client.execute(bulk);\n\t \t} catch (NoHttpResponseException e) {\n\t \t\t_trace.error(e);\n\t \t\treturn;\n\t \t}\n\t \t\n \t\t\tif (result.isSucceeded()) {\n \t\t\t\tlong currentNumInserts = numInserts.getValue();\n \t\t\t\tnumInserts.setValue(currentNumInserts + bulkSize);\n \t\t\t\tcurrentBulkSize = 0;\n \t\t\t} else {\n \t\t\t\tfor (BulkResultItem item : result.getItems()) {\n \t\t\t\t\tif (item.error != null) {\n \t\t\t\t\t\tnumInserts.increment();\n \t\t\t\t\t} else {\n \t\t\t\t\t\ttotalFailedRequests.increment();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Clear bulkBuilder. Gets recreated in connectedToElasticsearch().\n \t\t\tbulkBuilder = null;\n \t\t\t\n \t\t\t// Get size metrics for current type.\n \t\t\tif (sizeMetricsEnabled && mapperSizeInstalled) {\n\t \t\t\tString query = \"{\\n\" +\n\t \t \" \\\"query\\\" : {\\n\" +\n\t \t \" \\\"match_all\\\" : {}\\n\" +\n\t \t \" },\\n\" +\n\t \t \" \\\"aggs\\\" : {\\n\" +\n\t \t \" \\\"size_metrics\\\" : {\\n\" +\n\t \t \" \\\"extended_stats\\\" : {\\n\" +\n\t \t \" \\\"field\\\" : \\\"_size\\\"\\n\" +\n\t \t \" }\\n\" +\n\t \t \" }\\n\" +\n\t \t \" }\\n\" +\n\t \t \"}\";\n\t \t\t\t\n\t \t Search search = new Search.Builder(query)\n\t \t .addIndex(indexToInsert)\n\t \t .addType(typeToInsert)\n\t \t .build();\n\t \t \n\t \t SearchResult searchResult = client.execute(search);\n\t \t \n\t \t if (searchResult.isSucceeded()) {\n\t\t \t ExtendedStatsAggregation sizeMetrics = searchResult.getAggregations().getExtendedStatsAggregation(\"size_metrics\");\n\t\t \t\t\t\n\t\t \t if (sizeMetrics != null) {\n\t\t \t \tif (sizeMetrics.getAvg() != null) {\n\t\t\t\t \t\t\tavgInsertSizeBytes.setValue(sizeMetrics.getAvg().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getMax() != null) {\n\t\t \t \t\tmaxInsertSizeBytes.setValue(sizeMetrics.getMax().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getMin() != null) {\n\t\t \t \t\tminInsertSizeBytes.setValue(sizeMetrics.getMin().longValue());\n\t\t \t \t}\n\t\t \t \tif (sizeMetrics.getSum() != null) {\n\t\t \t \t\tsumInsertSizeBytes.setValue(sizeMetrics.getSum().longValue());\n\t\t \t \t}\n\t\t \t }\n\t \t }\n \t\t\t}\n \t\t}\n \t}\n }", "public Tuple(String attrib_names [], String attrib_types [], String attrib_values []) {\n\n\ttuple_counter++;\n\tnum_attribs = attrib_types.length;\n\tmy_data = new HashMap();\n\t\n\tfor (int i = 0; i < num_attribs; i++) {\n\ttry {\n\t Class cl = Class.forName(attrib_types[i]);\n\t Constructor constructor =\n\t\tcl.getConstructor(new Class[] { String.class });\n\t my_data.put ( attrib_names[i],\n\t\t(ColumnValue) constructor.newInstance\n\t\t(new Object[] { attrib_values[i] }));\n\t}\n\tcatch (java.lang.ClassNotFoundException e)\n\t { System.out.println(e.toString()); } \n\tcatch (java.lang.NoSuchMethodException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.reflect.InvocationTargetException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.InstantiationException e)\n\t { System.out.println(e.toString()); }\n\tcatch (java.lang.IllegalAccessException e)\n\t { System.out.println(e.toString()); }\n\n\t}\n }", "private Mutation mutationFromTuple(Tuple t) throws IOException\n {\n Mutation mutation = new Mutation();\n if (t.get(1) == null)\n {\n if (allow_deletes)\n {\n mutation.deletion = new Deletion();\n mutation.deletion.predicate = new org.apache.cassandra.thrift.SlicePredicate();\n mutation.deletion.predicate.column_names = Arrays.asList(objToBB(t.get(0)));\n mutation.deletion.setTimestamp(FBUtilities.timestampMicros());\n }\n else\n throw new IOException(\"null found but deletes are disabled, set \" + PIG_ALLOW_DELETES +\n \"=true in environment or allow_deletes=true in URL to enable\");\n }\n else\n {\n org.apache.cassandra.thrift.Column column = new org.apache.cassandra.thrift.Column();\n column.setName(objToBB(t.get(0)));\n column.setValue(objToBB(t.get(1)));\n column.setTimestamp(FBUtilities.timestampMicros());\n mutation.column_or_supercolumn = new ColumnOrSuperColumn();\n mutation.column_or_supercolumn.column = column;\n }\n return mutation;\n }", "TupleLiteralExp createTupleLiteralExp();", "private Tuples() {}", "public void putNext(Tuple tuple) throws IOException {\n\t\tint sqlPos = 1;\n\t\ttry {\n\t\t\tint size = tuple.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\ttry {\n\t\t\t\t\tObject field = tuple.get(i);\n\t\t\t\t\tif(field != null){\n\t\t\t\t\t\tif(\"\\\\N\".equalsIgnoreCase(field.toString())){\n\t\t\t\t\t\t\tfield = null;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\t\t\t\t\tswitch (DataType.findType(field)) {\n\t\t\t\t\tcase DataType.NULL:\n\t\t\t\t\t\tps.setNull(sqlPos, java.sql.Types.VARCHAR);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.BOOLEAN:\n\t\t\t\t\t\tps.setBoolean(sqlPos, (Boolean) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.INTEGER:\n\t\t\t\t\t\tps.setInt(sqlPos, (Integer) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.LONG:\n\t\t\t\t\t\tps.setLong(sqlPos, (Long) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.FLOAT:\n\t\t\t\t\t\tps.setFloat(sqlPos, (Float) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.DOUBLE:\n\t\t\t\t\t\tps.setDouble(sqlPos, (Double) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.DATETIME:\n\t\t\t\t\t\tps.setTimestamp(sqlPos, new Timestamp(((DateTime) field).getMillis()));\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.BYTEARRAY:\n\t\t\t\t\t\tbyte[] b = ((DataByteArray) field).get();\n\t\t\t\t\t\tps.setBytes(sqlPos, b);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DataType.CHARARRAY:\n\t\t\t\t\t\tps.setString(sqlPos, (String) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase DataType.BYTE:\n\t\t\t\t\t\tps.setByte(sqlPos, (Byte) field);\n\t\t\t\t\t\tsqlPos++;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase DataType.MAP:\n\t\t\t\t\tcase DataType.TUPLE:\n\t\t\t\t\tcase DataType.BAG:\n\t\t\t\t\t\tthrow new RuntimeException(\"Cannot store a non-flat tuple \"\n\t\t\t\t\t\t\t\t+ \"using DbStorage\");\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tthrow new RuntimeException(\"Unknown datatype \"\n\t\t\t\t\t\t\t\t+ DataType.findType(field));\n\n\t\t\t\t\t}\n\n\t\t\t\t} catch (ExecException ee) {\n\t\t\t\t\tthrow new RuntimeException(ee);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tps.addBatch();\n\t\t\tcount++;\n\t\t\tif (count > batchSize) {\n\t\t\t\tcount = 0;\n\t\t\t\tps.executeBatch();\n\t\t\t\tps.clearBatch();\n\t\t\t\tps.clearParameters();\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\ttry {\n\t\t\t\tlog\n\t\t\t\t.error(\"Unable to insert record:\" + tuple.toDelimitedString(\"\\t\"),\n\t\t\t\t\t\te);\n\t\t\t} catch (ExecException ee) {\n\t\t\t\t// do nothing\n\t\t\t}\n\t\t\tif (e.getErrorCode() == 1366) {\n\t\t\t\t// errors that come due to utf-8 character encoding\n\t\t\t\t// ignore these kind of errors TODO: Temporary fix - need to find a\n\t\t\t\t// better way of handling them in the argument statement itself\n\t\t\t} else {\n\t\t\t\tthrow new RuntimeException(\"JDBC error\", e);\n\t\t\t}\n\t\t}\n\t}", "static ProjectedTuple castNumbers(ProjectedTuple tuple) {\n List<Object> newVaues = new ArrayList<>();\n for (int i = 0; i < tuple.values().size(); i++) {\n newVaues.add(convert(tuple.values().get(i), tuple.paths().get(i).returnType()));\n }\n\n return ProjectedTuple.of(tuple.paths(), newVaues);\n }", "protected abstract ContentValues getDataFromInput();", "IntermediateTuple(Tuple t1, Tuple t2) {\n\n if(t1 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t1);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t1).baseTuples) {\n baseTuples.add(bt);\n }\n }\n\n if(t2 instanceof BaseTuple) {\n baseTuples.add((BaseTuple) t2);\n } else {\n for(BaseTuple bt : ((IntermediateTuple) t2).baseTuples) {\n baseTuples.add(bt);\n }\n }\n }", "public UnmodifiableTuple(Tuple<F, L> tuple) {\r\n this.first = tuple.getFirst();\r\n this.last = tuple.getLast();\r\n size = tuple.size();\r\n hashCode = tuple.hashCode();\r\n }", "public T caseTuple1(Tuple1 object)\n {\n return null;\n }", "protected Tuple cleanTuple(Tuple result)\n {\n return result;\n }", "public Tuple unify(Tuple other) {\n\t\tSubstitution subst = UnionFindBasedUnifier.fromTerms(this.elts, other.elts);\n\t\tif (subst != null) {\n\t\t\treturn new Tuple(subst.apply(this.elts));\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic Pair<S, T> convertPair() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn synchronizedPair(pair.convertPair(), mutex);\r\n\t\t\t}\r\n\t\t}", "<C, P> TupleLiteralExp<C, P> createTupleLiteralExp();", "public abstract T getTuple(int aPosition);", "Astro tuple(AstroArg args);", "protected Tuple columnToTuple(ColumnFamilyRecordReader.Column column, CfDef cfDef, AbstractType comparator) throws IOException\n {\n Tuple pair = TupleFactory.getInstance().newTuple(2);\n\n // name\n if(comparator instanceof AbstractCompositeType)\n StorageHelper.setTupleValue(pair, 0, composeComposite((AbstractCompositeType) comparator, column.name));\n else\n StorageHelper.setTupleValue(pair, 0, StorageHelper.cassandraToObj(comparator, column.name, nativeProtocolVersion));\n\n // value\n Map<ByteBuffer,AbstractType> validators = getValidatorMap(cfDef);\n if (validators.get(column.name) == null)\n {\n Map<MarshallerType, AbstractType> marshallers = getDefaultMarshallers(cfDef);\n StorageHelper.setTupleValue(pair, 1, StorageHelper.cassandraToObj(marshallers.get(MarshallerType.DEFAULT_VALIDATOR), column.value, nativeProtocolVersion));\n }\n else\n StorageHelper.setTupleValue(pair, 1, StorageHelper.cassandraToObj(validators.get(column.name), column.value, nativeProtocolVersion));\n return pair;\n }", "TupleLiteralPart createTupleLiteralPart();", "TOutput MapFrom(TInput input);", "Map<String, PrimitiveTypeProvider> convert(T data);", "static OVRF fromSTRUCT(STRUCT input) throws SQLException {\n\n\t\tif (input == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tOVRF v = new OVRF();\n\t\tObject[] val = input.getAttributes();\n\t\tv.id = Helpers.integerOrNull((BigDecimal)val[0]);\n\t\tv.rt = (String)val[1];\n\t\tv.name = (String)val[2];\n\t\tv.description = (String)val[3];\n\n\t\treturn v;\n\n\t}", "public interface IMetadataEntityTupleTranslator<T> {\n\n /**\n * Transforms a metadata entity of type T from a given tuple to a Java\n * object (deserializing the appropriate field(s) in the tuple as\n * necessary).\n * \n * @param tuple\n * Tuple containing a serialized representation of a metadata\n * entity of type T.\n * @return A new instance of a metadata entity of type T.\n * @throws MetadataException\n * @throws IOException\n */\n public T getMetadataEntityFromTuple(ITupleReference tuple) throws MetadataException, IOException;\n\n /**\n * Serializes the given metadata entity of type T into an appropriate tuple\n * representation (i.e., some number of fields containing bytes).\n * \n * @param metadataEntity\n * Metadata entity to be written into a tuple.\n * @throws IOException\n */\n public ITupleReference getTupleFromMetadataEntity(T metadataEntity) throws MetadataException, IOException;\n}", "@Override\n\tpublic void execute(Tuple input, BasicOutputCollector collector) {\n\t\tString[] numbers = (String[]) input.getString(1).split(\"\\\\+\");\n\t\tInteger added = 0;\n\t\ttry{\n\t\t\tif(numbers.length<2){\n\t\t\t\tthrow new InvalidParameterException(\"Should be at least 2 numbers\");\n\t\t\t}\n\t\t\tfor(String num : numbers){\n\t\t\t\t//Add each member\n\t\t\t\tadded += Integer.parseInt((java.lang.String) num);\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\t//On error emit null\n\t\t\tcollector.emit(new Values(input.getValue(0),NULL));\n\t\t}\n\t\t//Emit the result\n\t\tcollector.emit(new Values(input.getValue(0),added));\n\t}", "public AvroTupleWrapper(final T o) {\n avroObject = o;\n }", "public abstract Object fromProtoValue(Object in);", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic T exec(Tuple input) throws IOException {\n\t\t\tObject ret = null;\n\t\t\t\n\t\t\t// Cycle through.\n\t\t\tfor (Tuple outerTuple : (DataBag) input.get(0)) {\n\t\t\t\tfor (Tuple tup : (DataBag) outerTuple.get(0)) {\n//\t\t\t\t\tSystem.err.println(\"OP cur: \" + ret + \" check: \" + tup);\n\t\t\t\t\tif (0 <= (Long) tup.get(1)) {\n\t\t\t\t\t\tif (ret == null) {\n\t\t\t\t\t\t\tret = tup.get(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tint cmp = DataType.compare(ret, tup.get(0));\n\t\t\t\t\t\t\tif ((runMin && cmp > 0) || (!runMin && cmp < 0)) {\n\t\t\t\t\t\t\t\tret = tup.get(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn (T) ret;\n\t\t}", "<C, P> TupleLiteralPart<C, P> createTupleLiteralPart();", "Mapper<T, T2> from(T source);", "public Tuple(Object... values) {\n data = Arrays.copyOf(values, values.length);\n }", "public Tuple(TupleDesc td) {\n\t\t\tfields = new ArrayList<Field>();\n\t\t\ttupleDesc = td;\n\t\t\n\t\t// some code goes here\n\t\t// 2- assign td and initialize the array of fields\n\n\t}", "public static BInputPort connectTo(TopologyElement te, BOutput output,\n Type tupleType, BOperatorInvocation receivingBop,\n BInputPort input) {\n\n addDependency(te, receivingBop, tupleType);\n return receivingBop.inputFrom(output, input);\n }", "public interface CoordTupleString {\n\n /**\n * Accessor for the max tuple index\n * \n * @return the max tuple index\n */\n public abstract int maxIndex();\n\n /**\n * Accessor to determine the actual type managed.\n * \n * @return a Number the most directly corresponds to the\n * underlying managed type (Float for a float tuplestring,\n * Double for a double tuplestring, etc)\n */\n public abstract Number getPrimitiveType();\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float[]\n */\n public abstract float[] getasFloat(int tuple);\n\n /**\n * Accessor to retrieve a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double[]\n */\n public abstract double[] getasDouble(int tuple);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a float\n */\n public abstract float getasFloat(int tuple, int val);\n\n /**\n * Accessor to retrieve a single value in a tuple\n * \n * @param tuple the tuple to retrieve (the first tuple is index 0)\n * @param val the index of the value in the tuple (the first val\n * is index 0)\n * @return the tuple at index <code>tuple</code>, coereced into\n * a double\n */\n public abstract double getasDouble(int tuple, int val);\n}", "public TwoTuple(T value1, K value2) {\n this.value1 = value1;\n this.value2 = value2;\n }", "public T caseTupleTypeCS(TupleTypeCS object) {\r\n return null;\r\n }", "public void readFields(DataInput in) throws IOException {\n byte[] b = new byte[1];\n in.readFully(b);\n if (b[0]!=TUPLE)\n throw new IOException(\"Unexpected data while reading tuple from binary file\");\n Tuple t = read(in);\n fields = t.fields;\n }", "@SafeVarargs\n\tpublic static <R> Tuple<R> construct(R... data) {\n\t\tLinkedList<R> list = new LinkedList<>();\n\t\tfor (R element : data) {\n\t\t\tlist.add(element);\n\t\t}\n\n\t\treturn new Tuple<>(list);\n\t}", "private static Tuple tupleBuilder(String s) throws Exception {\n\n if (s.length() < 3 || s.charAt(0) != '(' || s.charAt(s.length() - 1) != ')') {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n\n s = s.substring(1, s.length() - 1); // \"abc\", +3, -7.5, -7.5f, 2e3\n String[] ss = s.split(\",\"); // [\"abc\" , +3, -7.5, -7.5f, 2e3]\n List<Object> list = new ArrayList<>();\n for (int i = 0; i < ss.length; i++) {\n String temp = ss[i].trim(); // ?i:int || \"abc\" || +3 || -7.5f || 2e3\n Object o = null;\n // type match\n if (temp.charAt(0) == '?') {\n int index = temp.indexOf(':');\n String name = temp.substring(1, index);\n String type = temp.substring(index + 1);\n if (type.equalsIgnoreCase(\"int\")) {\n type = TYPEMATCH_INTEGER_NAME;\n } else if (type.equalsIgnoreCase(\"float\")) {\n type = TYPEMATCH_FLOAT_NAME;\n } else if (type.equalsIgnoreCase(\"string\")) {\n type = TYPEMATCH_STRING_NAME;\n } else {\n System.out.print(\"Type match format is wrong. \");\n throw new Exception();\n }\n o = new ArrayList<String>(Arrays.asList(name, type));\n // type is string\n } else if (temp.charAt(0) == '\"' && temp.charAt(temp.length() - 1) == '\"') {\n o = new String(temp.substring(1, temp.length() - 1));\n // type is float\n } else if (temp.indexOf('.') != -1 || temp.indexOf('e') != -1 || temp.indexOf('E') != -1) {\n try {\n o = Float.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Float format is wrong. \");\n throw new Exception();\n }\n\n if ((Float) o == Float.POSITIVE_INFINITY) {\n System.out.print(\"Float is overflow. \");\n throw new Exception();\n }\n // type is int\n } else {\n try {\n o = Integer.valueOf(temp);\n } catch (Exception e) {\n System.out.print(\"Tuple format is wrong. \");\n throw new Exception();\n }\n }\n list.add(o);\n }\n Tuple t = new Tuple(list);\n return t;\n }", "public Object convertToCatalyst (Object a, org.apache.spark.sql.catalyst.types.DataType dataType) ;", "public Tuple1(T value) {\n super(value);\n }", "public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n Object[] oldElements = oldDataRawObject.getElements();\n Map<String, Object> integerClassValues = \n new HashMap<String, Object>();\n integerClassValues.put(\"data\", oldElements[0]);\n RawObject integerClassObject = \n new RawObject(integerClassType, integerClassValues, null);\n RawObject[] newElements = new RawObject[1];\n newElements[0] = integerClassObject;\n RawObject newDataRawObject = \n new RawObject(newDataType, newElements);\n return newDataRawObject;\n }", "@Override\r\n\t\tpublic hust.idc.util.pair.UnorderedPair<E> convertPair() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn synchronizedPair(pair.convertPair(), mutex);\r\n\t\t\t}\r\n\t\t}", "private ArrayList<Tuple> loadTuple() {\n\t\tArrayList<Tuple> idArray = new ArrayList<Tuple>();\n\t\t\n\t\ttry {\n\t\t\tFileInputStream fileInputStream = context.openFileInput(SAVE_FILE);\n\t\t\tInputStreamReader inputStreamReader = new InputStreamReader(\n\t\t\t\t\tfileInputStream);\n\t\t\tType listType = new TypeToken<ArrayList<Tuple>>() {\n\t\t\t}.getType();\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tGson gson = builder.create();\n\t\t\tArrayList<Tuple> list = gson.fromJson(inputStreamReader, listType);\n\t\t\tidArray = list;\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn idArray;\n\t}", "public Object convert(Object fromValue) {\n RawObject oldDataRawObject = (RawObject) fromValue;\n RawObject oldKeyRawObject = (RawObject)oldDataRawObject.\n getSuper().getValues().get(\"keys\");\n Object[] oldDataKeyValue = \n (Object[])oldKeyRawObject.getElements();\n RawObject oldValueRawObject = (RawObject)oldDataRawObject.\n getSuper().getValues().get(\"values\");\n \n ArrayList<RawObject> newDataKeyValue = \n new ArrayList<RawObject>();\n RawObject myEnumRawObject = new RawObject(myEnumType, \"DATA\");\n newDataKeyValue.add(myEnumRawObject);\n \n RawObject newKeyRawObject = new RawObject\n (oldKeyRawObject.getType(), newDataKeyValue.toArray());\n Map<String, Object> \n newDataSuperValue = new HashMap<String, Object>();\n newDataSuperValue.put(\"keys\", newKeyRawObject);\n newDataSuperValue.put(\"values\", oldValueRawObject);\n RawObject newDataSuperRawObject = \n new RawObject(newDataSuperType, newDataSuperValue, null);\n Map<String, Object> newDataValue = \n new HashMap<String, Object>();\n RawObject newDataRawObject = \n new RawObject(newDataType, newDataValue, \n newDataSuperRawObject);\n return newDataRawObject;\n }", "public T caseTuple3(Tuple3 object)\n {\n return null;\n }", "static Map<Name, ObjectConverter> createConversionMap (final FeatureType input, final FeatureType toConvert) throws NonconvertibleObjectException{\n\n if(input.equals(toConvert)){\n return null;\n }\n final Map<Name, ObjectConverter> map = new HashMap<Name, ObjectConverter>();\n\n for (PropertyDescriptor toConvertDesc : toConvert.getDescriptors()) {\n for(PropertyDescriptor inputDesc : input.getDescriptors()){\n\n //same property name\n if(toConvertDesc.getName().equals(inputDesc.getName())){\n\n final Class inputClass = inputDesc.getType().getBinding();\n final Class toConvertClass = toConvertDesc.getType().getBinding();\n if(toConvertClass.equals(inputClass)){\n //same name and same type\n map.put(toConvertDesc.getName(), null);\n }else{\n //same name but different type\n if(toConvertDesc instanceof GeometryDescriptor){\n map.put(toConvertDesc.getName(), new GeomConverter(toConvertClass, inputClass));\n }else{\n map.put(toConvertDesc.getName(), ConverterRegistry.system().converter(toConvertClass, inputClass));\n }\n }\n }\n }\n }\n return map;\n\n }", "public void execute(Tuple input, BasicOutputCollector collector) {\n String sentence = input.getString(0);\n String[] words = sentence.split(\"\\t\");\n collector.emit(new Values(words[1]));\n }", "public Tuple getModel();", "public Tuple()\n {\n // Creat a new tuple\n data = new byte[max_size];\n tuple_offset = 0;\n tuple_length = max_size;\n }", "private IMapData<Integer, String> getHashMapData2() {\n List<IKeyValueNode<Integer, String>> creationData = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(2, \"c\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"a\"),\n KeyValueNode.make(3, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<IKeyValueNode<Integer, String>> data = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }", "@Override\r\n\tpublic Tuple nextTuple() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tTuple tuple = null;\r\n\t\ttry{\r\n\t\t\tString s = br.readLine();\r\n\t\t\tif(s==null) return null;\r\n\t\t\ttuple = new Tuple(s);\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.print(\"No more tuples!\");\r\n\t\t}\r\n\t\treturn tuple;\r\n\t}", "public interface IGeneralTuple {\r\n /**\r\n * Sets the values for a tuple.\r\n * @param values the tuple values\r\n */\r\n public void setValues(List<Object> values);\r\n /**\r\n * Returns the list of values in a tuple.\r\n * @return the list of values\r\n */\r\n public List<Object> getValues();\r\n /**\r\n * Returns the value located in a specific index of the list of values. \r\n * @param index the index in which the value is located\r\n * @return the value \r\n */\r\n public Object getValue(int index);\r\n /**\r\n * Returns whether it is a general tuple.\r\n * @return a boolean value indicating whether it is a general tuple\r\n */\r\n public boolean isGeneralTuple();\r\n}", "FromValuesColumns createFromValuesColumns();", "public Object convertToScala (Object a, org.apache.spark.sql.catalyst.types.DataType dataType) ;", "protected Object getSplValue(Attribute attribute, Tuple tuple) {\r\n\r\n\t\tType splType = attribute.getType();\r\n\t\tint index = attribute.getIndex();\r\n\t\t\r\n\t\tif (splType.getMetaType() == MetaType.INT8)\r\n\t\t\treturn tuple.getByte(index);\r\n\t\tif (splType.getMetaType() == MetaType.INT16)\r\n\t\t\treturn tuple.getShort(index);\r\n\t\tif (splType.getMetaType() == MetaType.INT32)\r\n\t\t\treturn tuple.getInt(index);\r\n\t\tif (splType.getMetaType() == MetaType.INT64)\r\n\t\t\treturn tuple.getLong(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.UINT8)\r\n\t\t\treturn tuple.getByte(index);\r\n\t\tif (splType.getMetaType() == MetaType.UINT16)\r\n\t\t\treturn tuple.getShort(index);\r\n\t\tif (splType.getMetaType() == MetaType.UINT32)\r\n\t\t\treturn tuple.getInt(index);\r\n\t\tif (splType.getMetaType() == MetaType.UINT64)\r\n\t\t\treturn tuple.getLong(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.BLOB)\r\n\t\t\treturn tuple.getBlob(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.BOOLEAN)\r\n\t\t\treturn tuple.getBoolean(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.DECIMAL32)\r\n\t\t\treturn tuple.getBigDecimal(index);\r\n\t\tif (splType.getMetaType() == MetaType.DECIMAL64)\r\n\t\t\treturn tuple.getBigDecimal(index);\r\n\t\tif (splType.getMetaType() == MetaType.DECIMAL128)\r\n\t\t\treturn tuple.getBigDecimal(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.FLOAT32)\r\n\t\t\treturn tuple.getFloat(index);\r\n\t\tif (splType.getMetaType() == MetaType.FLOAT64)\r\n\t\t\treturn tuple.getDouble(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.RSTRING)\r\n\t\t\treturn tuple.getString(index);\r\n\t\tif (splType.getMetaType() == MetaType.USTRING)\r\n\t\t\treturn tuple.getString(index);\r\n\r\n\t\tif (splType.getMetaType() == MetaType.TIMESTAMP)\r\n\t\t\treturn tuple.getTimestamp(index).getSQLTimestamp();\r\n\r\n\t\tif (splType.getMetaType() == MetaType.XML)\r\n\t\t\treturn tuple.getXML(index);\r\n\r\n\t\t// Task 39870 Update JDBC toolkit with respect to optional data type support\r\n\t\t// it compares the contain of SPL type delivers by SPL application with data types \r\n\t\t// The \"MetaType.OPTIONAL)\" and \"tuple.getOptional\" was not used due of \r\n\t\t// compatibility with older Streams Version without optional type\r\n\t\tif(splType.getLanguageType().toUpperCase().contains(\"OPTIONAL\"))\r\n\t\t\treturn tuple.getObject(index);\r\n/*\r\n\t\tif (splType.getMetaType() == MetaType.OPTIONAL)\r\n\t\t{\r\n\t\t\tif ((tuple.getOptional(index, attribute.getType().getAsCompositeElementType()).isPresent()))\r\n\t\t {\r\n\t\t \treturn tuple.getOptional(index, attribute.getType().getAsCompositeElementType()).get();\r\n\t\t }\r\n\t\t else\r\n\t\t \treturn null;\r\n\t\t}\r\n*/\t\t\t\t\t\r\n\t\tLOGGER.log(LogLevel.ERROR, Messages.getString(\"JDBC_SPL_TYPE_NOT_SUPPORT\"), splType.getMetaType()); \r\n\t\treturn null;\r\n\r\n\t}", "public T caseTupleTypeLiteralExpCS(TupleTypeLiteralExpCS object) {\r\n return null;\r\n }", "private int inputTransformer(ArrayList<String> input) {\r\n\t\tint transformType = Integer.parseInt(input.get(0));\r\n\t\tinput.remove(0);\r\n\r\n\t\tswitch (transformType) {\r\n\r\n\t\tcase 1: // Chat\r\n\t\t\tString chatMessage = (String) input.get(0);\r\n\t\t\tthis.chatMessage.setValue(chatMessage);\r\n\t\t\treturn 2;\r\n\t\tcase 2: // PointMessage\t\t\r\n\t\t\tthis.pointMessage.setValue(getPointMessage(input));\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\treturn transformType;\r\n\t}", "FromValues createFromValues();", "public static void addTupleAsOneCell(List<Cell> result,\n Tuple tuple,\n TupleProjector tupleProjector,\n ImmutableBytesWritable ptr) {\n byte[] value =\n tupleProjector.getSchema().toBytes(tuple, tupleProjector.getExpressions(),\n tupleProjector.getValueBitSet(), ptr);\n Cell firstCell = result.get(0);\n Cell keyValue =\n PhoenixKeyValueUtil.newKeyValue(firstCell.getRowArray(),\n firstCell.getRowOffset(),firstCell.getRowLength(), VALUE_COLUMN_FAMILY,\n VALUE_COLUMN_QUALIFIER, firstCell.getTimestamp(), value, 0, value.length);\n result.add(keyValue);\n }", "public ITupleReference getTupleFromMetadataEntity(T metadataEntity) throws MetadataException, IOException;", "public abstract double[] getasDouble(int tuple);", "@Override\n public BavetScoringTriTuple<A, B, C> createTuple(BavetAbstractTriTuple<A, B, C> parentTuple) {\n return new BavetScoringTriTuple<>(this, parentTuple);\n }", "private PassedData(Parcel p) {\n this.a = p.readInt();\n this.b = p.readLong();\n this.c = p.readString();\n }", "public Tuple(List<? extends Loyalty> c)\r\n\t\t{\r\n\t\t\tsuper(c);\r\n\t\t}", "public Tuple(Loyalty... c)\r\n\t\t{\r\n\t\t\tsuper(Arrays.asList(c));\r\n\t\t}", "@SuppressWarnings(\"unchecked\")\n private Object convertToDataTransferObject(Object data, Class<?> dtoType) {\n if (Map.class.isAssignableFrom(data.getClass())) {\n return ObjectUtils.convertMapToObject((Map<String, ?>) data, dtoType);\n }\n throw new ParamInvalidException(\"Cannot parse '\" + data.getClass().getName() + \"' to '\" + dtoType.getName() + \"'\");\n }", "@Test\n\tpublic void testForex2DTupleBuilder() throws ParseException {\n\t\t\n\t\tfinal TupleBuilder tupleBuilder = TupleBuilderFactory.getBuilderForFormat(\n\t\t\t\tTupleBuilderFactory.Name.FOREX_2D);\n\n\t\tfinal Tuple tuple1 = tupleBuilder.buildTuple(FOREX_LINE, \"1\");\n\n\t\tAssert.assertNotNull(tuple1);\n\t\tAssert.assertEquals(Integer.toString(1), tuple1.getKey());\n\t\t\n\t\tAssert.assertEquals(2, tuple1.getBoundingBox().getDimension());\n\t\tAssert.assertEquals(tuple1.getBoundingBox().getCoordinateHigh(1), 1.05752d, 0.1);\n\t}", "public static TupleDesc combine(TupleDesc td1, TupleDesc td2) {\n TupleDesc newTupleDesc = new TupleDesc(td1.numfields + td2.numfields);\n for (int i = 0; i < td1.numfields; i += 1) {\n newTupleDesc.setTypes(i, td1.getType(i));\n newTupleDesc.setAttrNames(i, td1.getFieldName(i));\n }\n for (int i = 0; i < td2.numfields; i += 1) {\n newTupleDesc.setTypes(i+td1.numfields, td2.getType(i));\n newTupleDesc.setAttrNames(i+td1.numfields, td2.getFieldName(i));\n }\n return newTupleDesc;\n }", "Object convert(Object source, TypeToken<?> targetTypeToken);", "public abstract float[] getasFloat(int tuple);", "public ArrayList<Tuple2<Input, Input>> call(ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1a,\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1b) {\n\n if (sameRDD) {\n\n int[] permutationArray = new int[lst1a.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//new Tuple2<Data<Type0,Type1>,Input>[lst1a.length];\n //Collections.copy(lst1a,list2);\n list2.addAll(lst1a);\n\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsSelf(lst1a,\n permutationArray);\n return wilResult;\n } else {\n\n // reset pivot flag\n for (int i = 0; i < lst1b.size(); i++) {\n lst1b.get(i)._1().resetPivot();\n }\n\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list1 = merge(lst1a, lst1b, list1ASC, list1ASCSec);\n\n int[] permutationArray = new int[list1.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//Tuple2<Data<Type0,Type1>,Record>[list1.length];\n //System.arraycopy(list1, 0, list2, 0, list1.size());\n //Collections.copy(list1,list2);\n list2.addAll(list1);\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsNonSelf(\n list1, permutationArray);\n\n return wilResult;\n }\n // return output;\n\n }", "@Override\n\tpublic BasicMarketData convert(MarketDataLevel1 from) {\n\t\treturn null;\n\t}", "public abstract double getasDouble(int tuple, int val);", "public TupleDesc getTupleDesc();", "private List<Tuple> weatherMap(Tuple input) {\n \n Map<String, String> mockLocationService = new HashMap<String, String>();\n mockLocationService.put(\"Harrisburg\", \"PA\");\n mockLocationService.put(\"Pittsburgh\", \"PA\");\n mockLocationService.put(\"Phildelphia\", \"PA\");\n mockLocationService.put(\"Houston\", \"TX\");\n mockLocationService.put(\"SanAntonio\", \"TX\");\n mockLocationService.put(\"Austin\", \"TX\");\n mockLocationService.put(\"Sacramento\", \"CA\");\n mockLocationService.put(\"LosAngeles\", \"CA\");\n mockLocationService.put(\"SanFransico\", \"CA\");\n \n List<Tuple> output = new ArrayList<Tuple>();\n \n String city = input.fst();\n String hiLow = input.snd();\n \n output.add(new Tuple(mockLocationService.get(city), hiLow));\n \n lolligag();\n \n //<state, hi low>\n return output;\n }", "protected void processTuple (\n \t\t\t Tuple inputTuple, int streamId)\n \tthrows ShutdownException, InterruptedException {\n \tTuple result;\n \t//If we haven't already picked up a template tuple,\n \t// copy this one.\n \tif (tupleDataSample == null)\n \t\ttupleDataSample = inputTuple;\n \t\t\t\n \tcount++;\n result = appendWindowId(inputTuple, streamId);\n putTuple(result, 0);\t \n \tif ((count % slide == 0) && (windowType == 0)) {\n \t\t//output a punctuation to say windowId_from is completed\t\t\t\n \t\tputTuple (createPunctuation (inputTuple, windowId_from), 0);\n \t} \t\t\n \n }", "@Override\n public TimestampedUIDTuple getSourceTuple() {\n return (TimestampedUIDTuple) tuple;\n }", "abstract protected void writeTuple(Tuple tuple) throws IOException;", "private static MultiItemTerminal toMultiItemTerminal(ByteBuffer... values)\n {\n return new Tuples.Value(values);\n }", "public MeasureData(Tuple tuple) {\n mtype = tuple.getStringByField(StormUtils.STORM.FIELDS.MEASURE_TYPE);\n caseid = tuple.getStringByField(StormUtils.STORM.FIELDS.CASE_ID);\n mid = tuple.getIntegerByField(StormUtils.STORM.FIELDS.MEASURE_ID);\n mvalue = tuple.getDoubleByField(StormUtils.STORM.FIELDS.MEASURE_VALUE);\n }", "DataSet toDataSet(Object adaptee);", "public abstract float getasFloat(int tuple, int val);" ]
[ "0.6298252", "0.56664467", "0.56522954", "0.5508052", "0.5368735", "0.5326213", "0.5305641", "0.52946335", "0.524831", "0.5232237", "0.5223191", "0.5194655", "0.51741314", "0.51451015", "0.51327235", "0.50882035", "0.50806564", "0.5052586", "0.50149536", "0.5001011", "0.49526814", "0.49428615", "0.49373135", "0.49249014", "0.49067953", "0.48976025", "0.48970518", "0.48966295", "0.4854387", "0.48251885", "0.48174357", "0.48161083", "0.48109835", "0.4804443", "0.47940192", "0.47933757", "0.47892165", "0.4779403", "0.4772638", "0.47701135", "0.47674084", "0.47648036", "0.47546384", "0.4737513", "0.4735447", "0.4706295", "0.46977353", "0.46919236", "0.46690157", "0.46467277", "0.4642995", "0.46425807", "0.46416765", "0.46402323", "0.46398982", "0.46174532", "0.46173277", "0.45932448", "0.4587117", "0.45820975", "0.4581448", "0.45787132", "0.45627064", "0.4562437", "0.45532712", "0.4531994", "0.45222503", "0.4520367", "0.45025587", "0.44821063", "0.44770005", "0.44671512", "0.44541577", "0.44502947", "0.44369707", "0.4435598", "0.44334435", "0.44312158", "0.443082", "0.443066", "0.44290134", "0.4428585", "0.4424647", "0.44221276", "0.4418586", "0.44134134", "0.44093642", "0.4408477", "0.44035593", "0.44032285", "0.43840292", "0.43812108", "0.4380013", "0.43799496", "0.4374957", "0.43680355", "0.43630385", "0.435721", "0.43452394", "0.43397775" ]
0.62471306
1
The Intrinio ID for Security
@ApiModelProperty(value = "The Intrinio ID for Security") public String getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getIdentityId();", "public String getInoId();", "String getSecId();", "public String getIdentity();", "private String getIdentificationString() {\n\t\tif (clientController.client.visitorID.getVal() != null)\n\t\t\treturn clientController.client.visitorID.getVal().intern();\n\t\tif (clientController.client.logedInSubscriber.getVal() != null)\n\t\t\treturn clientController.client.logedInSubscriber.getVal().personalID;\n\t\treturn null;\n\t}", "public final String getIdentity() {\n return this.identity;\n }", "public String getIdentity() {\n\t\treturn identity;\n\t}", "java.lang.String getAoisId();", "public String getIdToken() throws IOException {\n return (String)userInfo.get(\"id_token\");\n }", "private long getOwnID(){\n return authenticationController.getMember() == null ? -1 :authenticationController.getMember().getID();\n }", "String getTheirPartyId();", "public static Object getIccid() {\n\t\treturn null;\n\t}", "public int getIdentity(){\r\n\t\treturn identity;\r\n\t}", "public String getMaternalID();", "public static String getIccid() {\n\t\treturn null;\n\t}", "UUID getInitiativeId();", "String getLoginId();", "public String getIdentifiant() {\n\t\treturn identifiant;\n\t}", "public String getOid() {\n return getProperty(Property.OID);\n }", "@Override\n public String getIdentityId() {\n\n // Load the identityId from the cache\n// identityId = cachedIdentityId;\n\n if (identityId == null) {\n // Call to your backend\n identityId = mFirebaseRef.getAuth().getUid();\n }\n return identityId;\n }", "public String getIdentity() { \n\t\treturn getIdentityElement().getValue();\n\t}", "com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType();", "public String getInsUserid() {\n return insUserid;\n }", "java.lang.String getLoginId();", "public static String getIAMUserId(){\n \t\t// There are a few places where we can find this\n \t\tString id = System.getProperty(\"AWS_ACCESS_KEY_ID\");\n \t\tif(id != null) return id;\n \t\tid = System.getProperty(STACK_IAM_ID);\n \t\tif (id == null) return null;\n \t\tid = id.trim();\n \t\tif (\"\".equals(id)) return null;\n \t\treturn id;\n \t}", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public String getIdentification ()\n {\n return this.toString();\n }", "long getLoginId();", "long getLoginId();", "long getLoginId();", "public long getIScanID() {\n return iScanID;\n }", "public String getPaternalID();", "public int getIdentificationNumber() {\n return identificationNumber;\n }", "public Integer getInsid() {\n return insid;\n }", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getLoginId();", "int getClientSessionID();", "String getIdentifiant();", "String getUserID();", "public String getSecId() {\n Object ref = secId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n secId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "String getInvitationId();", "@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}", "public int getIdentifiant() {\r\n return identifiant;\r\n }", "public Long getUserID() {\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return getByUsername(authentication.getName()).getId();\n }", "public String getSecId() {\n Object ref = secId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n secId_ = s;\n }\n return s;\n }\n }", "public abstract long getSdiId();", "public String getIdentificationNumber() {\n return this.identificationNumber;\n }", "@Override\n\tpublic String getIdentification() {\n\t\treturn \"\";\n\t}", "public com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType() {\n com.cantor.drop.aggregator.model.CFTrade.SecurityIdType result = com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.valueOf(secIdType_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.CUSIP : result;\n }", "public String getUserID();", "public com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType() {\n com.cantor.drop.aggregator.model.CFTrade.SecurityIdType result = com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.valueOf(secIdType_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.CUSIP : result;\n }", "public String Identity();", "public String getIdrequest() {\r\n\t\treturn idrequest;\r\n\t}", "String getBusi_id();", "public String getSystemId();", "@Override\n public String getIdentifier() {\n return myIdentity.getIdentifier();\n }", "public String getId() {\n\t\tStringBuilder builder = new StringBuilder();\n\t\tbuilder.append(\"n=\");\n\t\tif ( nodeId != null ) {\n\t\t\tbuilder.append(nodeId);\n\t\t}\n\t\tbuilder.append(\";c=\");\n\t\tif ( created != null ) {\n\t\t\tbuilder.append(created);\n\t\t}\n\t\tbuilder.append(\";s=\");\n\t\tif ( sourceId != null ) {\n\t\t\tbuilder.append(sourceId);\n\t\t}\n\t\treturn DigestUtils.sha1Hex(builder.toString());\n\t}", "public int getId() {\n\t\treturn config >> 8;\n\t}", "public String getId() {\r\n\t\treturn userId.toString();\r\n\t}", "public String getUserId() {\n if (this.isTokenValide()) {\n JWT jwt = new JWT(getToken());\n Claim claim = jwt.getClaim(\"user_id\");\n return claim.asString();\n } else {\n return \"\";\n }\n }", "public String getUserIdentity()\n {\n return userIdentity;\n }", "default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }", "public String getIdentificacao() {\n\t\treturn identificacao;\n\t}", "@Override\n public final Long getItsId() {\n return this.manufacture.getItsId();\n }", "public String secureIdentityToken() {\n return runtimeProperty(PROPERTY_SECURE_IDENTITY_TOKEN);\n }", "String getSessionID();", "String getSessionID();", "int getPrimarySnId();", "int getPrimarySnId();", "public String getAuthyID () {\n\t\treturn this.authyID;\n\t}", "public java.lang.String getAoisId() {\n java.lang.Object ref = aoisId_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n aoisId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "@SuppressWarnings(\"WeakerAccess\")\n public String getId() {\n return mSid;\n }", "public Identity getIdentity()\r\n {\r\n return securityService.findLoggedInIdentity();\r\n }", "public Integer getIdInstituicao() {\n\t\treturn idInstituicao;\n\t}", "public int getId() {\n return oid ;\n }", "protected Integer getCurrentUtilityId() {\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\n AuthenticatedUser user = null;\n\n if (auth.getPrincipal() instanceof AuthenticatedUser) {\n user = (AuthenticatedUser) auth.getPrincipal();\n }\n\n if (user != null) {\n return user.getUtilityId();\n }\n\n return null;\n }", "private String getIdioma()\n throws MareException\n {\n\t\tLong idioma = UtilidadesSession.getIdioma(this);\n\t\treturn idioma.toString();\n }", "public String getIdentityLogin()\r\n {\r\n return securityService.findLoggedInUsername();\r\n }", "public String getIdentNo() {\n return identNo;\n }", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();" ]
[ "0.7350923", "0.72842103", "0.698465", "0.6856527", "0.6799296", "0.67896277", "0.6598492", "0.6583299", "0.65697676", "0.654157", "0.65043175", "0.64407206", "0.6440119", "0.6436917", "0.6432956", "0.64239025", "0.640522", "0.63829106", "0.6376326", "0.63665694", "0.6351125", "0.6331263", "0.632966", "0.6302798", "0.62635016", "0.6256433", "0.6256433", "0.6256433", "0.6247136", "0.62470067", "0.62470067", "0.62470067", "0.62412095", "0.6240785", "0.623862", "0.6234245", "0.6227465", "0.6227465", "0.6227465", "0.6227465", "0.6227465", "0.62050813", "0.62044644", "0.62040925", "0.6189221", "0.6162029", "0.6160807", "0.61587036", "0.6144491", "0.61423534", "0.61403286", "0.6123999", "0.6116156", "0.6114395", "0.60951287", "0.60950774", "0.60922366", "0.6091797", "0.6075363", "0.60687286", "0.6067616", "0.60451466", "0.60406715", "0.6028806", "0.60086226", "0.6007349", "0.6000693", "0.5989243", "0.5969045", "0.5965965", "0.59532046", "0.59532046", "0.59505177", "0.59505177", "0.59479827", "0.5941319", "0.5938568", "0.5938183", "0.5937764", "0.59355384", "0.5934346", "0.5928326", "0.5921415", "0.5915201", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175", "0.5911175" ]
0.73785406
0
The common/local ticker of the Security
@ApiModelProperty(value = "The common/local ticker of the Security") public String getTicker() { return ticker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTicker() {\n\t\treturn \"Notificación Virtual Guardian\";\n\t}", "public String getTicker() {\n return this.ticker;\n }", "public String getTicker() {\n\n return ticker.getText();\n }", "StickerTransmitter getStickerTransmitter();", "public Security getSecurity()\n {\n return __m_Security;\n }", "public float getSecurity() {\n return security;\n }", "public static boolean getTicker() {\n\n ticker = new Ticker();\n\n try {\n LinkedList<Ticker> tickers = new LinkedList<>();\n\n SessionUtil.getInstance().setTickers(tickers);\n\n\n } catch (Exception e) {\n return false;\n }\n\n return true;\n }", "private String prepareSecurityToken() {\r\n\t\tint time = ((int) System.currentTimeMillis() % SECURITY_TOKEN_TIMESTAMP_RANGE);\r\n\t\treturn String.valueOf(time + (new Random().nextLong() - SECURITY_TOKEN_TIMESTAMP_RANGE));\r\n\t}", "private String issuer() {\n return \"spoqn.com\";\n }", "public void setTicker(String val) {\n ticker = val;\n }", "@Override\r\n public Ticker getTicker(CurrencyPair currencyPair, Object... args) throws IOException {\n if (tickerRequestTimeStamp == 0L || System.currentTimeMillis() - tickerRequestTimeStamp >= getRefreshRate()) {\r\n\r\n logger.debug(\"requesting BitcoinCharts tickers\");\r\n tickerRequestTimeStamp = System.currentTimeMillis();\r\n\r\n // Request data\r\n cachedBitcoinChartsTickers = bitcoinCharts.getMarketData();\r\n }\r\n\r\n return BitcoinChartsAdapters.adaptTicker(cachedBitcoinChartsTickers, currencyPair);\r\n }", "public void tickerStoppen() \n {\n anzeige.tickerAbmelden( this );\n }", "public String ticker(String pair) {\n\t\treturn this.apiCall(\"ticker\", pair, \"\", false);\n\t}", "public Integer getSecurity() {\n return security;\n }", "public Identifier getTradeProviderKey() {\n return _tradeProviderKey;\n }", "CineScopesTransmitter getCineScopesTransmitter();", "public String getClientSecurityToken() {\n\t\tString result = null;\n\t\tfor (Header header : sessionHeaders) {\n\t\t\tif (header.getName().equals(SessionConstants.CST)) {\n\t\t\t\tresult = header.getValue();\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "Integer getHundSec();", "EconomyDisplayTransmitter getEconomyDisplayTransmitter();", "@Override\n public int hashCode() {\n return ticker.hashCode();\n }", "String getSecId();", "protected String getMicrotimingKey(WebContext context) {\n switch (this) {\n case IP:\n return context.getRemoteIP().toString();\n case BOTH:\n return context.getRemoteIP().toString() + \" <-- \" + context.microtimingKey;\n }\n\n // URI is the default:\n return context.microtimingKey;\n }", "public java.lang.String getSecurityType() {\r\n return securityType;\r\n }", "public int getExternalIssuer();", "Integer networkTickRate();", "@JsonProperty(\"ticker\")\n public String getTicker() {\n return ticker;\n }", "@Override\n public SecurityInfo getInfo() {\n return info;\n }", "protected Subject getShiroSubject()\n\t{\n\t Subject currentUser = ThreadContext.getSubject();// SecurityUtils.getSubject();\n\n\t if (currentUser == null)\n\t {\n\t currentUser = SecurityUtils.getSubject();\n\t }\n\n\t return currentUser;\n\t}", "public interface SecuritySystemDisplay {\r\n\t/**\r\n\t * Displays the time remaining to go out of the house that is kept track of \r\n\t * by a TimeTracker instance.\r\n\t * \r\n\t * @param time remaining time, state state it is going into after time runs out\r\n\t */\r\n\tpublic void showTimeLeft(int time, String state);\r\n\r\n\t/**\r\n\t * Indicates that the system is in Away State\r\n\t */\r\n\tpublic void showAway();\r\n\r\n\t/**\r\n\t * Indicates that the system is in Stay State\r\n\t */\r\n\tpublic void showStay();\r\n\r\n\t/**\r\n\t * Indicate that the system is ready to arm\r\n\t */\r\n\tpublic void showReady();\r\n\r\n\t/**\r\n\t * Indicate that the system is unready to arm\r\n\t */\r\n\tpublic void showUnready();\r\n\r\n\t/**\r\n\t * Indicate that the system is arming\r\n\t */\r\n\tpublic void showArming();\r\n\r\n\t/**\r\n\t * Indicate that the system is disarmed\r\n\t */\r\n\tpublic void showDisarmed();\r\n\r\n\t/**\r\n\t * Indicate that the system is breach\r\n\t */\r\n\tpublic void showBreach();\r\n\r\n\t/**\r\n\t * Indicate that the system is triggered\r\n\t */\r\n\tpublic void showTriggered();\r\n\r\n\t/**\r\n\t * prompts user for password when cancel pressed\r\n\t */\r\n\tpublic void showPasswordPrompt();\r\n\r\n\t/**\r\n\t * shows numbers pressed\r\n\t */\r\n\tpublic void showNumeric(String stringPassword);\r\n\r\n}", "public SecurityType getSecurityType() {\n return securityType;\n }", "OctetString getSecurityName();", "public Ticker getTickerInfo() throws ExchangeException, NotAvailableFromExchangeException, NotYetImplementedForExchangeException, IOException{\n\t // Get the latest ticker data showing BTC to CAD\n\t Ticker ticker = marketDataService.getTicker(Currencies.BTC, Currencies.USD);\n\t \n\t double value = ticker.getLast().getAmount().doubleValue();\n\t String currency = ticker.getLast().getCurrencyUnit().toString();\n\t //To test return\n\t System.out.println(\"Last: \" + currency + \"-\" + value);\n\t System.out.println(\"Last: \" + ticker.getLast().toString());\n\t System.out.println(\"Volume: \" + ticker.getVolume().toString());\n\t System.out.println(\"High: \" + ticker.getHigh().toString());\n\t System.out.println(\"Low: \" + ticker.getLow().toString());\n\t System.out.println(\"tradeable ID: \" + ticker.getTradableIdentifier());\n\t return ticker;\n\t}", "Object getClock();", "java.lang.String getIssuer();", "@DOMSupport(DomLevel.ONE)\r\n @Property String getSecurity();", "public String getTicker(String market) {\n\n\t\treturn getJson(API_VERSION, PUBLIC, \"getticker\", returnCorrectMap(\"market\", market));\n\t}", "public String interestRate_AftrLogin() {\n\t\treturn helper.getText(interestRate);\n\t}", "@Test\n public void getSecurityPriceTechnicalsSrTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n Integer period = null;\n Integer signalPeriod = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityStochasticOscillator response = api.getSecurityPriceTechnicalsSr(identifier, period, signalPeriod, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }", "com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType();", "public interface SecurityService\r\n{\r\n\t/**\r\n\t * This method return true if the given 'securityToken' is a valid token for the given security service. The security service can be any service\r\n\t * such as OAuth, LDAP, ActiveDirectory, OpenID etc. It is up to the implementor of this interface to interact with the appropriate security\r\n\t * service to determine if the given securityToken is valid. Reasons for a token to not be valid include but are not limited to, expired tokens, \r\n\t * incorrect tokens, not authenticated tokens etc.<br/>\r\n\t * This method will be used by the provider in a DIRECT environment to authenticate/validate a consumer.\r\n\t * \r\n\t * @param securityToken The token that shall be validated against a given security service such as LDAP, OAuth, Active Directory, etc.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return TRUE if the token is known and valid to the security server and not expired. If a token is expired then FALSE should be returned.\r\n\t */\r\n\tpublic boolean validate(String securityToken, RequestMetadata requestMetadata);\r\n\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. In return it will provide \r\n\t * information that relate to the securityToken such as: <br/>\r\n\t * a) Information about the application and/or user of that securityToken (appUserInfo property populated in the TokenInfo) or<br/>\r\n\t * b) Information about the SIF environment or SIF session the securityToken relates to. This would be the case for already existing SIF\r\n\t * Environments.<br/>\r\n\t * Further an expire date might be set for the securityToken if the token has expired. If the securityToken does not expire then the \r\n\t * expire date is null in the returned TokenInfo object.<br/>\r\n * This method will be used by the provider in a DIRECT environment to get information about a consumer's security token.\r\n\t * \r\n\t * @param securityToken The security token for which the TokenInfo shall be returned.\r\n\t * @param requestMetadata Metadata that has been sourced from a request. The environmentID property is always null because the token is\r\n * not yet authenticated and therefore the environment is not yet determined. \r\n\t * \r\n\t * @return See Desc. It is expected that this method only returns either the environmentKey or the SIF environment ID or the SIF session token but\r\n\t * not all of these at the same time.\r\n\t */\r\n\tpublic TokenInfo getInfo(String securityToken, RequestMetadata requestMetadata);\r\n\t\r\n\t/**\r\n\t * This method may contact the security server which can be an OAuth server, and LDAP server a Active Directory etc. to generate a \r\n\t * security token based on the given 'coreInfo'. It is expected that any consumer or a provider in a BROKERED environment calls this \r\n\t * method to retrieve a security token which it will use as the authorisation token in all SIF requests to a provider or broker.\r\n\t * \r\n\t * @param coreInfo Information about the consumer/provider that might be used to generate a security token by the external security service.\r\n\t * In most cases it would at least need the application key.\r\n\t * @param password It is very likely that some sort of password will be required to generate a security token.\r\n\t * \r\n\t * @return A TokenInfo object which will have the 'token' property set (the security token). Optional the 'tokenExpiryDate' may be set\r\n\t * if the token has an expire date. If the 'tokenExpiryDate' is null it is assumed that the returned security token won't expire.\r\n\t * The returned token should only be a token without any authentication method as a prefix. For example the token may be\r\n\t * \"ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\". It should not hold the authentication method such as 'Bearer'\r\n\t * (i.e. not look like this: \"Bearer ZjI2NThiNTktNDM1Yi00YThkLTlmNzYtYzI0MDBiNjY1NWMxOlBhc3N3b3JkMQ\"). The SIF3 Framework will\r\n\t * manage the authentication method.\r\n\t */\r\n\tpublic TokenInfo createToken(TokenCoreInfo coreInfo, String password);\r\n}", "public SystematicAcension_by_LiftingTechnology() {\n\n\t}", "@Test\n public void getSecurityPriceTechnicalsKcTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n Integer period = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityKeltnerChannel response = api.getSecurityPriceTechnicalsKc(identifier, period, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }", "protected double NetworkServiceTime()\r\n\t{\r\n\t\treturn 25.0;\r\n\t}", "public String getSecurity_question() \r\n {\r\n return security_question;\r\n }", "void getTicker(String pair,HibtcApiCallback<Object> callback);", "public com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType() {\n com.cantor.drop.aggregator.model.CFTrade.SecurityIdType result = com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.valueOf(secIdType_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.CUSIP : result;\n }", "private Security() { }", "public String getSocialSecurityNumber() {\r\n\t\treturn socialSecurityNumber;\r\n\t}", "public interface InstanceSecurable extends Securable\n{\n\t/**\n\t * Return an identifying string. This string is used to determine\n\t * which instance of the Securable class we're dealing with when\n\t * looking up authorizations.\n\t */\n\tpublic String getInstanceIdentifier();\n}", "public interface ISecurityMonitorService {\n\n\n}", "public com.cantor.drop.aggregator.model.CFTrade.SecurityIdType getSecIdType() {\n com.cantor.drop.aggregator.model.CFTrade.SecurityIdType result = com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.valueOf(secIdType_);\n return result == null ? com.cantor.drop.aggregator.model.CFTrade.SecurityIdType.CUSIP : result;\n }", "public String getSocialSecurityNumber() {\n return socialSecurityNumber;\n }", "public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }", "public String getMarket() {\r\n return market;\r\n }", "public java.lang.String getSecrityNo() {\r\n return localSecrityNo;\r\n }", "default public int getClockSynchPort()\t\t\t\t\t{ return 2224; }", "public WebMarket getMarket() {\r\n return market;\r\n }", "long getCurrentClockNs() {\n return System.nanoTime();\n }", "@VisibleForTesting\n protected EzSecurityToken getSecurityToken() {\n if (new EzProperties(getConfigurationProperties(), true).getBoolean(\"ezbake.security.fake.token\", false)) {\n return ThriftTestUtils.generateTestSecurityToken(applicationSecurityId, applicationSecurityId, Lists.newArrayList(\"U\"));\n } else {\n try {\n return securityClient.fetchAppToken();\n } catch (Exception ex) {\n logger.error(\"Failed to get security token for INS\", ex);\n throw new RuntimeException(ex);\n }\n }\n }", "String getTradeCurrency();", "public int getSocialSecurityNumber() {\n return socialSecurityNumber;\n }", "private float horisontalTicker() {\n\t\t\t\treturn (ticker_horisontal += 0.8f);\n\t\t\t}", "public String getSsdsmc() {\n return ssdsmc;\n }", "public interface Securable\r\n{\r\n\t// public SecurityCheck addSecurityCheck( String checkType, String checkName\r\n\t// );\r\n\t//\r\n\t// public void addSecurityChecksListener( SecurityTestListener listener );\r\n\t//\r\n\t// public int getSecurityCheckCount();\r\n\t//\r\n\t// public SecurityCheck getSecurityCheckAt( int c );\r\n\t//\r\n\t// public void removeSecurityChecksListener( SecurityTestListener listener );\r\n\t//\r\n\t// public void removeSecurityCheck( SecurityCheck securityCheck );\r\n\t//\r\n\t// // public AssertionStatus getAssertionStatus();\r\n\t// //\r\n\t// // public enum AssertionStatus\r\n\t// // {\r\n\t// // UNKNOWN, VALID, FAILED\r\n\t// // }\r\n\t//\r\n\t// // public String getAssertableContent();\r\n\t//\r\n\t// // public String getDefaultAssertableContent();\r\n\t//\r\n\t// // public AssertableType getAssertableType();\r\n\t//\r\n\t// public List<SecurityCheck> getSecurityCheckList();\r\n\t//\r\n\t// public SecurityCheck getSecurityCheckByName( String name );\r\n\t//\r\n\t// public ModelItem getModelItem();\r\n\t//\r\n\t// public Interface getInterface();\r\n\t//\r\n\t// public SecurityCheck cloneSecurityCheck( SecurityCheck source, String name\r\n\t// );\r\n\t//\r\n\t// public Map<String, SecurityCheck> getSecurityChecks();\r\n\t//\r\n\t// public SecurityCheck moveSecurityCheck( int ix, int offset );\r\n}", "@Test\n public void getSecurityPriceTechnicalsDcTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n Integer period = null;\n String priceKey = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityDonchianChannel response = api.getSecurityPriceTechnicalsDc(identifier, period, priceKey, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }", "long getExpiration();", "int getSellCurrent();", "@Override\n\t\tpublic SecurityDirector getSecurity() {\n\t\t\treturn null;\n\t\t}", "public static String getSystemName()\n {\n return sSysName;\n }", "public JSONObject ticker() throws Exception;", "public int getWorkCredGain();", "@Override\n public final double getExpiration() {\n return safetyHelper.getExpiration();\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public CryptoProvider() {\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\n \"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "@SuppressWarnings({ \"deprecation\", \"unchecked\" })\r\n\tpublic void init() throws Exception{\r\n\t\tSShort = getSecurity(ShortSecurity);\r\n/* buy the long */\r\nTotalAmount = CurrentPortfolio.getTotalAmount(CurrentDate);\r\nCurrentPortfolio.sellAsset(curAsset, CurrentDate);\r\nCurrentPortfolio.buy (curAsset, LongSecurity, TotalAmount, CurrentDate);\r\n/* short */\r\n//ShortShares = (int)(TotalAmount/SShort.getCurrentPrice(CurrentDate));\r\n//CurrentPortfolio.shortSellByShareNumber(curAsset, ShortSecurity, ShortShares, CurrentDate);\r\nCurrentPortfolio.shortSell(curAsset, ShortSecurity, TotalAmount, CurrentDate);\r\n\t}", "public String name () {\n return \"tls\";\n }", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "public void securityOn()\n {\n m_bSecurity = true;\n }", "protected CryptoProvider() {\n\n super(\"Crypto\", 1.0, \"HARMONY (SHA1 digest; SecureRandom; SHA1withDSA signature)\");\n put(\"SecureRandom.SHA1PRNG\",\"org.apache.harmony.security.provider.crypto.SHA1PRNG_SecureRandomImpl\");\n put(\"SecureRandom.SHA1PRNG ImplementedIn\", \"Software\");\n }", "public int getSec(){\n\t\treturn sec;\n\t}", "private SecurityConsts()\r\n\t{\r\n\r\n\t}", "public interface IMarketManager {\r\n\r\n\tboolean hasMoreTicks();\r\n\r\n\tboolean newTicksThisLoop();\r\n\r\n\tMap getTickTable();\r\n\r\n\tvoid init(BackTestConfig config);\r\n\r\n\tvoid nextTick(long time);\r\n\r\n\tvoid close();\r\n\r\n\tMultimap<FXPair, FXTick> getPerLoopTickTable();\r\n\r\n\tlong getTickCounter();\r\n}", "java.lang.String getSID();", "java.lang.String getSID();", "java.lang.String getSID();", "java.lang.String getSID();", "java.lang.String getSID();", "java.lang.String getSID();", "java.lang.String getSID();", "@Test\n public void getSecurityPriceTechnicalsTsiTest() throws ApiException, NoSuchMethodException {\n String identifier = null;\n Integer lowPeriod = null;\n Integer highPeriod = null;\n String priceKey = null;\n String startDate = null;\n String endDate = null;\n Integer pageSize = null;\n String nextPage = null;\n ApiResponseSecurityTrueStrengthIndex response = api.getSecurityPriceTechnicalsTsi(identifier, lowPeriod, highPeriod, priceKey, startDate, endDate, pageSize, nextPage);\n\n // TODO: test validations\n }", "String getCCSID();", "String getCurTime();", "public String getTransmitRate()\r\n\t{\r\n\t\treturn transmitRate;\r\n\t}", "public void use(int currentTime) throws GeneralSecurityException {\n \t\n \tutils.authenticate(authenticationKey);\n \t\t// Dummy ticket use that validates only the HMAC. You need to implement the rest. \t\t\n \t\n \t// TODO: Create methods to read from card and store to the card\n \t// need to update the new remaining uses of the card.\n \t\n \t// Retrieve the expiry time from card at page 7\n \tbyte[] expiryTimeByte = new byte[4];\n \tutils.readPages(7, 1, expiryTimeByte, 0);\n \texpiryTime = ByteBuffer.wrap(expiryTimeByte).getInt();\n \t\n \t// Retrieve the remaining uses from the card at page 8\n \tbyte[] remainingUsesByte = new byte[4];\n \tutils.readPages(8, 1, remainingUsesByte, 0);\n \tremainingUses = ByteBuffer.wrap(remainingUsesByte).getInt();\n \t\t\t\n //TODO: Implement proper ticketing.\n \tisValid = true;\n if (expiryTime < currentTime) {\n \tinfoToShow = \"Ticket Expired!\";\n \tisValid = false;\n }else if (remainingUses == 0) {\n \tinfoToShow = \"No more rides available\";\n \tisValid = false;\n }else if (isValid()){\n\t \t// This string will be shown after ticket is used in test mode. Make\n\t // your own info string.\n\t infoToShow = \"Ticket Valid\";\n\t isValid = true;\n\t //expiryTime = 0;\n\t remainingUses--;\n\t \n\t // Write the remaining uses to page 8\n\t \n\t utils.writePages(ByteBuffer.allocate(4).putInt(remainingUses).array(), 0, 8, 1);\n\n\t byte[] dataOnCard = new byte [5 * 4];\n \t\tbyte[] macOnCard = new byte [2 * 4];\n \t\tutils.readPages(0, 5, dataOnCard, 0);\n \t\tutils.readPages(5, usedMacLength, macOnCard, 0);\n \t\t\n \t\t// ignore locks and OTP bits\n \t\tfor (int ig = 0; ig < 6; ig ++){\n \t\t\tdataOnCard[10+ig] = 0;\n \t\t}\n \t\tbyte[] mac = macAlgorithm.generateMac(dataOnCard);\n \t\t// We only use 8 bytes (64 bits) of the MAC.\n \t\tfor (int i = 0; i < usedMacLength*4; i++){\n \t\t\tif (macOnCard[i] != mac[i]) {\n \t\t\t\tinfoToShow = \"Invalid Ticket\";\n\t \t\t\tisValid = false;\n\t \t\t}\n \t\t}\n }\n \n if (!isValid)\n \t\tSystem.err.print(infoToShow); \n }", "public Singleton(){\n userID = 1;\n reportID = 1;\n purityReportID = 1;\n c = Calendar.getInstance();\n dateTime = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n dateTime.format(c.getTime());\n }", "public boolean securityStatus()\n {\n return m_bSecurity;\n }", "public String getSecurityQuestion() {\n return securityQuestion;\n }", "int getSmpRate();", "public synchronized String buyTicket() {\r\n Random r = new Random();\r\n int buyTckDuration = r.nextInt(3000)+1000;\r\n String timestamp = \"NULL\";\r\n if (isValid_ToBuyTicket()) {\r\n this.tktSold += 1;\r\n try {\r\n Thread.sleep(buyTckDuration);\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n// System.out.println(\"Sold a new ticket, today's sales num: \" + this.tktSold);\r\n\r\n // we still need to create a real ticket with a timestamps\r\n // some code()\r\n\r\n String postfix = getPostfix();\r\n timestamp = \"T\" + postfix;\r\n return timestamp;\r\n\r\n }else{\r\n System.out.println(\"Your ticket request denied!\");\r\n return timestamp;\r\n }\r\n\r\n }" ]
[ "0.6498009", "0.6433816", "0.59367454", "0.5803207", "0.5732455", "0.5690935", "0.5662871", "0.561103", "0.5584685", "0.55785906", "0.5546306", "0.54958695", "0.54825896", "0.5478606", "0.5466466", "0.53853357", "0.5383767", "0.5363568", "0.53473735", "0.532691", "0.53144735", "0.5303659", "0.52786404", "0.52739173", "0.52714896", "0.5250867", "0.5249727", "0.5232548", "0.52272946", "0.5201237", "0.5190507", "0.5189916", "0.5183897", "0.51070875", "0.50932974", "0.50852686", "0.5075712", "0.50746447", "0.5071823", "0.50675297", "0.50546813", "0.5024928", "0.5021518", "0.5018594", "0.5017811", "0.5012321", "0.50104225", "0.5009174", "0.49963647", "0.4994344", "0.49918917", "0.49850208", "0.49832317", "0.498254", "0.49812454", "0.49742505", "0.49734932", "0.49700472", "0.49654207", "0.49613488", "0.49576938", "0.49470434", "0.49457276", "0.49446753", "0.49373743", "0.49361587", "0.49305272", "0.49253747", "0.4922889", "0.49150127", "0.49072266", "0.4900448", "0.48992908", "0.48992908", "0.48992908", "0.4897339", "0.48954344", "0.48909605", "0.48852506", "0.48775756", "0.48744473", "0.4868626", "0.486636", "0.48643664", "0.48643664", "0.48643664", "0.48643664", "0.48643664", "0.48643664", "0.48643664", "0.48631418", "0.48617813", "0.48581457", "0.4852495", "0.48485342", "0.48359948", "0.48145038", "0.4810821", "0.48004875", "0.47970006" ]
0.7273924
0
The countrycomposite OpenFIGI identifier
@ApiModelProperty(value = "The country-composite OpenFIGI identifier") public String getCompositeFigi() { return compositeFigi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public int getId() {\n\t\treturn (m_country_id);\n\t}", "public String getCountryId() {\r\n return countryId;\r\n }", "public int getCountryId();", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public String getCountry_id() {\n return country_id;\n }", "public String getCountryID() {\n return countryID;\n }", "public long getCountryId() {\n return countryId;\n }", "public Integer getCountryId() {\n return countryId;\n }", "public String getCountryCode() {\n return normalizedBic.substring(COUNTRY_CODE_INDEX, COUNTRY_CODE_INDEX + COUNTRY_CODE_LENGTH);\n }", "public String countryCode() {\n return countryCode;\n }", "public int getCountryId() {\n return countryId;\n }", "String getCountryOfOrigin(long id) throws RemoteException;", "public int getC_Region_ID();", "public IsoCountry getCountry() {\n return country;\n }", "String getCidr();", "String getCountryCode();", "public Long getCountryId() {\n return this.countryId;\n }", "public java.lang.String getNationalId() {\r\n return nationalId;\r\n }", "java.lang.String getCountryCode();", "java.lang.String getCountryCode();", "public Integer getNationalId() {\n return nationalId;\n }", "private String getCountry(String id) {\n\t\tif(Utility.keyLevel(id) == 0 ) // It's a country\n\t\t\treturn id;\n\t\telse if(Utility.keyLevel(id) == -1 ) // ZZZ\n\t\t\t return id;\n\t\telse {\n\t\t\t// It's higher admin than level 0. We need to find the country the code is in\n\t\t\tString ctrcode = GeographicMapper.getAlpha3(id.substring(0, 2));\n\t\t\treturn ctrcode;\n\t\t}\n\t}", "public String getCountryIso() {\n return mCountryIso;\n }", "public String getCountryFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTRY);\n }", "java.lang.String getCountry();", "java.lang.String getCountry();", "public Integer getOriginCountryId() {\r\n\t\treturn originCountryId;\r\n\t}", "public String getCountryName();", "public String getSaijicd() {\r\n return saijicd;\r\n }", "public static Object getIccid() {\n\t\treturn null;\n\t}", "public int getIdCompI() {\n\t\treturn ID_COMP_I;\n\t}", "public int getHC_Org2_ID();", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public abstract java.lang.String getIdpc();", "public int getCountryCallingCode() {\n return countryCallingCode;\n }", "org.hl7.fhir.Identifier getIdentifier();", "@Override\n\tpublic String toString() {\n\t\treturn super.country;\n\t}", "public static String getIccid() {\n\t\treturn null;\n\t}", "java.lang.String getCountryName();", "public int getCountryId(){\n return ID;\n }", "public String getCountryLink(){\n\t\treturn (String)this.entryMap.get(GeoKeys.LOCAL_GEO_COUNTRY_LINK);\n\t}", "public Integer getCountyid() {\n return countyid;\n }", "public int getC_Currency_ID();", "public ConstellationIdentifier identifier();", "UUID getInitiativeId();", "public String getCompanyCountry() {\n return companyCountry;\n }", "String getBusi_id();", "java.lang.String getAoisId();", "public static String getISO3Country(String localeID) {\n/* 477 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "String getIPGeolocationCountryEmbeddedResource();", "public int getCodiceID() \r\n\t\t{\r\n\t\t\treturn CodiceID;\r\n\t\t}", "public String getInstitutionCode() {\n return normalizedBic.substring(INSTITUTION_CODE_INDEX, INSTITUTION_CODE_INDEX + INSTITUTION_CODE_LENGTH);\n }", "String gini_GetSectorID(int ent_id) {\n String name;\n switch (ent_id) {\n case 0:\n name = \"Northern Hemisphere Composite\";\n break;\n case 1:\n name = \"East CONUS\";\n break;\n case 2:\n name = \"West CONUS\";\n break;\n case 3:\n name = \"Alaska Regional\";\n break;\n case 4:\n name = \"Alaska National\";\n break;\n case 5:\n name = \"Hawaii Regional\";\n break;\n case 6:\n name = \"Hawaii National\";\n break;\n case 7:\n name = \"Puerto Rico Regional\";\n break;\n case 8:\n name = \"Puerto Rico National\";\n break;\n case 9:\n name = \"Supernational\";\n break;\n case 10:\n name = \"NH Composite - Meteosat/GOES E/ GOES W/GMS\";\n break;\n case 11:\n name = \"Central CONUS\";\n break;\n case 12:\n name = \"East Floater\";\n break;\n case 13:\n name = \"West Floater\";\n break;\n case 14:\n name = \"Central Floater\";\n break;\n case 15:\n name = \"Polar Floater\";\n break;\n default:\n name = \"Unknown-ID\";\n }\n\n return name;\n }", "String getContinentName();", "public String getcountryCode() {\n return countryCode;\n }", "public String getCountryCode()\r\n\t{\r\n\t\treturn this.countryCode;\r\n\t}", "@ApiModelProperty(value = \"Instance part of the EVSE ID. If not set, the ID will be generated from the charging station ID.\")\n public String getIsoIdentifier() {\n return isoIdentifier;\n }", "public String getInstitutionCountry() {\n return institutionCountry;\n }", "public String getCoutryName(String code) {\n\t\tString countryName = code;\n\t\tif (code.length() == 3) {\n\t\t\tcountryName = jsonCountryAlpha3.getString(code);\n\t\t} else if (code.length() == 2) {\n\t\t\tcountryName = jsonCountryAlpha2.getString(code);\n\t\t}\n\t\tif (countryName == null) {\n\t\t\treturn code;\n\t\t}\n\t\treturn countryName;\n\t}", "Country getCountry();", "public int getICID() {\n return icid;\n }", "public String getRepresentativeUniversalIdentifier() {\n return representativeUniversalIdentifier;\n }", "public String getCountryName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_NAME);\n\t}", "public String getCounty_id() {\n return county_id;\n }", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "public String getCountry() {\r\n return this.country;\r\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public final String getCountry() {\n\t\treturn country;\n\t}", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountryCode() {\n return countryCode_;\n }", "public String getAuthyCountryCode () {\n\t\treturn this.authyCountryCode;\n\t}", "public String getIccid() {\r\n return iccid;\r\n }", "Country(int flagImage, String name) {\n this.flagImage = flagImage;\n this.name = name;\n }", "public int getLBR_ICMSST_TaxUFDue_ID();", "public CountryEbo getOffCampusCountry() {\n if ( StringUtils.isBlank(offCampusCountryCode) ) {\n offCampusCountry = null;\n } else {\n if ( offCampusCountry == null || !StringUtils.equals( offCampusCountry.getCode(),offCampusCountryCode) ) {\n ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CountryEbo.class);\n if ( moduleService != null ) {\n Map<String,Object> keys = new HashMap<String, Object>(1);\n keys.put(LocationConstants.PrimaryKeyConstants.CODE, offCampusCountryCode);\n offCampusCountry = moduleService.getExternalizableBusinessObject(CountryEbo.class, keys);\n } else {\n throw new RuntimeException( \"CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.\" );\n }\n }\n }\n return offCampusCountry;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry()\n {\n return country;\n }", "public String getDIA_CHI()\n {\n return this.DIA_CHI;\n }", "public String getCountry() {\n return country;\n }", "public CountryCode getCountry() {\n return country;\n }", "private String getCountryName(String name)\r\n {\r\n }" ]
[ "0.6562966", "0.64360774", "0.6377509", "0.6305664", "0.6288475", "0.6266957", "0.6253408", "0.62256885", "0.6199931", "0.6184068", "0.61214954", "0.60969394", "0.6072449", "0.60395575", "0.60331225", "0.6030393", "0.6017505", "0.6003451", "0.59974873", "0.5996033", "0.5996033", "0.5991242", "0.59646297", "0.59600675", "0.5919927", "0.59051853", "0.59051853", "0.58878815", "0.5877533", "0.5869485", "0.58487374", "0.5813073", "0.58123213", "0.58050346", "0.5801547", "0.5801547", "0.57802796", "0.57773626", "0.5775979", "0.57742685", "0.57687265", "0.57622486", "0.57552534", "0.5715148", "0.5714021", "0.569543", "0.56941175", "0.56752276", "0.56696737", "0.56683373", "0.56612545", "0.5656526", "0.564333", "0.564333", "0.56401974", "0.5633762", "0.56298727", "0.5629668", "0.5618043", "0.56102186", "0.5608698", "0.56038463", "0.5600131", "0.5599795", "0.5598104", "0.5587889", "0.5586271", "0.5581692", "0.5580423", "0.5576347", "0.55671203", "0.5566916", "0.5563182", "0.5559638", "0.5559638", "0.5559638", "0.5559419", "0.55423415", "0.55301523", "0.55301523", "0.5529179", "0.5525367", "0.5520152", "0.5509101", "0.5504238", "0.5502021", "0.5498729", "0.54970706", "0.5494659", "0.5494659", "0.5494659", "0.5494659", "0.5494659", "0.5494659", "0.5494659", "0.54909694", "0.54902095", "0.54895115", "0.54850984", "0.54835117" ]
0.64933234
1
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPACES);\n }", "private String toIndentedString(Object o)\n/* */ {\n/* 128 */ if (o == null) {\n/* 129 */ return \"null\";\n/* */ }\n/* 131 */ return o.toString().replace(\"\\n\", \"\\n \");\n/* */ }", "private String toIndentedString( Object o )\n {\n if ( o == null )\n {\n return \"null\";\n }\n return o.toString().replace( \"\\n\", \"\\n \" );\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }", "private String toIndentedString(Object o) {\n if (o == null) {\n return \"null\";\n }\n return o.toString().replace(\"\\n\", \"\\n \");\n }" ]
[ "0.7886062", "0.7550246", "0.7498372", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504", "0.74625504" ]
0.0
-1
Constructor taking all properties.
public InformeLicenciasOdesVO( java.lang.String licencia, int numOdes) { this.licencia = licencia; this.numOdes = numOdes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Properties(){\n\n }", "public Constructor(){\n\t\t\n\t}", "public Property() {\n this(0, 0, 0, 0);\n }", "public Propuestas() {}", "public KeyVaultProperties() {\n }", "public void init(Properties props) ;", "public CustomerPolicyProperties() {\n }", "protected NodeProperties() {\r\n }", "public Property()\r\n {\r\n }", "public BaseParameters(){\r\n\t}", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "public Parameters() {\n\t}", "public Property() {}", "public PSRelation()\n {\n }", "public DimensionProperties() {\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public Car () {\n\n Make = \"\";\n Model = \"\";\n Year = 2017;\n Price = 0.00;\n }", "public void init(java.util.Properties props) {\r\n }", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public Person()\n {\n this.name = \"John Doe\";\n this.address = \"1234 Somewhere Dr.\";\n this.phoneNumber = \"309-555-1234\";\n this.emailAddress = \"[email protected]\";\n }", "public PropertyParser(Properties props)\n\t{\n\t\t_props = props;\n\t}", "private mxPropertiesManager()\n\t{\n\t}", "public\n YutilProperties()\n {\n super(new Properties());\n }", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "public Phl() {\n }", "public Pasien() {\r\n }", "public Cohete() {\n\n\t}", "public CyanSus() {\n\n }", "public ApplicationDefinitionProperties() {\n }", "public Person(){\r\n\t\tsuper();\r\n\t}", "public Person() {\n\t\tname \t= \"\";\n\t\taddress = \"\";\n\t\tcity \t= \"\";\n\t\tage \t= 0;\n\t}", "public Product() {\n\t}", "public Potencial() {\r\n }", "public LogProfileProperties() {\n }", "public PaymentDetails () {\n\t}", "private ConfigProperties() {\n\n }", "public mapper3c() { super(); }", "protected Product() {\n\t\t\n\t}", "public Data() {\n \n }", "protected Product()\n\t{\n\t}", "public Account() {\n this(0, 0.0, \"Unknown name\"); // Invole the 2-param constructor\n }", "private Instantiation(){}", "protected Settlement() {\n // empty constructor\n }", "public ApplicationResourceProperties() {\n }", "protected BaseTestObject()\n {\n\n fProp = new Properties(); // empty properties object\n fLog = TestLogger.getInstance(); // default level is DEBUG\n\n }", "public Customer() {\n name = \"N.A.\";\n surname = \"N.A.\";\n address = \"N.A.\";\n email = \"N.A.\";\n }", "@Override public void init()\n\t\t{\n\t\t}", "public Person() {\n\t\t\n\t}", "public MyPractice()\n\t{\n\t\t//Unless we specify values all data members\n\t\t//are a zero, false, or null\n\t}", "private Params()\n {\n }", "public Item()\r\n {\r\n // Initialize instance variables\r\n \r\n }", "public Zeffit()\n {\n // TODO: initialize instance variable(s)\n }", "public Property() {\n\t\tcity=\"\";\n\t\towner=\"\";\n\t\tpropertyName=\"\";\n\t\trentAmount=0;\n\t\tplot= new Plot(0,0,1,1);\n\t}", "public User(){\n this(null, null);\n }", "public Individual()\r\n\t{\r\n\t}", "public DataInputClientProperties() throws IOException {\n this(null);\n }", "public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}", "protected GeometricObject() \n\t{\n\t\tdateCreated = new java.util.Date();\n\t}", "public Plato(){\n\t\t\n\t}", "public Product() { }", "public Product() { }", "public AirAndPollen() {\n\n\t}", "public Book() {\n\t\t// Default constructor\n\t}", "public User() {\r\n this(\"\", \"\");\r\n }", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public Point()\n\t{ \n\t\t// Instantiate default properties\n\t\tx = 0;\n\t\ty = 0;\n\t}", "public Identity()\n {\n super( Fields.ARGS );\n }", "public Product() {\n }", "public Product() {\n }", "public Curso() {\r\n }", "private TerminalProperties() {\n this(new TerminalPropertiesBuilder());\n }", "public Hello()\n {\n // initialise instance variables\n \n }", "public Chauffeur() {\r\n\t}", "public Car(){\n\t\t\n\t}", "public Car() {\r\n super();\r\n }", "private DatabaseValidationProperties() {}", "public InitialData(){}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public LpsClient() {\n super();\n }", "public Course() {\n this(\"course\", null);\n }", "public TestBase()\r\n\t{\r\n\t\tprop = new Properties();\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"src\\\\test\\\\resources\\\\intellicus.properties\");\r\n\t\t\tFileInputStream fis = new FileInputStream(file);\r\n\t\t\tprop.load(fis);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public Product() {}", "public Item(){}", "public Data() {\n }", "public Data() {\n }", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public JsonObject()\n\t{\n\t\tsuper(ParserUtil.OBJECT_OPEN, ParserUtil.OBJECT_CLOSE);\n\t\tsetup();\n\t}", "@Override\r\n\tpublic void init() {}", "public Property() {\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\t}", "public Student() {\n//\t\tname = \"\";\n//\t\tage = 0;\n\t\t\n\t\t\n\t\t//call constructors inside of other constructors\n\t\tthis(999,0);\n\t}", "public RngObject() {\n\t\t\n\t}", "public Bicycle() {\n // You can also call another constructor:\n // this(1, 50, 5, \"Bontrager\");\n System.out.println(\"Bicycle.Bicycle- no arguments\");\n gear = 1;\n cadence = 50;\n speed = 5;\n name = \"Bontrager\";\n }", "public Shape() { this(X_DEFAULT, Y_DEFAULT); }", "public JCProjectProperties() {\n this(null);\n }", "@Override\n public void init() {}" ]
[ "0.7333252", "0.7262761", "0.72563577", "0.70931315", "0.7058185", "0.6869883", "0.6842003", "0.68334466", "0.6813449", "0.6799051", "0.67985827", "0.6787338", "0.6735265", "0.6696914", "0.66805005", "0.66522497", "0.66030705", "0.65863764", "0.656777", "0.6562376", "0.6558047", "0.65506595", "0.6540759", "0.6528204", "0.65210825", "0.65134984", "0.6510515", "0.6508043", "0.6484063", "0.64829093", "0.6476215", "0.64761955", "0.6462041", "0.64572394", "0.6449866", "0.6449357", "0.6447433", "0.64401805", "0.643928", "0.64330846", "0.64099956", "0.6409159", "0.6409114", "0.64054966", "0.64016044", "0.63982826", "0.63980645", "0.6393406", "0.6391183", "0.6386845", "0.63804066", "0.63790715", "0.63789797", "0.6374897", "0.6371425", "0.6368016", "0.63627565", "0.63627374", "0.6362467", "0.63619345", "0.6350738", "0.6347776", "0.63469034", "0.63469034", "0.6341251", "0.63381946", "0.6332519", "0.63276345", "0.63274026", "0.6326861", "0.63241243", "0.6319244", "0.63131744", "0.63131744", "0.63128954", "0.63076925", "0.63028026", "0.6301773", "0.6293593", "0.6292181", "0.62895036", "0.6282598", "0.6281041", "0.62761396", "0.62761194", "0.62756974", "0.62725306", "0.62721133", "0.6272018", "0.627146", "0.627146", "0.6269628", "0.6266705", "0.62658244", "0.6264668", "0.6263304", "0.6256523", "0.6256464", "0.6254845", "0.625127", "0.6250383" ]
0.0
-1
Copies constructor from other InformeLicenciasOdesVO
public InformeLicenciasOdesVO(InformeLicenciasOdesVO otherBean) { if (otherBean != null) { this.licencia = otherBean.getLicencia(); this.numOdes = otherBean.getNumOdes(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InformeLicenciasOdesVO(\r\n java.lang.String licencia,\r\n int numOdes)\r\n\r\n {\r\n this.licencia = licencia;\r\n this.numOdes = numOdes;\r\n }", "public CambioComplementariosDTO(java.lang.String curpEmpleado,\n java.lang.String rfcEmpleado,\n java.lang.String primerApellido,\n java.lang.String segundoApellido,\n java.lang.String nombreEmpleado,\n java.lang.String clabeEmpleado,\n java.lang.String idBancoSar,\n java.util.Date ingresoGobFed, \n java.util.Date ingresoDependencia, \n java.util.Date terminoCargoSind, \n java.lang.String imssIssste, \n java.lang.String EMailOficial, \n java.lang.String EMailPersonal,\n java.lang.Integer idRusp, \n java.lang.String sistemaReparto, \n java.lang.String idTipoPago, \n java.lang.String idEdoCivil, \n java.lang.String idNacionalidad, \n java.lang.String idProfnCarrera, \n java.lang.Integer idNivelEscolar, \n java.lang.Integer idInstEducativa, \n java.lang.Integer idEspProtCivil, \n java.lang.Integer idInstProtcivil, \n java.util.Date fecNotDecPatr, \n java.util.Date fecIniDeclPatr, \n java.util.Date fecIngSpc, \n java.lang.String casoMuestra,\n java.lang.String discapacidad,\n java.lang.String estudiaSiNo,\n java.lang.String padreMadre,\n java.lang.String compatEmpleo,\n java.lang.String usuario,\n java.lang.Integer idInmuebleP,\n java.lang.String plazaTelOfc1,\n java.lang.String plazaExt1) { \n this.curpEmpleado = curpEmpleado;\n this.rfcEmpleado = rfcEmpleado;\n this.primerApellido = primerApellido;\n this.segundoApellido = segundoApellido;\n this.nombreEmpleado = nombreEmpleado;\n this.clabeEmpleado = clabeEmpleado;\n this.idBancoSar = idBancoSar;\n this.ingresoGobFed = ingresoGobFed;\n this.ingresoDependencia = ingresoDependencia;\n this.terminoCargoSind = terminoCargoSind;\n this.imssIssste = imssIssste;\n this.EMailOficial = EMailOficial;\n this.EMailPersonal = EMailPersonal;\n this.idRusp = idRusp;\n this.sistemaReparto = sistemaReparto;\n this.idTipoPago = idTipoPago;\n this.idEdoCivil = idEdoCivil;\n this.idNacionalidad = idNacionalidad;\n this.idProfnCarrera = idProfnCarrera;\n this.idNivelEscolar = idNivelEscolar;\n this.idInstEducativa = idInstEducativa;\n this.idEspProtCivil = idEspProtCivil;\n this.idInstProtcivil = idInstProtcivil;\n this.fecNotDecPatr = fecNotDecPatr;\n this.fecIniDeclPatr = fecIniDeclPatr;\n this.fecIngSpc = fecIngSpc;\n this.casoMuestra = casoMuestra;\n this.discapacidad = discapacidad;\n this.estudiaSiNo = estudiaSiNo;\n this.padreMadre = padreMadre;\n this.compatEmpleo = compatEmpleo;\n this.usuario = usuario;\n this.idInmuebleP = idInmuebleP;\n this.plazaTelOfc1 = plazaTelOfc1;\n this.plazaExt1 = plazaExt1;\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public CambioComplementariosDTO() { }", "private ControleurAcceuil(){ }", "public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }", "public CarteCaisseCommunaute() {\n super();\n }", "public AfiliadoVista() {\r\n }", "public Venta(Producto producto,Cliente comprador,Cliente vendedor){\n this.fechaCompra=fechaCompra.now();\n this.comprador=comprador;\n this.vendedor=vendedor;\n this.producto=producto;\n \n }", "public Candidatura (){\n \n }", "public MorteSubita() {\n }", "public DDetRetContrArtEscenicsAttTO(java.lang.Integer ideFormato, java.lang.Byte numVersionFormato, java.lang.String numEvento, java.lang.String nomEspectaculo, java.lang.Integer codMunicipioEspectaculo, java.lang.Integer codDepartamentoEspectaculo, Integer fecRealizacion, java.lang.Long idePersonaRutProductor, java.lang.String valDireccionProductor, java.lang.Integer codMunicipioProductor, java.lang.Integer codDepartamentoProductor, java.lang.Long numTelefonoProductor, String valLugarEvento, java.lang.Integer numTotBoletasVendidas, java.math.BigDecimal valTotBoletasVendidas, BigDecimal valServDistComerBoleteria, java.lang.Integer numTotBolPrecIgSup3uvt, java.math.BigDecimal valTotBolPrecIgSup3uvt, java.lang.Integer numTotDerAsPreIgSup3uvt, java.math.BigDecimal valTotDerAsPreIgSup3uvt, java.lang.Integer numBoletasRetencionExceso, java.math.BigDecimal valBoletasRetencionExceso, Long ideUsuarioCambio, Timestamp fecCambio) {\n\t\tsetIdeFormato(ideFormato);\n\t\tsetNumVersionFormato(numVersionFormato);\n\t\tsetNumEvento(numEvento);\n\t\tsetNomEspectaculo(nomEspectaculo);\n\t\tsetCodMunicipioEspectaculo(codMunicipioEspectaculo);\n\t\tsetCodDepartamentoEspectaculo(codDepartamentoEspectaculo);\n\t\tsetFecRealizacion(fecRealizacion);\n\t\tsetIdePersonaRutProductor(idePersonaRutProductor);\n\t\tsetValDireccionProductor(valDireccionProductor);\n\t\tsetCodMunicipioProductor(codMunicipioProductor);\n\t\tsetCodDepartamentoProductor(codDepartamentoProductor);\n\t\tsetNumTelefonoProductor(numTelefonoProductor);\n\t\tsetValLugarEvento(valLugarEvento);\n\t\tsetNumTotBoletasVendidas(numTotBoletasVendidas);\n\t\tsetValTotBoletasVendidas(valTotBoletasVendidas);\n\t\tsetValServDistComerBoleteria(valServDistComerBoleteria);\n\t\tsetNumTotBolPrecIgSup3uvt(numTotBolPrecIgSup3uvt);\n\t\tsetValTotBolPrecIgSup3uvt(valTotBolPrecIgSup3uvt);\n\t\tsetNumTotDerAsPreIgSup3uvt(numTotDerAsPreIgSup3uvt);\n\t\tsetValTotDerAsPreIgSup3uvt(valTotDerAsPreIgSup3uvt);\n\t\tsetNumBoletasRetencionExceso(numBoletasRetencionExceso);\n\t\tsetValBoletasRetencionExceso(valBoletasRetencionExceso);\n\t\tsetIdeUsuarioCambio(ideUsuarioCambio);\n\t\tsetFecCambio(fecCambio);\n\t}", "public Libro(String codigo, String titulo, String autor, int editorial, String ISBN, String anioEdicion, int numEdicion, int pais, int idioma, String materia, int paginas, String ubicacion, String descripcion, String tipo, String estado) {\r\n this.codigo = codigo;\r\n this.titulo = titulo;\r\n this.autor = autor;\r\n this.editorial = editorial;\r\n this.ISBN = ISBN;\r\n this.anioEdicion = anioEdicion;\r\n this.numEdicion = numEdicion;\r\n this.pais = pais;\r\n this.idioma = idioma;\r\n this.materia = materia;\r\n this.paginas = paginas;\r\n this.ubicacion = ubicacion;\r\n this.descripcion = descripcion;\r\n this.tipo = tipo;\r\n this.estado = estado;\r\n }", "public void construirCargo() {\n persona.setCargo(Cargos.SUPERVISOR);\n }", "public CorreoElectronico() {\n }", "private IOferta buildOfertaEjemplo2() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.THURSDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f), \n\t\t\t\tnew ExtraerTotalBrutoProductos(new PredicadoRubro(\"11\")));\n\t\treturn new OfertaDinero(\"10% descuento comida los jueves\", condicion,\n\t\t\t\tdescuento);\n\t}", "@Override\n protected void carregaObjeto() throws ViolacaoRegraNegocioException {\n entidade.setNome( txtNome.getText() );\n entidade.setDescricao(txtDescricao.getText());\n entidade.setTipo( txtTipo.getText() );\n entidade.setValorCusto(new BigDecimal((String) txtCusto.getValue()));\n entidade.setValorVenda(new BigDecimal((String) txtVenda.getValue()));\n \n \n }", "public Comercial(String nombre, String apellido, int edad, double salario, double comision)\n {\n \tsuper(nombre, apellido, edad, salario);\n \tthis.comision=comision;\n }", "public CUClienteComplementoOV()\t{\n\n\t\t}", "public Caso_de_uso () {\n }", "public Vehiculo(Vehiculo other) {\r\n __isset_bitfield = other.__isset_bitfield;\r\n this.idVehiculo = other.idVehiculo;\r\n if (other.isSetMarca()) {\r\n this.marca = other.marca;\r\n }\r\n if (other.isSetModelo()) {\r\n this.modelo = other.modelo;\r\n }\r\n this.anio = other.anio;\r\n if (other.isSetColor()) {\r\n this.color = other.color;\r\n }\r\n if (other.isSetNombreAseguradora()) {\r\n this.nombreAseguradora = other.nombreAseguradora;\r\n }\r\n if (other.isSetNumPoliza()) {\r\n this.numPoliza = other.numPoliza;\r\n }\r\n if (other.isSetPlaca()) {\r\n this.placa = other.placa;\r\n }\r\n }", "public Vehiculo() {\r\n }", "public INodo copy(){\n INodo copia = new FuncionMultiplicacion(getRaiz(), getNHijos());\n copia.setEtiqueta(getEtiqueta());\n for (INodo aux : getDescendientes()){\n copia.incluirDescendiente(aux.copy());\n }\n return copia;\n }", "public frmClienteIncobrable() {\n initComponents();\n \n //CARGAR PROVINCIAS\n ArrayList<clsComboBox> dataProvincia = objProvincia.consultarTipoIncobrable(); \n for(int i=0;i<dataProvincia.size();i=i+1)\n {\n clsComboBox oItem = new clsComboBox(dataProvincia.get(i).getCodigo(), dataProvincia.get(i).getDescripcion());\n cmbTipoIncobrable.addItem(oItem); \n } \n \n \n //CARGAR AUTOCOMPLETAR\n List<String> dataCedula = objCliente.consultarCedulas(); \n SelectAllUtils.install(txtCedula);\n ListDataIntelliHints intellihints = new ListDataIntelliHints(txtCedula, dataCedula); \n intellihints.setCaseSensitive(false);\n \n Date fechaActual = new Date();\n txtFecha.setDate(fechaActual);\n }", "private IOferta buildOfertaEjemplo4() {\n\t\tPredicate<Compra> condicion = Predicates.alwaysTrue();\n\t\tFunction<Compra, Float> descuento = new DescuentoLlevaXPagaY(\"11-111-1111\", 3, 2);\n\t\treturn new OfertaDinero(\"Lleva 3 paga 2 en Coca-Cola\", condicion,\n\t\t\t\tdescuento);\n\t}", "public Cilindro(int idCilindro, int idCombustible, double longitud, double radio, String codigo, String combustible, double volumenFijo) {\r\n this.idCilindro = idCilindro;\r\n this.idCombustible = idCombustible;\r\n this.longitud = longitud;\r\n this.radio = radio;\r\n this.codigo = codigo;\r\n this.combustible = combustible;\r\n this.volumenFijo = volumenFijo;\r\n }", "public Asiento(double precio) {\n\t\t\n\t\tthis.disponibilidad = Disponibilidad.LIBRE;\t\t\n\t\tthis.cambiarPrecio(precio);\n\t}", "public Cliente(ArrayList<Direccion> v_direcciones, int v_rol, int v_ID, String v_correo, String v_pass, String v_usuario,\n String v_nombre, String v_apellido, String v_segundo_apellido, LocalDate v_fechanac, String genero, String v_telefono, String identificacion) {\n super(v_rol, v_ID, v_correo, v_pass, v_usuario, v_nombre, v_apellido, v_segundo_apellido, v_fechanac, genero, v_telefono, identificacion);\n this.v_direcciones = v_direcciones;\n }", "public Capo (int codiceID, int pesoA, int pesoV) \r\n\t{\r\n\t\tsetCodiceID(codiceID);\r\n\t\tsetPesoA(pesoA);\r\n\t\tsetDataA(LocalDate.from(LocalDate.now()));\r\n\t\tsetPesoV(pesoV);\r\n\t\tsetDataV(null);\r\n\t}", "public TdExpCurpDTO(java.lang.Integer curpSecuencia, java.lang.String idDocto, java.lang.String rfcEmpleado, \n int idExpRechazo, java.lang.String curpCve, java.lang.String curpDoctoRef, \n java.util.Date fecModifico, java.lang.String idStatus, java.lang.String usuario, \n java.lang.String curpFolio) {\n this.curpSecuencia = curpSecuencia;\n this.idDocto = idDocto;\n this.rfcEmpleado = rfcEmpleado;\n this.idExpRechazo = idExpRechazo;\n this.curpCve = curpCve;\n this.curpDoctoRef = curpDoctoRef;\n this.fecModifico = fecModifico;\n this.idStatus = idStatus;\n this.usuario = usuario;\n this.curpFolio = curpFolio;\n }", "public Comercial(String nombre ,int edad,double salario,double comision){\r\n\t\tsuper(nombre,edad,salario);\r\n\t\tthis.Comision=comision;\r\n\t}", "public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }", "public Clase04(Clase04 o){\r\n numPersonas++;\r\n numero= o.numero;\r\n nombre= o.nombre;\r\n }", "public LibrosFormBean() {\r\n libr = new ConjuntoLibro();\r\n }", "public FicheConnaissance() {\r\n }", "public SrvINFONEGOCIO(AgregarInfoNegocio view) {//C.P.M Tendremos un constructor con la vista de agregar informacion de negocio\r\n this.vista = view;//C.P.M Se la agregamos a la variable para tener acceso a la vista \r\n }", "public void inicializarOrdenDeCorte(OrdenDeCorte oc);", "public ZafCxP04(ZafParSis obj)\n {\n try\n {\n initComponents();\n //Inicializar objetos.\n objParSis=(ZafParSis)obj.clone();\n }\n catch (CloneNotSupportedException e)\n {\n this.setTitle(this.getTitle() + \" [ERROR]\");\n }\n }", "public RenovarLicencia() {\n //borrar todo cuando este listo el metodo de abajo\n initComponents();\n setTitle(\"Renovar Licencia\");\n setLocationRelativeTo(null);\n //se pide al gestor y se muestra por pantalla los datos del administrativo registrado\n txt_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getUsername());\n txt_nombre_user.setText(GestorAdministrativo.getInstance().getAdministrativo().getNombre() + \" \" + GestorAdministrativo.getInstance().getAdministrativo().getApellido());\n //borrar hasta aca\n }", "public Respuesta() {\n }", "public Alojamiento() {\r\n\t}", "public Cgg_res_oficial_seguimiento_usuario(){}", "public VotacaoSegundoDia() {\n\n\t}", "public RegistrarPagoCXC() {\n initComponents();\n HoraFecha ob2 = new HoraFecha();\n jdfecha.setDate(ob2.obtenerFechamascienanos());\n Buscar_cxc.restropagocxcCxpexitoso = false;\n Buscar_cxp.restropagocxpCxpexitoso = false;\n\n//// spinerDiasCredito.setValue(30);\n//// HoraFecha ob2 = new HoraFecha();\n//// fecha = ob2.obtenerFecha();\n//// jDateChooser1.setDate(fecha);\n//// \n//// jDateChooser1.setDate(sumarRestarDiasFecha(fecha, Integer.valueOf(spinerDiasCredito.getValue().toString())));\n//// txt_entrada.grabFocus(); \n//// txt_entrada.selectAll();\n//// \n ////formas de pago\n fp = OperacionesForms.FormasPagoCXC_seExceptualaformadePago_Credito(jComboBox1);\n\n//OperacionesForms.getAllComponents(this)\n// jComboBox1.setSelectedItem(Principal.formadepagopredeterminada);\n /// HoraFecha.fecha(fecha)\n }", "public VistaListacomprasnocliente() {\n // You can initialise any data required for the connected UI components here.\n }", "public AntrianPasien() {\r\n\r\n }", "VentanaPrincipal(InterfazGestorFF principal, InterfazEsquema estructura) {\n initComponents();\n setTitle(BufferDeRegistro.titulo);\n this.principal=principal;\n this.estructura=estructura;\n cargar_campos(); \n cargar_menu_listados();\n \n botones=new javax.swing.JButton[]{\n jBAbrirSGFF,jBActualizarRegistro,jBAyuda,jBBorrarRegistro,\n jBComenzarConsulta,jBGuardarSGFF,jBGuardarSGFF,jBImportarSGFF,\n jBInsertarRegistro,jBIrAlHV,jBIrAlHijo,\n jBIrAlPV,jBIrAlPadre,jBNuevaFicha,jBRegistroAnterior,jBRegistroSiguiente,jBSSGFF,jBCaracteres, jBAccInv, jBListar\n };\n combos=new javax.swing.JComboBox[]{\n jCBArchivos, jCBHijos, jCBPadresV, jCBHijosV\n };\n abrir(false);//Pongo en orden la barra de herramientas\n \n }", "private ElementoDettaglioVariazioneCodificaCapitoloFactory() {\n\t}", "public Recursos() {\n }", "private Productos(int codigo, String descripcion, double precio) {\n this.codigo = codigo;\n this.descripcion = descripcion;\n this.precio = precio;\n }", "public Corso() {\n\n }", "public FiltroCreditoTipo() {\r\n\t}", "public Libro() {\n\t\tsuper();\n\t\tthis.id = -1;\n\t\tthis.isbn = \"\";\n\t\tthis.titulo = \"\";\n\t\tthis.editorial = \"\";\n\t\tthis.prestado = false;\n\t}", "Compuesta createCompuesta();", "public jInternalCobro(ControladorPrincipal miControlador, Alumno unAlumno, Cuota cuota) {\n Cuota otro = cuota;\n this.controlador = miControlador;\n elAlumno = unAlumno;\n initComponents();\n Locale locale = new Locale(\"es\", \"ES\");\n DatePickerSettings settings = new DatePickerSettings(locale);\n settings.setFormatForDatesCommonEra(\"dd/MM/yyyy\");\n settings.setFormatForDatesBeforeCommonEra(\"dd/MM/uuuu\");\n datePicker.setSettings(settings);\n datePicker.setDateToToday();\n this.txtNombreAlumno.setText(elAlumno.getNombrealumno() + \" \" + elAlumno.getApellidoalumno());\n if(otro == null) {\n try {\n cargarTablaCuotas(elAlumno);\n } catch (Notificaciones ex) {\n JOptionPane.showMessageDialog(null, ex.getMessage());\n }\n } else {\n try {\n cargarTablaCuota(elAlumno, otro);\n } catch (Notificaciones ex) {\n ex.printStackTrace();\n }\n }\n }", "public ObjetoBBDD clonar() {\n\t\t\n\t\tIsFicha ficha=new IsFicha();\n\t\tficha.IDISFICHA=this.IDISFICHA;\n\t\tficha.NOTAS=ficha.NOTAS;\n\t\tficha.ANOTACIONES=this.ANOTACIONES;\n\t\tficha.NOTAS_EJERCICIOS=this.NOTAS_EJERCICIOS;\n\t\t//ficha.inicializar();\n\t\treturn ficha;\n\t}", "public Libro(String autorLibro, String tituloLibro, int numeroDePaginas, \n boolean esLibroDeTextoONo)\n {\n autor = autorLibro;\n titulo = tituloLibro;\n numeroPaginas = numeroDePaginas;\n numeroReferencia = \"\";\n vecesPrestado = 0;\n esLibroDeTexto = esLibroDeTextoONo;\n }", "public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor,\r\n\t\t\tJComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT,\r\n\t\t\tJComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial,\r\n\t\t\tJTextField nomeArtista, JTextField nomeObra, JTextField txtNovaObra, JFormattedTextField dataAquisicao,\r\n\t\t\tJEditorPane descricaoObra, JLabel msgGravar, JLabel msgVazio, JFormattedTextField txtValor,\r\n\t\t\tJButton btnPesqArtist, JButton btnNovoArtista, JButton btnEditarArtista, JButton btnNovaCategoria,\r\n\t\t\tJButton btnEditarCategoria, JButton btnNovoMaterial, JButton btnEditarMaterial, JButton btnNovoSetor,\r\n\t\t\tJButton btnEditarSetor, JButton btnNovoSetorT, JButton btnEditarSetorT, JTextField idObra,\r\n\t\t\tJButton btnGravar) {\r\n\r\n\t\tthis.frmAcervo = frmAcervo;\r\n\t\tthis.btnGravar = btnGravar;\r\n\t\tthis.idObra = idObra;\r\n\t\tthis.obras = new ArrayList<ObraMdl>();\r\n\t\tthis.imagem = imagem;\r\n\t\tthis.lblValor = lblValor;\r\n\t\tthis.nomeArtista = nomeArtista;\r\n\t\tthis.txtNovaObra = txtNovaObra;\r\n\t\tthis.lblStatus = lblStatus;\r\n\t\tthis.nomeObra = nomeObra;\r\n\t\tthis.dataAquisicao = dataAquisicao;\r\n\t\tthis.edtDescricao = descricaoObra;\r\n\t\tthis.cbMaterial = cbMaterial;\r\n\t\tthis.cbObras = cbObras;\r\n\t\tthis.cbCategoria = cbCategoria;\r\n\t\tthis.cbSetor = cbSetor;\r\n\t\tthis.cbSetorT = cbSetorT;\r\n\t\tthis.cbStatus = cbStatus;\r\n\t\tthis.cbStatusT = cbStatusT;\r\n\t\tthis.btnPesqArtist = btnPesqArtist;\r\n\t\tthis.btnNovoArtista = btnNovoArtista;\r\n\t\tthis.btnEditarArtista = btnEditarArtista;\r\n\t\tthis.btnNovaCategoria = btnNovaCategoria;\r\n\t\tthis.btnEditarCategoria = btnEditarCategoria;\r\n\t\tthis.btnNovoMaterial = btnNovoMaterial;\r\n\t\tthis.btnEditarMaterial = btnEditarMaterial;\r\n\t\tthis.btnNovoSetor = btnNovoSetor;\r\n\t\tthis.btnEditarSetor = btnEditarSetor;\r\n\t\tthis.btnNovoSetorT = btnNovoSetorT;\r\n\t\tthis.btnEditarSetorT = btnEditarSetorT;\r\n\t\tthis.txtValor = txtValor;\r\n\t\tthis.msgGravar = msgGravar;\r\n\t\tthis.msgVazio = msgVazio;\r\n\t\tthis.caminhoImagem = \"\";\r\n\r\n\t\tlerAcervo();\r\n\t}", "public ClienteDTO(int idTipoCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String fecNacCliente,\r\n\t\t\tString sexoCliente, String telefonoCliente, String celularCliente,\r\n\t\t\tString correoCliente, String numDocumento, String razSocCliente,\r\n\t\t\tString ciiuCliente, String cargoContacCliente) {\r\n\t\tsuper();\r\n\t\tthis.idTipoCliente = idTipoCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.fecNacCliente = fecNacCliente;\r\n\t\tthis.sexoCliente = sexoCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.numDocumento = numDocumento;\r\n\t\tthis.razSocCliente = razSocCliente;\r\n\t\tthis.ciiuCliente = ciiuCliente;\r\n\t\tthis.cargoContacCliente = cargoContacCliente;\r\n\t}", "public Rezervare(Rezervare other) {\r\n __isset_bitfield = other.__isset_bitfield;\r\n this.id = other.id;\r\n this.idCursa = other.idCursa;\r\n this.nrLoc = other.nrLoc;\r\n if (other.isSetClient()) {\r\n this.client = other.client;\r\n }\r\n }", "public Rubros(java.awt.Frame parent, boolean modal,int idpresupuesto,int quincena, int mes, int ano) {\n super(parent, modal);\n initComponents();\n this.idpresupuesto=idpresupuesto;\n this.quincena=quincena;\n this.mes=mes;\n String nmes=\"\";\n this.ano=ano; \n \n \t\n setLocationRelativeTo(null);\n \n PresupuestoDAO con;\n try {\n con = PresupuestoDAO.getInstance();\n TiposPagoSingleton tipospago_singleton = TiposPagoSingleton.getInstance();\n this.tiposp = tipospago_singleton.getTiposp();\n \n cmb_tipo_pago.setModel(new javax.swing.DefaultComboBoxModel(this.tiposp));\n cmb_tipo_pago.setSelectedItem(\"EFECTIVO\");\n }catch(SQLException e){} \n\n }", "private GrupoCuenta(String nombre, int operacion)\r\n/* 11: */ {\r\n/* 12:31 */ this.nombre = nombre;\r\n/* 13:32 */ this.operacion = operacion;\r\n/* 14: */ }", "public Tecnico(){\r\n\t\tthis.matricula = 0;\r\n\t\tthis.nome = \"NULL\";\r\n\t\tthis.email = \"NULL\";\r\n\t\tthis.telefone = \"TELEFONE\";\r\n\t\tlistaDeServicos = new ArrayList<Servico>();\r\n\t}", "public AvaliacaoRisco() {\n }", "public DDetRetContrArtEscenicsAttTO() { }", "public Pasien() {\r\n }", "public VistaProductos() {\n setUndecorated(true);\n initComponents();\n ValidadSoloNumeros(TextCodProduct);\n ValidadCaracteres(TextDescripcion);\n ValidadSoloNumeros(TextPrecio);\n ValidadSoloNumeros(TextCostoproduc);\n ValidadSoloNumeros(txtIvap);\n cn = Conexion.getConn();\n cargar();\n\n LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(cc.listaProvee().toArray()));\n\n obj = ControllerSql.getInstancia();\n proveedores = cc.listaProvee();\n // LitsadeProovedores.setModel(new javax.swing.DefaultComboBoxModel(proveedores.toArray()));\n LitsadeProovedores.setSelectedIndex(-1);\n }", "public CCuenta()\n {\n }", "public ControladorCatalogoServicios() {\r\n }", "private FournisseurArboTraficService() {\r\n\t\tsuper();\r\n\t}", "public Producto(double precioCompra, double precioVenta) {\n\t//\tsuper();\n\t\tthis.precioCompra = precioCompra;\n\t\tthis.precioVenta = precioVenta;\n\t}", "private Retorno( )\r\n {\r\n val = null;\r\n izq = null;\r\n der = null;\r\n\r\n }", "public Valvula(){}", "public ContribuintesIndividuais() {\n super();\n this.dependentes=0;\n this.nifs = new ArrayList<String>();\n this.coeffiscal=0;\n this.codigos = new ArrayList<String>();\n this.numFilhos = 0;\n }", "public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }", "public Exercicio(){\n \n }", "private ProcesoDTO registrarProcesoCoactivo() {\n RegistraProcesoDTO registra = new RegistraProcesoDTO();\n registra.setObservacion(EnumTipoProceso.COACTIVO.name());\n registra.setTipoProceso(EnumTipoProceso.COACTIVO);\n registra.setEstado(EnumEstadoProceso.ECUADOR_COACTIVO_RADICACION);\n registra.setConsecutivo(EnumConsecutivo.NUMERO_COACTIVO_ECUADOR);\n return iRFachadaProceso.crearProceso(registra);\n }", "public Partido(Equipo equipo1, Equipo equipo2, String campo, String fecha) {\n\t\tthis.jugado = false;\n\t\tthis.equipo1 = equipo1;\n\t\tthis.equipo2 = equipo2;\n\t\tthis.golesEquipo1 = -1;\n\t\tthis.golesEquipo2 = -1;\n\t\tthis.campo = campo;\n\t\tthis.fecha = fecha;\n\t\tthis.notas = \"\";\n\t\tthis.arbitro = null;\n\t}", "public VistaCliente(ObjectOutputStream oos, ObjectInputStream ois) \n throws IOException, ClassNotFoundException \n {\n \n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n \n addWindowListener(new java.awt.event.WindowAdapter() {\n @Override\n public void windowClosing(java.awt.event.WindowEvent evt) {\n try {\n close(oos, ois);\n } catch (IOException ex) {\n Logger.getLogger(VistaCliente.class.getName()).log(Level.SEVERE, null, ex);\n \n }\n }\n });\n \n this.oos = oos;\n this.ois = ois;\n initComponents();\n init();\n this.setExtendedState(MAXIMIZED_BOTH);\n this.getContentPane().setBackground(Color.WHITE);\n this.setResizable(false);//no permite que sea redimincionable\n Image icon = Toolkit.getDefaultToolkit().getImage(getClass()\n .getResource(\"/ImagenesInterfaz/Icono.png\"));\n setIconImage(icon);\n \n this.setTitle(\"CML EXPRESS\"); \n }", "Vaisseau_estAbscisseCouverte createVaisseau_estAbscisseCouverte();", "public SiacTRecapitoSoggetto() {\n\t}", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "public NewConsultasS() {\n initComponents();\n limpiar();\n bloquear();\n }", "public Relatorio2(Date inicio, Date fim, int codigo) {\n this.dtInicio = inicio;\n this.dtFim = fim;\n this.codCLucro = codigo;\n conexao.conecta();\n Utilitarios u = new Utilitarios();\n u.inserirIcone(this);\n initComponents();\n preencherTabelaReceita();\n totalizadores();\n //Abrir o frame centralizado\n setLocationRelativeTo(null);\n }", "public RegistroCompra() {\n initComponents();\n buscarProveedor();\n }", "public Veiculo() {\r\n\r\n }", "public Object clone() {\r\n ViewDetallesPagos cloned = new ViewDetallesPagos();\r\n\r\n cloned.setIDCUENTACONTABLE(this.IDCUENTACONTABLE); \r\n if (this.DECOMPARENDO != null)\r\n cloned.setDECOMPARENDO(new String(this.DECOMPARENDO)); \r\n if (this.CODIGOCUENTA != null)\r\n cloned.setCODIGOCUENTA(new String(this.CODIGOCUENTA)); \r\n if (this.NOMBRECUENTA != null)\r\n cloned.setNOMBRECUENTA(new String(this.NOMBRECUENTA)); \r\n cloned.setVIGENCIAINICIAL(this.VIGENCIAINICIAL); \r\n cloned.setVIGENCIAFINAL(this.VIGENCIAFINAL); \r\n if (this.FILTROPORFECHAS != null)\r\n cloned.setFILTROPORFECHAS(new String(this.FILTROPORFECHAS)); \r\n cloned.setIDTARIFA(this.IDTARIFA); \r\n cloned.setIDCONCEPTO(this.IDCONCEPTO); \r\n if (this.NOMBRECONCEPTO != null)\r\n cloned.setNOMBRECONCEPTO(new String(this.NOMBRECONCEPTO)); \r\n cloned.setIDITEM(this.IDITEM); \r\n cloned.setVALORPAGO(this.VALORPAGO); \r\n if (this.FECHAPAGO != null)\r\n cloned.setFECHAPAGO(new String(this.FECHAPAGO)); \r\n cloned.setVIGENCIA(this.VIGENCIA); \r\n return cloned;\r\n }", "private RicercaSinteticaCapitoloEPrev creaUtilityRicercaSinteticaCapitoloEPrev() {\n\t\tRicercaSinteticaCapitoloEPrev utility = new RicercaSinteticaCapitoloEPrev();\n\t\t\n\t\tutility.setAnnoEsercizio(getAnnoEsercizioInt());\n\t\tutility.setAnnoCapitolo(getAnnoCapitoloDaConsultare());\n\t\tutility.setNumeroCapitolo(getNumeroCapitoloDaConsultare());\n\t\tutility.setNumeroArticolo(getNumeroArticoloDaConsultare());\n\t\t\n\t\treturn utility;\n\t}", "public BoletoCodigoDeBarrasDV() {\n\n\t\tsuper();\n\t}", "@Generated\n public Secciones() {\n }", "public Principal() {\n initComponents();\n empresaControlador = new EmpresaControlador();\n clienteControlador = new ClienteControlador();\n vehiculoControlador = new VehiculoControlador();\n servicioControlador = new ServicioControlador();\n archivoObjeto = new ArchivoObjeto(\"/home/diego/UPS/56/ProgramacionAplicada/Parqueadero/src/archivo/ClienteArchivo.obj\");// Ruta Absolojuta\n archivosBinarios = new ArchivosBinarios();\n archivosBinariosAleatorio = new ArchivosBinariosAleatorio(\"ServicioArchivo.dat\");//Ruta relativa\n }", "public ChoixEntreprise() {\n\n }", "protected Asignatura()\r\n\t{}", "public Corso(String codice, String nome, String docente, String descrizione, String link) {\n this.codice = codice;\n this.nome = nome;\n this.docente = docente;\n this.descrizione = descrizione;\n this.link = link;\n }", "public Pila(Fabrica<TNodo> creadorDeNodos) {\n\t\tsuper(creadorDeNodos);\n\t}", "public Producto() {\r\n\t\tsuper();\r\n\t\tID = getIDnuevoProducto();\r\n\t\tnombre = \"\";\r\n\t\tvendedor = \"\";\r\n\t\tprecio = 0;\r\n\t\tcantidad = 0;\r\n\t\tenVenta = false;\r\n\t\tdescripcion = \"\";\r\n\t\tcategorias = new Categoria();\r\n\t\tcaracteristicas = null;//TODO CORREGIR\r\n\t}", "public Carrera(){\n }", "public Locacao2() {\n initComponents();\n try {\n carregarTabelaLocatario(new ELocatario());\n carregarTabelaCarro(new ECarro());\n } catch (Exception e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n \n this.cmbLocalRetirada.removeAllItems();\n this.cmbLocalRetirada.addItem(\"Selecione\");\n this.cmbLocalRetirada.addItem(\"Loja\");\n this.cmbLocalRetirada.addItem(\"Aeroporto\");\n this.cmbLocalRetirada.addItem(\"Rodoviária\");\n }", "public ClienteDTO(String idCliente, String nomCliente,\r\n\t\t\tString apePatCliente, String apeMatCliente, String fecNacCliente,\r\n\t\t\tString sexoCliente, String telefonoCliente, String celularCliente,\r\n\t\t\tString correoCliente, String numDocumento, String idEstado,\r\n\t\t\tString razSocCliente, String ciiuCliente, String cargoContacCliente) {\r\n\t\tsuper();\r\n\t\tthis.idCliente = idCliente;\r\n\t\tthis.nomCliente = nomCliente;\r\n\t\tthis.apePatCliente = apePatCliente;\r\n\t\tthis.apeMatCliente = apeMatCliente;\r\n\t\tthis.fecNacCliente = fecNacCliente;\r\n\t\tthis.sexoCliente = sexoCliente;\r\n\t\tthis.telefonoCliente = telefonoCliente;\r\n\t\tthis.celularCliente = celularCliente;\r\n\t\tthis.correoCliente = correoCliente;\r\n\t\tthis.numDocumento = numDocumento;\r\n\t\tthis.idEstado = idEstado;\r\n\t\tthis.razSocCliente = razSocCliente;\r\n\t\tthis.ciiuCliente = ciiuCliente;\r\n\t\tthis.cargoContacCliente = cargoContacCliente;\r\n\t}", "public Reserva(){super();}" ]
[ "0.6877503", "0.66318876", "0.6622086", "0.6621297", "0.65268815", "0.648067", "0.64375293", "0.6198189", "0.61412853", "0.61047274", "0.6062406", "0.60419285", "0.60267985", "0.6010174", "0.60087144", "0.6006799", "0.5990452", "0.5960931", "0.59589094", "0.5954561", "0.5946211", "0.59456277", "0.59426606", "0.5941596", "0.59367055", "0.5930088", "0.5916291", "0.59144104", "0.5908643", "0.59042317", "0.5898198", "0.58896995", "0.5880398", "0.5879197", "0.58702755", "0.58702326", "0.5866872", "0.58629966", "0.5856879", "0.5850421", "0.5845039", "0.58332604", "0.5827368", "0.5821026", "0.5820227", "0.5814094", "0.58072954", "0.57987213", "0.5798431", "0.57857484", "0.5780037", "0.5779053", "0.5770292", "0.57672715", "0.5757749", "0.5754502", "0.57532126", "0.57507926", "0.57398623", "0.5738968", "0.5735719", "0.5728944", "0.572835", "0.57280755", "0.5724216", "0.571922", "0.57180357", "0.57164913", "0.571441", "0.57134604", "0.5701221", "0.5692469", "0.5684636", "0.5683814", "0.5683255", "0.56823546", "0.56801826", "0.5678735", "0.5677004", "0.56768763", "0.566778", "0.5665468", "0.5665339", "0.5661516", "0.56547433", "0.5646902", "0.56462455", "0.56428844", "0.56375146", "0.5635715", "0.5633604", "0.56332475", "0.56323385", "0.5628229", "0.5626575", "0.5626366", "0.5620897", "0.56198674", "0.56196886", "0.56168795" ]
0.716688
0
Constructor for primary key
public BaseNote (java.lang.String id) { this.setId(id); initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PrimaryKey createPrimaryKey();", "public DatasetParameterPK() {\n }", "public ParametroPorParametroPK() {\r\n\t}", "PrimaryKey getPrimarykey();", "Key getPrimaryKey();", "public TdOficioAfectacionPK() {\n }", "PrimaryKey getPrimaryKey();", "public DomainPK()\n {\n }", "public LeaguePrimaryKey() {\n }", "public TdNmResumenPK() {\n }", "public PrimaryKey getPrimaryKey();", "public EnvioPersonaPK() {\r\n }", "public static Key createPrimaryKey(Number idexped, Number idbulto)\n {\n return new Key(new Object[] {idexped, idbulto});\n }", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "public void setPrimaryKey(String primaryKey);", "public PaymentRecordKey() {\n super();\n }", "private Integer newPrimaryKey( )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n daoUtil.executeQuery( );\n Integer nKey = null;\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 );\n }\n else\n {\n nKey = 1;\n }\n daoUtil.close( );\n\n return nKey.intValue( );\n }", "public MarketplaceRatingPK(){\n\t}", "public static PrimaryIndexBuilder pkIndex() {\n return new PrimaryKeyBuilderImpl();\n }", "public void setPrimaryKey(String primaryKey) {\r\n this.primaryKey = primaryKey;\r\n }", "@Override\r\n\tpublic String getPrimaryKey() {\n\t\treturn \"ID\";\r\n\t}", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(long primaryKey);", "public void setPrimaryKey(int primaryKey);", "public Key()\n {\n name = \"\";\n fields = new Vector<String>();\n options = new Vector<String>();\n isPrimary = false;\n isUnique = false;\n }", "public void setPrimaryKey(String primaryKey) {\n this.primaryKey = primaryKey;\n }", "public void setPrimaryKey(long primaryKey) {\n this.primaryKey = primaryKey;\n }", "public Constraint setKey( String theId) {\n\t\tmyKey = new IdDt(theId); \n\t\treturn this; \n\t}", "Object getPrimaryKey() throws IllegalStateException;", "public void setPrimaryKey(String primaryKey) {\r\n\t\tthis.primaryKey = primaryKey;\r\n\t}", "private int newPrimaryKey( )\n {\n int nKey;\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_NEW_PK );\n\n daoUtil.executeQuery( );\n\n if ( daoUtil.next( ) )\n {\n nKey = daoUtil.getInt( 1 ) + 1;\n }\n else\n {\n // If the table is empty\n nKey = 1;\n }\n\n daoUtil.free( );\n\n return nKey;\n }", "PK create(T newInstance);", "public ProductoPk createPk() {\r\n return new ProductoPk(idProducto);\r\n }", "private TbviajepasajeroPK getPrimaryKey(PathSegment pathSegment) {\r\n ugt.entidades.TbviajepasajeroPK key = new ugt.entidades.TbviajepasajeroPK();\r\n javax.ws.rs.core.MultivaluedMap<String, String> map = pathSegment.getMatrixParameters();\r\n java.util.List<String> idviaje = map.get(\"idviaje\");\r\n if (idviaje != null && !idviaje.isEmpty()) {\r\n key.setIdviaje(new java.lang.Integer(idviaje.get(0)));\r\n }\r\n java.util.List<String> cedulap = map.get(\"cedulap\");\r\n if (cedulap != null && !cedulap.isEmpty()) {\r\n key.setCedulap(java.lang.String.valueOf(cedulap.get(0)));\r\n }\r\n return key;\r\n }", "public String getPrimaryKey() {\n if (primaryKey == null) primaryKey = \"id\";\n return primaryKey;\n }", "public static Key createPrimaryKey(Number supplierId) {\n return new Key(new Object[]{supplierId});\n }", "public void setPrimaryKey(String primaryKey) {\n\t\tthis.primaryKey = primaryKey;\n\t}", "public PIEBankPlatinumKey() {\n\tsuper();\n}", "public ListaPorMenuPK() {\r\n\t}", "public DBRecordKey<gDBR> createKey() // <? extends DBRecord<?>>\n throws DBException\n {\n if (this.keyClass != null) {\n try {\n // this creates an empty key with no key fields\n Constructor<? extends DBRecordKey<gDBR>> kc = this.keyClass.getConstructor(new Class<?>[0]);\n return kc.newInstance(new Object[0]); // \"unchecked cast\"\n } catch (Throwable t) { // NoSuchMethodException, ...\n // Implementation error (should never occur)\n throw new DBException(\"Key Creation\", t);\n }\n }\n return null;\n }", "boolean isPrimaryKey();", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_1()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "@Test\n\tpublic void testDBPrimaryKeyConstraint_18()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "public SQLRowIdentifier() {\n\t\tsuper(EnumSQLType.SqlRowIdentifier, LENGTH);\n\t\t\n\t\tthis.page = new SQLInteger();\n\t\tthis.slot = new SQLInteger();\n\t}", "public void setPrimaryKey(VLegalFORelPK primaryKey);", "@Override\n\tpublic Object getPrimaryKey() {\n\t\treturn null;\n\t}", "@Test\n\tpublic void testDBPrimaryKeyConstraint_23()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}", "protected String createPrimaryKeyConstraint(TableModel table) {\r\n\t\tColumnModel[] pks = table.getPrimaryKeyColumns();\r\n\t\tString s = \"\";\r\n\t\tif (pks.length > 1) {\r\n\t\t\ts = \",\\n PRIMARY KEY(\";\r\n\t\t\tString a = \"\";\r\n\t\t\tfor (ColumnModel c : pks) {\r\n\t\t\t\tif (a.length() > 0) {\r\n\t\t\t\t\ta += \", \";\r\n\t\t\t\t}\r\n\t\t\t\ta += this.quote(c.getName());\r\n\t\t\t}\r\n\t\t\ts += a + \")\";\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public Object generalPK() {\n\t\treturn null;\r\n\t}", "public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}", "@Test\n\tpublic void testDBPrimaryKeyConstraint_29()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\");\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Key getPk() {\n\t\treturn null;\n\t}", "@Override\n public void setPrimaryKey(long primaryKey) {\n _partido.setPrimaryKey(primaryKey);\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_2()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "@Test\n\tpublic void testDBPrimaryKeyConstraint_24()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "public void setPrimaryKey(int primaryKey) {\n\t\tthis.primaryKey = primaryKey;\n\t}", "public JobID() {\n super();\n }", "public PessoaVO(Long pk){\r\n\t\tsuper(pk);\r\n\t}", "public PrimaryKeySpec(String aSchema, String aTable, String aField, String aCName) {\n this();\n copyPkFromValues(aSchema, aTable, aField, aCName);\n }", "public ObjectKey getPrimaryKey()\n {\n return SimpleKey.keyFor(getNewsletterId());\n }", "public String getPrimaryKey() {\r\n return primaryKey;\r\n }", "@Nonnull\n protected KeyExpression buildPrimaryKey() {\n return Key.Expressions.concat(\n Key.Expressions.recordType(),\n Key.Expressions.list(constituents.stream()\n .map(c -> Key.Expressions.field(c.getName()).nest(c.getRecordType().getPrimaryKey()))\n .collect(Collectors.toList())));\n }", "public abstract String getPrimaryKey(String tableName);", "@Override\n public String getPrimaryKey(String tableName) {\n return super.getPrimaryKey(tableName);\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_11()\n\t\tthrows Exception {\n\t\tDBTable table = new LazyTable(new JDBCDBImporter(\"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\", \"0123456789\"), (DBSchema) null, (String) null, (String) null);\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\t// An unexpected exception was thrown in user code while executing this test:\n\t\t// java.lang.NullPointerException\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getCatalog(LazyTable.java:130)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.getRealTable(LazyTable.java:256)\n\t\t// at org.databene.jdbacl.model.jdbc.LazyTable.setPrimaryKey(LazyTable.java:97)\n\t\t// at org.databene.jdbacl.model.DBPrimaryKeyConstraint.<init>(DBPrimaryKeyConstraint.java:47)\n\t\tassertNotNull(result);\n\t}", "boolean getPrimaryKey();", "@Test\n\tpublic void testDBPrimaryKeyConstraint_19()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_phieugiahan.setPrimaryKey(primaryKey);\n\t}", "public EntityID() {\n }", "public Key(int type)\n {\n this.type = type;\n this.columns = new ArrayList<Column>();\n }", "protected EquipmentTable() {\r\n\t\tsuper(NAME, PRIMARY_KEY_CONSTRAINT, null, null, GeneralHelper.getNonPrimaryColumns(COLUMNS));\r\n\t}", "public OmOrgSrefNamePK() {\r\n\t}", "@Override\n public String getKey()\n {\n return id; \n }", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_8()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"\", new DBSchema(\"\"));\n\t\tString name = \"0123456789\";\n\t\tboolean nameDeterministic = true;\n\t\tString columnName1 = \"0123456789\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT 0123456789 PRIMARY KEY (0123456789)\", result.toString());\n\t\tassertEquals(true, result.isNameDeterministic());\n\t\tassertEquals(\"0123456789\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "public ContentKey() {}", "public void setPrimaryKey(String primaryKey) {\n getBasicChar().setPrimaryKey(primaryKey);\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_13()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\t\tString columnName2 = \"0123456789\";\n\t\tString columnName3 = \"An��t-1.0.txt\";\n\t\tString columnName4 = null;\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1, columnName2, columnName3, columnName4);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY (, 0123456789, An��t-1.0.txt, )\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "protected String createPKString(DbEntity entity) {\n List pk = entity.getPrimaryKey();\n\n if (pk == null || pk.size() == 0) {\n throw new CayenneRuntimeException(\n \"Entity '\" + entity.getName() + \"' has no PK defined.\");\n }\n\n StringBuffer buffer = new StringBuffer();\n buffer.append(\"CREATE PRIMARY KEY \").append(entity.getName()).append(\" (\");\n\n Iterator it = pk.iterator();\n\n // at this point we know that there is at least on PK column\n DbAttribute firstColumn = (DbAttribute) it.next();\n buffer.append(firstColumn.getName());\n\n while (it.hasNext()) {\n DbAttribute column = (DbAttribute) it.next();\n buffer.append(\", \").append(column.getName());\n }\n\n buffer.append(\")\");\n return buffer.toString();\n }", "@Test\n\tpublic void testDBPrimaryKeyConstraint_30()\n\t\tthrows Exception {\n\t\tDBTable table = new DefaultDBTable(\"0123456789\", new DBSchema(\"\", new DBCatalog(\"\")));\n\t\tString name = \"\";\n\t\tboolean nameDeterministic = false;\n\t\tString columnName1 = \"\";\n\n\t\tDBPrimaryKeyConstraint result = new DBPrimaryKeyConstraint(table, name, nameDeterministic, columnName1);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(\"CONSTRAINT PRIMARY KEY ()\", result.toString());\n\t\tassertEquals(false, result.isNameDeterministic());\n\t\tassertEquals(\"\", result.getName());\n\t\tassertEquals(\"unique constraint\", result.getObjectType());\n\t\tassertEquals(null, result.getDoc());\n\t}", "protected LocationPK() {\n super();\n }", "public String getPrimaryKey() throws CloneNotSupportedException {\r\n\t\tString key=\"\";\r\n\t\tfor (int i = 0; i < this.state.getSizeCol(); i++) {\r\n\t\t\tfor (int j = 0; j < this.state.getSizeRow(); j++) {\r\n\t\t\t\tkey+=this.state.getValue(new Position(i,j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tkey+=\"?\"+this.state.getTractor().getPosition().toString();\r\n\t\treturn key;\r\n\t}", "public long getPrimaryKey() {\n return primaryKey;\n }" ]
[ "0.7875029", "0.7489606", "0.739803", "0.7096801", "0.70711553", "0.69975173", "0.69803166", "0.69716835", "0.6964837", "0.69633687", "0.69163185", "0.67959905", "0.6758902", "0.6702319", "0.6702319", "0.6702319", "0.6699209", "0.65859973", "0.6582905", "0.65318656", "0.6529337", "0.652376", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.65121114", "0.6507339", "0.646869", "0.64554304", "0.6440007", "0.6433323", "0.63936985", "0.6373589", "0.6351165", "0.630879", "0.6299928", "0.6296938", "0.6293471", "0.6288448", "0.6270761", "0.6257724", "0.62434083", "0.62414855", "0.62291366", "0.62212694", "0.62169766", "0.621116", "0.6202717", "0.61946255", "0.6194046", "0.61931163", "0.6191176", "0.61866844", "0.6173761", "0.61571634", "0.615285", "0.615285", "0.61485153", "0.6146449", "0.61374635", "0.6129914", "0.61275476", "0.61203897", "0.6111364", "0.61075836", "0.61074877", "0.61038184", "0.6102018", "0.6097855", "0.60977715", "0.60935456", "0.60913575", "0.6080798", "0.60706085", "0.60668147", "0.60645634", "0.6064229", "0.6061586", "0.6050735", "0.6044876", "0.60380024", "0.60372776", "0.60357565", "0.60341185", "0.60327", "0.60230243", "0.6022192", "0.6021738" ]
0.0
-1
Constructor for required fields
public BaseNote ( java.lang.String id, java.lang.String content, java.lang.String time) { this.setId(id); this.setContent(content); this.setTime(time); initialize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Field() {\r\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "public CisFieldError()\n\t{\n\t\t// required for jaxb\n\t}", "public RequirementsRecord() {\n super(Requirements.REQUIREMENTS);\n }", "private void fillMandatoryFields() {\n\n }", "public AirField() {\n\n\t}", "private FieldInfo() {\r\n\t}", "public UserInputField() {\n }", "public DependencyDescriptor(Field field, boolean required) {\n\t\tthis(field, required, true);\n\t}", "public FormFieldsReport() {}", "public FieldInfo() {\r\n \t// No implementation required\r\n }", "public Field(String watermark,\n String showfieldname,\n String saveRequired,\n String jfunction,\n String onChange,\n String onKeyDown,\n String defaultValue,\n String type,\n String sqlValue,\n String field_name,\n String relation,\n String states,\n String relationField,\n String onClickVList,\n String jIdList,\n String name,\n String searchRequired,\n String id,\n String placeholder,\n String value,\n String fieldType,\n String onclicksummary,\n String newRecord,\n List<Field> dListArray,\n List<OptionModel> mOptionsArrayList,\n String onclickrightbutton,\n String webSaveRequired,\n String field_type) {\n\n this.watermark = watermark;\n this.showfieldname = showfieldname;\n this.saveRequired = saveRequired;\n this.jfunction = jfunction;\n this.onChange = onChange;\n this.onKeyDown = onKeyDown;\n this.defaultValue = defaultValue;\n this.type = type;\n this.sqlValue = sqlValue;\n this.field_name = field_name;\n this.relation = relation;\n this.states = states;\n this.relationField = relationField;\n this.onClickVList = onClickVList;\n this.jIdList = jIdList;\n this.name = name;\n this.searchRequired = searchRequired;\n this.id = id;\n this.placeholder = placeholder;\n this.value = value;\n this.fieldType = fieldType;\n this.onclicksummary = onclicksummary;\n this.newRecord = newRecord;\n this.dListArray = dListArray;\n this.optionsArrayList = mOptionsArrayList;\n this.onclickrightbutton = onclickrightbutton;\n this.webSaveRequired = webSaveRequired;\n this.field_type = field_type;\n\n// this( watermark, showfieldname, saveRequired, jfunction,\n// onChange, onKeyDown, defaultValue, type, sqlValue,\n// field_name, relation, states, relationField,\n// onClickVList, jIdList, name, \"\",\n// searchRequired, id, placeholder, value,\n// fieldType, onclicksummary, newRecord, \"\",\n// dListArray,mOptionsArrayList,onclickrightbutton);\n }", "public PickUpCasualtyRequest() {\n\n // empty\n }", "private void fillMandatoryFields_custom() {\n\n }", "public Customer(@NotBlank(message = \"Name can't be blank\") String name, @NotBlank(message = \"Surname can't be blank\") String surname, @NotBlank(message = \"Phone can't be blank\") String phone, @NotNull(message = \"Date of birth can't be blank\") LocalDate dateOfBirth, int numberOfOffices, @NotNull(message = \"level of privilege can't be blank\") int levelOfPrivilege) {\n super(name, surname, phone, dateOfBirth);\n this.numberOfOffices = numberOfOffices;\n this.levelOfPrivilege = levelOfPrivilege;\n }", "@Override\n\tprotected void initializeFields() {\n\n\t}", "public FieldScrapper() \r\n {\r\n }", "private Request() {\n initFields();\n }", "public CpFldValidDate() { super(10018, 1); }", "public UBERequest() {\r\n }", "public ValidationComponent ()\n\t\t{\n\t\t}", "public Customer()\n{\n this.firstName = \"noFName\";\n this.lastName = \"noLName\";\n this.address = \"noAddress\";\n this.phoneNumber = 0;\n this.emailAddress = \"noEmail\";\n \n}", "private ValidationError() {\n }", "public QBXMLRequest() {\n }", "public StudentCourse() {\n this(\"student_course\", null);\n }", "public JsonField() {\n }", "private DatabaseValidationProperties() {}", "public MyPractice()\n\t{\n\t\t//Unless we specify values all data members\n\t\t//are a zero, false, or null\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "public InquiryGrupomuscularRequest()\r\n\t{\r\n\r\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public HLCPaymentDetails() { }", "public Identity()\n {\n super( Fields.ARGS );\n }", "public abstract List<String> requiredFields();", "public IntegerField() {\r this(3, 0, 0, 0);\r }", "public User() {\r\n this(\"\", \"\");\r\n }", "public Validation() {\n }", "public ModuleParams()\n\t{\n\t}", "public Person() {\n\t\tname \t= \"\";\n\t\taddress = \"\";\n\t\tcity \t= \"\";\n\t\tage \t= 0;\n\t}", "public FieldObject() {\n super(\"fields/\");\n setEnterable(true);\n }", "private void validateConstructor () throws ModelValidationException\n\t\t\t{\n\t\t\t\t// no constructor or no arg constructor\n\t\t\t\tModel model = getModel();\n\t\t\t\tboolean hasConstr = model.hasConstructor(keyClassName);\n\t\t\t\tObject noArgConstr = \n\t\t\t\t\tmodel.getConstructor(keyClassName, Model.NO_ARGS);\n\t\t\t\tint modifiers = model.getModifiers(noArgConstr);\n\n\t\t\t\tif (hasConstr && \n\t\t\t\t\t((noArgConstr == null) || !Modifier.isPublic(modifiers)))\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_constructor\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t}", "public BoletoPaymentRequest() {\n\n }", "public InquiryLftrattribRequest()\r\n\t{\r\n\t}", "public StudentRecord() {}", "public Course() {\n this(\"course\", null);\n }", "public Constructor(){\n\t\t\n\t}", "public PaymentDetails () {\n\t}", "public Message(){\n this(\"Not Specified\",\"Not Specified\");\n }", "public Employee () {\r\n lName = \"NO LAST NAME\";\r\n fName = \"NO FIRST NAME\";\r\n empID = \"NO EMPLOYEE ID\";\r\n salary = -1;\r\n }", "public Pojo1110110(){\r\n\t}", "@Override\n public JsonNode required(String fieldName) {\n return _reportRequiredViolation(\"Node of type %s has no fields\",\n ClassUtil.nameOf(getClass()));\n }", "@Test\n public void constructorComplete() {\n final String NAME = \"name\";\n final String PICTURE = \"pic\";\n final Integer POSITION = 5;\n final Integer STATUS = 1;\n final CourseType courseType = new CourseType(NAME, PICTURE, POSITION, STATUS);\n\n assertNull(courseType.getId());\n assertSame(NAME, courseType.getName());\n assertSame(PICTURE, courseType.getPicture());\n assertSame(POSITION, courseType.getPosition());\n assertSame(STATUS, courseType.getStatus());\n assertNull(courseType.getCourses());\n assertNull(courseType.getAllowedDishes());\n }", "public PersonRecord() {}", "private Validador() {\r\n }", "private FundInfo() {\n initFields();\n }", "private Reqbaz() {\n super(\"reqbaz\", null);\n }", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "public MessageRequest() {\n\t}", "public ModuleParams() {\n }", "private Params()\n {\n }", "protected PricingModel() {\n }", "private TextReader() {\n // There are no fields required to initialize\n }", "public Student()\n {\n lname = \"Tantiviramanond\";\n fname = \"Anchalee\";\n grade = 12;\n studentNumber = 2185;\n }", "public ObjectSchema() {\n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "@Test\n public void constructorSetsEmptyExtra()\n {\n //act\n ProductInfo actual = new ProductInfo();\n\n //assert\n assertEquals(\"\", Deencapsulation.getField(actual, \"extra\"));\n }", "public RTextField() {\r\n }", "@Test\n public void goalCustomConstructor_isCorrect() throws Exception {\n\n int goalId = 11;\n int userId = 1152;\n String name = \"Test Name\";\n int timePeriod = 1;\n int unit = 2;\n double amount = 1000.52;\n\n\n //Create goal\n Goal goal = new Goal(goalId, userId, name, timePeriod, unit, amount);\n\n // Verify Values\n assertEquals(goalId, goal.getGoalId());\n assertEquals(userId, goal.getUserId());\n assertEquals(name, goal.getGoalName());\n assertEquals(timePeriod, goal.getTimePeriod());\n assertEquals(unit, goal.getUnit());\n assertEquals(amount, goal.getAmount(),0);\n }", "public Potencial() {\r\n }", "public Request() {\n }", "private void setupRequiredValidation() {\n requiredMafExpressions.put(FIELD_HUGO_SYMBOL, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_HUGO_SYMBOL, \"may not be blank\");\r\n requiredMafExpressions.put(FIELD_ENTREZ_GENE_ID, Pattern.compile(\"\\\\d+\")); // number\r\n requiredFieldDescriptions.put(FIELD_ENTREZ_GENE_ID, \"must be an integer number\");\r\n requiredMafExpressions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_MATCHED_NORM_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_TUMOR_SAMPLE_BARCODE, QcLiveBarcodeAndUUIDValidatorImpl.ALIQUOT_BARCODE_PATTERN);\r\n requiredFieldDescriptions.put(FIELD_TUMOR_SAMPLE_BARCODE, \"must be a full aliquot barcode\");\r\n requiredMafExpressions.put(FIELD_VALIDATION_STATUS, Pattern.compile(\"Valid|Wildtype|Unknown|\\\\S?\"));\r\n requiredFieldDescriptions.put(FIELD_VALIDATION_STATUS, \"must be Valid, Wildtype, Unknown, or blank\");\r\n requiredMafExpressions.put(FIELD_CHROMOSOME, Pattern.compile(\"\\\\S+\"));\r\n requiredFieldDescriptions.put(FIELD_CHROMOSOME, \"must be one of: X, Y, M, 1-22, or full name of unassigned fragment\");\r\n setupMafSpecificChecks();\r\n }", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "public Car() {\r\n this(\"\", \"\", \"\", 0, Category.EMPTY, 0.00, \"\", 0, \"\", 0.00, \"\", DriveTrain.EMPTY,\r\n Aspiration.EMPTY, 0.00, 0.00, 0.00, 0.00, 0.0, 0.0, 0.0, 0.0, 0.0);\r\n }", "public Request(){\n\t\tthis(null, null, null);\n\t}", "@Test\n public void purchaseCustomConstructor_isCorrect() throws Exception {\n\n int purchaseId = 41;\n int userId = 99;\n int accountId = 6541;\n double price = 99.99;\n String date = \"02/19/2019\";\n String time = \"12:12\";\n String category = \"test category\";\n String location = \"test location\";\n String comment = \"test comment\";\n\n //Create empty purchase\n Purchase purchase = new Purchase(purchaseId, userId, accountId, price, date, time, category, location, comment);\n\n // Verify Values\n assertEquals(purchaseId, purchase.getPurchaseId());\n assertEquals(userId, purchase.getUserId());\n assertEquals(accountId, purchase.getAccountId());\n assertEquals(price, purchase.getPrice(), 0);\n assertEquals(date, purchase.getDate());\n assertEquals(time, purchase.getTime());\n assertEquals(category, purchase.getCategory());\n assertEquals(location, purchase.getLocation());\n assertEquals(comment, purchase.getComment());\n }", "public Question() {\r\n // This is the defult constructor b/c it takes no parameters\r\n firstPrompt = \"Please enter something:\";\r\n minScale = 1;\r\n maxScale = 10;\r\n secondPrompt = \"Additional comments:\";\r\n }", "public AirAndPollen() {\n\n\t}", "void initializeMandatorySectionFields();", "public ValidationMessage() {\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "public CreditCard ()\r\n\t{\r\n\t\t\r\n\t}", "public FundingDetails() {\n super();\n }", "public OnlyOneFieldException() {\n this.message = ONLY_ONE_FIELD_ALLOWED_MESSAGE;\n }", "public RequestMessage() {\r\n\t\tsuper();\r\n\t\tthis.criteria = new PersonSearchCriteria();\r\n\t\tthis.setSourceSystemID(SOURCE_SYSTEM_ID);\r\n\t\tthis.setSourceUserID(SOURCE_USER_ID);\r\n\t}", "public BaseParameters(){\r\n\t}", "public PSRelation()\n {\n }", "public FieldNotFoundException() {\n }", "public ErrorMessage() {\n\t}", "public AvroPerson() {}", "protected void initDataFields() {\r\n //this module doesn't require any data fields\r\n }", "public Validacion(String descripcion) {\n super(descripcion);\n }", "public Person()\n\t{\n\t\tthis.age = -1;\n\t\tthis.name = \"Unknown\";\n\t}", "public Person() {\n\t\t\n\t}", "public Student(String requiredStudentName)\n {\n studentName = requiredStudentName;\n }", "public Partage() {\n }", "public Parameters() {\n\t}", "public Student(){\n firstName = \"\";\n lastName = \"\";\n bootcamp = \"\";\n id = 42;\n grade = 1.0;\n }", "private void checkRequiredFields() {\n // check the fields which should be non-null\n if (configFileName == null || configFileName.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configFileName' should not be null.\");\n }\n if (configNamespace == null || configNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'configNamespace' should not be null.\");\n }\n if (searchBundleManagerNamespace == null\n || searchBundleManagerNamespace.trim().length() == 0) {\n throw new DAOConfigurationException(\n \"The 'searchBundleManagerNamespace' should not be null.\");\n }\n if (entityManager == null) {\n throw new DAOConfigurationException(\n \"The 'entityManager' should not be null.\");\n }\n }", "public ValidaCpf() {\n }", "public TboFlightSearchRequest() {\n}", "public ProposalSpecialReviewForm() {\r\n }" ]
[ "0.71718425", "0.70593333", "0.68855685", "0.68011117", "0.6788171", "0.665877", "0.6643776", "0.65873665", "0.65260553", "0.6511593", "0.6507464", "0.6504741", "0.6499354", "0.6499127", "0.6489181", "0.6437741", "0.6416246", "0.6358725", "0.6338867", "0.6270355", "0.62663263", "0.62556946", "0.6238193", "0.62276506", "0.6220664", "0.6207473", "0.6206237", "0.6204278", "0.6196808", "0.61893594", "0.6187281", "0.6186825", "0.6161104", "0.6144782", "0.6139718", "0.6128913", "0.611601", "0.6112131", "0.6110289", "0.60815", "0.6078185", "0.60740966", "0.6069644", "0.6058821", "0.60550433", "0.6052316", "0.6043621", "0.6041452", "0.6036001", "0.6027981", "0.602094", "0.6007505", "0.6006354", "0.60061276", "0.6004664", "0.6003377", "0.5995326", "0.599425", "0.5993343", "0.59915775", "0.5983726", "0.5980581", "0.59750146", "0.5972299", "0.59663236", "0.5965931", "0.59658045", "0.59635407", "0.59588176", "0.59535575", "0.5952708", "0.5945984", "0.59436303", "0.5940319", "0.59401995", "0.5940003", "0.5935176", "0.5934589", "0.5927621", "0.5927444", "0.5920697", "0.59195745", "0.5919246", "0.5917688", "0.5914413", "0.59141284", "0.59101546", "0.5909702", "0.590349", "0.5902929", "0.59023005", "0.59008396", "0.5900033", "0.5896314", "0.5896261", "0.588807", "0.58799213", "0.58790374", "0.58776593", "0.58721083", "0.5871662" ]
0.0
-1
Return the unique identifier of this class
public java.lang.String getId () { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "public String getUniqueID();", "public String getUniqueID ( ) { return _uniqueID; }", "String getUniqueID();", "public String getClassid() {\n return classid;\n }", "String getUniqueId();", "public String getUniqueID() {\n return this.uniqueID;\n }", "int getClassID();", "public String getUniqueID()\r\n {\r\n return (m_uniqueID);\r\n }", "public int getClassId() {\r\n return classId;\r\n }", "public String getId() {\n\t\treturn Integer.toString(this.hashCode());\n\t}", "private UniqueIdentifier(){\n\t\t\n\t}", "public String uniqueId() {\n return this.uniqueId;\n }", "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "public static String getUniqueIdentifier() {\r\n UUID uuid = UUID.randomUUID();\r\n return uuid.toString();\r\n }", "public Integer getClassId() {\r\n return classId;\r\n }", "public Integer getClassId() {\n return classId;\n }", "public String getUniqueId() {\n return _uniqueId;\n }", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}", "public Integer getClassid() {\n return classid;\n }", "public int getClassId() {\n\t\treturn this.classId;\n\t}", "public static String uniqueId() {\r\n return UUID.randomUUID().toString();\r\n }", "public Integer getClassid() {\r\n return classid;\r\n }", "public int numericName()\n {\n return Factory.getID(this);\n }", "public Long getClassId() {\n return this.ClassId;\n }", "public static String uniqueId() {\n return UUID.randomUUID().toString();\n }", "String getInstanceID();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "String id();", "public String getInstanceIdentifier();", "UUID getUniqueId();", "public String getUniqueId() {\n\t\treturn m_serverName + \" - \" + m_userId + \" - \" + m_timestampMillisecs;\n\t}", "public static String id()\n {\n return _id;\n }", "UUID id();", "public String getUniqueId() {\n return getCurrentInstance().getViewRoot().createUniqueId();\n }", "public int getUniqueID() { \n return -1;\n }", "Identifier getId();", "@Override\n\tpublic UUID getUniqueId() {\n\t\treturn uid;\n\t}", "String uniqueId();", "long getInstanceID();", "public String getId(){\n\t\treturn uuid;\n\t}", "public String getIdTypeName() {\n\t\treturn this.getIdType(this.currentClass()).getSimpleName();\n\t}", "public String getIdentifier();", "public String getIdentifier();", "public long getClassNameId() {\n return classNameId;\n }", "public int getUID() {\n return 0;\n }", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();", "String getId();" ]
[ "0.8099061", "0.7793248", "0.7745005", "0.773952", "0.76971465", "0.76135826", "0.75959677", "0.75864595", "0.754388", "0.75299907", "0.75275266", "0.7500354", "0.7487855", "0.74852705", "0.74435693", "0.7425048", "0.74089086", "0.74007654", "0.73874485", "0.7354514", "0.73528504", "0.7340511", "0.7338164", "0.73118955", "0.73104423", "0.72716933", "0.72658145", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72586036", "0.72508395", "0.72500837", "0.72083086", "0.71785855", "0.71684575", "0.71609515", "0.7160401", "0.71590537", "0.7156529", "0.7150428", "0.7130385", "0.71290153", "0.7120187", "0.7057421", "0.7057421", "0.7045934", "0.70416576", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535", "0.70316535" ]
0.0
-1
Set the unique identifier of this class
public void setId (java.lang.String id) { this.id = id; this.hashCode = Integer.MIN_VALUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setID() {\n\t\tthis.ID = UUID.randomUUID().toString();\n\t}", "public void setUniqueID(String uniqueID)\r\n {\r\n m_uniqueID = uniqueID;\r\n }", "@Override\n\tpublic void setUniqueId(int id) {}", "public void setUniqueId(final String uniqueId) {\n _uniqueId = uniqueId;\n }", "public void setId(String uid){\n this.uid = uid;\n }", "public String getUniqueID ( ) { return _uniqueID; }", "private UniqueIdentifier(){\n\t\t\n\t}", "void setIdNumber(String idNumber);", "@Override\n\t\tpublic void setId(final String identifier) {\n\t\t}", "public void setId(Uuid uuid) {\n\t\t this.id = uuid;;\n\t}", "public void setID() throws IOException;", "protected void setUniqueID(int newUniqueID) {\n\t\tuniqueID = newUniqueID;\n\t}", "public void generateID()\n {\n ID = this.hashCode();\n }", "public String getUniqueID();", "public void setInternalId()\n {\n // generate a unique id that will be used for the internal id:\n UUID uuid = UUID.randomUUID();\n this.internalId = uuid.toString();\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "public void setId(String s) {\n\t\tid = s;\n\t}", "String getUniqueID();", "public void setId(String anId) {\n _theId = anId;\n }", "@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}", "public void setId(String i) {\n\t\tid = i;\n\t}", "private void setId() {\n id = count++;\n }", "public String getUniqueID() {\n return this.uniqueID;\n }", "void setId(String id);", "void setId(String id);", "void setId(String id);", "void setId(int val);", "protected int getUniqueID() {\n\t\treturn uniqueID;\n\t}", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "private Uniqueid() {\n\n }", "public void setID(long id);", "@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}", "public void setID(Number numID);", "public void setId(String id) {\n }", "public void setId (String id);", "@Override\n\tpublic UUID getUniqueId() {\n\t\treturn uid;\n\t}", "public void setId(String value) {\n setAttributeInternal(ID, value);\n }", "public void setId(String value) {\n setAttributeInternal(ID, value);\n }", "@Override\r\n\t\tpublic void setId(String id)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "void setId(java.lang.String id);", "public String getUniqueId() {\n return _uniqueId;\n }", "public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }", "@PrePersist\n public void assignUUID() {\n this.uid = UUID.randomUUID();\n }", "public void setIdentifier(String value) {\n/* 214 */ setValue(\"identifier\", value);\n/* */ }", "public void setId (String id)\n {\n _id = id;\n }", "public String getId() {\n return this.getClass().getSimpleName() + \"@\" + this.hashCode();\n }", "@Override\n public void setId(final long id) {\n super.setId(id);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setIdentifier( String pIdentifier )\n {\n identifier = pIdentifier;\n }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "void setID(java.lang.String id);", "public void setId(String id);", "public void setId(String id);", "@Override\n public void setElementId(String arg0)\n {\n \n }", "private void setId(int value) {\n \n id_ = value;\n }", "@Override\n\tpublic void setId(String id)\n\t{\n\t\t\n\t}", "void setNilID();", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }", "public int getUniqueId() {\r\n\t\treturn uniqueId;\r\n\t}", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "public void setId(byte id){this.id = id;}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setIdentifier(java.lang.String identifier)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IDENTIFIER$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(IDENTIFIER$0);\n }\n target.setStringValue(identifier);\n }\n }", "public void setClassId(int value) {\r\n this.classId = value;\r\n }", "@Override\n\tpublic native final String createUniqueId() /*-{\n // In order to force uid's to be document-unique across multiple modules,\n // we hang a counter from the document.\n if (!this.gwt_uid) {\n this.gwt_uid = 1;\n }\n\n return \"gwt-uid-\" + this.gwt_uid++;\n\t}-*/;", "public void setId(Long pid) {\n this.pid = pid;\n }", "protected void setID(int i){\r\n\t\tthis.ID = i;\r\n\t}", "public void setId(String newValue);", "public void setId(long id) {\n id_ = id;\n }", "private void setId(Integer id) { this.id = id; }", "public native void setIdentifier (String identifier);", "public void setID(String idIn) {this.id = idIn;}", "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void setID(String value) {\r\n \t\t_id = value;\r\n \r\n \t}", "void setId(final String id);", "@Override\r\n\tpublic void setID(String id) {\n\t\tsuper.id=id;\r\n\t}", "public Object setID(int iD)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setId : \" + \"Agent\");\r\n/* 51 */ \tthis.myID = iD;\r\n/* 52 */ \treturn this;\r\n/* */ }", "public void setId(byte value) {\r\n this.id = value;\r\n }", "@Override\n\t/**\n\t * sets the class ID for the created class, the class ID is the\n\t * primary method for identifying a class's name and all of its methods,\n\t * variables, and comments \n\t * \n\t * @param s \n\t */\n\tpublic void setClassID(int s) {\n\t\tID = s;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "public void setID(java.lang.String ID) { throw new RuntimeException(\"Stub!\"); }", "public void setId(int i) { id = i; }", "public void setUID(int value) {\n this.uid = value;\n }", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public abstract void setId(int id);", "String getUniqueId();", "void setId(ID id);", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "@JsProperty(name = \"id\")\n public native void setId(String value);", "public String uniqueId() {\n return this.uniqueId;\n }", "public String getId(){\n\t\treturn uuid;\n\t}" ]
[ "0.7281828", "0.7188852", "0.70595604", "0.7058688", "0.69680285", "0.6883223", "0.6781155", "0.67765903", "0.67603344", "0.6737482", "0.6681386", "0.66533566", "0.6612935", "0.66081303", "0.66040903", "0.6576922", "0.657261", "0.65361136", "0.653008", "0.6522364", "0.65065205", "0.6502064", "0.6482504", "0.6476793", "0.64671975", "0.64671975", "0.64671975", "0.6460642", "0.6444427", "0.64442486", "0.64442486", "0.64442486", "0.6437511", "0.6420693", "0.64165735", "0.6401215", "0.63754857", "0.6374878", "0.63656694", "0.6361684", "0.6361684", "0.63512313", "0.63502073", "0.6349321", "0.6349031", "0.6324927", "0.63220745", "0.6321507", "0.6315967", "0.63076204", "0.63067985", "0.63067985", "0.63067985", "0.63024783", "0.6294556", "0.6293237", "0.62886536", "0.62886536", "0.6287711", "0.62867725", "0.62856513", "0.628313", "0.6282294", "0.6282294", "0.6281706", "0.6278545", "0.62769866", "0.62748367", "0.62739956", "0.6271003", "0.6253542", "0.62521213", "0.62500745", "0.62499684", "0.62454253", "0.6243884", "0.6243208", "0.6241344", "0.6236422", "0.6235209", "0.6231879", "0.6231015", "0.6228298", "0.6226541", "0.6223203", "0.62209547", "0.6217635", "0.6205935", "0.61963457", "0.6195149", "0.6195149", "0.6195149", "0.6195149", "0.6193496", "0.6186573", "0.61819446", "0.61742383", "0.61742383", "0.61723727", "0.6163484", "0.6162251" ]
0.0
-1
Return the value associated with the column: content
public java.lang.String getContent () { return content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "String getValue(String column, int row);", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "Object getDataValue(String column, int row);", "protected Object getCellValue(int row, String column) {\r\n\r\n\t\t// translate\r\n\t\tif(NAME.equals(column))\r\n\t\t{\r\n\t\t\tIUnitIf unit = getId(row);\r\n\t\t\tString name = MsoUtils.getUnitName(getId(row), true);\t\t\t\r\n\t\t\treturn unit.isChanged()?name.concat(\"*\"):name;\r\n\t\t}\r\n\t\telse if(VIEW.equals(column))\r\n\t\t\treturn getId(row);\r\n\r\n\t\t// not supported\r\n\t\treturn null;\r\n\r\n\t}", "@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}", "public String getValueColumn() {\n if (!isDate()) {\n return \"sort_text_value\";\n } else {\n return \"text_value\";\n }\n }", "java.lang.String getColumn();", "String getValueText();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "java.lang.String getValue();", "public String get(String content)\n {\n String nValue = \"\";\n \n try {\n FileInputStream input;\n if(Global.dataFile ==null)\n {\n input = new FileInputStream(Global.workDir+\"\\\\TestData\\\\licensing.xls\");\n }\n else if((Global.dataFile.equals(\"\")))\n {\n input = new FileInputStream(Global.workDir+\"\\\\TestData\\\\licensing.xls\");\n }\n else\n {\n input = new FileInputStream(Global.dataFile);\n }\n HSSFWorkbook wb = new HSSFWorkbook(input);\n HSSFSheet sheet = wb.getSheetAt(0);\n nValue = findValue(sheet, content);\n return nValue;\n } catch (Exception e) {\n // TODO Auto-generated catch block\n// e.printStackTrace();\n return nValue=\"\";\n } \n }", "Object getColumnValue(int colIndex);", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getValue();", "String getCellContent(final String header) {\n if (getHeaders().indexOf(header) == -1) {\n return \"-\";\n }\n return getCell(header).getText();\n }", "@Override\n public String getColumn() {\n Object ref = column_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n column_ = s;\n return s;\n }\n }", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "public String getValue();", "private String stringValue(String columnName) {\r\n String value = null;\r\n try {\r\n if ((rowSet != null) && selectContactInRowSet()) {\r\n value = rowSet.getString(columnName);\r\n }\r\n } catch (SQLException sqlex) {\r\n sqlex.printStackTrace();\r\n }\r\n return value;\r\n }", "public Object getValueAt(int row, int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\treturn expressions.get(row);\n\t\tcase 1:\n\t\t\treturn values.get(row);\n\t\t}\n\t\treturn \"\";\n\t}", "@Override\r\n\tpublic Object getColumnValue(int column) {\n\t\tswitch (column) {\r\n\t\tcase ID_COLUMN_ORDER:\r\n\t\t\treturn id;\r\n\t\tcase NOMBRE_COLUMN_ORDER:\r\n\t\t\treturn nombre;\r\n\t\tcase DESCRIPCION_COLUMN_ORDER:\r\n\t\t\treturn descripcion;\r\n\t\tcase POLIGONO_COLUMN_ORDER:\r\n\t\t\treturn poligono;\r\n\t\tcase ESTADO_COLUMN_ORDER:\r\n\t\t\treturn estado;\r\n\t\tcase URBANA_COLUMN_ORDER:\r\n\t\t\treturn urbana;\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);", "public Object getValueAt(int row, int col) {\n\t\t\tif ( nodes == null ) return null;\n\t\t\tif ( nodes.size() == 0 ) return null;\n\t\t\tif ( row > (nodes.size()-1 ) ) return null;\n\t\t\tif ( row < 0 )\n\t\t\t\treturn getColumnType(col);\n\t\t\trcNode n = null;\n\t\t\ttry {\n\t\t\t n = vnodes.elementAt(row) ;\n\t\t\t} catch(Exception ex) {\n\t\t\t n = null;\n\t\t\t}\n\t\t\tif ( n == null ) return null;\n\t\t\t//return node if column is negative\n\t\t\tif ( col==-1 )\n\t\t\t\treturn n;\n\t\t\tif ( col <0 )\n\t\t\t\treturn null;\n\t\t\t\n\t\t\tObject obj;\n\t\t\tString codename = getColumnCodeName(col);\n\t\t\tif ( codename.equals(\"Reflector\") ) return n==null?null:n.UnitName;\n\t\t\telse if ( codename.equals(\"Hostname\") ) return n==null || n.client==null?\"???\":n.client.hostName;\n\t\t\telse if ( codename.equals(\"Load\") ) {\n\t\t\t\tobj = n.haux.get(\"Load\");\n\t\t\t\tif ( obj == null )\n\t\t\t\t\treturn \"???\";\n\t\t\t\treturn \"\"+((DoubleContainer)obj).getValue();\n\t\t\t} else if ( codename.equals(\"Video\") ) {\n\t\t\t\tobj = n.haux.get(\"Video\");\n\t\t\t\tif ( obj == null )\n\t\t\t\t\treturn \"0\";\n\t\t\t\treturn \"\"+((int)((DoubleContainer)obj).getValue());\n\t\t\t} else if ( codename.equals(\"Audio\") ) {\n\t\t\t\tobj = n.haux.get(\"Audio\");\n\t\t\t\tif ( obj == null )\n\t\t\t\t\treturn \"0\";\n\t\t\t\treturn \"\"+((int)((DoubleContainer)obj).getValue());\n\t\t\t} else if ( codename.equals(\"MLVer\") ) return n==null || n.client==null?\"???\":n.client.mlVersion;\n if ( /* col == 2 */codename.equals(\"JavaVer\"))\n return getJavaVersion(n);\n\t\t\telse if ( codename.equals(\"ReflVer\") ) { \n\t\t\t\tString ver = (String) n.haux.get(\"ReflVersion\");\n\t\t\t\treturn (ver == null || ver.length() == 0 ? \"N/A\" : ver);\n\t\t\t}else if ( codename.equals(\"MLUptime\") )\n\t\t\t\treturn n.client.uptime;\n\t\t\telse if ( codename.equals(\"Group\") ) \n\t\t\t\treturn (n!=null && n.client!=null && n.client.mle !=null) ? n.client.mle.Group:\"???\";\n\t\t\treturn null;\n\t\t}", "public Object getValueAt(int rowIndex, int columnIndex) {\n\t\treturn content.get(rowIndex).get(columnIndex);\r\n\t}", "String getColumn();", "public String getContent(String content)\n\t{\n\t\treturn prop.getProperty(content);\n\t}", "public Object getCell(int column) {\r\n switch (column) {\r\n case 0:\r\n return _internalEvent.getDate() ;\r\n case 1:\r\n return _internalEvent.getFileName() ;\r\n case 2:\r\n return new Integer(_internalEvent.getEventCode()) ;\r\n case 3:\r\n return _internalEvent.getEventDescription() ;\r\n case 4:\r\n return _internalEvent.getExtendedMessage() ;\r\n default:\r\n return \"\" ;\r\n }\r\n }", "public Object getValueAt(int row, int col)\n\t{\n\t\tOrdreMatch ordreMatch = (OrdreMatch)datas.get(row);\n\t\tswitch(col)\n\t\t{\t\t\t\n\t\t\tcase 0 : // match n°\t\t\t\n\t\t\t\treturn \"\"+(ordreMatch.getNumMatch());\n\t\t\tcase 1 : // adversaire 1\n\t\t\t\treturn \"\"+ordreMatch.getAdversaire1();\n\t\t\tcase 2 : // adversaire 2\t\t\t\n\t\t\t\treturn \"\"+ordreMatch.getAdversaire2();\n\t\t\tdefault :\n\t\t\t\treturn \"\";\t\t\t\n\t\t}\n\t}", "public Object getCellEditorValue() {\r\n return component.getText();\r\n }", "public String getCellText(int row, int col) {\n\t\treturn input.get(row).get(col);\n\t}", "public String getContentText(Integer contentId) {\n String sql = \"SELECT content_text FROM contents WHERE content_id = ?\";\n return jdbc.queryForObject(sql, String.class, contentId);\n }", "private static String findValueTemp(HSSFSheet sheet, String cellContent){\n\n int colNum = 0; \n String value=\"\";\n for(Row row : sheet) {\n for(Cell cell : row) {\n// boolean bul =cell.getStringCellValue().trim().equalsIgnoreCase(cellContent.trim());\n// System.out.println(bul);\n\n if(cell.getStringCellValue().trim().equalsIgnoreCase(cellContent.trim())){\n\n\n colNum = cell.getColumnIndex();\n HSSFRow nRow= sheet.getRow(1);\n HSSFCell nCell = nRow.getCell(colNum);\n if(nCell.getCellType() == HSSFCell.CELL_TYPE_STRING)\n {\n value = (nCell.getStringCellValue() == null) ? \"\" : nCell.getStringCellValue();\n }\n else if(nCell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC)\n {\n value = (String) (((Double)nCell.getNumericCellValue() == null) ? \"\" : nCell.getNumericCellValue());\n }\n else if(nCell.getCellType() == HSSFCell.CELL_TYPE_BLANK)\n {\n value = \"\";\n }\n// try {\n// \n// value=nCell.getStringCellValue();\n// } catch (NullPointerException e) {\n// // TODO Auto-generated catch block\n// value=\"\";\n// e.printStackTrace();\n// }\n// if(nCell.getStringCellValue()!=null)\n// {\n// System.out.println(value);\n// }\n \n \n }\n \n }\n break;\n } \n return value; \n }", "Object getDataValue(final int row, final int column);", "protected abstract V makeModelCellValue(C column);", "public char getContent() {\n return content;\n }", "public Object getValueAt(int row, int column) {\n\t\tString[] rowValues = this.records.get(row);\n return rowValues[column];\n\t}", "public Object getValueAt(int row, int col)\n {\n //if row is greater than the total attributes length return null\n if (row > prop_names.size() - 1)\n return null;\n\n //if column is 0 then return the name of the attribute\n //as names are stored at nth row column 0\n if (col == 0)\n return prop_names.get(row);\n\n //return null if there is no value stored for editor for that row\n if (prop_map.size() <= row)\n return null;\n\n //get the value of the attribute from editor\n return prop_map.get(row);\n //return super.getValueAt(row,color);\n }", "private String getCellValue(Cell cell) {\r\n String value = null;\r\n if (cell != null) {\r\n CellValue cellValue = evaluator.evaluate(cell);\r\n if (cellValue != null) {\r\n switch (cellValue.getCellType()) {\r\n case NUMERIC:\r\n value = String.valueOf(cell.getNumericCellValue());\r\n break;\r\n case STRING:\r\n value = cell.getStringCellValue();\r\n break;\r\n case BLANK:\r\n break;\r\n case ERROR:\r\n break;\r\n default:\r\n value = cell.getStringCellValue();\r\n break;\r\n }\r\n }\r\n }\r\n return value;\r\n }", "public Object getCellEditorValue() {\r\n return jtextfield.getText();\r\n }", "private IntegerPlaintext getIntegerPlaintext(String columnValue, BigInteger rowId, ColumnMeta columnMeta) {\n IntegerPlaintext integerPlaintext = new IntegerPlaintext();\n integerPlaintext.setPlainText(columnValue);\n integerPlaintext.setSensitive(columnMeta.isSensitive());\n integerPlaintext.setP(p);\n integerPlaintext.setQ(q);\n integerPlaintext.setG(g);\n integerPlaintext.setN(n);\n integerPlaintext.setTotient(totient);\n integerPlaintext.setRowId(rowId);\n integerPlaintext.setColumnKey(columnMeta.getColkey());\n return integerPlaintext;\n }", "public int getValue(int row, int column);", "public Object getValueAt(int row, int column) {\n Preso cli = lista.get(row);\n /*if (column == Id) {\n return cli.getId();\n } else*/ if (column == Nome) {\n return cli.getNome();\n } if (column == Tempo) {\n return cli.getTempo();\n } else\n\n return \"\"; //Nunca deve ocorrer \n }", "public Object getValueAt(int row, int column) {\r\n if (_debugTable == null) {\r\n return \"\" ;\r\n }\r\n try {\r\n Object o = _debugTable.getTableCell(row, column) ;\r\n return (o != null) ? o : \"\" ;\r\n } catch (Exception e) {\r\n return \"\" ;\r\n }\r\n }", "public Object getValueAt(int row, int column){\n return dataEntries[row][column];\n }", "Text getValue() throws IOException;", "public String getValue() { return value; }", "@Override\n public final HasCell<T, ?> getColumn(Context context, T rowValue, Element elem) {\n return getColumn(elem);\n }", "public String fullCellText();", "public String getValue() {\n\t\treturn _text;\n\t}", "public String getValue () { return value; }", "public String getColumn() {\n Object ref = column_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n column_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getText(T anItem, int aCol) { return getText(anItem); }", "public Object getValueAt(int row, int col) {\n\t\tDownload download = DownloadList.getInstance().getDownload(row);\n\t\tswitch (col) {\n\t\tcase 0:\n\t\t\tif(download.getFileWeb() instanceof Firmware) {\n\t\t\t\treturn ((DownloadFirmware)download).getCommercialDevice().getNomeCommerciale();\n\t\t\t} else {\n\t\t\t\treturn \"iTunes\";\n\t\t\t}\n\t\tcase 1: //versione (eventualmente anche la build)\n\t\t\tif(download.getFileWeb() instanceof Firmware) {\n\t\t\t\treturn TableLogic.getVersione(download.getProcessList().get(0).getURIString());\t\t\t\t\n\t\t\t} else {\n\t\t\t\treturn ((ItunesVersion)download.getFileWeb()).getVersionAndOs();\n\t\t\t}\n\t\tcase 2: // Size\n\t\t\treturn download.getDimension();\n\t\tcase 3: // Progress\n\t\t\treturn new Float((((float) download.getDownloadedBytes()) / (download.getDimensioneTotale())) * 100);\n\t\tcase 4: // Status\n\t\t\treturn download.getStatus();\n\t\tcase 5: // Veocita'\n\t\t\treturn download.getSpeed();\n\t\tcase 6: // Tempo rimamente\n\t\t\treturn download.getRemainingTime(); \n\t\tcase 7: //azione\n\t\t\treturn StateActionTableButton.getInstance().getButton(download.getUri().toString());\n\t\t}\n\t\treturn \"\";\n\t}", "@Override\n\tpublic String visitValue(ValueContext ctx) {\n\t \n\t\t\n\t return ctx.getChild(0).getText();\n\t\t\n\t\t\n\t}", "public Object getValueAt(int row, int col) {\n\n Download download = downloadList.get(row);\n switch (col) {\n case 0: // Handled by a separate thread.\n break;\n case 1: // page label\n return download.getLabel();\n case 2: // URL\n return download.getUrl();\n case 3: // Size\n long size = download.getSize();\n return (size == -1) ? \"\" : Long.toString(size);\n case 4: // Progress\n return download.getProgress();\n case 5: // Status\n if (download.getStatus() == Download.ERROR) {\n return download.getErrorMessage();\n } else\n return Download.STATUSES[download.getStatus()];\n }\n return \"\";\n }", "private Object getCellValue(XSSFCell cell) {\n\t\tObject cellValue = null;\n\t\tDecimalFormat df = new DecimalFormat(\"#\");\n\t\tswitch (cell.getCellType()) {\n\t\t// This case to get the data and get the value as strings.\n\t\tcase XSSFCell.CELL_TYPE_STRING:\n\t\t\tcellValue = cell.getRichStringCellValue().getString().trim();\n\t\t\tbreak;\n\t\t// This case to get the data and get the value as number.\n\t\tcase XSSFCell.CELL_TYPE_NUMERIC:\n\t\t\tcellValue = df.format(cell.getNumericCellValue()).toString();\n\t\t\tbreak;\n\t\t// This case to get the data and get the value as boolean.\n\t\tcase XSSFCell.CELL_TYPE_BOOLEAN:\n\t\t\tcellValue = String.valueOf(cell.getBooleanCellValue()).trim();\n\t\t\tbreak;\n\t\tcase XSSFCell.CELL_TYPE_FORMULA:\n\t\t\tcellValue = cell.getCellFormula();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tcellValue = \"空\";\n\t\t}\n\t\treturn cellValue;\n\t}", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}" ]
[ "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.701869", "0.7014127", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.69438195", "0.65482515", "0.63703096", "0.63025206", "0.6259936", "0.62574106", "0.62121314", "0.62082124", "0.62082124", "0.62082124", "0.62082124", "0.62082124", "0.62082124", "0.61785704", "0.61126757", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.60454684", "0.59785944", "0.596036", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5922133", "0.5921409", "0.59203273", "0.5913291", "0.58935165", "0.58570457", "0.58449167", "0.5837605", "0.58348125", "0.58341634", "0.5806307", "0.5800611", "0.5774191", "0.5773992", "0.5770902", "0.57633245", "0.5758803", "0.5742028", "0.5734882", "0.5732372", "0.57245225", "0.57071006", "0.57057464", "0.570143", "0.56958604", "0.5695288", "0.5664847", "0.56428105", "0.5637651", "0.5636287", "0.5635452", "0.5629502", "0.5611743", "0.56099284", "0.55781984", "0.55654025", "0.5559755", "0.55586743", "0.55582947", "0.55555296" ]
0.0
-1
Set the value related to the column: content
public void setContent (java.lang.String content) { this.content = content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n }", "private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n }", "private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n }", "private void setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n }", "public void setContent(String newValue);", "public void setContent(java.lang.CharSequence value) {\n this.Content = value;\n }", "public void setContent(String[][] content) {\n\t\tAssert.isNotNull(content);\n\t\tinput.clear();\n\t\tif (content.length <= 0) {\n\t\t\ttableViewer.refresh();\n\t\t\treturn;\n\t\t}\n\t\tsetColumnsCount(content[0].length);\n\t\tfor (int i = 0; i < content.length; i++) {\n\t\t\tList<String> row = new ArrayList<String>(content[0].length);\n\t\t\tfor (int j = 0; j < content[0].length; j++) {\n\t\t\t\trow.add(content[i][j]);\n\t\t\t}\n\t\t\tinput.add(row);\n\t\t}\t\t\n\t\ttableViewer.refresh();\n\t\tfireTableModified();\n\t}", "@Override\n public void set(C content) {\n this.content = content;\n }", "private void setContent(String content) {\n this.content = content;\n }", "public void setContent(Object content) {\n this.content = content;\n }", "void setContent(java.lang.String content);", "public com.babbler.ws.io.avro.model.BabbleValue.Builder setContent(java.lang.String value) {\n validate(fields()[1], value);\n this.content = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setContent(String content)\n/* */ {\n/* 1340 */ this.content = content;\n/* */ }", "public void setContent(String content) { this.content = content; }", "public void updateData(String colum, String content) {\n\t\tContentValues values = new ContentValues();\r\n\t\tvalues.put(colum, content);\r\n\r\n\t\t// Which row to update, based on the ID\r\n\t\tString selection = FeedEntry.COLUMN_NAME_NUMBER_ID + \" LIKE ?\";\r\n\t\tString[] selectionArgs = { String.valueOf(rowId) };\r\n\r\n\t\tint count = dbr.update(FeedReaderDbHelper.FeedEntry.TABLE_NAME, values,\r\n\t\t\t\tselection, selectionArgs);\r\n\t}", "public synchronized void setContent(Object content) {\n // nothing\n }", "public void setContent(T content);", "public void setValue(String column, String value) {\n Collection<Column> cols = source.getColumn(column);\n Column col = cols.iterator().next();\n setValue(col, value);\n }", "void setDataFromDBContent() {\n\n }", "void setContent(String data) {\n this.content = data;\n }", "public void setContent(String content) {\n\t this.content = content;\n\t}", "public void setContent(String content) {\n this.contents = content;\n }", "private static void setField(BibtexEntry be, String field, String content) {\n if (!content.equals(\"\"))\n be.setField(field, content);\n }", "public sparqles.avro.discovery.DGETInfo.Builder setContent(java.lang.CharSequence value) {\n validate(fields()[8], value);\n this.Content = value;\n fieldSetFlags()[8] = true;\n return this; \n }", "public void setContent(String content) {\r\n\t\tthis.content = content;\r\n\t}", "public Builder setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n content_ = value;\n onChanged();\n return this;\n }", "public Builder setContent(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n content_ = value;\n onChanged();\n return this;\n }", "public void setContent(String content) {\n this.m_content = content;\n }", "public void setValueAt(Object value, int row, int column) {\r\n switch(column){\r\n case FILENAME:\r\n ((CoverFooterItemType)data.get(row)).setFileName(value.toString());\r\n break;\r\n \r\n case PATH:\r\n ((CoverFooterItemType)data.get(row)).setFilePath(value.toString());\r\n break;\r\n \r\n case PAGES:\r\n ((CoverFooterItemType)data.get(row)).setNumPages(value.toString());\r\n break;\r\n \r\n case PAGESELECTION:\r\n ((CoverFooterItemType)data.get(row)).setPageSelection(value.toString());\r\n break;\r\n \r\n } \r\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public void setContent(String content) {\n this.content = content;\n }", "public abstract void setContent(Object o);", "void addCellContent(Cell cell, String content);", "public void setContent(String content) {\n\t\tthis.content = content;\n\t}", "public void setContent(String content) {\n\t\tthis.content = content;\n\t}", "public void setContent(String content) {\n\t\tmContent = content;\n\t}", "public void setContent(String content) {\n\t\tthis.content = content == null ? null : content.trim();\n\t}", "@Override\n public void setValueAt( Object aValue, Object node, int column )\n {\n }", "public void setWholeText(String content) {\n\t\ttextInterface().setString(content);\n\t}", "@Override\r\n\t\t\tpublic void modifyText(ModifyEvent me) {\n\t\t\t\tString newValue = newEditor.getText();\r\n\t\t\t\teditor.getItem().setText(VALUE_COLUMN_NO, newValue);\r\n\t\t\t\t//isEditorModify = true;\r\n\t\t\t\t//propertyInfo.setValue(newValue);\r\n\t\t\t}", "public Result<T> setContent(T content) {\n Result<T> returnResult = new Result<T>(this.resultCode, this.resultText);\n returnResult.content = content;\n return returnResult;\n }", "private static void setIfNecessary(BibtexEntry be, String field, String content) {\n if (!content.equals(\"\"))\n be.setField(field, content);\n }", "protected void setContents(Object contents) {\n\t}", "public void setContent(String newContent)\n\t{\n\t\tthis.content = newContent;\n\t}", "public Builder setContent(\n String value) {\n copyOnWrite();\n instance.setContent(value);\n return this;\n }", "public Builder setContent(\n String value) {\n copyOnWrite();\n instance.setContent(value);\n return this;\n }", "private boolean updated(char col, int row, String content){\n CellNode current = Head;\n while(current != null){\n if(checkColRow(current, col, row) != null){\n current.getCell().setContent(content); return true;\n }\n current = current.getNext();\n }\n return false;\n }", "void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);", "public Builder setContent(\n String value) {\n copyOnWrite();\n instance.setContent(value);\n return this;\n }", "public Builder setContent(\n String value) {\n copyOnWrite();\n instance.setContent(value);\n return this;\n }", "void setColumnValue(int colIndex, Object value);", "public void setValue(int col, String value) {\n\t\tint row = rowList.getSelectedIndex();\n\t\tdm.setValue(col, row, value);\n\t}", "public void setContent( Term content ) {\n this.content = content;\n }", "public void setContent(String content) {\r\n this.content = content == null ? null : content.trim();\r\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(String content) {\n this.content = content == null ? null : content.trim();\n }", "public void setContent(\n final java.lang.String content) {\n this._content = content;\n }", "public void setContent(byte[] value) {\r\n this.content = value;\r\n }", "public void setContents(String contents)\n\t{\n\t\tsetColumn(contents, OFF_LINE_NO, lineLength);\n\t}", "@Override\n\tpublic void setValueAt(Object value, int row, int column) {\n\t\tswitch (column) {\n\t\tcase 0:\n\t\t\tString expr = value.toString();\n\t\t\texpressions.set(row, expr);\n\t\t\tString result = executeExpr(expr, row);\n\n\t\t\tvalues.set(row, result);\n\t\t\tupdateModel();\n\t\t\tif (row + 1 == expressions.size()) {\n\t\t\t\texpressions.add(\"\");\n\t\t\t\tvalues.add(\"\");\n\t\t\t\tfireTableRowsInserted(row + 1, row + 1);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t// just reset column 2; ignore edits\n\t\t\tfireTableDataChanged();\n\t\t}\n\t}", "protected void changeContent() {\n byte[] data = Arrays.copyOf(content.getContent(),\n content.getContent().length + 1);\n data[content.getContent().length] = '2'; // append one byte\n content.setContent(data);\n LOG.info(\"document content changed\");\n }", "public void setValueAt(Object value, int row, int col) {\n if(row < getRowCount()){\n if (DEBUG) {\n System.out.println(\"Setting value at \" + row + \",\" + col\n + \" to \" + value\n + \" (an instance of \"\n + value.getClass() + \")\");\n }\n String[] r = data.get(row);\n r[col] = (String) value;\n fireTableCellUpdated(row, col);\n\n if (DEBUG) {\n System.out.println(\"New value of data:\");\n printDebugData();\n }\n }\n }", "@Override\r\n\tprotected void setValue(Object element, Object value) {\r\n\t\t// update the whole table\r\n\t\tgetViewer().refresh();\r\n\t}", "public BlobName setContent(String content) {\n this.content = content;\n return this;\n }", "public final native void setContent(String content) /*-{\n this.setContent(content);\n }-*/;", "public void setValueAt(Object value, int row, int col) {\r\n \tswitch(col){\r\n case 0:\r\n \tattributs.get(row).setPk((Boolean)value);\r\n \tbreak;\r\n case 1:\r\n \tSystem.out.println(value);\r\n \tattributs.get(row).setName((String)value);\r\n \tbreak;\r\n case 2:\r\n \tattributs.get(row).setType((String)value);\r\n \tbreak;\r\n case 3:\r\n \tattributs.get(row).setTaille((String)value);\r\n \tbreak;\r\n case 4:\r\n \tattributs.get(row).setNul((Boolean)value);\r\n \tbreak;\r\n case 5:\r\n \tattributs.get(row).setUk((Boolean)value);\r\n \tbreak;\r\n \t\r\n \t}\r\n fireTableCellUpdated(row, col);\r\n }", "private void setValue(int columnIndex, String value) throws Exception {\n //TODO Take into account the possiblity of a collision, and notify listeners if necessary\n if (wasNull || value == null) {\n rowValues[columnIndex - 1] = null;\n } else {\n switch (metaData.getColumnType(columnIndex)) {\n case Types.TINYINT:\n rowValues[columnIndex - 1] = Byte.valueOf(value.trim());\n break;\n case Types.SMALLINT:\n rowValues[columnIndex - 1] = Short.valueOf(value.trim());\n break;\n case Types.INTEGER:\n rowValues[columnIndex - 1] = Integer.valueOf(value.trim());\n break;\n case Types.BIGINT:\n rowValues[columnIndex - 1] = Long.valueOf(value.trim());\n break;\n case Types.REAL:\n rowValues[columnIndex - 1] = Float.valueOf(value.trim());\n break;\n case Types.FLOAT:\n case Types.DOUBLE:\n rowValues[columnIndex - 1] = Double.valueOf(value.trim());\n break;\n case Types.DECIMAL:\n case Types.NUMERIC:\n rowValues[columnIndex - 1] = new BigDecimal(value.trim());\n break;\n case Types.BOOLEAN:\n case Types.BIT:\n rowValues[columnIndex - 1] = Boolean.valueOf(value.trim());\n break;\n case Types.CHAR:\n case Types.VARCHAR:\n case Types.LONGVARCHAR:\n rowValues[columnIndex - 1] = value;\n break;\n case Types.VARBINARY:\n case Types.LONGVARBINARY:\n case Types.BINARY:\n byte[] bytes = Base64.decode(value);\n rowValues[columnIndex - 1] = bytes;\n break;\n case Types.DATE:\n case Types.TIME:\n case Types.TIMESTAMP:\n rowValues[columnIndex - 1] = new Timestamp(Long.parseLong(value.trim()));\n break;\n case Types.ARRAY:\n case Types.BLOB:\n case Types.CLOB:\n case Types.DATALINK:\n case Types.DISTINCT:\n case Types.JAVA_OBJECT:\n case Types.OTHER:\n case Types.REF:\n case Types.STRUCT:\n //what to do with this?\n break;\n default :\n //do nothing\n }\n }\n }", "protected void updateContents(Object aValue) {\n \n \t\tif (getText() == null) {\n \t\t\treturn;\n \t\t}\n \n \t\tString aText = StringStatics.BLANK;\n \t\tif (aValue != null) {\n \t\t\taText = aValue.toString();\n \t\t}\n \t\tgetText().setText(aText);\n \t}", "public void setContent(List<String> content){\n\t\t\tif (canHaveContent())this.content = content;\n\t\t}", "public Content(String text) {\n setContent(text);\n }", "public void setContent(java.lang.String content) {\n this._content = content;\n }", "@Override\n public void setValueAt(Object value, int row, int column) { data[row][column] = value; }", "public void setValueOf( final Object value, final R row, final C columnEnum ) {}", "void setElement(int row, String field, Object value);", "public abstract void setContentDescription(String description);", "private void setContentBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n content_ = value.toStringUtf8();\n }", "private void setContentBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n content_ = value.toStringUtf8();\n }", "public void setValueAt(Object value, int row, int column)\n\t{\n\t\tgetModel().setDataAt(value, row, convertColumnIndexToModel(column));\n\t}", "public void setValueAt(Object value, int row, int column){\n dataEntries[row][column] = value;\n }", "public void setContents(String value) {\n\tif (value == null) {\n\t throw new IllegalArgumentException(\"The value must be non-null.\");\n\t}\n\tthis.contents = value;\n }", "@Override\n\t\tpublic void setValueColumn(int columnIndex) {\n\t\t\tthis.valueColumn = columnIndex;\n\t\t}", "public Builder setContent(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n content_ = value;\n onChanged();\n return this;\n }", "public Builder setContent(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000001;\n content_ = value;\n \n return this;\n }", "public void setValueAt(Object value, int row, int col)\n {\n if (col == 1)\n {\n matchResults.get(row).setFirstName(value.toString());\n }\n // set the last name string\n else if (col == 3)\n { \n matchResults.get(row).setlastName(value.toString());\n }\n fireTableCellUpdated(row, col);\n }", "@Override\n public void setValueAt(Object aValue, int aRow, int aColumn) {\n model.setValueAt(aValue, aRow, aColumn); \n }", "public Bias setContent(String content) {\n this.content = content;\n return this;\n }", "public void setValue(String value) {\n\t\tthis.text = value;\n\t}" ]
[ "0.69386184", "0.69386184", "0.6935943", "0.6935943", "0.69198954", "0.66610765", "0.6633325", "0.6612936", "0.65737724", "0.65613455", "0.65542346", "0.65084016", "0.646093", "0.641375", "0.6391793", "0.6386444", "0.6327825", "0.6323189", "0.6270654", "0.6270061", "0.62664175", "0.6260468", "0.62394094", "0.6235078", "0.62345916", "0.6227344", "0.61554", "0.615296", "0.615281", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.6150387", "0.613584", "0.6131654", "0.6103635", "0.6103635", "0.60946494", "0.60892934", "0.6086238", "0.607633", "0.6056485", "0.60550845", "0.6043219", "0.60293674", "0.6022811", "0.6019565", "0.6019565", "0.60174966", "0.60122454", "0.60092795", "0.60092795", "0.6000315", "0.5992088", "0.5988129", "0.597833", "0.59500736", "0.59500736", "0.59500736", "0.59500736", "0.59500736", "0.59500736", "0.5949114", "0.59433264", "0.5927511", "0.5906821", "0.59029025", "0.5869192", "0.58659726", "0.5852476", "0.5848664", "0.5841292", "0.57900757", "0.5783842", "0.57726717", "0.5768632", "0.5740488", "0.5739376", "0.5739161", "0.5725489", "0.5720661", "0.57141066", "0.57141066", "0.57115597", "0.5711126", "0.56794983", "0.5675484", "0.5675132", "0.56649286", "0.56517154", "0.5641532", "0.5616622", "0.56091666" ]
0.589231
74
Return the value associated with the column: time
public java.lang.String getTime () { return time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LocalTime get_TIME(int column) {\n // Time column is always 8 chars long\n String timeString = dataBuffer_.getCharSequence(columnDataPosition_[column - 1],\n 8, charset_[column - 1]).toString();\n return LocalTime.parse(timeString, DRDAConstants.DB2_TIME_FORMAT);\n// return DateTime.timeBytesToTime(dataBuffer_,\n// columnDataPosition_[column - 1],\n// cal,\n// charset_[column - 1]);\n }", "public T getValue(float time) {\r\n return fun.getValue(new TimeInstant(time));\r\n }", "public int getMatchTime() {\n return getIntegerProperty(\"Time\");\n }", "public double getTime() { return time; }", "public Date time() {\n return _time;\n }", "public double getTime() {\n return this.time;\n }", "public double getTime() {return _time;}", "public Date time() {\n return _time;\n }", "public Date time() {\n return _time;\n }", "public double getTime(int timePt);", "public java.sql.Time getTime(String attr) {\n return (java.sql.Time) super.get(attr);\n }", "public String getTime() {\n return this.time;\n }", "public java.lang.Integer getTime() {\n return time;\n }", "public Time getTime(int columnIndex) throws SQLException {\n\n try {\n debugCodeCall(\"getTime\", columnIndex);\n return get(columnIndex).getTime();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public Date getEventTime() {\n\t\treturn time;\n\t}", "public java.sql.Time getTime(int columnIndex) throws SQLException\n {\n return m_rs.getTime(columnIndex);\n }", "public java.lang.Integer getTime() {\n return time;\n }", "public Long getTime() {\n return time;\n }", "public int getTime() {\r\n return time;\r\n }", "public Date getaTime() {\r\n return aTime;\r\n }", "public String getTime(){\n return time;\n }", "public String getTime() {\n return time;\n }", "public java.sql.Time getTime(String columnName) throws SQLException\n {\n return m_rs.getTime(columnName);\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public Date getTime() {\r\n return time;\r\n }", "public int getTime() { return _time; }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "public int getTime() {\n return time;\n }", "@JsonGetter(\"time\")\r\n public String getTime() {\r\n return time;\r\n }", "public String getTime() {\r\n\t\treturn time;\r\n\t}", "public long getTime() {\r\n \treturn time;\r\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "public Date getTime() {\n return time;\n }", "@javax.annotation.Nullable\n public Long getTime() {\n return time;\n }", "public long getTime(){\n return this.time;\n }", "@Override\n\tpublic String getTime() {\n\t\treturn time;\n\t}", "public String getTime() {\n\t\treturn time;\n\t}", "public long getPlayerTime ( ) {\n\t\treturn extract ( handle -> handle.getPlayerTime ( ) );\n\t}", "@JsonProperty(\"time\")\n public String getTime() {\n return time;\n }", "public Time getTime() {\n return this.time; // returns the time associated with the task\n }", "T getEventTime();", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public double time()\n\t{\n\t\treturn _dblTime;\n\t}", "public Object getValue() {\n\t\t SpinnerDateModel model = (SpinnerDateModel)((JSpinner)editor).getModel();\n\t\t Date date = model.getDate();\n\t\t java.sql.Time time = new java.sql.Time(date.getTime());\n\t return time;\n\t }", "public Date getTime() {\r\n\t\treturn time;\r\n\t}", "public Date getTime() {\n\t\treturn time;\n\t}", "private java.sql.Time getSqlTimeFromLabel(CharSequence text) {\n String timeString = text.toString()+\":00\";\n return java.sql.Time.valueOf(timeString);\n }", "public int getTime() {\n\t\treturn time;\n\t}", "public int getTime() {\n\t\treturn time;\n\t}", "@Override\n public long getTime() {\n return time;\n }", "public int getTT()\n {\n return toTime;\n }", "public BigInteger getTime() {\n\t\treturn time;\n\t}", "public double getFirstTime()\n\t{\n\t\tdouble time = Double.NaN;\n\t\tfinal Entry< Double, V > entry = getFirstEntry();\n\t\tif( entry != null )\n\t\t{\n\t\t\ttime = entry.getKey();\n\t\t}\n\t\treturn time;\n\t}", "@Override\n public Object getValueAt(int rowIndex, int columnIndex) {\n\n if (columnIndex == 0) {\n return allLakes.get(rowIndex).getName();\n }\n\n // Column 1 is for that lake's best time, if there is one.\n // Check to make sure there are times for that lake, if not, return a \"No times\" message.\n\n if (columnIndex == 1) {\n double time = allLakes.get(rowIndex).getFastestTime();\n\n if (time == Lake.NO_TIMES) {\n return \"No times\";\n } else {\n return time;\n }\n }\n\n return null;\n }", "String getHighScoreTime() {\n return getStringStat(highScoreTime);\n }", "public long getTime() {\n return time;\n }", "public TimeObject getElem(long time)\n\t{\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.setTimeInMillis(time);\n\t\treturn timeObjectfromCalendar(c);\n\t}", "public Time getTime(String columnName) throws SQLException {\n\n try {\n debugCodeCall(\"getTime\", columnName);\n return get(columnName).getTime();\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public int getTime() {\n if (USE_SERIALIZABLE) {\n return childBuilder.getTime();\n } else {\n // @todo Replace with real Builder object if possible\n return convertNullToNOT_SET(childBuilderElement.getAttributeValue(\"time\"));\n }\n }", "double getTime();", "public void setTime(String time) {\n this.time = time;\n }", "void setTime(int index, Time value) throws SQLException;", "public EventTime getTime() {\n return this.time;\n }", "public double getTime();", "@Override\r\n\tpublic long getTime() {\n\t\treturn this.time;\r\n\t}", "public Time12 getTime()\n\t{\n\t\treturn time;\n\t}", "public long getTime() {\r\n\t\treturn time;\r\n\t}", "public String getEventTime1()\n {\n EventTime1 = timeField1.getText();\n return EventTime1;\n }", "public int getTime() {\n\n\t\treturn time;\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "BigInteger getResponse_time();", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public int getTimeMilli(int columnIndex) {\n TimeMilliVector vector = (TimeMilliVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public long getTime() {\n return _time;\n }", "public String getTime(){\r\n String time = \"\";\r\n return time;\r\n }", "public synchronized String getTime() {\n\t\treturn time;\n\t}", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public long getTime() {\n return time_;\n }", "public void setTime(String time) {\r\n\t\tthis.time = time;\r\n\t}", "public String getTime() {\n\t\treturn mTime;\n\t}", "public void getTimeNano(String columnName, NullableTimeNanoHolder holder) {\n TimeNanoVector vector = (TimeNanoVector) table.getVector(columnName);\n vector.get(rowNumber, holder);\n }", "@java.lang.Override\n public long getTime() {\n return time_;\n }", "private long baseTime() {\n return Bytes.getUnsignedInt(row, tsdb.metrics.width());\n }", "Time getTime();", "public java.sql.Time getARRIVAL_AT_LOC_TIME()\n {\n \n return __ARRIVAL_AT_LOC_TIME;\n }", "public void setTime(String time) {\n\t\tthis.time = time;\n\t}", "public long getTimeMicro(int columnIndex) {\n TimeMicroVector vector = (TimeMicroVector) table.getVector(columnIndex);\n return vector.get(rowNumber);\n }", "public long getEventTime();" ]
[ "0.69734716", "0.67304176", "0.6553496", "0.655045", "0.6401722", "0.63987994", "0.63776636", "0.6374776", "0.6374776", "0.6338667", "0.6333577", "0.6225754", "0.6202391", "0.6195331", "0.6183369", "0.6136668", "0.61270374", "0.6110974", "0.61096984", "0.6108225", "0.6085095", "0.60790837", "0.6078384", "0.60742664", "0.60742664", "0.60742664", "0.60707825", "0.60693735", "0.60693735", "0.60693735", "0.6061067", "0.60562724", "0.60341233", "0.6032263", "0.6032263", "0.6032263", "0.6032263", "0.6029913", "0.6022066", "0.6013952", "0.60091746", "0.60076195", "0.6004837", "0.5978567", "0.596973", "0.5964305", "0.5964305", "0.5962962", "0.59619296", "0.5945801", "0.59411055", "0.5929798", "0.5929798", "0.5927961", "0.5925344", "0.5920955", "0.5919072", "0.59156406", "0.5899349", "0.5894493", "0.5891553", "0.5886666", "0.5882497", "0.5882497", "0.5882497", "0.588194", "0.58665067", "0.5865643", "0.58601356", "0.5854848", "0.58375716", "0.5837335", "0.5834402", "0.58129305", "0.5811028", "0.57941616", "0.57894254", "0.57894254", "0.57853013", "0.5755067", "0.57532585", "0.5749825", "0.57473844", "0.5743099", "0.5740315", "0.5740315", "0.5740315", "0.5740315", "0.5740315", "0.5740315", "0.5711868", "0.57111025", "0.5695882", "0.56924826", "0.5692472", "0.5680967", "0.56801724", "0.567717", "0.56727505", "0.5668662" ]
0.5812385
74
Set the value related to the column: time
public void setTime (java.lang.String time) { this.time = time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setTime(int index, Time value) throws SQLException;", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public void setTime(Time time) {\n this.time = time; // assigns the time argument value to the time attribute\n }", "public void setTime(double time) {_time = time;}", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setTime(Date time) {\r\n this.time = time;\r\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = time;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "private void setTime(long value) {\n \n time_ = value;\n }", "public void setTime( Date time ) {\n this.time = time;\n }", "public void setTime(String time) {\n }", "public void setTime(long time)\n {\n this.time = time;\n\n }", "public void setTime(Date time) {\r\n\t\tthis.time = time;\r\n\t}", "public void setTime(long time,int ento){ \r\n\t}", "void setTime(int index, Time value, Calendar cal)\n throws SQLException;", "public void setTime(long time) {\r\n this.time = time;\r\n }", "public void setTime(long time) {\n this.time = time;\n }", "void setTime(final int time);", "public void setTime(Date time) {\n\t\tthis.time = time;\n\t}", "public void setTime( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), TIME, value);\r\n\t}", "public void setTime(java.lang.Integer value) {\n this.time = value;\n }", "public void setTime(String time) {\n this.time = time;\n }", "public void setTime(long time) {\r\n\t\tthis.time = time;\r\n\t}", "public void setTime(Long time) {\n this.time = time;\n }", "public void setTime(Date time) {\n this.time = new Date(time.getTime());\n }", "public void setTime(String time) {\r\n\t\tthis.time = time;\r\n\t}", "public void setTime(long time) {\r\n this.time.setTime(time);\r\n }", "public edu.pa.Rat.Builder setTime(int value) {\n validate(fields()[0], value);\n this.time = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "@Override\n\tpublic void setTime(String time) {\n\t\tthis.time = time;\n\t}", "public void setTime(int time) {\n\t\tthis.time = time;\n\t}", "public void setARRIVAL_AT_LOC_TIME(java.sql.Time value)\n {\n if ((__ARRIVAL_AT_LOC_TIME == null) != (value == null) || (value != null && ! value.equals(__ARRIVAL_AT_LOC_TIME)))\n {\n _isDirty = true;\n }\n __ARRIVAL_AT_LOC_TIME = value;\n }", "public void setTime(String time) {\n\t\tthis.time = time;\n\t}", "public void setTime(int time) {\n\n\t\tthis.time = time;\n\t}", "public void setTime(int t){\r\n\t\t\t\ttime = t;\r\n\t\t\t}", "public void setTime(){\r\n \r\n }", "public void setTime(float time) {\n this.time = time;\n }", "public void setTime(int time) {\r\n\t\tthis.time = time;\r\n\t\tupdate();\r\n\t}", "@JsonSetter(\"time\")\r\n public void setTime(String time) {\r\n this.time = time;\r\n }", "public void updateTime(String columnName, Time x) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"updateTime(\" + quote(columnName) + \", x);\");\n }\n update(columnName, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "@Override\n\tpublic void setTime(long time)\n\t{\n\t\tsource.setTime(time);\n\t}", "private void setTime(Instant time) {\n this.time = time;\n }", "public void set(final long timeValue) {\n stamp = timeValue;\n }", "public void setTime(){\n \tDatabaseManager.getDBM().setLockedTime(cal); \n }", "public void setTime(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), TIME, value);\r\n\t}", "public Builder setTime(long value) {\n\n time_ = value;\n onChanged();\n return this;\n }", "public void setTime(gov.ucore.ucore._2_0.TimeType time)\n {\n synchronized (monitor())\n {\n check_orphaned();\n gov.ucore.ucore._2_0.TimeType target = null;\n target = (gov.ucore.ucore._2_0.TimeType)get_store().find_element_user(TIME$2, 0);\n if (target == null)\n {\n target = (gov.ucore.ucore._2_0.TimeType)get_store().add_element_user(TIME$2);\n }\n target.set(time);\n }\n }", "public void updateTime(String columnName, java.sql.Time x) throws SQLException\n {\n m_rs.updateTime(columnName, x);\n }", "private void setTime(long value) {\n bitField0_ |= 0x00000002;\n time_ = value;\n }", "private void setEditedTime(int value) {\n \n editedTime_ = value;\n }", "public void setTime(int time)\n {\n this.time = time;\n start = time;\n end = time;\n }", "protected void setTimestamp(long time) \n {\n\t\tlTimestamp = time;\n\t}", "public void updateTime(int columnIndex, Time x) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"updateTime(\" + columnIndex + \", x);\");\n }\n update(columnIndex, x == null ? (Value) ValueNull.INSTANCE : ValueTime.get(x));\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public void setTime( int value ) {\n final int oldTime = currentTime;\n currentTime = value;\n selectedThingsChanged( oldTime );\n\n mapComponent.getOptionContainer().getTimeCode().setText( DataExporter.generateTimeCode( value ) );\n\n mapComponent.getRadiantGoldLabel().setText( Integer.toString( appState.getReplay().getTeamGold( value, true ) ) );\n mapComponent.getDireGoldLabel().setText( Integer.toString( appState.getReplay().getTeamGold( value, false ) ) );\n\n mapComponent.getRadiantXPLabel().setText( Integer.toString( appState.getReplay().getTeamXP( value, true ) ) );\n mapComponent.getDireXPLabel().setText( Integer.toString( appState.getReplay().getTeamXP( value, false ) ) );\n\n }", "public static void setTime( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, TIME, value);\r\n\t}", "public void updateTime(int columnIndex, java.sql.Time x) throws SQLException\n {\n m_rs.updateTime(columnIndex, x);\n }", "public void setTime(int hour, int minute, int second){\r\n this.hour = hour ; /*when it was hour,minutes,second it was a new variable for this function bt as we used this.It gained access to the global ones. */\r\n this.minute = minute; \r\n this.second = second;\r\n }", "public void setTime ( final Calendar time ) {\n this.time = time;\n }", "public static void set(long time) {\n\t\tWorldTime.absoluteTime = time;\n\t}", "@Override\r\n\tpublic void setMyTime(MyTime myTime) {\n\t\t\r\n\t}", "public void timeUpdate(int time) {\r\n handler.setTime(time);\r\n }", "public void setaTime(Date aTime) {\r\n this.aTime = aTime;\r\n }", "public void addTime( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.add(this.model, this.getResource(), TIME, value);\r\n\t}", "public final native void setTime(String time) /*-{\n this.setTime(time);\n }-*/;", "void setReportTime(long time);", "private void SetTime() {\r\n\t\t timelbl.setText(second/3600+\":\"+((second/60)%60)+\":\"+(second%60));\r\n\t}", "public static void setTime(){\n\t\tCalendar cal = Calendar.getInstance();\n\t\tif (!JsonUtils.RUNNING_LOCALLY){\n\t\t\tcal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 4); //account for UTC offset because of lambda\n\t\t}\n\t\tCURRENT_TIME = formatTime(cal.getTime().toString());\n\t}", "public void setTimeUpdate(Date timeUpdate) {\n this.timeUpdate = timeUpdate;\n }", "public void setValue(Object value) {\n\t if (value != null) {\n\t \tjava.sql.Time time = (java.sql.Time)value;\n\t \t((JSpinner)editor).setValue(new Date(time.getTime()));\n\t }\n\t }", "public Builder setTime(long value) {\n bitField0_ |= 0x00000008;\n time_ = value;\n onChanged();\n return this;\n }", "private void setTime(int hour, int minute){\n Calendar calendar = Calendar.getInstance();\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n\n persistLong(calendar.getTimeInMillis());\n\n notifyChanged();\n notifyDependencyChange(shouldDisableDependents());\n }", "public void setTime(DateTime inputTime){\n time = inputTime.getMillis();\n timeZone = inputTime.getZone();\n }", "public void setTime(int parameterIndex, Time x) throws SQLException {\n currentPreparedStatement.setTime(parameterIndex, x);\n }", "public Builder setTime(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n time_ = value;\n onChanged();\n return this;\n }", "public void setTime(String eTime) {\n\t\tmTime = eTime;\n\t}", "public void setTime(Date date) {\n time = date;\n renderCaption();\n }", "public final void setTime(final Date newTime) {\n this.time = newTime;\n }", "public Builder setTime(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n time_ = value;\n onChanged();\n return this;\n }", "private void setRealTime(QueryData data, long time) {\n realTimeTime = time - parser.incrementTime();\n realTimeValue = data;\n }", "public static void setTime(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, TIME, value);\r\n\t}", "public void onTimeSet(TimePicker view, int hourOfDay, int minute) {\n\n time = 3600 * hour + 60 * minute;\n\n\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public static void setModemTemperatureTimestamp(long time) {\n\t\t\n\t}", "public void addValueTime(IValueTime vt){\n \tthis.generator.addValueTime(vt);\n }", "public void setPlayerTime ( long time , boolean relative ) {\n\t\texecute ( handle -> handle.setPlayerTime ( time , relative ) );\n\t}", "public void setcTime(Date cTime) {\r\n this.cTime = cTime;\r\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public Builder setTime(long value) {\n copyOnWrite();\n instance.setTime(value);\n return this;\n }", "public void setTime(int hour, int minute, int second)\r\n\t{\r\n\t\tHours.setValue(hour);\r\n\t\tMinutes.setValue(minute);\r\n\t\tSeconds.setValue(second);\r\n\t\t\r\n\t\tupdateTime();\r\n\t}" ]
[ "0.7882224", "0.7736612", "0.7736612", "0.7736612", "0.76811945", "0.7613065", "0.7605051", "0.7605051", "0.7605051", "0.7568996", "0.7568996", "0.7568996", "0.7568996", "0.7510212", "0.7510212", "0.7510212", "0.7510212", "0.748842", "0.7467541", "0.74583876", "0.74498767", "0.74430645", "0.7441334", "0.7404532", "0.7394874", "0.7382897", "0.73797435", "0.73216045", "0.73106873", "0.7295054", "0.729402", "0.7276055", "0.72559774", "0.7240004", "0.72034776", "0.72030205", "0.71910316", "0.7183566", "0.7137003", "0.7131934", "0.7121163", "0.70984054", "0.70829", "0.70686394", "0.7048681", "0.7046505", "0.7038065", "0.7006633", "0.70044476", "0.69542867", "0.69487065", "0.69408524", "0.6928583", "0.6919809", "0.68947196", "0.68911904", "0.68864465", "0.6851075", "0.6779282", "0.67748654", "0.67640615", "0.67593116", "0.67379063", "0.67100525", "0.66884077", "0.6684898", "0.66837436", "0.6623835", "0.65991795", "0.6596365", "0.6573717", "0.6572686", "0.6548658", "0.6524997", "0.65194815", "0.6514955", "0.6490212", "0.64798987", "0.6477236", "0.6465016", "0.644659", "0.6426503", "0.6413297", "0.64031494", "0.6395633", "0.63847405", "0.6378324", "0.6370842", "0.63671273", "0.63671273", "0.63671273", "0.6360154", "0.6343239", "0.6339707", "0.6337054", "0.6333356", "0.6333356", "0.6333356", "0.6333356", "0.6313489" ]
0.69034874
54
check if the center of cn has more than num properties that can be removed i.e. the properties are also connected by other nodes
private static ArrayList<Edge> getValidFeatures(ConceptNet cn){ ArrayList<Edge> ret = new ArrayList<Edge>(); ConceptNetNode center = cn.center; ArrayList<Edge> features = center.getInPropertyEdge(); for(Edge e : features){ ConceptNetNode cnn = cn.getStartNode(e); if(cnn == null){ System.err.println("Error: Cannot find node: " + e.start + " in Concept Net: " + center.name); return null; } if(cnn.getInPropertyEdge().size() > 1 || cnn.getOutPropertyEdge().size() > 1 || cnn.getInRelEdge().size() > 1 || cnn.getOutRelEdge().size() > 1){ ret.add(e); } } features = center.getOutPropertyEdge(); for(Edge e : features){ ConceptNetNode cnn = cn.getEndNode(e); if(cnn == null){ System.err.println("Error: Cannot find node: " + e.end + " in Concept Net: " + center.name); return null; } if(cnn.getInPropertyEdge().size() > 1 || cnn.getOutPropertyEdge().size() > 1 || cnn.getInRelEdge().size() > 1 || cnn.getOutRelEdge().size() > 1){ ret.add(e); } } return ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean canRemoveTiles() {\n return this.mCurrentSpecs.size() > 8;\n }", "private boolean hasCollided(Circle a, Polygon p) {\r\n //calculate the distance between the centers\r\n return p.getBoundsInParent().intersects(a.getBoundsInParent());\r\n\r\n }", "private void deleteNodeSvcProperties(int nodeIndex, String svc) {\n synchronized(AlertCorrelationEngine.class) {\n IndexArray index = (IndexArray) \n servicesNode[nodeIndex].remove(svc);\n\n for (int j = index.getStartIndex();\n j <= index.getStopIndex();\n j++) {\n\n AlertTreeNodeLeaf leaf = null;\n try {\n //\n // Remove a range : always remove the first element since\n // this operation shifts the whole indexes for the array.\n //\n leaf = (AlertTreeNodeLeaf) \n propertiesNode[nodeIndex].remove(index.getStartIndex());\n } catch (IndexOutOfBoundsException oob) {\n logger.severe(\"Index Out of Bound : svc = \" + svc + \n \", startIndex = \" + index.getStartIndex() +\n \", stopIndex = \" + index.getStopIndex() +\n \", index = \" + j + oob);\n }\n if (leaf != null) {\n propertiesMap.remove(leaf.getPath());\n }\n }\n }\n }", "public int size() {\n return _properties.size();\n }", "public int checkCollisions() {\r\n\t\tArrayList<Comet> comets = Comet.getCometList();\r\n\r\n\t\tfor (int i = 0; i < comets.size(); i++) {\r\n\t\t\tComet tempComet = comets.get(i);\r\n\r\n\t\t\tif (getBounds().intersects(tempComet.getBounds())) {\r\n\t\t\t\tComet.removeComet(tempComet);\r\n\t\t\t\tcol++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn col;\r\n\t}", "@Override\n @NoProxy\n @NoDump\n public int removeXproperties(final String val) {\n List<BwXproperty> xs = getXproperties(val);\n\n if (xs.size() == 0) {\n return 0;\n }\n\n for (BwXproperty x: xs) {\n removeXproperty(x);\n }\n\n return xs.size();\n }", "int getPropertiesCount();", "public boolean shouldRemove(){\r\n\t\tif (heat<=0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private boolean isMoreThanMoles(int numOfMoles) {\n int count = 0;\n for (ImageView imageView : imageViewsArray) {\n if (imageView.getDrawable() != null) {\n count++;\n }\n }\n return count > numOfMoles;\n }", "protected void checkSize()\n {\n // check if pruning is required\n if (m_cCurUnits > m_cMaxUnits)\n {\n synchronized (this)\n {\n // recheck so that only one thread prunes\n if (m_cCurUnits > m_cMaxUnits)\n {\n prune();\n }\n }\n }\n }", "private void deleteNodeProperties(int nodeIndex) {\n synchronized(AlertCorrelationEngine.class) {\n for (int i = 0; i < propertiesNode[nodeIndex].size(); i++) {\n \n AlertTreeNodeLeaf leaf =\n (AlertTreeNodeLeaf) propertiesNode[nodeIndex].get(i);\n if (leaf != null) {\n propertiesMap.remove(leaf.getPath());\n }\n }\n servicesNode[nodeIndex].clear();\n propertiesNode[nodeIndex].clear();\n }\n }", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "@Override\n\tpublic int getPropertyCount() {\n\t\treturn 5;\n\t}", "public void testProperties(){\n \n if (parent == null)\n return;\n \n tests(parent);\n \n if (testSettings.AP_mnemonics){\n \n //- LOG ONLY - list of conflicts before cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n cleanMnemonicsConflict();\n \n // LOG ONLY - list of conflicts after cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS after clean up = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n }\n \n if (testSettings.AP_noLabelFor)\n checkLabelTextComponentPairs();\n }", "public void sanityCheckNumNodes() {\n\t\tint sanity = viewedPos.sanityCheckGetNumberOfNodes();\n\t\tif(sanity != numPosRecorded) {\n\t\t\tSystem.err.println(\"ERROR: the number of nodes in the tree is not equal to the number of nodes added. #Added: \" + numPosRecorded + \" number received: \" + sanity);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "public boolean hasSpaces() {\n\t\treturn !divided && points.keySet().size() != QUADTREE_NODE_CAPACITY;\n\t}", "private boolean hasHeapProperty() {\n for(int i=1; i <= count; i++) {\n if( findRightChild(i) <= count ) { // if i Has two children...\n // ... and i is smaller than either of them, , then the heap property is violated.\n if( items[i].compareTo(items[findRightChild(i)]) < 0 ) return false;\n if( items[i].compareTo(items[findLeftChild(i)]) < 0 ) return false;\n }\n else if( findLeftChild(i) <= count ) { // if n has one child...\n // ... and i is smaller than it, then the heap property is violated.\n if( items[i].compareTo(items[findLeftChild(i)]) < 0 ) return false;\n }\n else break; // Neither child exists. So we're done.\n }\n return true;\n }", "private boolean hasCollided(Circle a, Circle b) {\r\n //calculate the distance between the centers\r\n double dist = Math.sqrt(Math.pow(a.getCenterX() - b.getCenterX(), 2) + Math.pow(a.getCenterY() - b.getCenterY(), 2));\r\n double rads = a.getRadius() + b.getRadius();\r\n\r\n //if the distance between the centers is less than the 2 radius\r\n //they have collided. \r\n return dist < rads;\r\n }", "int givePropSize(List<Integer[]> coordsInProp) throws Exception;", "public void computeExpectedChildrenProperties() {\n\t\t\n\t\tSet<Attribute<? extends IValue>> parentAttributes = new HashSet<>(popParents.getPopulationAttributes());\n\t\tparentAttributes.retainAll(pMatching.getDimensions());\n\t\t\n\t\tlogger.info(\"computing for the dimensions: {}\", parentAttributes);\n\t\t\n\t\t/*\n\t\t * \n\t\tMap<Set<Attribute<? extends IValue>>,Integer> parents2matchingCandidates = new HashMap<>();\n\t\tfor (Entry<ACoordinate<Attribute<? extends IValue>, IValue>, AControl<Double>> e: \n\t\t\tpMatching.getMatrix().entrySet()) {\n\t\t\t\n\t\t}\n\t\t\n\t\tGosplContingencyTable c = new GosplContingencyTable(pMatching.getDimensions());\n\t\t// for each coordinate of the probabilities table \n\t\t// 1) compute the \n\t\t * \n\t\t */\n\n\t\t\n\t}", "private boolean satisfiesPolygon() {\n \t\treturn this.markers.size() >= 3;\n \t}", "private boolean tooSmallforThisPaddock(PaddockCoordinates coor) {\n return ((coor.getX() + coor.getWidth() > this.width)\n || (coor.getY() + coor.getHeight() > this.height));\n }", "private static int getNumTotalEdges(){\r\n\t\t//return getMutMap().keySet().size();\r\n\t\treturn numCols+1;\r\n\t}", "public boolean checkCollission(LinkedList<Node> agents) {\n for (Node otherAgent: agents) {\n double dist = Math.sqrt(Math.pow(otherAgent.getX() - agent.getX(), 2) + Math.pow(otherAgent.getY() - agent.getY(), 2));\n if (dist != 0) {\n return true;\n }\n }\n \n return false;\n }", "private boolean compareProperties (Properties props1 , Properties props2){\n boolean propertiesAreEqual = true;\n Properties props2Clone = (Properties)props2.clone();\n Iterator<Object> itProps1Name = props1.keySet().iterator();\n while (propertiesAreEqual && itProps1Name.hasNext()){\n String propertyName = (String)itProps1Name.next();\n if (props2Clone.containsKey(propertyName)){\n propertiesAreEqual = props1.getProperty(propertyName).trim()\n .equals(props2Clone.getProperty(propertyName).trim());\n // Remove checked property from props2Clone properties\n props2Clone.remove(propertyName);\n }\n else{\n propertiesAreEqual = false;\n }\n }\n // If there are left properties in CSS file then files are not equal\n if (props2Clone.size() > 0){\n propertiesAreEqual = false;\n }\n \n return propertiesAreEqual;\n \n }", "public boolean minSize(){\n\t\tboolean result; \n\t\tif(keys.size() < (MAXKEYS/2) -1){\n\t\t\tresult = true;\n\t\t}\n\t\telse{ \n\t\t\tresult = false;\n\t\t}\n\t\treturn result;\n\t}", "public void noPropertyies() {\n\t\tproperties.clear();\r\n\t\tfor(int i = 0; i<groups.length; i++){\r\n\t\t\tgroups[i].clear();\r\n\t\t}\r\n\t}", "public boolean underfull() {\n\t\treturn lastindex < minkeys(); // ptrs number: Math.ceil(degree / 2.0) ~ n\n\t}", "public int pruneCrewMembers() {\r\n\t\tcrewMembers.removeIf(crewMember -> crewMember.getHealth() <= 0);\r\n\t\treturn crewMembers.size();\r\n\t}", "public static void viewDeleteProperty() {\n\t\tint regNum = Integer.parseInt(getResponseTo(\"Enter registrants number of property to delete: \"));\r\n\t\t// ArrayList<Property> prop_list = rc.listOfProperties(regNum);\r\n\t\tArrayList<Property> prop_list = rc.listOfProperties(regNum);\r\n\t\t// check if the size of ArrayList is 0, else delete the property with given\r\n\t\t// regNum\r\n\r\n\t\tif (prop_list.size() == 0) {\r\n\t\t\tSystem.out.println(\"No properties are associated with that registration number.\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Properties are associated with that registration number are:\\n\");\r\n\t\t\tfor (Property property : prop_list) {\r\n\t\t\t\tSystem.out.println(property);\r\n\t\t\t}\r\n\t\t\tSystem.out.printf(\r\n\t\t\t\t\t\"You are about delete %d properties; do you wish to continue?\\n\" + \"(Enter 'Y' to proceed) \",\r\n\t\t\t\t\tprop_list.size());\r\n\t\t\tString choice = getResponseTo(\"\");\r\n\t\t\tif (choice.equals(\"Y\") || choice.equals(\"y\")) {\r\n\t\t\t\trc.deleteProperties(prop_list);\r\n\t\t\t\tSystem.out.println(\"Property/ies deleted\");\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Properties are associated with that registration number were not deleted\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void clean() {\n //use iterator\n Iterator<Long> it = nodes.keySet().iterator();\n while (it.hasNext()) {\n Long node = it.next();\n if (nodes.get(node).adjs.isEmpty()) {\n it.remove();\n }\n }\n }", "public boolean canFinish(int numCourses, int[][] prerequisites) {\n if(numCourses==0 || numCourses==1){return true;}\n List<Set<Integer>> adjacency = new ArrayList<Set<Integer>>();\n for(int i=0;i<numCourses;i++){\n Set<Integer> adja = new HashSet<Integer>();\n adjacency.add(adja);\n } //initialization\n \n for(int i=0;i<prerequisites.length;i++){\n adjacency.get(prerequisites[i][0]).add(prerequisites[i][1]);\n }\n \n int[] preNum = new int[numCourses];\n for(int i=0;i<adjacency.size();i++){\n Iterator<Integer> iterator = adjacency.get(i).iterator();\n while(iterator.hasNext()){\n preNum[iterator.next()]++;\n }\n }\n \n for(int i=0;i<numCourses;i++){\n //try to remove all the nodes\n //but can return in the middle\n int j=0;\n for(;j<numCourses;j++){\n if(preNum[j]==0){break;}\n }\n \n if(j==numCourses){return false;}\n \n preNum[j]=-1;\n \n Iterator<Integer> temp = adjacency.get(j).iterator();\n while(temp.hasNext()){\n preNum[temp.next()]--;\n } \n } \n return true; \n }", "public void clearCentroids();", "@Override\n protected boolean removeChanceNode() {\n\n Node candidateToReduce;\n Node candidateToRemove;\n Node nodeToRemove;\n String operation;\n int i;\n NodeList children;\n Node valueNodeToReduce;\n\n NodeList chancesID;\n boolean removed = false;\n Node nodeUtil = null;\n\n\n\n\n // Obtain the value node \n\n //sv = ((IDWithSVNodes) diag).getTerminalValueNode();\n\n //diag.save(\"debug-mediastinet.elv\");\n\n //List of chance nodes in the diagram\n chancesID = diag.getNodesOfKind(Node.CHANCE);\n\n for (i = 0; (i < chancesID.size()) && removed == false; i++) {\n\n candidateToRemove = chancesID.elementAt(i);\n\n //Check if the candidaToRemove can be removed\n if (isRemovableChance(candidateToRemove)) {\n\n nodeToRemove = candidateToRemove;\n children = nodeToRemove.getChildrenNodes();\n //Reduce value nodes if it's necessary\n\n if (children.size() > 1) {\n //We have to reduce\n candidateToReduce = getCandidateValueNodeToReduceForChanceNode(nodeToRemove);\n\n //valueNodeToReduce =\tobtainValueNodeToReduce(reachableParents);\n valueNodeToReduce = obtainValueNodeToReduce(nodeToRemove, candidateToReduce);\n ReductionAndEvalID.reduceNode(\n (IDWithSVNodes) diag,\n valueNodeToReduce);\n nodeUtil = valueNodeToReduce;\n operation = \"Reduce: \" + nodeUtil.getName() + \" to eliminate: \" + nodeToRemove.getName();\n System.out.println(operation);\n statistics.addOperation(operation);\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n //The chance has only one child (utility)\n nodeUtil = children.elementAt(0);\n\n }\n\n\n String auxName = candidateToRemove.getName();\n operation = \"Chance node removal: \" + auxName;\n System.out.println(operation);\n statistics.addOperation(operation);\n\n //Add the name of the node to 'orderOfElimination'\n ((PropagationStatisticsID) statistics).addNameToOrderOfElimination(auxName);\n\n // The relation of the utility node is modified. In this \n // case the parents of the node to remove will be parents \n // of the utility node \n\n modifyUtilityRelation(nodeUtil, nodeToRemove, true);\n\n // Calculate the new expected utility \n getExpectedUtility(nodeUtil, nodeToRemove);\n\n // The node is deleted \n\n diag.removeNodeOnly(nodeToRemove);\n\n//\t\t\t\tStore the size of the diagram\n\n statistics.addSize(diag.calculateSizeOfPotentials());\n\n statistics.addTime(crono.getTime());\n\n indexOperation++;\n try {\n diag.save(\"debug-operation-\" + indexOperation + \".elv\");\n } catch (IOException ex) {\n Logger.getLogger(ArcReversalSV.class.getName()).log(Level.SEVERE, null, ex);\n }\n // Set removed \n removed = true;\n\n }\n }//for\n return removed;\n }", "private void detectExcessSize() {\n final String overflow = getElement().getStyle().getProperty(\n \"overflow\");\n getElement().getStyle().setProperty(\"overflow\", \"hidden\");\n if (BrowserInfo.get().isIE()\n && getElement().getPropertyInt(\"clientWidth\") == 0) {\n // can't detect possibly themed border/padding width in some\n // situations (with some layout configurations), use empty div\n // to measure width properly\n DivElement div = Document.get().createDivElement();\n div.setInnerHTML(\"&nbsp;\");\n div.getStyle().setProperty(\"overflow\", \"hidden\");\n div.getStyle().setProperty(\"height\", \"1px\");\n getElement().appendChild(div);\n excessWidth = getElement().getOffsetWidth()\n - div.getOffsetWidth();\n getElement().removeChild(div);\n } else {\n excessWidth = getElement().getOffsetWidth()\n - getElement().getPropertyInt(\"clientWidth\");\n }\n excessHeight = getElement().getOffsetHeight()\n - getElement().getPropertyInt(\"clientHeight\");\n \n getElement().getStyle().setProperty(\"overflow\", overflow);\n }", "private int numberOfIncorrectFollowUp(JigsawNode jNode) {\n\t\tint s = 0;\n\t\tint dimension = JigsawNode.getDimension();\n\t\tfor (int index = 1; index < dimension * dimension; index++) {\n\t\t\tif (jNode.getNodesState()[index] + 1 != jNode.getNodesState()[index + 1])\n\t\t\t\ts++;\n\t\t}\n\t\treturn s;\n\t}", "@Override\n public void validateProperties(PropertyGroup properties) throws PropertySpec.ValidationException\n {\n getServiceAccount();\n if (gkeMasterVersionSpec.value(properties) != null)\n {\n validateClusterVersion();\n }\n if (regionSpec.optionalValue(properties).isPresent() == zoneSpec.optionalValue(properties).isPresent())\n {\n throw new PropertySpec.ValidationException(String.format(\"Exactly one of %s or %s must be specified.\",\n regionSpec.name(), zoneSpec.name()));\n }\n if (regionSpec.optionalValue(properties).isPresent() &&\n getNodeGroup().getNodes().size() % DEFAULT_ZONES_PER_REGION != 0)\n {\n throw new PropertySpec.ValidationException(String.format(\n \"Regional clusters by default replicate nodes over %d zones; this cant be done when %s=%d.\",\n DEFAULT_ZONES_PER_REGION, NODE_COUNT_KEY, getNodeGroup().getNodes().size()));\n }\n checkRegionOrZone(regionSpec, properties, 2);\n checkRegionOrZone(zoneSpec, properties, 3);\n }", "public boolean hasSameSides(Property prop) {\n // this code provided by Dave Houtman [2020] personal communication\n return this.getXLength() == prop.getXLength() && this.getYWidth() == prop.getYWidth();\n }", "public boolean isSetSmallCircle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SMALLCIRCLE$2) != 0;\n }\n }", "public boolean hasUncountable() {\n return ops.hasUncountable(mat);\n }", "public boolean hasChanges() {\n return Math.abs(this.x) > 1.0E-5f || Math.abs(this.y) > 1.0E-5f || Math.abs(this.scale - this.minimumScale) > 1.0E-5f || Math.abs(this.rotation) > 1.0E-5f || Math.abs(this.orientation) > 1.0E-5f;\n }", "public boolean DeleteNotInCircle (ArrayList<Location> form_circle, Location centre, int start, int end)\n {\n for (int i=0; i<form_circle.size (); i++)\n {\n if (centre.getDistance(form_circle.get(i)) > disthre )\n {\n if (i<4) return false;\n else { \n for (int q = i; q<form_circle.size (); q++)\n {\n form_circle.remove(q);\n }\n Date timee = Transfertime(time.get(start+i-1));\n Date times = Transfertime(time.get(start));\n if (abs(timee.getTime()-times.getTime())/1000 >=staythre)\n {\n centre = GeoUtils.getEuclideanCentroid(form_circle);\n return true;\n } else return false;\n }\n }\n }\n return false;\n }", "public boolean remainingVerticies(ArrayList<Vertex> edges) {\n\n for (int i = 0; i < edges.size(); i++) {\n if (edges.get(i).color == Color.YELLOW) {\n return true;\n }\n }\n return false;\n }", "public boolean isSetDimensns()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DIMENSNS$6) != 0;\n }\n }", "private void checkCapacity() {\n\t\tif (size.get() >= region.getCapacity()) {\n\t\t\tsynchronized (cleanUpThread) {\n\t\t\t\tcleanUpThread.notify();\n\t\t\t}\n\t\t}\n\t}", "public native boolean isLengthComputable() /*-{\n\t\treturn this.lengthComputable;\n\t}-*/;", "public boolean isNumberVariablesCoherent() {\n\n\t\tint m = getVariablesNumberInMap();\n\t\tint t = getVariablesNumberInTree();\n\t\treturn m == t;\n\t}", "int getPropsCount();", "PropertiesTask removeAllProperties();", "public boolean hasProperty() {\n return !properties.isEmpty();\n }", "private boolean shouldTrim( RelNode rootRel ) {\n return THREAD_TRIM.get() || RelOptUtil.countJoins( rootRel ) < 2;\n }", "private int RetrieveCleanUpProps()\r\n {\n String[] punctuationFiles = new String[] {\"punctuation.props\"};\r\n FileInputStream input;\r\n String tempStr;\r\n File ftemp;\r\n Collection c = new ArrayList<String>();\r\n\r\n // Get the list of the props file containing the words to remove (not the punctuation)\r\n DirList props = new DirList(inputDir, \"^(?!(punctuation)).*\\\\.props$\", 1);\r\n\t\tArrayList<File> wordsList = props.getListFiles();\r\n//\t\tSystem.out.println(\"props files:\"+wordsList);\r\n //TODO all properties are taken to a single arraylist. does it ok?.\r\n\t\tProperties enProps =new Properties ();\r\n\t\tString propsDir = inputDir.getPath().concat(File.separator).concat(searchdir);\r\n\t\t\r\n\t\t// Init the lists which will contain the words and chars to remove \r\n\t\tcleanUpStrings = new ArrayList<String>();\r\n\t\tcleanUpChars = new ArrayList<String>();\r\n\t\t\r\n\t try {\r\n\t \t// Retrieve words to remove\r\n for (File aWordsList : wordsList) {\r\n ftemp = aWordsList;\r\n if (ftemp.exists()) {\r\n enProps.load(input = new FileInputStream(ftemp.getAbsolutePath()));\r\n input.close();\r\n c = enProps.values();\r\n cleanUpStrings.addAll(c);\r\n enProps.clear();\r\n }\r\n }\r\n\r\n\t \t// Retrieve char to remove (punctuation for ex.)\r\n for (String punctuationFile : punctuationFiles) {\r\n tempStr = propsDir.concat(File.separator).concat(punctuationFile);\r\n ftemp = new File(tempStr);\r\n if (ftemp.exists()) {\r\n enProps.load(input = new FileInputStream(tempStr));\r\n input.close();\r\n c = enProps.values();\r\n cleanUpChars.addAll(c);\r\n enProps.clear();\r\n }\r\n }\r\n\t }\r\n\t catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t return 1;\r\n\t }\r\n \treturn 0;\r\n }", "public boolean percolates(){\r\n\t\treturn uf.connected(N * N, N * N + 1);\r\n\t}", "private boolean hasServerRemovedAllElements() {\n return getNumElementsRemoved() >= getNumElementsToRemove();\n }", "private void checkRep() throws RuntimeException {\n\n if(polys == null) {\n if(size != 0)\n throw new RuntimeException(\"size field should be equal to zero when polys is null sine stack is empty\");\n } else {\n\n int countResult = 0;\n RatPoly headPoly = polys.head;\n Cons nextCons = polys;\n\n if(headPoly != null) { \n for (int i = 1;; i++) {\n if(nextCons != null) {\n countResult = i;\n nextCons = nextCons.tail;\n } else\n break; \n }\n }\n if(countResult != size)\n throw new RuntimeException(\"size field is not equal to Count(s.polys). Size constant is \"+size+\" Cons cells have length \"+countResult); \n }\n }", "public int countNotEmpty() {\n\t\tint count = 0;\n\t\tfor (HexagonPos hexagonPos : hexagonsPos) {\n\t\t\tif (!(hexagonPos.getHexagon() instanceof Empty))\n\t\t\t\t++count;\n\t\t}\n\t\treturn count;\n\t}", "private ArrayList<Integer> pruneIllegals(ArrayList<Integer> cm,\n ArrayList<Integer> config) {\n //Remove out of bound spots\n for (int i = 0; i < cm.size(); i++) {\n if(cm.get(i) < 0) {\n cm.remove(i);\n i--;\n } else if (cm.get(i) >= config.size()) {\n cm.remove(i);\n i--;\n }\n }\n //Remove points that have no person there\n boolean occupied;\n for (int i = 0; i < cm.size(); i++) {\n if (config.get(cm.get(i)) == '.') {\n cm.remove(i);\n i--;\n }\n }\n\n return cm;\n }", "public boolean overLaps(Property prop) {\n if (this.getXRight() <= prop.getXLeft() || this.getXLeft() >= prop.getXRight()\n || this.getYTop() >= prop.getYBottom() || this.getYBottom() <= prop.getYTop()) {\n return false;\n }\n return true;\n }", "private boolean isFull(){\n return cellSize == Max;\n }", "void verifyNumberOfDimensions(int ignoreMeNumDimensions) {\n // do nothing on purpose\n }", "private int computeCount() {\n \n int count;\n try{\n count = this.clippingFeatures.size() * this.featuresToClip.size();\n }catch(ArithmeticException e ){\n \n count = Integer.MAX_VALUE;\n }\n return count;\n }", "private boolean checkDeletion() {\n/* 4471 */ if (this.creatures == null || this.creatures.size() == 0)\n/* */ {\n/* 4473 */ if (this.vitems == null || this.vitems.isEmpty())\n/* */ {\n/* 4475 */ if (this.walls == null || this.walls.size() == 0)\n/* */ {\n/* 4477 */ if (this.structure == null)\n/* */ {\n/* 4479 */ if (this.fences == null)\n/* */ {\n/* 4481 */ if (this.doors == null || this.doors.size() == 0)\n/* */ {\n/* 4483 */ if (this.effects == null || this.effects.size() == 0)\n/* */ {\n/* 4485 */ if (this.floors == null || this.floors.size() == 0)\n/* */ {\n/* 4487 */ if (this.mineDoors == null || this.mineDoors.size() == 0) {\n/* */ \n/* 4489 */ this.zone.removeTile(this);\n/* 4490 */ return true;\n/* */ } \n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* 4500 */ return false;\n/* */ }", "private static boolean hasCapacityForMultiEvaluation() {\n // return true;\n int threshold = 3;\n int available = Runtime.getRuntime().availableProcessors() * ServerRunner.getProcessorMultiplier();\n return available >= threshold;\n }", "void verifyIntProperties() throws IllegalStateException {\n if (mProperties.size() < 2) {\n return;\n }\n int last = getIntPropertyValue(0);\n for (int i = 1; i < mProperties.size(); i++) {\n int v = getIntPropertyValue(i);\n if (v < last) {\n throw new IllegalStateException(String.format(\"Parallax Property[%d]\\\"%s\\\" is\"\n + \" smaller than Property[%d]\\\"%s\\\"\",\n i, mProperties.get(i).getName(),\n i - 1, mProperties.get(i - 1).getName()));\n } else if (last == IntProperty.UNKNOWN_BEFORE && v == IntProperty.UNKNOWN_AFTER) {\n throw new IllegalStateException(String.format(\"Parallax Property[%d]\\\"%s\\\" is\"\n + \" UNKNOWN_BEFORE and Property[%d]\\\"%s\\\" is UNKNOWN_AFTER\",\n i - 1, mProperties.get(i - 1).getName(),\n i, mProperties.get(i).getName()));\n }\n last = v;\n }\n }", "boolean hasIsCentralNode();", "static boolean hasMoreComposites(final int flags) {\n return (flags & MORE_COMPONENTS.bitMask) > 0;\n }", "private static void checkRequiredProperties()\n\t{\n\t\tfor (ServerProperty prop : ServerProperty.values())\n\t\t{\n\t\t\tif (prop.isRequired())\n\t\t\t{\n\t\t\t\t// TODO\n//\t\t\t\tswitch (prop)\n//\t\t\t\t{\n//\t\t\t\t\tcase GERMINATE_AVAILABLE_PAGES:\n//\t\t\t\t\t\tSet<Page> availablePages = getSet(prop, Page.class);\n//\t\t\t\t\t\tif (CollectionUtils.isEmpty(availablePages))\n//\t\t\t\t\t\t\tthrowException(prop);\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_USE_AUTHENTICATION:\n//\t\t\t\t\t\tboolean useAuthentication = getBoolean(prop);\n//\t\t\t\t\t\tif (useAuthentication)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_SERVER)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_SERVER);\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_NAME)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_NAME);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_GATEKEEPER_REGISTRATION_ENABLED:\n//\t\t\t\t\t\tboolean registrationNeedsGatekeeper = getBoolean(prop);\n//\n//\t\t\t\t\t\tif (registrationNeedsGatekeeper)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tString gatekeeperUrl = get(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(gatekeeperUrl))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tdefault:\n\t\t\t\tif (StringUtils.isEmpty(get(prop)))\n\t\t\t\t\tthrowException(prop);\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void validatePropertiesModels(GraphContext context) throws Exception\n {\n GraphService<PropertiesModel> service = new GraphService<>(context, PropertiesModel.class);\n\n int numberFound = 0;\n for (PropertiesModel model : service.findAll())\n {\n numberFound++;\n\n Properties props = model.getProperties();\n Assert.assertEquals(\"value1\", props.getProperty(\"example1\"));\n Assert.assertEquals(\"anothervalue\", props.getProperty(\"anotherproperty\"));\n Assert.assertEquals(\"1234\", props.getProperty(\"timetaken\"));\n }\n\n Assert.assertEquals(1, numberFound);\n }", "public boolean isValid(){\n\t\treturn points.size() >= 2;\n\t}", "private void checkCollisions() {\n float x = pacman.getPos().x;\n float y = pacman.getPos().y;\n\n GameEntity e;\n for (Iterator<GameEntity> i = entities.iterator(); i.hasNext(); ) {\n e = i.next();\n // auf kollision mit spielfigur pruefen\n if (Math.sqrt((x - e.getPos().x) * (x - e.getPos().x) + (y - e.getPos().y) * (y - e.getPos().y)) < 0.5f)\n if (e.collide(this, pacman))\n i.remove();\n }\n }", "boolean hasXconnect(ConnectPoint cp);", "private boolean checkConstraints(int num, int row, int col) {\n int[][] numberGridCopy = new int[5][5];\n for(int rowId = 0; rowId < 5; rowId++){\n for(int colId = 0; colId < 5; colId++){\n numberGridCopy[rowId][colId] = numberGrid[rowId][colId];\n }\n }\n\n // set the prospective value\n numberGridCopy[row][col] = num;\n\n // see if any of the constraints are broken by the prospective value\n for(Constraint constraint : constraints){\n if(!constraint.apply(numberGridCopy)){\n return false;\n }\n }\n return true;\n }", "protected static boolean nudge(JComponent c,Rectangle dest) {\n\t\tRectangle bounds = c.getBounds();\n\t\t\n\t\tdouble lastDX = getDouble(c,PROPERTY_LAST_DX,0);\n\t\tdouble lastDY = getDouble(c,PROPERTY_LAST_DY,0);\n\t\tdouble lastDW = getDouble(c,PROPERTY_LAST_DW,0);\n\t\tdouble lastDH = getDouble(c,PROPERTY_LAST_DH,0);\n\t\t\n\t\tdouble dx = dest.x-bounds.x;\n\t\tdouble dy = dest.y-bounds.y;\n\t\tdouble dw = dest.width-bounds.width;\n\t\tdouble dh = dest.height-bounds.height;\n\t\t\n\t\tdx = limit(.5*sign(dx)*Math.sqrt(Math.abs(dx))+.5*lastDX,dx);\n\t\tdy = limit(.5*sign(dy)*Math.sqrt(Math.abs(dy))+.5*lastDY,dy);\n\t\tdw = limit(.5*sign(dw)*Math.sqrt(Math.abs(dw))+.5*lastDW,dw);\n\t\tdh = limit(.5*sign(dh)*Math.sqrt(Math.abs(dh))+.5*lastDH,dh);\n\n\t\tc.putClientProperty(PROPERTY_LAST_DX, new Double(dx));\n\t\tc.putClientProperty(PROPERTY_LAST_DY, new Double(dy));\n\t\tc.putClientProperty(PROPERTY_LAST_DW, new Double(dw));\n\t\tc.putClientProperty(PROPERTY_LAST_DH, new Double(dh));\n\t\t\n\t\tif(Math.abs(dx)<1.2 && \n\t\t\t\tMath.abs(dy)<1.2 &&\n\t\t\t\tMath.abs(dw)<1.2 && \n\t\t\t\tMath.abs(dh)<1.2 ) {\n\t\t\tc.setBounds(dest);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tbounds.x += (int)(dx+.5);\n\t\tbounds.y += (int)(dy+.5);\n\t\tbounds.width += (int)(dw+.5);\n\t\tbounds.height += (int)(dh+.5);\n\t\n\t\tc.setBounds(bounds);\n\t\n\t\treturn false;\n\t}", "public boolean percolates() {\n for (int i = 0; i < size; i++) {\r\n if (flowGrid[size * (size - 1) + i] < size) { // if any of the bottom row points at any of the index in the top row\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "boolean hasProperty0();", "protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }", "@Override\n public boolean hasSeenAtLeast(int numLiveCellsDesired) {\n return live() > numLiveCellsDesired;\n }", "@Override\n public boolean hasSeenAtLeast(int numLiveCellsDesired) {\n return live() > numLiveCellsDesired;\n }", "private boolean isChoseFine(){\n if(freeSpaces.size()!=2 & freeSpaces.size()!=3){ //if the number of chosen spaces is not 3 or 2, that means it can't be good.\n return false;\n }\n else if(freeSpaces.size()==2){ //if there are 2.\n if(freeSpaces.elementAt(0).place.distance(freeSpaces.elementAt(1).place)==1)\n return true;\n else //if the distance between the spaces isn't 1, that means it can't be two suite spaces.\n return false;\n }\n else{ //if there are 3.\n //get the all 3 elements.\n int aX = freeSpaces.elementAt(0).place.x;\n int aY = freeSpaces.elementAt(0).place.y;\n int bX = freeSpaces.elementAt(1).place.x;\n int bY = freeSpaces.elementAt(1).place.y;\n int cX = freeSpaces.elementAt(2).place.x;\n int cY = freeSpaces.elementAt(2).place.y;\n if(aX==bX && bX==cX){ //if they are in the same column.\n int min = Math.min(aY, Math.min(bY, cY));\n int max = Math.max(aY, Math.max(bY, cY));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else if(aY==bY && bY==cY){ //if they are in the same row.\n int min = Math.min(aX, Math.min(bX, cX));\n int max = Math.max(aX, Math.max(bX, cX));\n return (max - min == 2); //if the distance between the max and the min is 2, that means they 3 suited.\n }\n else //if they are in different rows and columns, so it isn't good.\n return false;\n }\n }", "public boolean canReproduce() {\r\n ArrayList<Cell> neighbours = getNeighbours(FIRSTLAYER);\r\n\r\n int numOfSameT = 0;\r\n int numOfEmpty = 0;\r\n int numOfFoodC = 0;\r\n\r\n for (Cell cell : neighbours) {\r\n if (isSameType(cell.getInhabit())) {\r\n numOfSameT++;\r\n } else if (cell.getInhabit() == null && isTerrainAccessiable(cell)) {\r\n numOfEmpty++;\r\n } else if (isEdible(cell.getInhabit())) {\r\n numOfFoodC++;\r\n }\r\n }\r\n\r\n return (numOfSameT >= numOfSameTypeNeighbourToReproduce() \r\n && numOfEmpty >= numOfEmptyToReproduce()\r\n && numOfFoodC >= numOfFoodCellToReproduce());\r\n }", "public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }", "private void clean() {\n Iterable<Long> v = vertices();\n Iterator<Long> iter = v.iterator();\n while (iter.hasNext()) {\n Long n = iter.next();\n if (world.get(n).adj.size() == 0) {\n iter.remove();\n }\n }\n }", "public boolean percolates(){\n\t //special case for n=1:\n\t if(n==1 && numOpen==0){\n\t return false;\n\t }\n\t //this seems very inefficient.. maybe fix\n\t //way to prevent backwash\n\t for(int i= (n*n -n)+1; i <= n*n; i++){\n\t if(grid.connected(0, i)){\n\t return true;\n\t }\n\t }\n\t\treturn false;\n\t}", "protected void checkEdges(){\n if (getX() > getWorld().getBackground().getWidth() + getImage().getWidth()){\n world.monsterAdded();\n getWorld().removeObject(this);\n world.decreaseLives();\n }\n }", "public boolean isSetPenClr()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(PENCLR$12) != 0;\n }\n }", "public boolean shouldIgnoreUnrelatedDimensions() {\n return getCube().shouldIgnoreUnrelatedDimensions(\n getMeasureCube().getName());\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }", "public boolean percolates() {\n return uf.connected(n*n, n*n+1);\r\n }", "private void unsetValidMoves() {\n\t\tcurrentPos.setFill(Paint.valueOf(\"Dodgerblue\"));\n\n\t\tif(l.upValid) {\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.leftValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));\n\t\t}\n\n\t\tif(l.rightValid) {\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Dodgerblue\"));}\n\t}", "public boolean percolates(){\n\t\treturn unionFind.connected(virtualBottom, virtualTop);\n\t}", "public boolean checkGradient() {\r\n boolean temp = true;\r\n for (int i = 0; i<clusters.length; i++) {\r\n for (int j = 0; j<clusters[i].length; j++) {\r\n try {\r\n if (this.data.getProbeColor(this.experiment.getGeneIndexMappedToData(clusters[i][j])) != null) {\r\n temp = false;\r\n }\r\n } catch (Exception e) {\r\n }\r\n }\r\n }\r\n return temp;\r\n }", "public boolean setProperties(Properties props) {\n String str;\n\n super.setProperties(props);\n str=props.getProperty(\"shun\");\n if(str != null) {\n shun=Boolean.valueOf(str).booleanValue();\n props.remove(\"shun\");\n }\n\n str=props.getProperty(\"merge_leader\");\n if(str != null) {\n merge_leader=Boolean.valueOf(str).booleanValue();\n props.remove(\"merge_leader\");\n }\n\n str=props.getProperty(\"print_local_addr\");\n if(str != null) {\n print_local_addr=Boolean.valueOf(str).booleanValue();\n props.remove(\"print_local_addr\");\n }\n\n str=props.getProperty(\"join_timeout\"); // time to wait for JOIN\n if(str != null) {\n join_timeout=Long.parseLong(str);\n props.remove(\"join_timeout\");\n }\n\n str=props.getProperty(\"join_retry_timeout\"); // time to wait between JOINs\n if(str != null) {\n join_retry_timeout=Long.parseLong(str);\n props.remove(\"join_retry_timeout\");\n }\n\n str=props.getProperty(\"leave_timeout\"); // time to wait until coord responds to LEAVE req.\n if(str != null) {\n leave_timeout=Long.parseLong(str);\n props.remove(\"leave_timeout\");\n }\n\n str=props.getProperty(\"merge_timeout\"); // time to wait for MERGE_RSPS from subgroup coordinators\n if(str != null) {\n merge_timeout=Long.parseLong(str);\n props.remove(\"merge_timeout\");\n }\n\n str=props.getProperty(\"digest_timeout\"); // time to wait for GET_DIGEST_OK from PBCAST\n if(str != null) {\n digest_timeout=Long.parseLong(str);\n props.remove(\"digest_timeout\");\n }\n\n str=props.getProperty(\"view_ack_collection_timeout\");\n if(str != null) {\n view_ack_collection_timeout=Long.parseLong(str);\n props.remove(\"view_ack_collection_timeout\");\n }\n\n str=props.getProperty(\"resume_task_timeout\");\n if(str != null) {\n resume_task_timeout=Long.parseLong(str);\n props.remove(\"resume_task_timeout\");\n }\n\n str=props.getProperty(\"disable_initial_coord\");\n if(str != null) {\n disable_initial_coord=Boolean.valueOf(str).booleanValue();\n props.remove(\"disable_initial_coord\");\n }\n\n str=props.getProperty(\"handle_concurrent_startup\");\n if(str != null) {\n handle_concurrent_startup=Boolean.valueOf(str).booleanValue();\n props.remove(\"handle_concurrent_startup\");\n }\n\n str=props.getProperty(\"num_prev_mbrs\");\n if(str != null) {\n num_prev_mbrs=Integer.parseInt(str);\n props.remove(\"num_prev_mbrs\");\n }\n\n if(props.size() > 0) {\n log.error(\"GMS.setProperties(): the following properties are not recognized: \" + props);\n\n return false;\n }\n return true;\n }", "public boolean hasNeighbours() {\n\t\tif (this.eltZero != null || this.eltOne != null || this.eltTwo != null)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "@Test\n public void testWithUnknownProperty() throws Exception {\n LogicalGraph socialGraph = getSocialNetworkLoader().getLogicalGraph();\n List<EPGMVertex> vertices = socialGraph\n .callForGraph(new VertexDeduplication<>(\"Person\", Collections.singletonList(\"notSet\")))\n .getVerticesByLabel(\"Person\").collect();\n assertEquals(1, vertices.size());\n }", "private boolean isTreeFull() {\n // The number of leaf nodes required to store the whole vector\n // (each leaf node stores 32 elements).\n int requiredLeafNodes = (totalSize >>> 5);\n\n // The maximum number of leaf nodes we can have in a tree of this\n // depth (each interior node stores 32 children).\n int maxLeafNodes = (1 << treeDepth);\n\n return (requiredLeafNodes > maxLeafNodes);\n }", "@java.lang.Override\n public boolean hasPolygonsCount() {\n return polygonsCount_ != null;\n }", "private boolean isNxNShape() {\n return this.matrix.size() == this.n &&\n this.matrix.stream()\n .allMatch(row -> row.size() == this.n);\n }", "public boolean percolates() {\n\t\treturn cellTree.connected(side * side, side * side + 1);\n\t}", "private void checkPaintMeasures() {\r\n\t\t\r\n\t\t//Check from change\r\n\t\tint sizeNow = fontSize;\r\n\t\tif(sizeNow == sizeThen)return;\r\n\t\tsizeThen = sizeNow;\r\n\t\t\r\n\t\t//Set units\r\n\t\tmarkWidth = (double) sizeNow / 15;\r\n\t\tsizePaintLength = p.textLength(text, surface, sizeNow, bold, italic);\r\n\t\tif (viewPaintLength != viewPaintLength) viewPaintLength = sizePaintLength;\r\n\t}" ]
[ "0.52658415", "0.5259183", "0.52177143", "0.52094245", "0.51783967", "0.5176358", "0.5152664", "0.5145016", "0.51339376", "0.5129586", "0.5119517", "0.5106535", "0.5106535", "0.509566", "0.49877965", "0.49855292", "0.49663052", "0.49649492", "0.49639514", "0.49551955", "0.4952949", "0.49512464", "0.4944402", "0.49397072", "0.49327573", "0.49295413", "0.48886332", "0.48452094", "0.48399287", "0.48324564", "0.48306286", "0.48206082", "0.48168182", "0.4816701", "0.48137876", "0.48066142", "0.48010367", "0.4796189", "0.47889134", "0.47685215", "0.47667754", "0.47614688", "0.47531968", "0.47472087", "0.4741084", "0.47386023", "0.472638", "0.4718711", "0.47164804", "0.4715418", "0.4715014", "0.471377", "0.47057596", "0.4705112", "0.4704763", "0.47040144", "0.4691174", "0.46813715", "0.46778306", "0.467566", "0.4674478", "0.46719337", "0.466805", "0.46665803", "0.46661362", "0.46624196", "0.4661146", "0.46562275", "0.46522635", "0.4649743", "0.46479306", "0.46477446", "0.46477392", "0.46459198", "0.46456096", "0.46452978", "0.46402556", "0.46402556", "0.46399492", "0.4638777", "0.46336865", "0.4630278", "0.46295333", "0.46236953", "0.46236393", "0.46233767", "0.46231613", "0.4619394", "0.4618009", "0.46129742", "0.4612625", "0.46108443", "0.46091813", "0.4608946", "0.46064574", "0.46055356", "0.46051756", "0.46042362", "0.4604052", "0.46039823", "0.46032834" ]
0.0
-1
Displays an alert box with given title and message
public void display(String title, String message) throws IOException { Stage alertBoxStage = new Stage(); FXMLLoader loader = new FXMLLoader(getClass().getResource("AlertBox.fxml")); Parent root = loader.load(); alertBoxStage.setTitle(title); AlertBoxController alertBoxController = loader.getController(); alertBoxController.setMessageLabel(message, alertBoxStage); alertBoxStage.initModality(Modality.APPLICATION_MODAL); alertBoxStage.setScene(new Scene(root, 350, 175)); Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds(); alertBoxStage.setX((screenBounds.getWidth() - 350) / 2); alertBoxStage.setY((screenBounds.getHeight() - 175) / 2); alertBoxStage.setResizable(false); alertBoxStage.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showAlert(String message);", "private void alert(String title, String message) {\n UIAlertView alertView = new UIAlertView(title, message, null, \"OK\");\n alertView.show();\n }", "public void alert(String message);", "private void displayAlert(String title, String message) {\n\t\tStage window = new Stage();\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\n\t\twindow.setTitle(title);\n\t\twindow.setHeight(100);\n\n\t\tLabel errorMessage = new Label(message);\n\t\terrorMessage.setPrefWidth(150 + message.length() * 5);\n\t\terrorMessage.setAlignment(Pos.CENTER);\n\t\tButton close = new Button(\"Okay\");\n\t\tclose.setOnAction(event -> window.close());\n\n\t\twindow.setWidth(errorMessage.getPrefWidth());\n\n\t\tVBox layout = new VBox();\n\t\tlayout.getChildren().addAll(errorMessage, close);\n\t\tlayout.setAlignment(Pos.CENTER);\n\t\tlayout.setSpacing(15);\n\n\t\tScene scene = new Scene(layout);\n\t\twindow.setScene(scene);\n\t\twindow.showAndWait();\n\t}", "public static void display(String title, String message) {\n AlertBox.display(title, message,\n AlertBox.DEFAULT_CONFIRM,\n AlertBox.DEFAULT_MIN_WIDTH,\n AlertBox.DEFAULT_MIN_Height);\n }", "public void alert(String msg, String title) {\n\t\tJOptionPane.showMessageDialog(rootPane, msg, title, JOptionPane.ERROR_MESSAGE);\n\t}", "public static void alert(String title, String message, AlertType a) {\r\n Alert alert = new Alert(a);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(message);\r\n //Optional<ButtonType> result = alert.showAndWait();\r\n alert.showAndWait();\r\n }", "protected void alert(String message) {\n\t\talertWindow.setContentText(message);\n\t\talertWindow.show();\n\t}", "private void showPopup(String title, String message)\n\t{\n\t\tJOptionPane.showMessageDialog(frmMPSWebServices, message, title, JOptionPane.PLAIN_MESSAGE);\n\t}", "public static void alert(AlertType type, String title, String message) {\n\t\tAlert alert = new Alert(type);\n\t\talert.setTitle(title);\n\t\talert.setContentText(message);\n\t\talert.show();\n\t}", "@Then(\"^User should see a predefined alert box$\")\r\n\tpublic void user_should_see_a_predefined_alert_box() throws Throwable {\n\t\tSystem.out.println(\"Alert message pop-ups on the screen\");\r\n\t}", "public static void display(String title, String message, String confirm) {\n AlertBox.display(title, message, confirm, AlertBox.DEFAULT_MIN_WIDTH, AlertBox.DEFAULT_MIN_Height);\n }", "private void alert(String title, String msg) {\n if (title.isEmpty() || msg.isEmpty()) {\n return;\n }\n if (isFinishing()) {\n return;\n }\n new AlertDialog.Builder(this).setTitle(title).setMessage(msg)\n .setIcon(android.R.drawable.ic_dialog_info)\n .setNeutralButton(R.string.ok, null).show();\n }", "private void alert(String title, String msj){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(getActivity());\n alertDialog.setTitle(title);\n alertDialog.setMessage(msj);\n alertDialog.setPositiveButton(getString(R.string.alert_accept), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n alertDialog.show();\n }", "public void showMessage(Alert.AlertType type, String title, String text){\r\n Alert a = new Alert(type);\r\n a.initOwner(null);\r\n a.setTitle(title);\r\n a.setContentText(text);\r\n double height = a.getHeight();\r\n a.setHeight(height*2);\r\n a.setWidth(height*1.2);\r\n a.showAndWait();\r\n }", "public void alert(String msg) {\n\t\tJOptionPane.showMessageDialog(rootPane, msg);\n\t}", "private void showErrorMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Error message initiated. Error Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n alert.showAndWait();\r\n }", "public void displayError(String message){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "private void alert(String msg) {\r\n\t\tSystem.out.print(msg);\r\n\t }", "public void alert(String msg) {\n new Alert(msg, \"alertDone\");\n }", "public void showMessage(){\n final AlertDialog.Builder alert = new AlertDialog.Builder(context);\n alert.setMessage(message);\n alert.setTitle(title);\n alert.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n alert.create().dismiss();\n }\n });\n alert.create().show();\n }", "public static void alert(String message) {\r\n\t Stage window = new Stage();\r\n\r\n\t // Blokira klikanje na druge povrsine sem pop-up\r\n\t window.initModality(Modality.APPLICATION_MODAL);\r\n\t window.setTitle(\"Alert\");\r\n\t window.setMinWidth(250);\r\n\t window.setMinHeight(100);\r\n\t \r\n\t // Label\r\n\t Label label = new Label();\r\n\t label.setText(message);\r\n\t Button closeButton = new Button(\"Close\");\r\n\t closeButton.setOnAction(e -> window.close());\r\n\r\n\t // Layout\r\n\t VBox layout = new VBox(10);\r\n\t layout.getChildren().addAll(label, closeButton);\r\n\t layout.setAlignment(Pos.CENTER);\r\n\r\n\t // Pop-up ostaje aktivan\r\n\t Scene scene = new Scene(layout);\r\n\t window.setScene(scene);\r\n\t window.showAndWait();\r\n\t }", "private void showErroAlert(String errorMessage) {\n LOGGER.log(Level.INFO, \"Showing Alert window with error message...\");\n Alert errorAlert = new Alert(Alert.AlertType.ERROR, errorMessage, ButtonType.OK);\n errorAlert.show();\n }", "public static void alert(String title, String header, String message, AlertType a) {\r\n Alert alert = new Alert(a);\r\n alert.setTitle(title);\r\n alert.setHeaderText(header);\r\n alert.setContentText(message);\r\n //Optional<ButtonType> result = alert.showAndWait();\r\n alert.showAndWait();\r\n }", "public ErrorAlert(String message) {\r\n\r\n JOptionPane.showMessageDialog(MainWindow.getInstance(), message);\r\n\r\n }", "private void showAlert(String title, String description){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(title);\n alert.setHeaderText(null);\n alert.setContentText(description);\n alert.showAndWait();\n }", "public static void show(final String title, final String message) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(title);\n alert.setHeaderText(null);\n alert.setContentText(message);\n alert.showAndWait();\n }", "void warningBox(String title, String message);", "private void showAlert(String message) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(message);\n builder.show();\n }", "public void showMessage(String title, String message){\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.show();\n }", "public void showAlertDialog(String title, String message) {\n\n\t\t// Create an object of alert class for an activity\n\t\tAlertDialog alertDialog = new AlertDialog.Builder(objContext).create();\n\n\t\t// Setting Dialog Title\n\t\talertDialog.setTitle(title);\n\n\t\t// Setting Dialog Message\n\t\talertDialog.setMessage(message);\n\n\t\t// Setting Icon to Dialog\n\t\talertDialog.setIcon(R.drawable.ic_launcher);\n\n\t\talertDialog.setButton(DialogInterface.BUTTON_POSITIVE, \"Ok\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\talertDialog.show();\n\t}", "static void giveInfo(String message){\n JOptionPane.showMessageDialog(null, message);\n }", "public void displayInfo(String message){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setContentText(message);\n //alert.initOwner(owner);\n alert.show();\n }", "public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}", "private void showAlert(String message) {\n //Builds an AlertDialog with message, title, if cancellable, and what the positive button does\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n// String errorMessage = null;\n// try {\n// JSONObject arr = new JSONObject(message);\n// errorMessage = arr.getString(\"error\");\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();\n\n }", "protected void showAlertDialog(String title, String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(title);\n\t\tbuilder.setMessage(message);\n\t\tbuilder.setPositiveButton(\"OK\", null);\n\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "public static native void alert(String msg) /*-{\r\n $wnd.alert(msg);\r\n }-*/;", "private void showAlert(String msg) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(msg).setCancelable(false).setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "private void sendAlert(String message, Alert.AlertType type) {\n Alert alert = new Alert(type);\n alert.setTitle(\"Submission Error\");\n alert.setHeaderText(null);\n alert.setContentText(message);\n alert.showAndWait();\n }", "public void alert(String msg)\n {\n this.ui.alert(msg);\n theLogger.info(\"Alert sent to UI\");\n }", "void errorBox(String title, String message);", "protected void alertbox(String title, String mymessage) {\n \t\t// add scrollview to alertbox\n \t\tnew AlertDialog.Builder(this)\n \t\t\t\t.setMessage(mymessage)\n \t\t\t\t.setTitle(title)\n \t\t\t\t.setView(LayoutInflater.from(this).inflate(R.layout.scroll_result,null))\n \t\t\t\t.setCancelable(true)\n \t\t\t\t.setNeutralButton(\"Done\",\n \t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n \t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\n \t\t\t\t\t\t\t\t\tint whichButton) {\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}).show();\n \t}", "static void showAlert(final Context con, final String title, final String msg){\n \tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(con);\n \n\t\t\t// set title\n\t\talertDialogBuilder.setTitle(title);\n\t\talertDialogBuilder.setMessage(msg).setCancelable(true)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n\t\t @Override\n\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t // TODO Auto-generated method stub\n\t\t // Do something\n\t\t dialog.dismiss();\n\t\t }\n\t\t });\n\t\t\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n }", "public void showMessage(String message);", "public void showAlertMessage(String message) {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);\n alertDialogBuilder.setMessage(message).setCancelable(false).setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n AlertDialog alertdialog = alertDialogBuilder.create();\n alertdialog.show();\n }", "private void showMessage(String TStr, String CStr) {\r\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\r\n\t\talert.setTitle(TStr);\r\n\t\talert.setHeaderText(null);\r\n\t\talert.setContentText(CStr);\r\n\r\n\t\talert.showAndWait();\r\n\t}", "private void showError(String text, String title){\n JOptionPane.showMessageDialog(this,\n text, title, JOptionPane.ERROR_MESSAGE);\n }", "@FXML\r\n public void displayMessage(String message) {\r\n \r\n Alert displayMessage = new Alert(Alert.AlertType.INFORMATION);\r\n displayMessage.setTitle(null);\r\n displayMessage.setHeaderText(null);\r\n displayMessage.setContentText(message);\r\n displayMessage.showAndWait();\r\n \r\n }", "private static void showError(String message, String title) {\r\n MainMenu.showNotification(AlertType.ERROR, title, message);\r\n }", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void messageBoxShow(String message, String title) {\n\t\tAlertDialog alertDialog;\n\n\t\talertDialog = new AlertDialog.Builder(this).create();\n\t\talertDialog.setTitle(title);\n\t\talertDialog.setMessage(message);\n\t\talertDialog.setButton(\"Retry\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tsendRequest();\n\t\t\t}\n\t\t});\n\t\talertDialog.setButton2(\"Cancel\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t}\n\t\t});\n\t\talertDialog.show();\n\t}", "public static void msgBox(String message){\n JOptionPane.showMessageDialog (null, message);\n }", "public void AlertBox(String title, String message, int width, int height) {\n //Creating the stage and modifying its settings for the alertBox\n Stage window = new Stage();\n window.initModality((Modality.APPLICATION_MODAL));\n window.setTitle(title);\n window.centerOnScreen();\n\n //Creating the layout for the box\n VBox layout = new VBox();\n layout.setAlignment(Pos.CENTER);\n layout.setSpacing(5);\n Label messageToDisplay = new Label(message);\n //Event handling\n Button okButton = new Button(\"Ok\");\n okButton.setOnAction(e -> window.close());\n layout.getChildren().addAll(messageToDisplay, okButton);\n\n\n Scene scene = new Scene(layout, width, height);\n window.setScene(scene);\n window.setResizable(false);\n window.showAndWait();\n\n }", "private void show_Alert(String msg) {\n ((TextView) dialog.findViewById(R.id.tv_text)).setText(msg);\n dialog.findViewById(R.id.tv_ok).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n dialog.show();\n }", "private void printErrorAlert(String title, String header, String message) {\r\n\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n\t\tif(title.length()>0)\r\n\t\t\talert.setTitle(title);\r\n\t\tif(header.length()>0)\r\n\t\t\talert.setHeaderText(header);\r\n\t\tif(message.length()>0)\r\n\t\t\talert.setContentText(message);\r\n\t\tStage stage = (Stage) alert.getDialogPane().getScene().getWindow();\r\n\t\tstage.getIcons().add(new Image(this.getClass().getResource(\"x.png\").toString()));\r\n\t\talert.showAndWait();\r\n\t}", "private void displayError(String errorText) {\n\t\tMessageBox messageBox = new MessageBox(shell, SWT.OK);\n\t\tmessageBox.setMessage(errorText);\n\t\tmessageBox.setText(\"Alert\");\n\t\tmessageBox.open();\n\t}", "public static void alert(Context context, String title, String msg) {\n\t\ttry {\n\t\t\tAlertDialog.Builder alertDialogBuilder = getBuilder(context);\n\t\t\talertDialogBuilder.setMessage(Html.fromHtml(msg));\n\t\t\talertDialogBuilder.setTitle(title);\n\t\t\talertDialogBuilder.setPositiveButton(android.R.string.ok , new DialogInterface.OnClickListener() {\n\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talertDialogBuilder.setOnKeyListener(new DialogInterface.OnKeyListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {\n\t\t\t\t\tif (keyCode == KeyEvent.KEYCODE_BACK)\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tAlertDialog alertDialog = alertDialogBuilder.create(); // create alert dialog\n\t\t\talertDialog.show();\t\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "private void showInfoMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n alert.showAndWait();\r\n }", "public static void showAlert(Activity activity, String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(activity);\n\t\t//builder.setCustomTitle(title); \n\t\tbuilder.setMessage(message);\n\t\t\n\t\tbuilder.setCancelable(false);\n\t\tbuilder.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\tdialog.cancel();\n\n\t\t\t}\n\n\t\t});\n\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t\tTextView messageText = (TextView) alert.findViewById(android.R.id.message);\n\t\tmessageText.setGravity(Gravity.CENTER);\n\t}", "private void showAlertSelectionFail(String title, String msg) {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(title);\n\n // Header Text: null\n alert.setHeaderText(null);\n alert.setContentText(msg);\n alert.showAndWait();\n }", "private void showAlert(String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(message).setTitle(\"Response from Yourcare\")\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t// do nothing\n\t\t\t\t\t\t\n\n\t\t\t\t\t\tIntent intent = new Intent(getApplicationContext(),CapturePrescriptionActivity.class);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\tfinish();\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "public static void show(String message, String title) {\n\t\tStage stage = new Stage();\n\t\tstage.initModality(Modality.APPLICATION_MODAL);\n\t\tstage.setTitle(title);\n\t\tstage.setMinWidth(250);\n\t\tLabel lbl = new Label();\n\t\tlbl.setText(message);\n\t\tButton btnOK = new Button();\n\t\tbtnOK.setText(\"OK\");\n\t\tbtnOK.setOnAction(e -> stage.close());\n\t\tVBox pane = new VBox(20);\n\t\tpane.getChildren().addAll(lbl, btnOK);\n\t\tpane.setAlignment(Pos.CENTER);\n\t\tpane.setPadding(new Insets(8));\n\t\tScene scene = new Scene(pane);\n\t\tstage.setScene(scene);\n\t\tstage.showAndWait();\n\t}", "private void showAlert(String message) {\n\n if (message.equals(\"Uploaded Successfully...\")) {\n // this.dismiss();\n commmunicator.onDialogMessage(new MessageDetails());\n this.dismiss();\n\n } else {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(form.getContext());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }\n }", "public static void displayMessage(String message){\n JOptionPane.showInputDialog(message);\n }", "void displayErrorMessage(String errorMessage){\r\n\t\t\r\n\t\tJOptionPane.showMessageDialog(this, errorMessage);\r\n\t\t\r\n\t}", "private void errorAlert(String msg) {\n Alert dialog = new Alert(Alert.AlertType.ERROR);\n dialog.setTitle(\"Error\");\n dialog.setHeaderText(\"!!\");\n dialog.setContentText(msg);\n dialog.show();\n }", "private void showMessage(String title, String message, Context context) {\r\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\r\n builder.setTitle(title);\r\n builder.setMessage(message);\r\n builder.show();\r\n\r\n\r\n }", "public void showMessageDialog(String title, String message, Context context) {\n //Create the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.show();\n }", "public static void showErrorPanel(String title, String msg) {\n final DialogBox dialogBox = new DialogBox();\r\n dialogBox.setText(\"Remote Procedure Call\");\r\n dialogBox.setAnimationEnabled(true);\r\n final Button closeButton = new Button(\"Close\");\r\n // We can set the id of a widget by accessing its Element\r\n closeButton.getElement().setId(\"closeButton\");\r\n final HTML serverResponseLabel = new HTML();\r\n VerticalPanel dialogVPanel = new VerticalPanel();\r\n dialogVPanel.addStyleName(\"dialogVPanel\");\r\n dialogVPanel.add(new HTML(\"<br><b>Server replies:</b>\"));\r\n dialogVPanel.add(serverResponseLabel);\r\n dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);\r\n dialogVPanel.add(closeButton);\r\n dialogBox.setWidget(dialogVPanel);\r\n\r\n // Add a handler to close the DialogBox\r\n closeButton.addClickHandler(new ClickHandler() {\r\n\r\n @Override\r\n public void onClick(ClickEvent event) {\r\n dialogBox.hide();\r\n }\r\n });\r\n\r\n // Show the error message to the user\r\n dialogBox.setText(title);\r\n serverResponseLabel.addStyleName(\"serverResponseLabelError\");\r\n serverResponseLabel.setHTML(msg);\r\n dialogBox.center();\r\n closeButton.setFocus(true);\r\n }", "private void popupMessage(String message) {\n\t\tJOptionPane.showMessageDialog(this, message, \"Error\", JOptionPane.ERROR_MESSAGE);\n\t}", "void showSuccess(String message);", "public void showmessage ( String tiltle, String message){\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setCancelable(true);\n builder.setTitle(tiltle);\n builder.setMessage(message);\n builder.show();\n }", "private void alertBox_service(String title, String msg) {\r\n\t\tAlertDialog.Builder service_alert = new AlertDialog.Builder(this.mContext);\r\n\t\tservice_alert.setTitle(title);\r\n\t\tservice_alert.setMessage(msg);\r\n\t\tservice_alert.setNeutralButton(\"OK\",new DialogInterface.OnClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tservice_alert.show();\r\n\t}", "private void alert(String message) {\n\t\tAlertDialog alert = new AlertDialog.Builder(this).setTitle(getString(R.string.warning)).setMessage(message)\n\t\t\t\t.setNeutralButton(getString(R.string.ok), new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t// TODO maybe implement ? controller.connect();\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}\n\t\t\t\t}).create();\n\t\talert.show();\n\t}", "public void showAlert(String message) {\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\r\n\t\t//alert.setIcon(R.drawable.attention_icon);\r\n\t\t//alert.setTitle(\"Warning\");\r\n\t\talert.setMessage(message);\r\n\t\talert.show();\r\n\t}", "public void showError (String message) {\r\n if(myAnimation != null){\r\n myAnimation.stop();\r\n }\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(ALERT_MESSAGE);\r\n alert.setContentText(message);\r\n alert.show();\r\n }", "public static native void alert(String texto)/*-{\n\t\t\t\n\t\t\t$wnd.bootbox.alert(texto);\t\n\t\n\t\n\t}-*/;", "private void showError(String message){\n\t\tsetupErrorState();\n\t\tsynapseAlert.showError(message);\n\t}", "public void ShowMessageBox(String text)\n {\n ShowMessageBox(getShell(), \"Error\", text, 0);\n }", "public static void alert(AlertType type, String message) {\n\t\talert(type, type.toString(), message);\n\t}", "private void alert(String string) {\n\r\n\t}", "public void showMessage(String message) \r\n\t\t{\t\t\t\r\n\t\t}", "public void alertName(){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error al ingresar nombre\");\n alert.setHeaderText(\"Se encontró un error en el nombre,\"\n + \"tiene mas de 12 caracteres o está repetido. Debe ingresar el nombre nuevamente.\");\n alert.showAndWait();\n }", "public void ShowMessageBox(String title, String text)\n {\n ShowMessageBox(getShell(), title, text, 0);\n }", "void Alert(IErrorDisplayer displayer, T ex, String message);", "private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}", "@Override\n public void displayMessage(int status, String msg) {\n if (status == Constants.STATUS_OK) {\n dispose();\n } else {\n JOptionPane.showMessageDialog(null, msg, \"Lỗi\", JOptionPane.ERROR_MESSAGE);\n }\n }", "@Override\n public void displayMessage(int status, String msg) {\n if (status == Constants.STATUS_OK) {\n dispose();\n } else {\n JOptionPane.showMessageDialog(null, msg, \"Lỗi\", JOptionPane.ERROR_MESSAGE);\n }\n }", "private void showErrorAlert()\n {\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n \tbuilder.setMessage(getResources().getString(R.string.app_error_str))\n \t .setCancelable(false)\n \t .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n \t public void onClick(DialogInterface dialog, int id) {\n \t dialog.cancel();\n \t }\n \t });\n \t \n \tAlertDialog alert = builder.create();\n \talert.show();\n }", "void AlertaValidacion(String title, String message){\n AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);\n builder.setTitle(title);\n builder.setMessage(message).setPositiveButton(\"ACEPTAR\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "private void showAlert(String status, String msg){\n android.app.AlertDialog.Builder builder = new android.app.AlertDialog.Builder(HostelRequestActivity.this)\n .setTitle(status)\n .setMessage(msg);\n builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n onBackPressed();\n }\n\n });\n //call api for insertion\n builder.setCancelable(false);\n android.app.AlertDialog alert = builder.create();\n alert.show();\n }", "public void showWinMessage(String info) {\n\t\tAlert al = new Alert(AlertType.WARNING);\n\t\tal.setTitle(\"Se termino el juego\");\n\t\tal.setHeaderText(\"Ganaste\");\n\t\tal.setContentText(info);\n\t\tal.showAndWait();\n\t}", "void showError(String message);", "void showError(String message);", "public void message() {\n JOptionPane.showMessageDialog(null,\n \"Task was deleted successfully.\",\n \"Message\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void alertDisplay(int alertType) {\r\n\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n\r\n switch (alertType) {\r\n case 1:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Error Adding Part\");\r\n alert.setContentText(\"Form contains blank fields or invalid values.\");\r\n alert.showAndWait();\r\n break;\r\n case 2:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Machine ID\");\r\n alert.setContentText(\"Machine ID may only contain numbers.\");\r\n alert.showAndWait();\r\n break;\r\n case 3:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Min\");\r\n alert.setContentText(\"Min must be a number greater than 0 and less than Max.\");\r\n alert.showAndWait();\r\n break;\r\n case 4:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Inventory\");\r\n alert.setContentText(\"Inventory must be a number equal to or between Min and Max.\");\r\n alert.showAndWait();\r\n break;\r\n case 5:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Name Empty\");\r\n alert.setContentText(\"Name cannot be empty.\");\r\n alert.showAndWait();\r\n break;\r\n }\r\n }", "public static void alertDialog(final String message) {\r\n _app.invokeLater(new Runnable() {\r\n public void run() {\r\n Dialog.alert(message);\r\n }\r\n });\r\n }", "public abstract void showMessageBox(String message);", "public void displayErrorMessage(String errorMess)\n {\n JOptionPane.showMessageDialog(this,errorMess);\n }", "public static void alert(Alert alert) {\n alerter.alert(alert);\n }" ]
[ "0.8224513", "0.8057396", "0.797065", "0.79488486", "0.7847943", "0.7778948", "0.7630955", "0.75417984", "0.74243844", "0.7420709", "0.7402007", "0.7397191", "0.7396726", "0.7376739", "0.7362436", "0.7326891", "0.7315297", "0.7294803", "0.72827107", "0.72763205", "0.7238485", "0.7235026", "0.721475", "0.7210205", "0.71690965", "0.7151652", "0.7148854", "0.70985997", "0.7092402", "0.7090297", "0.7083758", "0.7083613", "0.7064573", "0.70606506", "0.7058683", "0.7038267", "0.7029537", "0.7016612", "0.7008973", "0.70072985", "0.7004583", "0.6997864", "0.69798434", "0.69774884", "0.6969442", "0.6955046", "0.695429", "0.6941423", "0.6927316", "0.6926299", "0.69243485", "0.6917014", "0.6914609", "0.6911213", "0.6910936", "0.69010556", "0.6899572", "0.68912363", "0.68757653", "0.68617433", "0.68543804", "0.6846131", "0.68446517", "0.6839764", "0.6839419", "0.68379784", "0.68378043", "0.68339914", "0.68307424", "0.6816528", "0.6810576", "0.67924213", "0.6791118", "0.67891693", "0.6788791", "0.67872316", "0.6787074", "0.67867297", "0.67849785", "0.6778808", "0.6777781", "0.6777763", "0.6776648", "0.6764707", "0.67587405", "0.67578036", "0.6740052", "0.6740052", "0.67374396", "0.67358494", "0.6730576", "0.67232394", "0.67200786", "0.67200786", "0.6711088", "0.67046356", "0.6693618", "0.669289", "0.6689017", "0.6688736" ]
0.7600327
7