Gets the {@link ChunkData} for the specified identifier and {@link Chunk}.

@param <T> the generic type
@param identifier the identifier
@param world the world
@param chunk the chunk
@return the chunk data
171991
@SuppressWarnings("unchecked")
	private <T> ChunkData<T> chunkData(String identifier, World world, Chunk chunk)
	{
		Table<String, Chunk, ChunkData<?>> data = datas.get();
		return (ChunkData<T>) data.get(identifier, chunk);

	}
449244
public OBinarySerializer<?> getObjectSerializer(final byte identifier) {
    OBinarySerializer<?> impl = serializerIdMap.get(identifier);
    if (impl == null) {
      final Class<? extends OBinarySerializer<?>> cls = serializerClassesIdMap.get(identifier);
      if (cls != null)
        try {
          impl = cls.newInstance();
        } catch (Exception e) {
          OLogManager.instance().error(this, "Cannot create an instance of class %s invoking the empty constructor", cls);
        }
    }
    return impl;
  }
768324
@Override
    public TemplateContentData get(String identifier) {
        Object lock = locksMap.get(identifier);
        if (lock != null) {
            synchronized (lock) {
                AccessOrderedTemplateContentData data = templateDataMap.get(identifier);
                if ((data != null) && templateOrderQueue.contains(data)) {
                    templateOrderQueue.remove(data);
                    if (isFresh(data)) {
                        TemplateContentData templateContentData = data.getTemplateContentData();
                        templateOrderQueue.offer(data);
                        return templateContentData;
                    }
                    templateDataMap.remove(identifier);
                    deductAndGet(data.getTemplateContentData().getTemplateContent().length);
                    LOGGER.warn(String.format("Template: %s is out of date, removing.", identifier));
                }
            }
        }
        return null;
    }
265967
@Override
  public List<NameAssignment> lookup(final Iterable<Identifier> identifiers) {
    LOG.log(Level.FINE, "identifiers");
    final List<NameAssignment> nas = new ArrayList<>();
    for (final Identifier id : identifiers) {
      final InetSocketAddress addr = idToAddrMap.get(id);
      LOG.log(Level.FINEST, "id : {0} addr: {1}", new Object[]{id, addr});
      if (addr != null) {
        nas.add(new NameAssignmentTuple(id, addr));
      }
    }
    return nas;
  }
1100544
@Override
    public Object get(final String identifier) {
        Declaration decl = getDeclarations().get( identifier );
        if ( decl == null ) {
            throw new IllegalArgumentException( "identifier '" + identifier + "' cannot be found" );
        }
        return get( decl );
    }
1032948
@SuppressWarnings("fallthrough")
    protected void identifier() throws ParseException {
        skipWhitespace();
        int pos = bp;

        if (isJavaIdentifierStart(ch)) {
            readJavaIdentifier();
            return;
        }

        throw new ParseException("dc.identifier.expected");
    }
719615
@SuppressWarnings("unchecked")
    public Declaration getDeclaration(final String identifier) {
        if ( this.dirty || (this.declarations == null) ) {
            this.declarations = this.getExtendedLhs( this, null ).getOuterDeclarations();
            this.dirty = false;
        }
        return this.declarations.get( identifier );
    }
109619
public static <T> void setData(String identifier, IBlockAccess world, BlockPos pos, T data)
	{
		setData(identifier, world, pos, data, false);
	}
1180061
public IDrawerItem getDrawerItem(long identifier) {
        Pair<IDrawerItem, Integer> res = getAdapter().getItemById(identifier);
        if (res != null) {
            return res.first;
        } else {
            return null;
        }
    }
226899
void readToData(boolean returnOnYield)
        throws IOException
    {
        InputStream is = getInputStream();

        if (is == null)
            return;

        for (int tag = is.read(); tag >= 0; tag = is.read()) {
            switch (tag) {
                case 'Y':
                    server.freeReadLock();
                    if (returnOnYield)
                        return;
                    server.readChannel(channel);
                    break;

                case 'Q':
                    server.freeReadLock();
                    this.is = null;
                    this.server = null;
                    return;

                case 'U':
                    this.url = readUTF();
                    break;

                case 'D':
                    chunkLength = (is.read() << 8) + is.read();
                    return;

                default:
                    readTag(tag);
                    break;
            }
        }
    }
449327
public static List<EntityPlayerMP> getPlayersWatchingChunk(Chunk chunk)
	{
		return getPlayersWatchingChunk((WorldServer) chunk.getWorld(), chunk.x, chunk.z);
	}
144802
public final DSLMapParser.value_chunk_return value_chunk() throws RecognitionException {
		DSLMapParser.value_chunk_return retval = new DSLMapParser.value_chunk_return();
		retval.start = input.LT(1);

		Object root_0 = null;

		Token EQUALS21=null;
		Token COMMA22=null;
		Token DOT23=null;
		ParserRuleReturnScope literal20 =null;

		Object EQUALS21_tree=null;
		Object COMMA22_tree=null;
		Object DOT23_tree=null;

		try {
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:5: ( ( literal | EQUALS | COMMA | DOT )+ )
			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:7: ( literal | EQUALS | COMMA | DOT )+
			{
			root_0 = (Object)adaptor.nil();


			// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:7: ( literal | EQUALS | COMMA | DOT )+
			int cnt13=0;
			loop13:
			while (true) {
				int alt13=5;
				switch ( input.LA(1) ) {
				case COLON:
				case LEFT_SQUARE:
				case LITERAL:
				case RIGHT_SQUARE:
					{
					int LA13_2 = input.LA(2);
					if ( (synpred15_DSLMap()) ) {
						alt13=1;
					}

					}
					break;
				case EQUALS:
					{
					int LA13_3 = input.LA(2);
					if ( (synpred16_DSLMap()) ) {
						alt13=2;
					}

					}
					break;
				case COMMA:
					{
					int LA13_4 = input.LA(2);
					if ( (synpred17_DSLMap()) ) {
						alt13=3;
					}

					}
					break;
				case DOT:
					{
					int LA13_5 = input.LA(2);
					if ( (synpred18_DSLMap()) ) {
						alt13=4;
					}

					}
					break;
				}
				switch (alt13) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:8: literal
					{
					pushFollow(FOLLOW_literal_in_value_chunk742);
					literal20=literal();
					state._fsp--;
					if (state.failed) return retval;
					if ( state.backtracking==0 ) adaptor.addChild(root_0, literal20.getTree());

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:16: EQUALS
					{
					EQUALS21=(Token)match(input,EQUALS,FOLLOW_EQUALS_in_value_chunk744); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					EQUALS21_tree = (Object)adaptor.create(EQUALS21);
					adaptor.addChild(root_0, EQUALS21_tree);
					}

					}
					break;
				case 3 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:23: COMMA
					{
					COMMA22=(Token)match(input,COMMA,FOLLOW_COMMA_in_value_chunk746); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					COMMA22_tree = (Object)adaptor.create(COMMA22);
					adaptor.addChild(root_0, COMMA22_tree);
					}

					}
					break;
				case 4 :
					// src/main/resources/org/drools/compiler/lang/dsl/DSLMap.g:182:29: DOT
					{
					DOT23=(Token)match(input,DOT,FOLLOW_DOT_in_value_chunk748); if (state.failed) return retval;
					if ( state.backtracking==0 ) {
					DOT23_tree = (Object)adaptor.create(DOT23);
					adaptor.addChild(root_0, DOT23_tree);
					}

					}
					break;

				default :
					if ( cnt13 >= 1 ) break loop13;
					if (state.backtracking>0) {state.failed=true; return retval;}
					EarlyExitException eee = new EarlyExitException(13, input);
					throw eee;
				}
				cnt13++;
			}

			}

			retval.stop = input.LT(-1);

			if ( state.backtracking==0 ) {
			retval.tree = (Object)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (Object)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}
280206
protected ItemData getCachedCleanItemData(String identifier) throws RepositoryException
   {
      ItemData data = getCachedItemData(identifier);

      if (data != null && !data.isNode() && !(data instanceof NullItemData) && forceLoad((PropertyData)data))
      {
         cache.remove(data.getIdentifier(), data);
         data = null;
      }
      return data;
   }
444406
public String retrieveData(String token) {
        try {
            RetrievedContent data = this.s3StorageProvider.getContent(this.hiddenSpaceName, token);
            return IOUtil.readStringFromStream(data.getContentStream());
        } catch (NotFoundException ex) {
            return null;
        } catch (Exception ex) {
            throw new DuraCloudRuntimeException(ex);
        }
    }
1265156
private void writeChunk(String spaceId, ChunkInputStream chunk)
        throws NotFoundException {
        // Write chunk as a temp file
        String chunkId = chunk.getChunkId();
        File chunkFile = IOUtil.writeStreamToFile(chunk);

        try {
            String chunkChecksum = getChunkChecksum(chunkFile);

            // Write chunk if it is not already in storage (or jumpstart is enabled)
            if (jumpStart || !chunkInStorage(spaceId, chunkId, chunkChecksum)) {
                try {
                    createRetrier().execute(new Retriable() {
                        private int attempt = 0;

                        @Override
                        public Object retry() throws Exception {
                            attempt++;
                            try (InputStream chunkStream = new FileInputStream(chunkFile)) {
                                ChunkInputStream chunkFileStream =
                                    new ChunkInputStream(chunkId,
                                                         chunkStream,
                                                         chunkFile.length(),
                                                         chunk.md5Preserved());
                                writeSingle(spaceId, chunkChecksum, chunkFileStream, attempt == getMaxRetries() + 1);
                            }
                            return "";
                        }
                    });

                } catch (Exception e) {
                    String err = "Failed to store chunk with ID " + chunkId +
                                 " in space " + spaceId + " after " + getMaxRetries() +
                                 " attempts. Last error: " + e.getMessage();
                    throw new DuraCloudRuntimeException(err, e);
                }
            }
        } finally {
            if (null != chunkFile && chunkFile.exists()) {
                FileUtils.deleteQuietly(chunkFile);
            }
        }
    }
250375
private IdentifierToken eatIdOrKeywordAsId() {
    Token token = nextToken();
    if (token.type == TokenType.IDENTIFIER) {
      return (IdentifierToken) token;
    } else if (Keywords.isKeyword(token.type)) {
      return new IdentifierToken(
          token.location, Keywords.get(token.type).toString());
    } else {
      reportExpectedError(token, TokenType.IDENTIFIER);
    }
    return null;
  }
87845
public static <T extends Chunkable> List<byte[]> chunksFrom(T chunkable, int chunkLength) {

        List<byte[]> chunks = new ArrayList<>();

        int chunkCount = chunkCountFrom(chunkable, chunkLength);
        for (int i = 0; i < chunkCount; i++) {
            byte[] chunk = chunkFrom(chunkable, chunkLength, i);
            chunks.add(chunk);
        }

        return chunks;
    }