Esri Geoportal Server
1.0

com.esri.gpt.server.assertion.index
Class AsnIndexReference

java.lang.Object
  extended by com.esri.gpt.server.assertion.index.AsnIndexReference

public class AsnIndexReference
extends Object

Represents a configuration reference to a Lucene based assertion index.


Constructor Summary
AsnIndexReference()
          Default constructor.
AsnIndexReference(AsnIndexReference objectToDuplicate)
          Construct by duplicating an existing object.
 
Method Summary
 AsnIndexReference duplicate()
          Produces a deep clone of the object.
 boolean getEnabled()
          Gets the status indicating whether or not the index is enabled.
 String getIndexAdapterClass()
          Gets the fully qualified class name of the index adapter.
 String getIndexLocation()
          Gets the location of the index folder (system path).
 String getName()
          Gets the name associated with the index.
 boolean getUseNativeFSLockFactory()
          Gets the flag indicating if a NativeFSLockFactory should be used.
 int getWriteLockTimeout()
          Gets the write lock timeout in milli-seconds.
 AsnIndexAdapter makeIndexAdapter(AsnContext context)
          Makes an index adapter based upon the associated indexAdapterClass.
 void setEnabled(boolean enabled)
          Sets the status indicating whether or not the index is enabled.
 void setIndexAdatperClass(String indexAdapterClass)
          Sets the fully qualified class name of the index adapter.
 void setIndexLocation(AsnIndexReference rootIndexRef, String name, String location)
          Sets the location of the index folder (system path).
 void setIndexLocation(String location)
          Sets the location of the index folder (system path).
 void setName(String name)
          Sets the name associated with the index.
 void setUseNativeFSLockFactory(boolean useNative)
          Sets the flag indicating if a NativeFSLockFactory should be used.
 void setWriteLockTimeout(int millis)
          Sets the write lock timeout in milli-seconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsnIndexReference

public AsnIndexReference()
Default constructor.


AsnIndexReference

public AsnIndexReference(AsnIndexReference objectToDuplicate)
Construct by duplicating an existing object.

Parameters:
objectToDuplicate - the object to duplicate
Method Detail

getEnabled

public boolean getEnabled()
Gets the status indicating whether or not the index is enabled.

Returns:
true if enabled

setEnabled

public void setEnabled(boolean enabled)
Sets the status indicating whether or not the index is enabled.

Parameters:
enabled - true if enabled

getIndexAdapterClass

public String getIndexAdapterClass()
Gets the fully qualified class name of the index adapter.
(must extend AsnIndexAdapter)

Returns:
the index adapter class

setIndexAdatperClass

public void setIndexAdatperClass(String indexAdapterClass)
Sets the fully qualified class name of the index adapter.
(must extend AsnIndexAdapter)

Parameters:
indexAdapterClass - the index adapter class

getIndexLocation

public String getIndexLocation()
Gets the location of the index folder (system path).

Returns:
the location

setIndexLocation

public void setIndexLocation(String location)
Sets the location of the index folder (system path).

Parameters:
location - the location

setIndexLocation

public void setIndexLocation(AsnIndexReference rootIndexRef,
                             String name,
                             String location)
Sets the location of the index folder (system path).

Parameters:
rootIndexRef - the index reference associated with the assertion root
name - the index folder name
location - the location

getName

public String getName()
Gets the name associated with the index.

Returns:
the name

setName

public void setName(String name)
Sets the name associated with the index.

Parameters:
name - the name

getUseNativeFSLockFactory

public boolean getUseNativeFSLockFactory()
Gets the flag indicating if a NativeFSLockFactory should be used.

Returns:
true if a NativeFSLockFactory should be used, otherwise use a SimpleFSLockFactory

setUseNativeFSLockFactory

public void setUseNativeFSLockFactory(boolean useNative)
Sets the flag indicating if a NativeFSLockFactory should be used.

Parameters:
useNative - true if a NativeFSLockFactory should be used, otherwise use a SimpleFSLockFactory

getWriteLockTimeout

public int getWriteLockTimeout()
Gets the write lock timeout in milli-seconds.

Returns:
the write lock timeout

setWriteLockTimeout

public void setWriteLockTimeout(int millis)
Sets the write lock timeout in milli-seconds.
If the timeout is less than zero, the timeout will be set to 60000.

Parameters:
millis - the write lock timeout the write lock timeout

duplicate

public AsnIndexReference duplicate()
Produces a deep clone of the object.
The duplication constructor is invoked.
return new AsnIndexRef(this);

Returns:
the duplicated object

makeIndexAdapter

public AsnIndexAdapter makeIndexAdapter(AsnContext context)
                                 throws ClassNotFoundException,
                                        InstantiationException,
                                        IllegalAccessException
Makes an index adapter based upon the associated indexAdapterClass.

Parameters:
context - the assertion operation context
Returns:
the index adapter
Throws:
ClassNotFoundException - if the class was not found
InstantiationException - if the class could not be instantiated
IllegalAccessException - if the class could not be accessed

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.