本文整理了Java中org.apache.cassandra.io.util.FileUtils.clean()
方法的一些代码示例,展示了FileUtils.clean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileUtils.clean()
方法的具体详情如下:
包路径:org.apache.cassandra.io.util.FileUtils
类名称:FileUtils
方法名:clean
暂无
代码示例来源:origin: org.apache.cassandra/cassandra-all
public void releaseBuffer(ByteBuffer buffer)
{
usedBuffers.decrementAndGet();
if (bufferPool.size() < maxBufferPoolSize)
bufferPool.add(buffer);
else
FileUtils.clean(buffer);
}
代码示例来源:origin: jsevellec/cassandra-unit
public void releaseBuffer(ByteBuffer buffer)
{
usedBuffers.decrementAndGet();
if (bufferPool.size() < maxBufferPoolSize)
bufferPool.add(buffer);
else
FileUtils.clean(buffer);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public void close() throws IOException
{
doFlush(0);
channel.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public void close() throws IOException
{
doFlush(0);
channel.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
public void close() throws IOException
{
channel.close();
super.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@Override
protected void internalClose()
{
if (FileUtils.isCleanerAvailable)
FileUtils.clean(buffer);
super.internalClose();
}
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
public void close() throws IOException
{
channel.close();
super.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
protected void internalClose()
{
if (FileUtils.isCleanerAvailable)
FileUtils.clean(buffer);
super.internalClose();
}
}
代码示例来源:origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra
@Override
public void close() throws IOException
{
channel.close();
super.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
@Override
public void close() throws IOException
{
doFlush(0);
channel.close();
FileUtils.clean(buffer);
buffer = null;
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
@VisibleForTesting
void reset()
{
Chunk parent = getParentChunk(slab);
if (parent != null)
parent.free(slab, false);
else
FileUtils.clean(slab);
}
代码示例来源:origin: jsevellec/cassandra-unit
@VisibleForTesting
void reset()
{
Chunk parent = getParentChunk(slab);
if (parent != null)
parent.free(slab, false);
else
FileUtils.clean(slab);
}
代码示例来源:origin: com.netflix.sstableadaptor/sstable-adaptor-cassandra
@VisibleForTesting
void reset()
{
Chunk parent = getParentChunk(slab);
if (parent != null)
parent.free(slab, false);
else
FileUtils.clean(slab);
}
代码示例来源:origin: jsevellec/cassandra-unit
@Override
protected Throwable doPreCleanup(Throwable accumulate)
{
accumulate = super.doPreCleanup(accumulate);
if (compressed != null)
{
try { FileUtils.clean(compressed); }
catch (Throwable t) { accumulate = merge(accumulate, t); }
compressed = null;
}
return accumulate;
}
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
private void migrateLegacyHints()
{
ByteBuffer buffer = ByteBuffer.allocateDirect(256 * 1024);
String query = String.format("SELECT DISTINCT target_id FROM %s.%s", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS);
//noinspection ConstantConditions
QueryProcessor.executeInternal(query).forEach(row -> migrateLegacyHints(row.getUUID("target_id"), buffer));
FileUtils.clean(buffer);
}
代码示例来源:origin: jsevellec/cassandra-unit
private void migrateLegacyHints()
{
ByteBuffer buffer = ByteBuffer.allocateDirect(256 * 1024);
String query = String.format("SELECT DISTINCT target_id FROM %s.%s", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS);
//noinspection ConstantConditions
QueryProcessor.executeInternal(query).forEach(row -> migrateLegacyHints(row.getUUID("target_id"), buffer));
FileUtils.clean(buffer);
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
private void migrateLegacyHints()
{
ByteBuffer buffer = ByteBuffer.allocateDirect(256 * 1024);
String query = String.format("SELECT DISTINCT target_id FROM %s.%s", SchemaConstants.SYSTEM_KEYSPACE_NAME, SystemKeyspace.LEGACY_HINTS);
//noinspection ConstantConditions
QueryProcessor.executeInternal(query).forEach(row -> migrateLegacyHints(row.getUUID("target_id"), buffer));
FileUtils.clean(buffer);
}
代码示例来源:origin: org.apache.cassandra/cassandra-all
public ByteBuffer getThreadLocalReusableBuffer(int size)
{
ByteBuffer result = reusableBufferHolder.get();
if (result.capacity() < size || BufferType.typeOf(result) != preferredReusableBufferType)
{
FileUtils.clean(result);
result = preferredReusableBufferType.allocate(size);
reusableBufferHolder.set(result);
}
return result;
}
代码示例来源:origin: com.strapdata.cassandra/cassandra-all
public ByteBuffer getThreadLocalReusableBuffer(int size)
{
ByteBuffer result = reusableBufferHolder.get();
if (result.capacity() < size || BufferType.typeOf(result) != preferredReusableBufferType)
{
FileUtils.clean(result);
result = preferredReusableBufferType.allocate(size);
reusableBufferHolder.set(result);
}
return result;
}
代码示例来源:origin: jsevellec/cassandra-unit
public ByteBuffer getThreadLocalReusableBuffer(int size)
{
ByteBuffer result = reusableBufferHolder.get();
if (result.capacity() < size || BufferType.typeOf(result) != preferredReusableBufferType)
{
FileUtils.clean(result);
result = preferredReusableBufferType.allocate(size);
reusableBufferHolder.set(result);
}
return result;
}
内容来源于网络,如有侵权,请联系作者删除!