public class OStorageRemote
extends com.orientechnologies.orient.core.storage.OStorageAbstract
implements com.orientechnologies.orient.core.storage.OStorageProxy
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,com.orientechnologies.orient.core.storage.OCluster> |
clusterMap |
static String |
PARAM_DB_TYPE |
static String |
PARAM_MAX_POOL |
static String |
PARAM_MIN_POOL |
protected List<String> |
serverURLs |
componentsFactory, configuration, lock, mode, name, status, url, version| Constructor and Description |
|---|
OStorageRemote(String iClientId,
String iURL,
String iMode) |
OStorageRemote(String iClientId,
String iURL,
String iMode,
com.orientechnologies.orient.core.storage.OStorage.STATUS status) |
| Modifier and Type | Method and Description |
|---|---|
int |
addCluster(String iClusterName,
boolean forceListBased,
Object... iArguments) |
int |
addCluster(String iClusterName,
int iRequestedId,
boolean forceListBased,
Object... iParameters) |
protected String |
addHost(String host)
Registers the remote server with port.
|
void |
backup(OutputStream out,
Map<String,Object> options,
Callable<Object> callable,
com.orientechnologies.orient.core.command.OCommandOutputListener iListener,
int compressionLevel,
int bufferSize) |
protected OChannelBinaryAsynchClient |
beginRequest(byte iCommand)
Acquire a network channel from the pool.
|
protected void |
beginResponse(OChannelBinaryAsynchClient iNetwork)
Starts listening the response.
|
com.orientechnologies.orient.core.storage.OPhysicalPosition[] |
ceilingPhysicalPositions(int clusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition) |
boolean |
cleanOutRecord(com.orientechnologies.orient.core.id.ORecordId recordId,
com.orientechnologies.orient.core.version.ORecordVersion recordVersion,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> callback) |
void |
clearSession() |
void |
clearToken() |
void |
close(boolean iForce,
boolean onDelete) |
Object |
command(com.orientechnologies.orient.core.command.OCommandRequestText iCommand)
Execute the command remotely and get the results back.
|
void |
commit(com.orientechnologies.orient.core.tx.OTransaction iTx,
Runnable callback) |
long |
count(int iClusterId) |
long |
count(int[] iClusterIds) |
long |
count(int[] iClusterIds,
boolean countTombstones) |
long |
count(int iClusterId,
boolean countTombstones) |
long |
countRecords() |
void |
create(Map<String,Object> iOptions) |
com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.OPhysicalPosition> |
createRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
byte[] iContent,
com.orientechnologies.orient.core.version.ORecordVersion iRecordVersion,
byte iRecordType,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<Long> iCallback) |
void |
delete() |
com.orientechnologies.orient.core.storage.OStorageOperationResult<Boolean> |
deleteRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
com.orientechnologies.orient.core.version.ORecordVersion iVersion,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> iCallback) |
boolean |
dropCluster(int iClusterId,
boolean iTruncate) |
void |
endRequest(OChannelBinaryAsynchClient iNetwork)
Ends the request and unlock the write lock
|
void |
endResponse(OChannelBinaryAsynchClient iNetwork)
End response reached: release the channel in the pool to being reused
|
boolean |
exists() |
com.orientechnologies.orient.core.storage.OPhysicalPosition[] |
floorPhysicalPositions(int clusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition) |
ORemoteServerEventListener |
getAsynchEventListener() |
protected OChannelBinaryAsynchClient |
getAvailableNetwork(String iCurrentURL) |
String |
getClientId() |
com.orientechnologies.orient.core.storage.OCluster |
getClusterById(int iClusterId) |
com.orientechnologies.orient.core.storage.OCluster |
getClusterByName(String iClusterName) |
com.orientechnologies.orient.core.record.impl.ODocument |
getClusterConfiguration() |
long[] |
getClusterDataRange(int iClusterId) |
int |
getClusterIdByName(String iClusterName) |
Collection<com.orientechnologies.orient.core.storage.OCluster> |
getClusterInstances() |
int |
getClusterMap() |
Set<String> |
getClusterNames() |
int |
getClusters() |
Class<OSBTreeCollectionManagerRemote> |
getCollectionManagerClass() |
com.orientechnologies.orient.core.conflict.ORecordConflictStrategy |
getConflictStrategy() |
protected String |
getCurrentServerURL() |
int |
getDefaultClusterId() |
protected String |
getDefaultHost() |
protected int |
getDefaultPort() |
protected int |
getDefaultSSLPort() |
OEngineRemote |
getEngine() |
String |
getPhysicalClusterNameById(int iClusterId) |
com.orientechnologies.orient.core.storage.ORecordMetadata |
getRecordMetadata(com.orientechnologies.orient.core.id.ORID rid) |
protected void |
getResponse(OChannelBinaryAsynchClient iNetwork) |
String |
getServerURL() |
int |
getSessionId() |
byte[] |
getSessionToken() |
long |
getSize() |
String |
getType() |
String |
getURL() |
String |
getUserName() |
long |
getVersion() |
protected void |
handleException(OChannelBinaryAsynchClient iNetwork,
String message,
Exception exception)
Handles exceptions.
|
com.orientechnologies.orient.core.storage.OStorageOperationResult<Boolean> |
hideRecord(com.orientechnologies.orient.core.id.ORecordId recordId,
int mode,
com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> callback) |
com.orientechnologies.orient.core.storage.OPhysicalPosition[] |
higherPhysicalPositions(int iClusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition iClusterPosition) |
boolean |
isAssigningClusterIds() |
boolean |
isPermanentRequester() |
com.orientechnologies.orient.core.storage.OPhysicalPosition[] |
lowerPhysicalPositions(int iClusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition) |
void |
open(String iUserName,
String iUserPassword,
Map<String,Object> iOptions) |
protected String |
openRemoteDatabase() |
protected void |
parseServerURLs()
Parse the URLs.
|
com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.ORawBuffer> |
readRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
String iFetchPlan,
boolean iIgnoreCache,
com.orientechnologies.orient.core.storage.ORecordCallback<com.orientechnologies.orient.core.storage.ORawBuffer> iCallback) |
com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.ORawBuffer> |
readRecordIfVersionIsNotLatest(com.orientechnologies.orient.core.id.ORecordId rid,
String fetchPlan,
boolean ignoreCache,
com.orientechnologies.orient.core.version.ORecordVersion recordVersion) |
void |
reload() |
void |
removeRemoteServerEventListener() |
void |
restore(InputStream in,
Map<String,Object> options,
Callable<Object> callable,
com.orientechnologies.orient.core.command.OCommandOutputListener iListener) |
void |
rollback(com.orientechnologies.orient.core.tx.OTransaction iTx) |
protected void |
sendClientInfo(OChannelBinaryAsynchClient network) |
void |
setAsynchEventListener(ORemoteServerEventListener iListener) |
void |
setConflictStrategy(com.orientechnologies.orient.core.conflict.ORecordConflictStrategy iResolver) |
void |
setDefaultClusterId(int defaultClusterId) |
void |
setSessionId(String iServerURL,
int iSessionId,
byte[] token) |
void |
synch() |
void |
updateClusterConfiguration(String iConnectedURL,
byte[] obj) |
com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.version.ORecordVersion> |
updateRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
boolean updateContent,
byte[] iContent,
com.orientechnologies.orient.core.version.ORecordVersion iVersion,
byte iRecordType,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<com.orientechnologies.orient.core.version.ORecordVersion> iCallback) |
protected String |
useNewServerURL(String iUrl) |
addUser, callInLock, checkForClose, checkForClusterPermissions, checkForRecordValidity, close, dropCluster, getComponentsFactory, getConfiguration, getLastOperationId, getLock, getName, getStatus, getUnderlying, getUsers, isClosed, isDistributed, removeUser, toStringexistsResource, getResource, removeResourceclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddUser, callInLock, checkForClusterPermissions, checkForRecordValidity, close, dropCluster, getComponentsFactory, getConfiguration, getLastOperationId, getLock, getName, getStatus, getUnderlying, getUsers, isClosed, isDistributed, removeUserpublic static final String PARAM_MIN_POOL
public static final String PARAM_MAX_POOL
public static final String PARAM_DB_TYPE
public OStorageRemote(String iClientId, String iURL, String iMode) throws IOException
IOExceptionpublic OStorageRemote(String iClientId, String iURL, String iMode, com.orientechnologies.orient.core.storage.OStorage.STATUS status) throws IOException
IOExceptionpublic boolean isAssigningClusterIds()
isAssigningClusterIds in interface com.orientechnologies.orient.core.storage.OStorageisAssigningClusterIds in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic int getSessionId()
public String getServerURL()
public byte[] getSessionToken()
public void setSessionId(String iServerURL, int iSessionId, byte[] token)
public void clearToken()
public void clearSession()
public ORemoteServerEventListener getAsynchEventListener()
public void setAsynchEventListener(ORemoteServerEventListener iListener)
public void removeRemoteServerEventListener()
public void open(String iUserName, String iUserPassword, Map<String,Object> iOptions)
open in interface com.orientechnologies.orient.core.storage.OStoragepublic void reload()
reload in interface com.orientechnologies.orient.core.storage.OStoragepublic void create(Map<String,Object> iOptions)
create in interface com.orientechnologies.orient.core.storage.OStoragepublic boolean exists()
exists in interface com.orientechnologies.orient.core.storage.OStoragepublic void close(boolean iForce,
boolean onDelete)
close in interface com.orientechnologies.orient.core.storage.OStorageclose in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic void delete()
delete in interface com.orientechnologies.orient.core.storage.OStoragepublic Set<String> getClusterNames()
getClusterNames in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.OPhysicalPosition> createRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
byte[] iContent,
com.orientechnologies.orient.core.version.ORecordVersion iRecordVersion,
byte iRecordType,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<Long> iCallback)
createRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.ORecordMetadata getRecordMetadata(com.orientechnologies.orient.core.id.ORID rid)
getRecordMetadata in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.ORawBuffer> readRecordIfVersionIsNotLatest(com.orientechnologies.orient.core.id.ORecordId rid,
String fetchPlan,
boolean ignoreCache,
com.orientechnologies.orient.core.version.ORecordVersion recordVersion)
throws com.orientechnologies.orient.core.exception.ORecordNotFoundException
readRecordIfVersionIsNotLatest in interface com.orientechnologies.orient.core.storage.OStoragecom.orientechnologies.orient.core.exception.ORecordNotFoundExceptionpublic com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.storage.ORawBuffer> readRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
String iFetchPlan,
boolean iIgnoreCache,
com.orientechnologies.orient.core.storage.ORecordCallback<com.orientechnologies.orient.core.storage.ORawBuffer> iCallback)
readRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OStorageOperationResult<com.orientechnologies.orient.core.version.ORecordVersion> updateRecord(com.orientechnologies.orient.core.id.ORecordId iRid,
boolean updateContent,
byte[] iContent,
com.orientechnologies.orient.core.version.ORecordVersion iVersion,
byte iRecordType,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<com.orientechnologies.orient.core.version.ORecordVersion> iCallback)
updateRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OStorageOperationResult<Boolean> deleteRecord(com.orientechnologies.orient.core.id.ORecordId iRid, com.orientechnologies.orient.core.version.ORecordVersion iVersion, int iMode, com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> iCallback)
deleteRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OStorageOperationResult<Boolean> hideRecord(com.orientechnologies.orient.core.id.ORecordId recordId, int mode, com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> callback)
hideRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic boolean cleanOutRecord(com.orientechnologies.orient.core.id.ORecordId recordId,
com.orientechnologies.orient.core.version.ORecordVersion recordVersion,
int iMode,
com.orientechnologies.orient.core.storage.ORecordCallback<Boolean> callback)
cleanOutRecord in interface com.orientechnologies.orient.core.storage.OStoragepublic void backup(OutputStream out, Map<String,Object> options, Callable<Object> callable, com.orientechnologies.orient.core.command.OCommandOutputListener iListener, int compressionLevel, int bufferSize) throws IOException
backup in interface com.orientechnologies.orient.core.util.OBackupableIOExceptionpublic void restore(InputStream in, Map<String,Object> options, Callable<Object> callable, com.orientechnologies.orient.core.command.OCommandOutputListener iListener) throws IOException
restore in interface com.orientechnologies.orient.core.util.OBackupableIOExceptionpublic long count(int iClusterId)
count in interface com.orientechnologies.orient.core.storage.OStoragepublic long count(int iClusterId,
boolean countTombstones)
count in interface com.orientechnologies.orient.core.storage.OStoragepublic long[] getClusterDataRange(int iClusterId)
getClusterDataRange in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OPhysicalPosition[] higherPhysicalPositions(int iClusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition iClusterPosition)
higherPhysicalPositions in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OPhysicalPosition[] ceilingPhysicalPositions(int clusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition)
ceilingPhysicalPositions in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OPhysicalPosition[] lowerPhysicalPositions(int iClusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition)
lowerPhysicalPositions in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OPhysicalPosition[] floorPhysicalPositions(int clusterId,
com.orientechnologies.orient.core.storage.OPhysicalPosition physicalPosition)
floorPhysicalPositions in interface com.orientechnologies.orient.core.storage.OStoragepublic long getSize()
getSize in interface com.orientechnologies.orient.core.storage.OStoragepublic long countRecords()
countRecords in interface com.orientechnologies.orient.core.storage.OStoragecountRecords in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic long count(int[] iClusterIds)
count in interface com.orientechnologies.orient.core.storage.OStoragepublic long count(int[] iClusterIds,
boolean countTombstones)
count in interface com.orientechnologies.orient.core.storage.OStoragepublic Object command(com.orientechnologies.orient.core.command.OCommandRequestText iCommand)
command in interface com.orientechnologies.orient.core.storage.OStoragepublic void commit(com.orientechnologies.orient.core.tx.OTransaction iTx,
Runnable callback)
commit in interface com.orientechnologies.orient.core.storage.OStoragepublic void rollback(com.orientechnologies.orient.core.tx.OTransaction iTx)
rollback in interface com.orientechnologies.orient.core.storage.OStoragepublic int getClusterIdByName(String iClusterName)
getClusterIdByName in interface com.orientechnologies.orient.core.storage.OStoragepublic int getDefaultClusterId()
getDefaultClusterId in interface com.orientechnologies.orient.core.storage.OStoragepublic void setDefaultClusterId(int defaultClusterId)
setDefaultClusterId in interface com.orientechnologies.orient.core.storage.OStoragepublic int addCluster(String iClusterName, boolean forceListBased, Object... iArguments)
addCluster in interface com.orientechnologies.orient.core.storage.OStoragepublic int addCluster(String iClusterName, int iRequestedId, boolean forceListBased, Object... iParameters)
addCluster in interface com.orientechnologies.orient.core.storage.OStoragepublic boolean dropCluster(int iClusterId,
boolean iTruncate)
dropCluster in interface com.orientechnologies.orient.core.storage.OStoragepublic void synch()
synch in interface com.orientechnologies.orient.core.storage.OStoragepublic String getPhysicalClusterNameById(int iClusterId)
getPhysicalClusterNameById in interface com.orientechnologies.orient.core.storage.OStoragepublic int getClusterMap()
public Collection<com.orientechnologies.orient.core.storage.OCluster> getClusterInstances()
getClusterInstances in interface com.orientechnologies.orient.core.storage.OStoragepublic com.orientechnologies.orient.core.storage.OCluster getClusterById(int iClusterId)
getClusterById in interface com.orientechnologies.orient.core.storage.OStoragepublic long getVersion()
getVersion in interface com.orientechnologies.orient.core.storage.OStoragegetVersion in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic com.orientechnologies.orient.core.record.impl.ODocument getClusterConfiguration()
public void endRequest(OChannelBinaryAsynchClient iNetwork) throws IOException
IOExceptionpublic void endResponse(OChannelBinaryAsynchClient iNetwork)
public boolean isPermanentRequester()
public void updateClusterConfiguration(String iConnectedURL, byte[] obj)
public com.orientechnologies.orient.core.storage.OCluster getClusterByName(String iClusterName)
getClusterByName in interface com.orientechnologies.orient.core.storage.OStoragegetClusterByName in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic com.orientechnologies.orient.core.conflict.ORecordConflictStrategy getConflictStrategy()
getConflictStrategy in interface com.orientechnologies.orient.core.storage.OStoragepublic void setConflictStrategy(com.orientechnologies.orient.core.conflict.ORecordConflictStrategy iResolver)
setConflictStrategy in interface com.orientechnologies.orient.core.storage.OStoragepublic String getURL()
getURL in interface com.orientechnologies.orient.core.storage.OStoragegetURL in class com.orientechnologies.orient.core.storage.OStorageAbstractpublic String getClientId()
public int getClusters()
getClusters in interface com.orientechnologies.orient.core.storage.OStoragepublic String getType()
getType in interface com.orientechnologies.orient.core.storage.OStoragepublic Class<OSBTreeCollectionManagerRemote> getCollectionManagerClass()
getCollectionManagerClass in interface com.orientechnologies.orient.core.storage.OStoragepublic OEngineRemote getEngine()
public String getUserName()
getUserName in interface com.orientechnologies.orient.core.storage.OStorageProxyprotected void handleException(OChannelBinaryAsynchClient iNetwork, String message, Exception exception)
message - the detail messageexception - cause of the errorprotected String openRemoteDatabase() throws IOException
IOExceptionprotected void sendClientInfo(OChannelBinaryAsynchClient network) throws IOException
IOExceptionprotected void parseServerURLs()
protected String getDefaultHost()
protected int getDefaultPort()
protected int getDefaultSSLPort()
protected OChannelBinaryAsynchClient beginRequest(byte iCommand) throws IOException
iCommand - id. Ids described at OChannelBinaryProtocolIOExceptionprotected String getCurrentServerURL()
protected OChannelBinaryAsynchClient getAvailableNetwork(String iCurrentURL) throws IOException
IOExceptionprotected void beginResponse(OChannelBinaryAsynchClient iNetwork) throws IOException
IOExceptionprotected void getResponse(OChannelBinaryAsynchClient iNetwork) throws IOException
IOExceptionCopyright © 2009–2015 Orient Technologies. All rights reserved.