Skip to content

Commit

Permalink
1st commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Kanatoko committed Jun 13, 2012
0 parents commit eca13d5
Show file tree
Hide file tree
Showing 328 changed files with 31,523 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/jsch-0.1.46.jar"/>
<classpathentry exported="true" kind="lib" path="lib/mongo-2.7.2.jar"/>
<classpathentry exported="true" kind="lib" path="bin/"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.class
48 changes: 48 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>MonjaDB</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<filteredResources>
<filter>
<id>1333163438960</id>
<name>src/net/jumperz/security</name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-MBCUtil.java</arguments>
</matcher>
</filter>
<filter>
<id>1333193377165</id>
<name>src/net/jumperz/util</name>
<type>6</type>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-true-false-MRrdUtil.java</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
6 changes: 6 additions & 0 deletions .settings/org.eclipse.core.resources.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Wed Apr 04 01:55:56 JST 2012
eclipse.preferences.version=1
encoding//src/net/jumperz/app/MMonjaDB/eclipse/dialog/MConnectDialog.java=UTF-8
encoding//src/net/jumperz/app/MMonjaDBCore=Shift_JIS
encoding//src/net/jumperz/mongo/MMongoUtil.java=Shift_JIS
encoding//src/net/jumperz/util=Shift_JIS
12 changes: 12 additions & 0 deletions .settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#Mon Jun 11 18:10:07 JST 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.5
15 changes: 15 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: MonjaDB
Bundle-SymbolicName: net.jumperz.app.MMonjaDB;singleton:=true
Bundle-Version: 1.0.1.qualifier
Bundle-Activator: net.jumperz.app.MMonjaDB.eclipse.Activator
Bundle-Vendor: JUMPERZ.NET
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.ui.console
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: bin/,
lib/mongo-2.7.2.jar,
lib/jsch-0.1.46.jar
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
35 changes: 35 additions & 0 deletions bin/net/jumperz/mongo/parseFindQuery.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
var a = {
invoked : [],
findArg : []
};
a.find = function()
{
this.invoked.push( 'find' );
//this.debug = arguments.length;
for( var i = 0; i < arguments.length; ++i )
{
this.findArg[ i ] = arguments[ i ];
}
return this;
};
a.skip = function()
{
this.invoked.push( 'skip' );
this.skipArg = arguments[ 0 ];
return this;
};
a.limit = function()
{
this.invoked.push( 'limit' );
this.limitArg = arguments[ 0 ];
return this;
};
a.sort = function()
{
this.invoked.push( 'sort' );
this.sortArg = arguments[ 0 ];
return this;
};

//_QUERY_
return a;
Binary file added bin/net/jumperz/net/MHttpData.java.swp
Binary file not shown.
132 changes: 132 additions & 0 deletions bin/net/jumperz/util/MThreadPool.java.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
package net.jumperz.util;

import java.util.*;

public final class MThreadPool
{
private static final int DEFAULT_THREAD_COUNT = 20;
private List waitingThreadList;
private List runningThreadList;
private List commandList;
private boolean stopped = false;
private int maxThreadCount = 0;
//---------------------------------------------------------------
public MThreadPool( int threadCount )
{
init( threadCount );
}
//---------------------------------------------------------------
public MThreadPool()
{
init( DEFAULT_THREAD_COUNT );
}
//---------------------------------------------------------------
private void init( int threadCount )
{
waitingThreadList = new ArrayList();
runningThreadList = new ArrayList();
commandList = new ArrayList();

//create worker threads
for( int i = 0; i < threadCount; ++i )
{
waitingThreadList.add( new MWorkerThread( this ) );
}
}
//---------------------------------------------------------------
private final synchronized void doIt()
{
//MLogger.getInstance().Log( CommandList.size() + ":" + waitingThreadList.size() );
if( commandList.size() > 0
&& waitingThreadList.size() > 0
)
{
int lastCommandIndex = commandList.size() - 1;
int lastThreadIndex = waitingThreadList.size() - 1;

MCommand command = ( MCommand )commandList.get( lastCommandIndex );
commandList.remove( lastCommandIndex );

MWorkerThread workerThread = ( MWorkerThread )waitingThreadList.get( lastThreadIndex );
waitingThreadList.remove( lastThreadIndex );
runningThreadList.add( workerThread );

workerThread.setCommand( command );
//System.out.println( command );
workerThread.resumeThread();
}

int count = runningThreadList.size();
if( count > maxThreadCount )
{
MLogger.getInstance().Log( "maxThreadCount::" + count );
maxThreadCount = count;
}
}
//---------------------------------------------------------------
public final synchronized void addCommand( MCommand command )
{
commandList.add( command );
System.err.println( commandList.size() );
doIt();
}
//---------------------------------------------------------------
public final synchronized void setThreadWait( MWorkerThread workerThread )
{
runningThreadList.remove( workerThread );

if( stopped )
{
workerThread.terminate();
workerThread.resumeThread();
}
else
{
waitingThreadList.add( workerThread );
doIt();
}
}
//---------------------------------------------------------------
public final synchronized void stop()
{
if( stopped )
{
return;
}

stopped = true;

//stop waiting threads
while( !waitingThreadList.isEmpty() )
{
MWorkerThread workerThread = ( MWorkerThread )waitingThreadList.get( 0 );
waitingThreadList.remove( 0 );
workerThread.terminate();
workerThread.resumeThread();
}

//stop running threads
while( !runningThreadList.isEmpty() )
{
MWorkerThread workerThread = ( MWorkerThread )runningThreadList.get( 0 );
runningThreadList.remove( 0 );
workerThread.breakThread();
}
}
//---------------------------------------------------------------
public int getRunningThreadCount()
{
return runningThreadList.size();
}
//---------------------------------------------------------------
public int getWaitingThreadCount()
{
return waitingThreadList.size();
}
//---------------------------------------------------------------
public int getCommandCount()
{
return commandList.size();
}
//--------------------------------------------------------------------------------
}
11 changes: 11 additions & 0 deletions build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
output.. = .
bin.includes = META-INF/,\
plugin.xml,\
bin/,\
src/,\
lib/mongo-2.7.2.jar,\
lib/jsch-0.1.46.jar,\
.classpath,\
.project,\
.settings/,\
build.properties
Binary file added lib/jsch-0.1.46.jar
Binary file not shown.
Binary file added lib/mongo-2.7.2.jar
Binary file not shown.
Loading

0 comments on commit eca13d5

Please sign in to comment.