Compare commits
2 Commits
rv2.stable.8
...
rv2
| Author | SHA1 | Date | |
|---|---|---|---|
| c345826641 | |||
| 9c3ca0e3d7 |
@@ -71,7 +71,8 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
private Object visitorIterationNumber = null;
|
private Object visitorIterationNumber = null;
|
||||||
// connection criteria
|
// connection criteria
|
||||||
private int compressedData = 0;
|
private int compressedData = 0;
|
||||||
private int channelData = 0;
|
private int usedChannels = 0;
|
||||||
|
private int lastUsedChannels = 0;
|
||||||
|
|
||||||
public GridNode( IGridBlock what )
|
public GridNode( IGridBlock what )
|
||||||
{
|
{
|
||||||
@@ -90,7 +91,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
|
|
||||||
public int usedChannels()
|
public int usedChannels()
|
||||||
{
|
{
|
||||||
return this.channelData >> 8;
|
return this.lastUsedChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Class<? extends IGridHost> getMachineClass()
|
public Class<? extends IGridHost> getMachineClass()
|
||||||
@@ -358,7 +359,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
@Override
|
@Override
|
||||||
public boolean meetsChannelRequirements()
|
public boolean meetsChannelRequirements()
|
||||||
{
|
{
|
||||||
return ( !this.gridProxy.getFlags().contains( GridFlags.REQUIRE_CHANNEL ) || this.getUsedChannels() > 0 );
|
return( !this.gridProxy.getFlags().contains( GridFlags.REQUIRE_CHANNEL ) || this.getUsedChannels() > 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -384,7 +385,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
|
|
||||||
public int getUsedChannels()
|
public int getUsedChannels()
|
||||||
{
|
{
|
||||||
return this.channelData & 0xff;
|
return this.usedChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FindConnections()
|
public void FindConnections()
|
||||||
@@ -581,7 +582,8 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
public void setGridStorage( GridStorage s )
|
public void setGridStorage( GridStorage s )
|
||||||
{
|
{
|
||||||
this.myStorage = s;
|
this.myStorage = s;
|
||||||
this.channelData = 0;
|
this.usedChannels = 0;
|
||||||
|
this.lastUsedChannels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -600,7 +602,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
{
|
{
|
||||||
if( zeroOut )
|
if( zeroOut )
|
||||||
{
|
{
|
||||||
this.channelData &= ~0xff;
|
this.usedChannels = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int idx = this.connections.indexOf( fast );
|
int idx = this.connections.indexOf( fast );
|
||||||
@@ -631,7 +633,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
@Override
|
@Override
|
||||||
public void incrementChannelCount( int usedChannels )
|
public void incrementChannelCount( int usedChannels )
|
||||||
{
|
{
|
||||||
this.channelData += usedChannels;
|
this.usedChannels += usedChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -650,8 +652,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
|
|
||||||
if( this.getLastUsedChannels() != this.getUsedChannels() )
|
if( this.getLastUsedChannels() != this.getUsedChannels() )
|
||||||
{
|
{
|
||||||
this.channelData &= 0xff;
|
this.lastUsedChannels = this.usedChannels;
|
||||||
this.channelData |= this.channelData << 8;
|
|
||||||
|
|
||||||
if( this.getInternalGrid() != null )
|
if( this.getInternalGrid() != null )
|
||||||
{
|
{
|
||||||
@@ -662,7 +663,7 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
|
|
||||||
public int getLastUsedChannels()
|
public int getLastUsedChannels()
|
||||||
{
|
{
|
||||||
return ( this.channelData >> 8 ) & 0xff;
|
return lastUsedChannels;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class MachineSecurityBreak implements Callable<Void>
|
private static class MachineSecurityBreak implements Callable<Void>
|
||||||
@@ -683,7 +684,6 @@ public class GridNode implements IGridNode, IPathItem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class ConnectionComparator implements Comparator<IGridConnection>
|
private static class ConnectionComparator implements Comparator<IGridConnection>
|
||||||
{
|
{
|
||||||
private final IGridNode gn;
|
private final IGridNode gn;
|
||||||
|
|||||||
Reference in New Issue
Block a user